Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 62d6aa1

Browse files
GarethCabournDaviesmaxtrevor
authored andcommittedDec 5, 2024
Fix a couple of output/upload value issues in pycbc live (gwastro#4953)
* get singles back to being reduced chisquared in uploads * Save ranking statistic information in the "likelihood" part of the coinc table * Not all CandidateForGraceDB will have stat in the coinc_results
1 parent 3be4869 commit 62d6aa1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎pycbc/events/single.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ def check(self, trigs, data_reader):
303303

304304
# fill in a new candidate event
305305
candidate = {
306-
f'foreground/{self.ifo}/{k}': cutall_trigs[k][i] for k in trigs
306+
f'foreground/{self.ifo}/{k}': cut_trigs[k][sngl_idx][i]
307+
for k in trigs
307308
}
308309
candidate['foreground/stat'] = rank[i]
309310
candidate['foreground/ifar'] = ifar

‎pycbc/io/gracedb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ def __init__(self, coinc_ifos, ifos, coinc_results, **kwargs):
136136
coinc_event_row.time_slide_id = lsctables.TimeSlideID(0)
137137
coinc_event_row.process_id = proc_id
138138
coinc_event_row.coinc_event_id = coinc_id
139-
coinc_event_row.likelihood = 0.
139+
if 'foreground/stat' in coinc_results:
140+
coinc_event_row.likelihood = coinc_results['foreground/stat']
141+
else:
142+
coinc_event_row.likelihood = 0.
140143
coinc_event_table.append(coinc_event_row)
141144
outdoc.childNodes[0].appendChild(coinc_event_table)
142145

0 commit comments

Comments
 (0)
Please sign in to comment.