Skip to content

Commit

Permalink
More reobuse if/elif conditions in page_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
pannarale committed Jan 30, 2025
1 parent d60e45f commit f65d46c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pycbc/results/pygrb_postprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,19 @@ def load_data(input_file, ifos, rw_snr_threshold=None, data_tag=None,
trigs_dict = {}
with HFile(input_file, "r") as trigs:
for (path, dset) in _dataset_iterator(trigs):
# The dataset contains information other than trig/inj properties:
# The dataset contains search information, not trig/inj properties:
# just copy it
if len(dset) != num_orig_pts:
if 'search' in path:
trigs_dict[path] = dset[:]
# The dataset is relative to an IFO: cut with the correct index
# The dataset is trig/inj info at an IFO: cut with the correct index
elif path[:2] in ifos:
ifo = path[:2]
if ifo_ids_above_thresh_locations[ifo].size != 0:
trigs_dict[path] = \
dset[:][ifo_ids_above_thresh_locations[ifo]]
else:
trigs_dict[path] = numpy.array([])
# The dataset is relative to the network: cut it before copying
# The dataset trig/inj network info: cut it before copying
else:
trigs_dict[path] = dset[above_thresh]

Expand Down

0 comments on commit f65d46c

Please sign in to comment.