From 5250673801da446886578308079be3866dd9d704 Mon Sep 17 00:00:00 2001 From: Yifan Wang Date: Fri, 15 Sep 2023 23:07:19 +0200 Subject: [PATCH] remove the proj and projslc attributes in gated_gaussian_model, it's used for debugging before --- pycbc/inference/models/gated_gaussian_noise.py | 7 ------- pycbc/strain/gate.py | 2 -- pycbc/types/timeseries.py | 3 --- 3 files changed, 12 deletions(-) diff --git a/pycbc/inference/models/gated_gaussian_noise.py b/pycbc/inference/models/gated_gaussian_noise.py index 8852ecc8583..33e7ecc27e1 100644 --- a/pycbc/inference/models/gated_gaussian_noise.py +++ b/pycbc/inference/models/gated_gaussian_noise.py @@ -46,9 +46,6 @@ def __init__(self, variable_params, data, low_frequency_cutoff, psds=None, static_params=None, highpass_waveforms=False, **kwargs): # we'll want the time-domain data, so store that self._td_data = {} - # cache the current projection for debugging - self.current_proj = {} - self.current_nproj = {} # cache the overwhitened data self._overwhitened_data = {} # cache the current gated data @@ -383,7 +380,6 @@ def _lognl(self): self._det_lognls.clear() # get the times of the gates gate_times = self.get_gate_times() - self.current_nproj.clear() for det, invpsd in self._invpsds.items(): norm = self.det_lognorm(det) gatestartdelay, dgatedelay = gate_times[det] @@ -395,7 +391,6 @@ def _lognl(self): gated_dt = data.gate(gatestartdelay + dgatedelay/2, window=dgatedelay/2, copy=True, invpsd=invpsd, method='paint') - self.current_nproj[det] = (gated_dt.proj, gated_dt.projslc) # convert to the frequency series gated_d = gated_dt.to_frequencyseries() # overwhiten @@ -546,7 +541,6 @@ def _loglikelihood(self): # get the times of the gates gate_times = self.get_gate_times() logl = 0. - self.current_proj.clear() for det, h in wfs.items(): invpsd = self._invpsds[det] norm = self.det_lognorm(det) @@ -562,7 +556,6 @@ def _loglikelihood(self): gated_res = res.gate(gatestartdelay + dgatedelay/2, window=dgatedelay/2, copy=True, invpsd=invpsd, method='paint') - self.current_proj[det] = (gated_res.proj, gated_res.projslc) gated_rtilde = gated_res.to_frequencyseries() # overwhiten gated_rtilde *= invpsd diff --git a/pycbc/strain/gate.py b/pycbc/strain/gate.py index 73f3fa112c9..6c2a70f59c3 100644 --- a/pycbc/strain/gate.py +++ b/pycbc/strain/gate.py @@ -179,6 +179,4 @@ def gate_and_paint(data, lindex, rindex, invpsd, copy=True): proj = linalg.solve_toeplitz(tdfilter[:(rindex - lindex)], owhgated_data[lindex:rindex]) data[lindex:rindex] -= proj - data.projslc = (lindex, rindex) - data.proj = proj return data diff --git a/pycbc/types/timeseries.py b/pycbc/types/timeseries.py index c05bdf1fb62..3bf94065473 100644 --- a/pycbc/types/timeseries.py +++ b/pycbc/types/timeseries.py @@ -619,9 +619,6 @@ def gate(self, time, window=0.25, method='taper', copy=True, fdata = data.to_frequencyseries() fdata = apply_fd_time_shift(fdata, -offset + fdata.epoch, copy=False) tdata = fdata.to_timeseries() - # fill in projslc information - tdata.projslc = data.projslc - tdata.proj = data.proj return tdata elif method == 'hard': tslice = data.time_slice(time - window, time + window)