From 5f6bf9cb9998534b7cca09c3c71adc8c1c6f7eaf Mon Sep 17 00:00:00 2001 From: Alexander Harvey Nitz Date: Thu, 5 Sep 2024 18:00:33 -0400 Subject: [PATCH] cc --- pycbc/events/stat.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pycbc/events/stat.py b/pycbc/events/stat.py index 3a163b5e20e..e04ba732cad 100644 --- a/pycbc/events/stat.py +++ b/pycbc/events/stat.py @@ -506,7 +506,8 @@ def get_hist(self, ifos=None): # renormalise to PDF self.weights[ifo] = \ - (weights[ifo] / (weights[ifo].sum() * bin_volume)).astype(numpy.float32) + (weights[ifo] / (weights[ifo].sum() * bin_volume)) + self.weights[ifo] = self.weights[ifo].astype(numpy.float32) if param[ifo].dtype == numpy.int8: # Older style, incorrectly sorted histogram file @@ -641,13 +642,17 @@ def logsignalrate(self, stats, shift, to_shift): # Get reference ifo information rate = numpy.zeros(len(shift), dtype=numpy.float32) - ps = {ifo: numpy.array(stats[ifo]['coa_phase'], dtype=numpy.float32, ndmin=1) + ps = {ifo: numpy.array(stats[ifo]['coa_phase'], + dtype=numpy.float32, ndmin=1) for ifo in self.ifos} - ts = {ifo: numpy.array(stats[ifo]['end_time'], dtype=numpy.float64, ndmin=1) + ts = {ifo: numpy.array(stats[ifo]['end_time'], + dtype=numpy.float64, ndmin=1) for ifo in self.ifos} - ss = {ifo: numpy.array(stats[ifo]['snr'], dtype=numpy.float32, ndmin=1) + ss = {ifo: numpy.array(stats[ifo]['snr'], + dtype=numpy.float32, ndmin=1) for ifo in self.ifos} - sigs = {ifo: numpy.array(stats[ifo]['sigmasq'], dtype=numpy.float32, ndmin=1) + sigs = {ifo: numpy.array(stats[ifo]['sigmasq'], + dtype=numpy.float32, ndmin=1) for ifo in self.ifos} for ref_ifo in self.ifos: rtype = rtypes[ref_ifo]