Skip to content

Commit

Permalink
tags not being picked up in minifollowups if upper case given as a di…
Browse files Browse the repository at this point in the history
…rect option
  • Loading branch information
GarethCabournDavies committed Aug 21, 2024
1 parent 6ac430c commit 0e2a022
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions pycbc/workflow/injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,14 @@ def setup_injection_workflow(workflow, output_dir=None,
)
curr_file = resolve_url_to_file(injection_path, attrs=file_attrs)
inj_files.append(curr_file)
elif injection_method == "IN_FRAME":
# IN_FRAME means that we will supply frames with the appropriate
elif injection_method == "UNKNOWN_IN_FRAME":
# UNKNOWN_IN_FRAME means that we will supply frames with the appropriate
# injections unknown to the analysis
inj_files.append(None)
else:
err = "Injection method must be one of IN_WORKFLOW, IN_FRAME, "
err += "AT_RUNTIME or PREGENERATED. Got %s." % (injection_method)
err = "Injection method must be one of IN_WORKFLOW, "
err += "UNKNOWN_IN_FRAME, AT_RUNTIME or PREGENERATED. "
err += "Got %s." % (injection_method)
raise ValueError(err)

inj_tags.append(inj_tag)
Expand Down
8 changes: 4 additions & 4 deletions pycbc/workflow/minifollowups.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def setup_foreground_minifollowups(workflow, coinc_file, single_triggers,
node.add_opt('--inspiral-data-read-name', insp_data_name)
node.add_opt('--inspiral-data-analyzed-name', insp_anal_name)
if tags:
node.add_list_opt('--tags', tags)
node.add_list_opt('--tags', [tag.lower() for tag in tags])
node.new_output_file_opt(workflow.analysis_time, '.dax', '--dax-file')
node.new_output_file_opt(workflow.analysis_time, '.dax.map', '--output-map')

Expand Down Expand Up @@ -216,7 +216,7 @@ def setup_single_det_minifollowups(workflow, single_trig_file, tmpltbank_file,
check_existing_options=False,
)
if tags:
node.add_list_opt('--tags', tags)
node.add_list_opt('--tags', [tag.lower() for tag in tags])
node.new_output_file_opt(workflow.analysis_time, '.dax', '--dax-file')
node.new_output_file_opt(workflow.analysis_time, '.dax.map',
'--output-map')
Expand Down Expand Up @@ -310,7 +310,7 @@ def setup_injection_minifollowups(workflow, injection_file, inj_xml_file,
node.add_opt('--inspiral-data-read-name', insp_data_name)
node.add_opt('--inspiral-data-analyzed-name', insp_anal_name)
if tags:
node.add_list_opt('--tags', tags)
node.add_list_opt('--tags', [tag.lower() for tag in tags])
node.new_output_file_opt(workflow.analysis_time, '.dax', '--dax-file', tags=tags)
node.new_output_file_opt(workflow.analysis_time, '.dax.map', '--output-map', tags=tags)

Expand Down Expand Up @@ -1236,7 +1236,7 @@ def setup_upload_prep_minifollowups(workflow, coinc_file, xml_all_file,
node.add_opt('--inspiral-data-read-name', insp_data_name)
node.add_opt('--inspiral-data-analyzed-name', insp_anal_name)
if tags:
node.add_list_opt('--tags', tags)
node.add_list_opt('--tags', [tag.lower() for tag in tags])
node.new_output_file_opt(workflow.analysis_time, '.dax', '--dax-file')
node.new_output_file_opt(workflow.analysis_time, '.dax.map', '--output-map')

Expand Down

0 comments on commit 0e2a022

Please sign in to comment.