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

Bugfix: allow two detectors exactly in offline search #4464

Merged
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
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(
maxtrevor marked this conversation as resolved.
Show resolved Hide resolved
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