Skip to content

Commit

Permalink
fix: integrate backwards in waveform base class
Browse files Browse the repository at this point in the history
  • Loading branch information
cchapmanbird committed Dec 18, 2024
1 parent 052f2cf commit 2c5f86f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions few/waveform/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ def _generate_waveform(
# scale coefficients here by the mass ratio
phase_information_in = phase_spline_coeff[:,[3,5],:] / (mu / M)

if self.inspiral_generator.inspiral_generator.bool_integrate_backwards:
if self.inspiral_generator.inspiral_generator.integrate_backwards:
phase_information_in[:,:,0] += self.xp.array([Phi_phi[-1] + Phi_phi[0], Phi_r[-1] + Phi_r[0]])

phase_t_in = self.inspiral_generator.inspiral_generator.integrator_t_cache
else:
phase_information_in = [Phi_phi_temp, Phi_theta_temp, Phi_r_temp]
if self.inspiral_generator.inspiral_generator.bool_integrate_backwards:
if self.inspiral_generator.inspiral_generator.integrate_backwards:
phase_information_in[0] += self.xp.array([Phi_phi[-1] + Phi_phi[0]])
phase_information_in[1] += self.xp.array([Phi_theta[-1] + Phi_theta[0]])
phase_information_in[2] += self.xp.array([Phi_r[-1] + Phi_r[0]])
Expand All @@ -459,7 +459,7 @@ def _generate_waveform(
dt=dt,
T=T,
include_minus_m=include_minus_m,
integrate_backwards=self.inspiral_generator.inspiral_generator.bool_integrate_backwards,
integrate_backwards=self.inspiral_generator.inspiral_generator.integrate_backwards,
**kwargs,
)

Expand Down Expand Up @@ -726,7 +726,7 @@ def __call__(
traj_spline_coeff_in = traj_spline_coeff.copy()
traj_spline_coeff_in[:,3:,:] /= (mu / M)

if self.inspiral_generator.inspiral_generator.bool_integrate_backwards:
if self.inspiral_generator.inspiral_generator.integrate_backwards:
traj_spline_coeff_in[:,3:,0] += self.xp.array([Phi_phi[-1] + Phi_phi[0], Phi_theta[-1] + Phi_theta[0], Phi_r[-1] + Phi_r[0]])

waveform = self.create_waveform(
Expand All @@ -745,7 +745,7 @@ def __call__(
mich=mich,
dt=dt,
T=T,
integrate_backwards=self.inspiral_generator.inspiral_generator.bool_integrate_backwards,
integrate_backwards=self.inspiral_generator.inspiral_generator.integrate_backwards,
)

return waveform

0 comments on commit 2c5f86f

Please sign in to comment.