Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing bug in input files check #4885

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/pygrb/pycbc_pygrb_page_tables
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ qf_h5_outfile = opts.quiet_found_injs_h5_output_file
output_files = []

# Check for correct input
if [found_missed_file, onsource_file, offsource_file].count(None) != 2:
parser.error('Please provide one of --found-missed-file, ' +
'--onsource-file, or --offsource-file.')
if [found_missed_file, onsource_file].count(None) == 0:
parser.error('Please provide --found-missed-file to process injections, ' +
'--onsource-file to process the on-source, or neither of ' +
'them to process the off-source triggers.')
# The user may process injections...
elif found_missed_file is not None:
output_files = [qf_outfile, mf_outfile, qf_h5_outfile]
Expand All @@ -251,7 +252,8 @@ elif onsource_file is not None:
if None in output_files:
parser.error('Please provide both on-source output files ' +
'when using --onsource-file.')
# ...or triggers in the offsource (offsource_file is not None)
# ...or triggers in the offsource
# (both onsource_file and found_missed_file are None)
else:
output_files = [lofft_outfile, lofft_h5_outfile]
if None in output_files:
Expand Down
Loading