Skip to content

Commit

Permalink
Update relbin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
WuShichao authored Aug 24, 2023
1 parent e176430 commit e3c793e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions pycbc/inference/models/relbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ def __init__(
earth_rotation=False,
earth_rotation_mode=2,
marginalize_phase=True,
not_marginalize_submodel=False,
**kwargs
):

variable_params, kwargs = self.setup_marginalization(
variable_params,
marginalize_phase=marginalize_phase,
**kwargs)
if not not_marginalize_submodel:
variable_params, kwargs = self.setup_marginalization(
variable_params,
marginalize_phase=marginalize_phase,
**kwargs)

super(Relative, self).__init__(
variable_params, data, low_frequency_cutoff, **kwargs
Expand Down Expand Up @@ -660,8 +662,9 @@ def __init__(self, *args,
**kwargs):
super(RelativeTime, self).__init__(*args, **kwargs)
self.sample_rate = float(sample_rate)
self.setup_peak_lock(sample_rate=self.sample_rate, **kwargs)
self.draw_ifos(self.ref_snr, **kwargs)
if not kwargs['not_marginalize_submodel']:
self.setup_peak_lock(sample_rate=self.sample_rate, **kwargs)
self.draw_ifos(self.ref_snr, **kwargs)

@property
def ref_snr(self):
Expand Down Expand Up @@ -839,7 +842,7 @@ def _loglr(self, just_sh_hh=False):
# Note, this includes complex conjugation already
# as our stored inner products were hp* x data
htf = (f.real * ip + 1.0j * f.imag * ic)

print("dts, p['tc'], dt: ", (dts, p['tc'], dt))
sh = self.sh[ifo].at_time(dts, interpolate='quadratic')
sh_total += sh * htf
hh_total += self.hh[ifo] * abs(htf) ** 2.0
Expand Down

0 comments on commit e3c793e

Please sign in to comment.