Skip to content
Snippets Groups Projects
Commit fab69a52 authored by Rachael Huxford's avatar Rachael Huxford
Browse files

iDQ: Add sanity check for idq inputs. Either both or neither of the...

iDQ: Add sanity check for idq inputs. Either both or neither of the idq-channel-names and idq-gate-threshold must be provided.
parent e33200c4
No related branches found
No related tags found
1 merge request!402iDQ: Add sanity check for idq inputs.
Pipeline #498184 passed with warnings
......@@ -502,6 +502,11 @@ def parse_command_line():
raise ValueError("--min-instruments must be >= 1")
if options.min_instruments > len(detectors.channel_dict):
raise ValueError("--min-instruments (%d) is greater than the number of --channel-name's (%d)" % (options.min_instruments, len(detectors.channel_dict)))
if options.idq_gate_threshold:
if not options.idq_channel_name:
raise ValueError("--idq-gate-threshold supplied, but not --idq-channel-name. Please supply idq channel name for extraction.")
elif options.idq_channel_name:
raise ValueError("--idq-channel-name provided, but not --idq-gate-threshold. Please supply a threshold for gating with iDQ.")
#
# Option checks complete
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment