pespace.waveform.interface_ripple

Differentiable JAX waveform interfaces for the customized ripple fork.

Install from https://github.com/nnrui/ripple. The interfaces return polarizations and time-frequency relations for the JAX detector response and Whittle likelihood.

Classes

IMRPhenomXAS(frequencies, reference_frequency)

Interface class to get the IMRPhenomXAS waveform from ripple.

IMRPhenomXHM(frequencies, reference_frequency)

Interface class to get the IMRPhenomXHM waveform from ripple.

WaveformRippleBase(frequencies, ...)

Abstract base class of the ripple waveform interfaces.

pespace.waveform.interface_ripple._RIPPLE_INSTALL_URL = 'https://github.com/nnrui/ripple'

URL of the repository of the non-official ripple (jax-based).

class pespace.waveform.interface_ripple.WaveformRippleBase(frequencies, reference_frequency)[source]

Bases: ABC

Abstract base class of the ripple waveform interfaces.

Concrete waveform templates should subclass this class, implement the required_params property and the get_waveform() method, and are then callable through __call__.

Parameters:
  • frequencies (array-like) – Frequency samples in Hz at which the waveform is evaluated.

  • reference_frequency (float) – Reference frequency in Hz for the waveform generation.

Notes

The frequency-domain waveform returned by concrete templates is a dict: {"plus": hp, "cross": hc, "tf": tf} for a single-mode waveform, with complex hp/hc and real tf of shape (N_freq,); for waveforms with higher modes, each harmonic mode maps to such a dict, e.g. {"22": {...}, "21": {...}}. The coalescence time shift is usually applied in the detector response computation; in that case the coalescence time is fixed to zero inside the waveform computation.

abstract property required_params: tuple[str, ...]

Names of the parameters required by the waveform template.

Returns:

Required parameter names.

Return type:

tuple of str

abstractmethod get_waveform(params)[source]

Evaluate the ripple waveform for the given parameters.

Parameters:

params (namedtuple) – Namedtuple containing the parameters listed in required_params.

Returns:

Waveform dict: {"plus": hp, "cross": hc, "tf": tf} for a single-mode waveform, or a mode-keyed dict {"22": {...}, "21": {...}} for higher modes.

Return type:

dict

_abc_impl = <_abc._abc_data object>
class pespace.waveform.interface_ripple.IMRPhenomXAS(frequencies, reference_frequency)[source]

Bases: WaveformRippleBase

Interface class to get the IMRPhenomXAS waveform from ripple.

Parameters:
  • frequencies (array-like) – Frequency samples in Hz at which the waveform is evaluated.

  • reference_frequency (float) – Reference frequency in Hz for the waveform generation.

property required_params

Names of the parameters required by IMRPhenomXAS.

get_waveform(params)[source]

Evaluate the IMRPhenomXAS waveform from ripple.

Parameters:

params (namedtuple) – Namedtuple containing the parameters listed in required_params.

Returns:

Waveform dict: {"plus": hp, "cross": hc, "tf": tf} for a single-mode waveform, or a mode-keyed dict {"22": {...}, "21": {...}} for higher modes.

Return type:

dict

_abc_impl = <_abc._abc_data object>
class pespace.waveform.interface_ripple.IMRPhenomXHM(frequencies, reference_frequency, modes=('21', '33', '32', '44'))[source]

Bases: WaveformRippleBase

Interface class to get the IMRPhenomXHM waveform from ripple.

The waveform is returned mode by mode, since the detector response is computed for each mode separately from its own time-frequency relation tf (see pespace.detector._jax_impl._antenna_jax).

Parameters:
  • frequencies (array-like) – Frequency samples in Hz at which the waveform is evaluated.

  • reference_frequency (float) – Reference frequency in Hz for the waveform generation.

  • modes (tuple of str, optional) – Higher modes to include besides the (2, 2) mode, by default ("21", "33", "32", "44").

Notes

Unlike IMRPhenomXAS, which requires the chirp mass and the symmetric mass ratio, this template takes the component masses mass_1 and mass_2 directly, so that no mass conversion is performed inside the interface.

property required_params

Names of the parameters required by IMRPhenomXHM.

get_waveform(params)[source]

Evaluate the IMRPhenomXHM waveform from ripple.

Parameters:

params (namedtuple) – Namedtuple containing the parameters listed in required_params.

Returns:

Mode-keyed waveform dict, e.g. {"22": {"plus": hp, "cross": hc, "tf": tf}, ...}, one entry per mode: the (2, 2) mode plus each mode in modes. Each entry holds the complex polarizations hp/hc and the real time-frequency relation tf of that mode.

Return type:

dict

_abc_impl = <_abc._abc_data object>