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

Apply single IFO cut only when more than 2 IFOs are used by PyGRB #5016

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion bin/pycbc_multi_inspiral
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ with ctx:
# indices from that IFO, i.e., IFO 0; otherwise, this
# method finds coincidences and applies the single IFO cut,
# namely, triggers must have at least 2 IFO SNRs above
# args.sngl_snr_threshold.
# args.sngl_snr_threshold when 3 or more IFOs are involved.
if nifo > 1:
coinc_idx = coh.get_coinc_indexes(
idx_dict, time_delay_idx[slide][position_index]
Expand Down
6 changes: 4 additions & 2 deletions pycbc/events/coherent.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ def get_coinc_indexes(idx_dict, time_delay_idx):
[coinc_list, idx_dict[ifo] - time_delay_idx[ifo]]
)
# Search through coinc_idx for repeated indexes. These must have been loud
# in at least 2 detectors.
# in at least 2 detectors if the analysis uses more than 2 detectors.
counts = np.unique(coinc_list, return_counts=True)
coinc_idx = counts[0][counts[1] > 1]
coinc_idx = (
counts[0][counts[1] > 1] if len(idx_dict.keys()) > 2 else counts[0]
)
return coinc_idx


Expand Down
Loading