Skip to content

Commit d7d03ed

Browse files
Adding a column to the PyGRB injections tables which reports whether an injeciton is missed, cut, or vetoed (#5207) (#5208)
Co-authored-by: Francesco Pannarale <[email protected]>
1 parent 9a14c75 commit d7d03ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/pygrb/pycbc_pygrb_page_tables

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,16 @@ if found_missed_file is not None:
702702
cut_injs[key] = np.full(len(cut_injs['mass1']), -1)
703703
if key not in missed_injs:
704704
missed_injs[key] = np.full(len(missed_injs['mass1']), -1)
705+
# Update the data to include a label stating whether the injection was
706+
# vetoed, found and then removed due to the reweighted SNR cut, or missed
707+
vetoed['category'] = np.full(len(vetoed['mass1']), 'Vetoed')
708+
cut_injs['category'] = np.full(len(cut_injs['mass1']), 'Cut')
709+
missed_injs['category'] = np.full(len(missed_injs['mass1']), 'Missed')
710+
# Update the header and table formatter
711+
th += ['Category']
712+
format_strings.extend(['##'])
705713
t_missed = [np.concatenate((missed_injs[key], vetoed[key], cut_injs[key]))
706-
for key in keys]
714+
for key in keys+['category']]
707715
t_missed = list(zip(*t_missed))
708716
t_missed.sort(key=lambda elem: elem[0])
709717
logging.info("Writing %d missed, vetoed, and cut injections to html file.",

0 commit comments

Comments
 (0)