Skip to content

Commit

Permalink
cc
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnitz committed Jul 2, 2024
1 parent 01bc4ae commit 5a9d151
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pycbc/inference/models/marginalized_gaussian_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,15 @@ def __init__(self, variable_params,
gates=self.gates, **kwargs['static_params'])

self.dets = {}

if sample_rate is not None:
logging.info("Using %s sample rate for marginalization", sample_rate)
logging.info("Using %s sample rate for marginalization",
sample_rate)
for det in self._whitened_data:
tlen = int(round(float(sample_rate) * self.whitened_data[det].duration))
tlen = int(round(float(sample_rate) *
self.whitened_data[det].duration))
flen = tlen // 2 + 1
self._whitened_data[det].resize(flen)
self._whitened_data[det].resize(flen)

def _nowaveform_loglr(self):
"""Convenience function to set loglr values if no waveform generated.
Expand Down Expand Up @@ -334,7 +336,7 @@ def _loglr(self):
for det in wfs:
if det not in self.dets:
self.dets[det] = Detector(det)

if self.precalc_antenna_factors:
fp, fc, dt = self.get_precalc_antenna_factors(det)
else:
Expand All @@ -347,7 +349,7 @@ def _loglr(self):
params['dec'],
params['tc'])
dtc = params['tc'] + dt

cplx_hd = fp * cplx_hpd[det].at_time(dtc,
interpolate='quadratic')
cplx_hd += fc * cplx_hcd[det].at_time(dtc,
Expand Down

0 comments on commit 5a9d151

Please sign in to comment.