Skip to content

Commit

Permalink
Apply single IFO cut only when more than 2 IFOs are used by PyGRB
Browse files Browse the repository at this point in the history
  • Loading branch information
pannarale committed Jan 22, 2025
1 parent 52034ec commit 3e40162
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit 3e40162

Please sign in to comment.