From 54345245e87a2243b511d87be7e4b3eff8f93f66 Mon Sep 17 00:00:00 2001 From: Tito Dal Canton Date: Tue, 20 Feb 2024 17:01:37 +0100 Subject: [PATCH] Fix comment bugs in #4635 (#4645) --- bin/pycbc_live | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/bin/pycbc_live b/bin/pycbc_live index 606f081cf9a..7cfb3af8290 100755 --- a/bin/pycbc_live +++ b/bin/pycbc_live @@ -542,6 +542,9 @@ class LiveEventManager(object): ) logging.info('Coincident candidate! Saving as %s', fname) + # Which IFOs were active? + live_ifos = [ifo for ifo in sld if 'snr_series' in sld[ifo]] + # Verbally explain some details not obvious from the other info comment = ( 'Trigger produced as a {} coincidence.
' @@ -553,9 +556,9 @@ class LiveEventManager(object): comment = comment.format( ppdets(coinc_ifos), args.ranking_statistic, - set(ifos) - self.skymap_only_ifos, - ppdets(followup_ifos), - ppdets(self.skymap_only_ifos) + ppdets(set(ifos) - self.skymap_only_ifos), + ppdets(live_ifos), + ppdets(set(live_ifos) & self.skymap_only_ifos) ) ifar = coinc_results['foreground/ifar'] @@ -577,9 +580,6 @@ class LiveEventManager(object): # even if not running it - do this before the thread so no # data buffers move on in a possible interim period - # Which IFOs were active? - live_ifos = [ifo for ifo in sld if 'snr_series' in sld[ifo]] - # Tell SNR optimized event about p_terr if hasattr(event, 'p_terr') and event.p_terr is not None: coinc_results['p_terr'] = event.p_terr @@ -648,6 +648,9 @@ class LiveEventManager(object): ) logging.info('Single-detector candidate! Saving as %s', fname) + # Which IFOs were active? + live_ifos = [ifo for ifo in sld if 'snr_series' in sld[ifo]] + # Verbally explain some details not obvious from the other info comment = ( 'Trigger produced as a {0} single.
' @@ -656,7 +659,9 @@ class LiveEventManager(object): 'Detectors used only for localization: {2}.' ) comment = comment.format( - ifo, ppdets(followup_ifos), ppdets(self.skymap_only_ifos) + ifo, + ppdets(live_ifos), + ppdets(set(live_ifos) & self.skymap_only_ifos) ) # Has a coinc event at this time been uploaded recently? @@ -694,9 +699,6 @@ class LiveEventManager(object): # where there is already a coinc continue - # Which IFOs were active? - live_ifos = [ifo for ifo in sld if 'snr_series' in sld[ifo]] - # Tell SNR optimized event about p_terr if hasattr(event, 'p_terr') and event.p_terr is not None: single['p_terr'] = event.p_terr