Skip to content

Commit

Permalink
remove the proj and projslc attributes in gated_gaussian_model, it's …
Browse files Browse the repository at this point in the history
…used for debugging before
  • Loading branch information
yi-fan-wang committed Sep 15, 2023
1 parent b7534af commit 5250673
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions pycbc/inference/models/gated_gaussian_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pycbc/strain/gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions pycbc/types/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5250673

Please sign in to comment.