Commit 7768e4ad authored by Javier Quinteros's avatar Javier Quinteros
Browse files

Channel selection through parameters.

parent eec00ff1
......@@ -425,6 +425,15 @@ def main():
parser.add_argument('--end', '--endtime',
help='End of the selected time window.\nFormat: 2019-02-01T00:01:02.123456Z',
default=None)
parser.add_argument('--chstart', type=int,
help='First channel to select',
default=0)
parser.add_argument('--chstop', type=int,
help='Last channel to select',
default=None)
parser.add_argument('--chstep', type=int,
help='Step between channels in the selection',
default=1)
parser.add_argument('filename', help='File name to read and process.')
args = parser.parse_args()
......@@ -440,7 +449,8 @@ def main():
logs.error('End time is smaller than Start time.')
return
td = TDMS(args.filename, directory=args.directory, iterate='D', chstart=0, chstop=1, chstep=5,
td = TDMS(args.filename, directory=args.directory, iterate='D',
chstart=args.chstart, chstop=args.chstop, chstep=args.chstep,
starttime=dtstart, endtime=dtend)
with td:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment