From 7a0a0b0ee2f8ce53ddb6dbb9a930dd529232987f Mon Sep 17 00:00:00 2001 From: Gareth S Cabourn Davies Date: Fri, 5 Apr 2024 14:24:04 +0100 Subject: [PATCH] Apply GCD suggestions --- pycbc/events/stat.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pycbc/events/stat.py b/pycbc/events/stat.py index da08891ac01..5876bd81e9b 100644 --- a/pycbc/events/stat.py +++ b/pycbc/events/stat.py @@ -845,8 +845,10 @@ def find_fits(self, trigs): The thresh fit value(s) """ try: + # Exists where trigs is a class with the template num attribute tnum = trigs.template_num except AttributeError: + # Exists where trigs is dict-like tnum = trigs['template_id'] try: @@ -1546,13 +1548,13 @@ def rank_stat_coinc(self, s, slide, step, to_shift, """ sngl_rates = {sngl[0]: sngl[1]['snglstat'] for sngl in s} + # Find total volume of phase-time-amplitude space occupied by + # noise coincs if 'dets' in kwargs: ln_noise_rate = coinc_rate.combination_noise_lograte( sngl_rates, kwargs['time_addition'], kwargs['dets']) - - # Find total volume of phase-time-amplitude space occupied by - # noise coincs + # Extent of time-difference space occupied noise_twindow = coinc_rate.multiifo_noise_coincident_area( self.hist_ifos, kwargs['time_addition'],