pygwtf.models.taylort3spin.model#
Attributes#
Classes#
AnalyticModel is the base class for all analytic waveform models in pygwtf. |
Functions#
|
Convert the symmetic mass ratio and total mass of a binary system to the individual masses, assuming m1 >= m2. |
Module Contents#
- pygwtf.models.taylort3spin.model.THREADS_PER_BLOCK = 128#
- pygwtf.models.taylort3spin.model.etaM_to_m1m2(eta, M)#
Convert the symmetic mass ratio and total mass of a binary system to the individual masses, assuming m1 >= m2. Args:
eta: Symmetric mass ratio. M: Total mass.
- Returns:
m1: Mass of the first body. m2: Mass of the second body.
- class pygwtf.models.taylort3spin.model.TaylorT3Spin(backend: str | pygwtf.backend.Backend | None = None)#
Bases:
pygwtf.models.base.AnalyticModelAnalyticModel is the base class for all analytic waveform models in pygwtf.
- The model class is responsible for
Defining the input parameters of the model
Computing any derived parameters (such as the time to coalescence) from the input parameters
Providing access to the numba-compiled functions required for the waveform generation kernel
See the docstrings for each required method for more details.
- property parameters: list[str]#
Returns a list of the input parameters required for this model. The order of the parameters in this list must match the order of the parameters expected by the numba-compiled functions.
- property derived_parameters: list[str]#
Returns a list of any derived parameters that are computed from the input parameters. The order of the parameters in this list must match the order of the derived parameters expected by the numba-compiled functions. These parameters will be appended to the input parameters in the parameter array passed to the numba-compiled functions.
- compute_derived_parameters(parameters: numpy.ndarray) None#
Computes any derived parameters from the input parameters. The input parameter array will have shape (n_sources, n_parameters + n_derived_parameters) and the derived parameters should be computed in place and stored in the appropriate columns of this array (i.e. the columns after the input parameters). The default implementation of this method does nothing, as not all models will have derived parameters.
- property amplitude_function: Callable#
The numba-compiled function that computes the amplitude of the waveform at a given time, frequency and frequency derivative. This function should have the signature amplitude(t, f, fdot, parameters) where parameters is a 1D array containing the input parameters
for a single source (in the order specified by the parameters method).
- property phi_f_fdot_function: Callable#
The numba-compiled function that computes the phase, frequency and frequency derivative of the waveform at a given time. This function should have the signature phi_f_fdot(t, parameters) where parameters is a 1D array containing the input parameters
for a single source (in the order specified by the parameters method).
- property get_TT_polarisations_function: Callable#
The numba-compiled function that computes the plus and cross polarisations of the waveform at a given time, frequency and frequency derivative. This function is only required for non-TDI waveform generation. This function should have the signature hplus_hcross(hlm, parameters) where parameters is a 1D array containing the input parameters
for a single source (in the order specified by the parameters method) and hlm is the multipole.
The default implementation of this method returns None for flexibility, as not all models will require this function.
- get_time_bounds(parameters: numpy.ndarray, frequency_band: tuple[float, float]) tuple[numpy.ndarray, numpy.ndarray]#
Computes the start and end times of the waveform for each source in the input parameter array. This is used to determine the time segments over which to compute the waveform for each source.