Skip to content

Commit

Permalink
Bugfix: allow two detectors exactly in offline search (gwastro#4464)
Browse files Browse the repository at this point in the history
* bugfix for skipping exclude_zerolag in two-detector-exactly search

* Allow the search to use two-detectors exactly

* clarify why a job is removed in the exact-coincidence case
  • Loading branch information
GarethCabournDavies authored and PRAVEEN-mnl committed Nov 3, 2023
1 parent 795243f commit 9b3ef58
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions bin/workflows/pycbc_make_offline_search_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,29 @@ for ifocomb in ifo_sets:
else:
ordered_ifo_list = ifocomb[0]
coinctag= '1det'
other_ifo_keys = list(no_fg_exc_files.keys())
other_ifo_keys.remove(ordered_ifo_list)
ctagcomb = ['full_data', coinctag]
other_bg_files = {ctype: no_fg_exc_files[ctype]
for ctype in other_ifo_keys}
final_bg_files[ordered_ifo_list] = wf.setup_exclude_zerolag(
workflow,
no_fg_exc_files[ordered_ifo_list],
wf.FileList(other_bg_files.values()),
output_dir, ordered_ifo_list,
tags=ctagcomb
)

combined_bg_file = wf.setup_combine_statmap(
if len(ifo_sets) == 1:
# Just one event type - pass it through
final_bg_files[ordered_ifo_list] = no_fg_exc_files[ordered_ifo_list]
else:
# Combining the statmap files, multiple possible event types
other_ifo_keys = list(no_fg_exc_files.keys())
other_ifo_keys.remove(ordered_ifo_list)
ctagcomb = ['full_data', coinctag]
other_bg_files = {ctype: no_fg_exc_files[ctype]
for ctype in other_ifo_keys}
final_bg_files[ordered_ifo_list] = wf.setup_exclude_zerolag(
workflow,
no_fg_exc_files[ordered_ifo_list],
wf.FileList(other_bg_files.values()),
output_dir, ordered_ifo_list,
tags=ctagcomb
)

if len(ifo_sets) == 1:
combined_bg_file = no_fg_exc_files[ordered_ifo_list]
else:
combined_bg_file = wf.setup_combine_statmap(
workflow,
wf.FileList(final_bg_files.values()),
wf.FileList([]),
Expand Down Expand Up @@ -457,6 +466,7 @@ ifar_ob = wf.make_ifar_plot(workflow, combined_bg_file,
rdir['open_box_result'],
tags=combined_bg_file.tags + ['open_box'],
executable='page_ifar_catalog')

table = wf.make_foreground_table(workflow, combined_bg_file,
hdfbank, rdir['open_box_result'],
singles=insps, extension='.html',
Expand Down Expand Up @@ -523,9 +533,11 @@ for key in final_bg_files:
closed_page = [(snrifar_cb, ifar_cb)]
else:
closed_page = [(snrifar_cb,)]
table = wf.make_foreground_table(workflow, bg_file, hdfbank, open_dir,
singles=insps, extension='.html',
tags=bg_file.tags)
if len(ifo_sets) > 1:
# If there is only one ifo_set, then this table has already been made
table = wf.make_foreground_table(workflow, bg_file, hdfbank, open_dir,
singles=insps, extension='.html',
tags=bg_file.tags)

detailed_page = [(snrifar, ratehist), (snrifar_ifar, ifar_ob), (table,)]
layout.two_column_layout(open_dir, detailed_page)
Expand Down

0 comments on commit 9b3ef58

Please sign in to comment.