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
|
Interface class to get the IMRPhenomXAS waveform from ripple. |
|
Interface class to get the IMRPhenomXHM waveform from ripple. |
|
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:
ABCAbstract base class of the ripple waveform interfaces.
Concrete waveform templates should subclass this class, implement the
required_paramsproperty and theget_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 complexhp/hcand realtfof 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:
WaveformRippleBaseInterface 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:
WaveformRippleBaseInterface 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(seepespace.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 massesmass_1andmass_2directly, 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 inmodes. Each entry holds the complex polarizationshp/hcand the real time-frequency relationtfof that mode.- Return type:
dict
- _abc_impl = <_abc._abc_data object>¶