Skip to content

Commit

Permalink
Update bin/all_sky_search/pycbc_prepare_xml_for_gracedb
Browse files Browse the repository at this point in the history
Co-authored-by: Tito Dal Canton <[email protected]>
  • Loading branch information
GarethCabournDavies and titodalcanton committed Oct 11, 2023
1 parent fea78f3 commit 4d27e15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/all_sky_search/pycbc_prepare_xml_for_gracedb
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ xmldoc.childNodes[-1].removeChild(coinc_event_map_table)
xmldoc.childNodes[-1].removeChild(coinc_inspiral_table)
xmldoc.childNodes[-1].removeChild(coinc_table)

# Find the coinc_table entry corresponding to the desired event ID
event = None
for event in coinc_table:
coinc_event_id = event.coinc_event_id
if args.event_id == coinc_event_id:
# This is the event we want
break
if event is None:
raise ValueError(f"event {args.event_id} not found in coinc table")

coinc_event_table_curr = lsctables.New(lsctables.CoincTable)
coinc_event_table_curr.append(event)
Expand Down

0 comments on commit 4d27e15

Please sign in to comment.