Frameworks

Base class

class gwModels.frameworks.base.BaseEccentricHM(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, get_orbfreq_mod_from_amp_mod=False, recompute_tpeak=True, project_ecc_on_higher_modes=True, t_buffer=100, end_time=100)[source]

Bases: object

Base class to seamlessly convert a multi-modal (several spherical harmonic modes present) quasi-circular waveform into a multi-modal eccentric waveform if the quadrupolar eccentric waveform is known.

Subclasses: NRHME (non-spinning), NRXHME (non-precessing).

__init__(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, get_orbfreq_mod_from_amp_mod=False, recompute_tpeak=True, project_ecc_on_higher_modes=True, t_buffer=100, end_time=100)[source]

Initializes the BaseEccentricHM class.

Parameters:
  • t_ecc (array) – Time array for the eccentric 22 mode waveform.

  • h_ecc_dict (dict) – Dictionary of eccentric waveform modes, should only contain the 22 mode.

  • t_cir (array) – Time array for the circular waveform modes.

  • h_cir_dict (dict) – Dictionary of circular waveform modes. Keys should include ‘h_l2m2’, ‘h_l2m1’, etc.

  • get_orbfreq_mod_from_amp_mod (bool) – If True, computes the modulation in the orbital frequency from the amplitude modulation itself. Default is False.

  • recompute_tpeak (bool) – If True, recomputes the peaks of the waveforms. Default is True.

  • project_ecc_on_higher_modes (bool) – If True, projects the effect of eccentricity onto higher-order spherical harmonic modes. Default is True.

  • t_buffer (float) – Buffer time to exclude at the beginning of the data. Default is 100.

  • end_time (float) – Final time to keep in the common time grid. Default is 100.

Calculates:

Multi-modal eccentric waveform.

align_peaks()[source]

Aligns all waveforms such that the merger occurs at t=0. The merger is defined as the point where the 22 mode amplitude is the largest.

obtain_common_timegrid()[source]

Constructs a common time grid between the circular waveform and the eccentric 22 mode waveform.

Returns:

Common time grid array.

Return type:

array

obtain_amplitude_modulation()[source]

Computes the amplitude modulation from the 22 mode eccentric and circular waveforms using Eq(4) of https://arxiv.org/pdf/2403.15506.

obtain_orbfreq_modulation()[source]

Computes the eccentric frequency modulation from the 22 mode eccentric and circular waveforms. If get_orbfreq_mod_from_amp_mod is True, it uses the amplitude modulation to scale frequency modulations via Eq(6) of https://arxiv.org/pdf/2403.15506.

twist_mode_amplitude(mode)[source]

Convert the amplitude of a circular mode to its corresponding eccentric mode amplitude.

Parameters:

mode (str) – The mode identifier (e.g., ‘h_l2m2’).

Returns:

The projected amplitude of the corresponding eccentric mode,

calculated using Eq(9) of https://arxiv.org/pdf/2403.15506.

Return type:

float

twist_mode_orbital_frequency(mode)[source]

Convert the orbital frequency of a circular mode to its corresponding eccentric mode orbital frequency.

Parameters:

mode (str) – The mode identifier (e.g., ‘h_l2m2’).

Returns:

The projected orbital frequency of the corresponding eccentric mode,

calculated using Eq(10) of https://arxiv.org/pdf/2403.15506.

Return type:

float

twist_mode_phase(mode)[source]

Obtain the eccentric phase term for a given mode using orbital frequency modulation.

Parameters:

mode (str) – The mode identifier (e.g., ‘h_l2m2’).

Returns:

The computed phase of the corresponding eccentric mode, calculated using

Eq(11) of https://arxiv.org/pdf/2403.15506. The integration constant is set to 0.

Return type:

array

twist_modes()[source]

Transform circular waveform modes into eccentric waveform modes.

Returns:

A dictionary containing the transformed eccentric waveform modes.

The amplitude and phase of the ‘h_l2m2’ mode remain unchanged, while other modes are modified according to their respective projected amplitudes and phases using Eq(11) of https://arxiv.org/pdf/2403.15506.

Return type:

dict

obtain_eccentricHM()[source]

Align eccentric modes in phases and times so that the initial phase matches the corresponding circular phase.

Returns:

A dictionary containing the aligned eccentric higher-order

multipole waveform modes, ensuring initial phase alignment.

Return type:

dict

gwNRHME

class gwModels.frameworks.gwnrhme.NRHME(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, get_orbfreq_mod_from_amp_mod=False, recompute_tpeak=True, project_ecc_on_higher_modes=True, t_buffer=100, end_time=100)[source]

Bases: BaseEccentricHM

Convert a multi-modal quasi-circular non-spinning waveform into a multi-modal eccentric non-spinning waveform given a known non-spinning quadrupolar eccentric waveform.

gwNRXHME

class gwModels.frameworks.gwnrxhme.NRXHME(t_ecc=None, h_ecc_dict=None, t_cir=None, h_cir_dict=None, get_orbfreq_mod_from_amp_mod=False, recompute_tpeak=True, project_ecc_on_higher_modes=True, t_buffer=100, end_time=100)[source]

Bases: BaseEccentricHM

Convert a multi-modal quasi-circular non-precessing waveform into a multi-modal eccentric non-precessing waveform given a known non-precessing quadrupolar eccentric waveform.