Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions dingo/gw/waveform_generator/waveform_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,13 @@ def generate_FD_modes_LO(self, parameters):
values.
iota: float
"""
# TD approximants that are implemented in J frame. Currently tested for:
# 101: IMRPhenomXPHM
if self.approximant in [101]:
# FD Waveform approximants that are implemented in either the L0 or J frame. Currently tested for:
# IMRPhenomXPHM - Modes returned in J-Frame
# IMRPhenomXHM - Modes returned in L0-Frame


tested_approximants = ["IMRPhenomXPHM","IMRPhenomXHM"]
if LS.GetStringFromApproximant(self.approximant) in tested_approximants:
parameters_lal_fd_modes = self._convert_parameters(
{**parameters, "f_ref": self.f_ref},
lal_target_function="SimInspiralChooseFDModes",
Expand All @@ -670,17 +674,18 @@ def generate_FD_modes_LO(self, parameters):
# unpack linked list, convert lal objects to arrays
hlm_fd = wfg_utils.linked_list_modes_to_dict_modes(hlm_fd)
hlm_fd = {k: v.data.data for k, v in hlm_fd.items()}
# For the waveform models considered here (e.g., IMRPhenomXPHM), the modes
# are returned in the J frame (where the observer is at inclination=theta_JN,
# azimuth=0). In this frame, the dependence on the reference phase enters
# via the modes themselves. We need to convert to the L0 frame so that the
# dependence on phase enters via the spherical harmonics.
hlm_fd = frame_utils.convert_J_to_L0_frame(
hlm_fd,
parameters,
self,
spin_conversion_phase=self.spin_conversion_phase,
)

# For waveform models where the modes are returned in the J frame (where the observer is
# at an inclination=theta_JN, azimuth=0), the dependence on the reference phase enters
# via the modes themselves. We need to convert to the L0 frame so that the
# dependence on phase enters via the spherical harmonics.
if LS.GetStringFromApproximant(self.approximant) == "IMRPhenomXPHM":
hlm_fd = frame_utils.convert_J_to_L0_frame(
hlm_fd,
parameters,
self,
spin_conversion_phase=self.spin_conversion_phase,
)
return hlm_fd, iota
else:
raise NotImplementedError(
Expand Down