@@ -405,64 +405,64 @@ def channel_type(value):
405
405
command_group .add_argument (metavar = 'csv_path' , dest = 'csv_path' , nargs = '?' ,
406
406
type = str , default = None ,
407
407
help = 'Exports measured data to the given file in CSV format.'
408
- " If filename ends with '.xz' the content is compress using lzma/xz."
409
- " This reduces the filesize to ~ 1/12 compered to the uncompressed format."
410
- " Those files can be decompressed using 'xz -dk <filename>" )
408
+ " If the filename ends with '.xz' the content is compressed using lzma/xz."
409
+ " This reduces the file size to ~ 1/12 compared to the uncompressed format."
410
+ " Those files can be decompressed using 'xz -dk <filename>'. " )
411
411
command_group .add_argument ('--calibrate' , metavar = ('calibrationfile_path' , 'channels_at_once' ), nargs = 2 ,
412
412
type = str , default = None ,
413
413
help = 'If set, calibrate the device by measuring given voltages and write'
414
414
' calibration values to given file.'
415
- ' Multiple channels (1, 2, 4 or all 8) can get calibrated at the same time'
415
+ ' Multiple channels (1, 2, 4 or all 8) can be calibrated at the same time'
416
416
' if supplied with the same voltage. Ignores all other arguments.' )
417
417
parser .add_argument ('-s' , '--channels' , metavar = 'channel' , nargs = '+' ,
418
418
type = channel_type , default = list (range (1 , 9 )),
419
- help = "Select channels that are of interest" )
419
+ help = "Selects channels of interest. " )
420
420
parser .add_argument ('-l' , '--loglevel' , dest = 'log_level' , nargs = '?' ,
421
421
type = str , default = "info" , choices = str_to_log_level .keys (),
422
- help = 'Set the loglevel to debug ' )
422
+ help = 'Sets the log level for debugging. ' )
423
423
parser .add_argument ('-v' , '--vscale' , metavar = 'scale' , nargs = "+" ,
424
424
type = float , default = [1.0 ], choices = Hantek1008 .valid_vscale_factors (),
425
- help = 'Set the pre scale in the hardware, must be 1, 0.125, or 0.02. If one value is given, all '
426
- 'selected channels will use that vscale, otherwise there must be one value per selected '
427
- 'channel' )
425
+ help = 'Sets the pre scale in the hardware, must be 1, 0.125, or 0.02. If a single value is '
426
+ 'given, all selected channels will use that vscale, otherwise there must be one value '
427
+ 'per selected channel. ' )
428
428
parser .add_argument ('-c' , '--calibrationfile' , dest = "calibration_file_path" , metavar = 'calibrationfile_path' ,
429
429
type = str , default = None ,
430
- help = "Use the content of the given calibration file to correct the measured samples" )
430
+ help = "Use the content of the given calibration file to correct the measured samples. " )
431
431
parser .add_argument ('-r' , '--raw' , dest = "raw_or_volt" ,
432
432
type = str , default = "volt" , const = "raw" , nargs = '?' , choices = ["raw" , "volt" , "volt+raw" ],
433
- help = "Specifies whether the sample values return from the device should be transformed"
434
- " to volts (eventually using calibration data) or not. If flag is not set, it defaults "
435
- " to 'volt'. If flag is set without a parameter 'raw' is used" )
433
+ help = "Specifies whether the sample values returned from the device should be transformed "
434
+ "to volts (using calibration data if specified ) or not. If not set, the default "
435
+ "value is 'volt'. If the flag is set without a parameter, 'raw' is used. " )
436
436
parser .add_argument ('-z' , '--zoscompensation' , dest = "zos_compensation" , metavar = 'x' ,
437
437
type = str , default = None , nargs = '*' ,
438
438
help =
439
- """Compensate the zero offset shift that obscures over longer timescales.
439
+ """Compensates the zero offset shift that occurs over longer timescales.
440
440
There are two possible ways of compensating that:
441
- (A) Compute shift out of an unused channels : Needs at least one unused channel, make sure
442
- that no voltage is applied to the given channel.
443
- (B) Compute shift with the help of a given function. Such a function computes a correction-factor
444
- based on the time past since start.
445
- Defaults to no compensation. If used without an argument method A is used on channel 8.
446
- If one integer argument is given method A is used on that channel. Otherwise Method B is used.
447
- It awaits a path to a file with a python function
441
+ (A) Computing the shift out of an unused channel : Needs at least one unused channel, make sure
442
+ that no external voltage is applied to the given channel.
443
+ (B) Computing the shift with the help of a given function. Such a function computes a
444
+ correction-factor based on the time passed since start.
445
+ Defaults to no compensation. If used without an argument, method A is used on channel 8.
446
+ If an integer argument is given, method A is used on that channel. Otherwise, method B is used,
447
+ which expects a path to a python file with containing a function
448
448
(calc_zos(ch: int, vscale: float, dtime: float)->float) in it
449
449
and as a second argument a time offset (how long the device is already running in sec).
450
450
""" )
451
451
parser .add_argument ('-f' , '--samplingrate' , dest = 'sampling_rate' ,
452
452
type = float , default = 440 , choices = Hantek1008 .valid_roll_sampling_rates (),
453
- help = 'Set the sampling rate (in Hz) the device should use (default:440)' )
453
+ help = 'Sets the sampling rate (in Hz) the device should use (default:440). ' )
454
454
parser .add_argument ('-m' , '--measuresamplingrate' , dest = 'do_sampling_rate_measure' , action = "store_const" ,
455
455
default = False , const = True ,
456
- help = 'Measure the exact samplingrate the device achieves by using the computer internal clock. '
457
- 'Increases startup duration by ~10 sec' )
456
+ help = 'Measures the exact sampling rate the device achieves by using the computer internal '
457
+ 'clock. Increases startup duration by ~10 sec. ' )
458
458
parser .add_argument ('-t' , '--timestampstyle' , dest = "timestamp_style" ,
459
459
type = str , default = "own_row" , nargs = '?' , choices = ["own_row" , "first_column" ],
460
- help = "Specifies the style the timestamps of the values are included in the CSV output. There"
460
+ help = "Specifies the style of the timestamps included in the CSV output. There"
461
461
" are two options: When the 'own_row' style is used, every time the device sends a bunch"
462
- " of measured samples, these are writen to the CSV output followed by one row with the"
462
+ " of measured samples, these are written to the CSV output followed by one row with the"
463
463
" timestamp."
464
- " Use the 'first_column' option to let the first column have interpolated timestamps. "
465
- " Default is 'own_row'." )
464
+ " Use the 'first_column' option to let the first column of each line have an interpolated "
465
+ " timestamp. Default is 'own_row'." )
466
466
467
467
args = parser .parse_args ()
468
468
0 commit comments