Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
vaishakp committed Sep 24, 2024
1 parent 8f62d3e commit 63c4495
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions nrcatalogtools/waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ def metadata(self):
"""Return the simulation metadata dictionary"""
return self.sim_metadata

@property
def modes_with_junk_removed(self):
return self._modes_with_junk_removed

def get_parameters(self, total_mass=1.0):
"""Return the initial physical parameters for the simulation. Only for
quasicircular simulations are supported, orbital eccentricity is ignored
Expand Down Expand Up @@ -433,12 +437,16 @@ def get_td_waveform(
t_ref=t_ref,
tol=tol,
)
h = interpolate_in_amp_phase(
self.evaluate([angles["theta"], angles["psi"], angles["alpha"]]),
new_time,
k=k,
kind=kind,
) * utils.amp_to_physical(total_mass, distance)

if remove_junk:
self.remove_junk_from_modes()
h = interpolate_in_amp_phase(
self.modes_with_no_junk.evaluate([angles["theta"], angles["psi"], angles["alpha"]]),
new_time,
k=k,
kind=kind,
) * utils.amp_to_physical(total_mass, distance)
else:

h.time *= m_secs
# Return conjugated waveform to comply with lal
Expand All @@ -447,6 +455,7 @@ def get_td_waveform(
def remove_junk_from_modes():
""" Remove the portion of data with junk radiation from WaveformModes """

self._modes_with_no_junk = ()

return WaveformModesObj

Expand Down

0 comments on commit 63c4495

Please sign in to comment.