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

More robust pygrb_page_tables #5027

Merged
merged 4 commits into from
Jan 31, 2025
Merged
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/pygrb/pycbc_pygrb_page_tables
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ if onsource_file:
# Get trigs
on_trigs = ppu.load_data(onsource_file, ifos, data_tag=None,
rw_snr_threshold=opts.newsnr_threshold,
slide_id='all')
slide_id=0)

# Record loudest trig by BestNR
loud_on_bestnr = 0
Expand Down
9 changes: 5 additions & 4 deletions pycbc/results/pygrb_postprocessing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,20 @@ 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 or missed injections
# information, not properties of triggers or found injections:
# just copy it
if len(dset) != num_orig_pts:
if 'search' in path or 'missed' 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 is trig/inj network info: cut it before copying
else:
trigs_dict[path] = dset[above_thresh]

Expand Down
Loading