phenomxpy.phenomt package

Parent class

class phenomxpy.phenomt.phenomt._PhenomT[source]

Bases: object

Parent class with common methods for the IMRPhenomT family: IMRPhenomT, IMRPhenomTHM, IMRPhenomTP, IMRPhenomTPHM.

compute_fd_polarizations(f_min_fd=None)[source]

Compute FFT Fourier ransform of the time domain conditioned polarizations hp, hc.

Return only the positive frequencies spectrum since for real time series h(-f)=h*(f).

By default the frequency series starts at 0, but can be changed with the f_min_fd argument.

Returns:

hp(f), hc(f), frequencies

Return type:

Tuple of 3 1D ndarrays

condition_polarizations(hp, hc)[source]

Condition time domain polarizations for proper FFT Fourier Transform.

Two stages conditioning:

  1. Apply tappering at the beginning and a high-pass filter.

  2. Tappering at the end and one cycle at low frequency.

Then resize the series to match the input delta_f if specified or adjust to a power of 2 length.

Parameters:
  • hp – 1D arrays with the time series of the polarizations.

  • hc – 1D arrays with the time series of the polarizations.

Returns:

hp(t), hc(t) conditioned polarizations.

Return type:

Tuple of 2 1D ndarrays

set_time_array(times=None)[source]

Set time array where to compute hlms and polarizations.

If times is None and delta_t > 0, compute an internal equispaced time array and store it as self.times.

The return array (and self.times) are in units of mass.

The input argument times can have astropy units s and Msun. If it doesn’t have units then it is assumed to be in seconds if total_mass is provided, if not it is assumed to have units of mass.

IMRPhenomT

class phenomxpy.phenomt.phenomt.IMRPhenomT(mode=None, mode22=None, pWF_input=None, **kwargs)[source]

Bases: _PhenomT

Class for aligned-spin, single harmonic.

Can initialize any harmonic, not only the 22.

The 22 mode is described in [1], while the subdominant modes in [2].

Initialize pWF, pAmp and pPhase objects for a specific harmonic.

Parameters:
  • mode (list [l,m]) – Indeces for the spherical harmonic to be initialized.

  • mode22 (IMRPhenomT) – Class with the 22 mode initialized to be reused by the subdominant harmonics.

  • kwargs – All the parameters accepted by pWF.

pWF

pWF object with common quantities for all modes

Type:

pWF

pAmp

pAmp object for amplitude coefficients

Type:

pAmp

pPhase

pPhase object for phase coefficients

Type:

pPhase

pPhase22

pPhase object of the 22 mode to be used by higher modes

Type:

pPhase

mode20

Class for the 20 mode

Type:

phenomxpy.mode20

compute_hlm(times=None, cache=None, return_cache=False)[source]

Compute hlm mode in time array.

Parameters:
  • times (1D ndarray) – Time array where to evaluate the hlm. If None, use the internal one self.times.

  • cache (Cache) – Cache object with imr_22phase and x_insp, only used for the 22 mode. imr_22phase: the inspiral-merger-ringdown phase of the 22 mode and it is used to rescale the phase of the HMs. x_insp: PN expansion parameter evolution for the inspiral region and it is used to compute the amplitudes of the HMs.

  • return_cache (bool) – If True, return hlm and cache object.

Returns:

  • 1D ndarray – hlm(t)

  • (Optionally for the 22 mode)

  • 1Dndarray, Cache – hlm(t), cache object with imr_22phase and x_insp if return_cache=True

compute_polarizations(times=None)[source]

Compute hp, hc for one mode and its negative counterpart.

Parameters:

times (1D ndarray or None) – Time array where to evaluate the polarizations. If None, use the internal arry self.times. If not None, recompute the hlms in the new array.

Returns:

hp(t), hc(t) contribution for one mode and its opposite one

Return type:

Tuple of 2 1D ndarrays

static metadata()[source]

Return metadata describing this waveform class implementation.

Returns: dict: Metadata dictionary with the following keys:

  • type (str): Type of waveform, e.g., ‘aligned_spin’.

  • f_ref_spin (bool): Whether reference frequency spin is supported.

  • modes (bool): Whether individual mode generation is implemented.

  • polarizations (bool): Whether both polarizations are provided.

  • implemented_domain (str): Domain of implementation (‘time’ or ‘frequency’).

  • approximant (str): Name of the waveform approximant.

  • implementation (str): Name of the code implementing it.

  • conditioning_routines (bool): Whether waveform conditioning routines are available.

IMRPhenomTHM

class phenomxpy.phenomt.phenomt.IMRPhenomTHM(pWF_input=None, params: THMParams | dict | None = None, **kwargs)[source]

Bases: _PhenomT

Class for the IMRPhenomTHM model [2], aligned-spin with subdominant harmonics.

Initialize an IMRPhenomT class for each (l,m) harmonic.

Parameters:
  • mode_array (None, list) – List with the modes to be computed in format [[l,m], [,], …]. If None use default array (22, 21, 33, 44, 55 and negative modes).

  • add_20_mode (bool) – Add the 20 mode to the list of modes.

  • pWF_input (pWF) – pWF object with common waveform quantities for all the modes.

  • kwargs – All the parameters accepted by pWF.

phenT_classes

Dictionary with initialiazed IMRPhenomT classes for each harmonic. E.g. {‘22’:phen22, ‘21’:phen21, …}. Keys only show positive modes since the class is the same for the negative ones.

Type:

dict

pWF

pWF object with common quantities for all modes

Type:

pWF

mode_array

List with the modes to be computed in format [[l,m], [,], …]. For equal black holes cases, odd modes are removed from mode_array.

Type:

list

lmax

maximum l in the mode_array

Type:

int

times

Internally computed equispaced time array if input time array is None. Only set if the evaluation methods is called.

Type:

1D ndarray

compute_hlms(times=None)[source]

Compute all the hlms modes in a time array.

Parameters:

times (1D ndarray) – Time array where to evaluate the polarizations. If None, use the internal one self.times.

Returns:

hlms(t). Each element contains the hlm array for each mode. The keys are the mode strings, e.g. ‘22’, ‘21’, ‘2-2’, etc.

Return type:

dict

compute_polarizations(times=None)[source]

Compute hp, hc in a time array.

Parameters:

times (1D ndarray) – Time array where to evaluate the polarizations. If None, use the internal one self.times.

Returns:

hp(t), hc(t)

Return type:

Tuple of 2 1D ndarrays

static metadata()[source]

Return metadata describing this waveform class implementation.

Returns: dict: Metadata dictionary with the following keys:

  • type (str): Type of waveform, e.g., ‘aligned_spin’.

  • f_ref_spin (bool): Whether reference frequency spin is supported.

  • modes (bool): Whether individual mode generation is implemented.

  • polarizations (bool): Whether both polarizations are provided.

  • implemented_domain (str): Domain of implementation (‘time’ or ‘frequency’).

  • approximant (str): Name of the waveform approximant.

  • implementation (str): Name of the code implementing it.

  • conditioning_routines (bool): Whether waveform conditioning routines are available.

IMRPhenomTP

class phenomxpy.phenomt.phenomtp.IMRPhenomTP(**kwargs)[source]

Bases: IMRPhenomTPHM

Class for the IMRPhenomTP model [3].

Precessing model with only the 22 mode in the co-precessing frame.

Wrapper to the IMRPhenomTPHM class called with only the 22, 2-2 modes.

static metadata()[source]

Return metadata describing this waveform class implementation.

Returns: dict: Metadata dictionary with the following keys:

  • type (str): Type of waveform, e.g., ‘aligned_spin’.

  • f_ref_spin (bool): Whether reference frequency spin is supported.

  • modes (bool): Whether individual mode generation is implemented.

  • polarizations (bool): Whether both polarizations are provided.

  • implemented_domain (str): Domain of implementation (‘time’ or ‘frequency’).

  • approximant (str): Name of the waveform approximant.

  • implementation (str): Name of the code implementing it.

  • conditioning_routines (bool): Whether waveform conditioning routines are available.

IMRPhenomTPHM

class phenomxpy.phenomt.phenomtp.IMRPhenomTPHM(params: TPHMParams | dict | None = None, **kwargs)[source]

Bases: _PhenomT

Class for the IMRPhenomTPHM model [3].

Multipolar quasicircular precessing-spin waveform model. The mode_array is specified in the co-precessing frame.

compute_CPmodes(times=None)[source]

Compute hlms(t) in the co-precessing frame for a given time array. Use internal array if times is None.

Parameters:

times (1D ndarray) – Time array where to evaluate the modes

Returns:

CPmodes(t), t

Return type:

Tuple with dictionary of modes and time array

compute_Jmodes(times=None)[source]

Compute hlms(t) in the J-frame for a given time array. Use internal array if times is None.

Parameters:

times (1D ndarray) – Time array where to evaluate the modes

Returns:

Jmodes(t), t

Return type:

Tuple with dictionary of modes and time array

compute_L0modes(times=None)[source]

Compute hlms(t) in the L0-frame for a given time array. Use internal array if times is None..

Parameters:

times (1D ndarray) – Time array where to evaluate the modes

Returns:

L0modes(t), t

Return type:

Tuple with dictionary of modes and time array

compute_euler_angles(times=None)[source]

Compute Euler angles alpha, cosbeta, gamma for a time array.

3 prescriptions supported:
  • NNLO

  • MSA

  • Numerical/SpinTaylor (default)

Parameters:

times (1D ndarray) – Time array where to evaluate the angles. If None, use equispaced grid self.times.

Returns:

\(\\alpha(t)\), \(\cos(\\beta(t))\), \(\\gamma(t)\),

Return type:

Tuple with 3 1D ndarrays

compute_polarizations(times=None)[source]

Compute polarizations hp(t), hc(t) for a given time array. Use internal array if times is None.

Parameters:

times (1D ndarray) – Time array where to evaluate the polarizations

Returns:

hp(t), hc(t), t

Return type:

Tuple with 3 1D ndarrays

compute_quaternions(times=None)[source]

Compute quaternions in time array to transform from L to L0 frame and align with the line-of-sight.

For the NNLO and MSA prescriptions, the quaternions are computed from the Euler angles.

For the numerical prescription, the default option is to compute the quaternions directly from the evolution of the L frame: the Z axis is LNhatev, the X axis is named E1ev (same name as in lalsuite), and the Y axis is obtained by completing the triad with the cross product Y=ZxX. There is also the option to compute the quaternions from the numerical Euler angles. However, this option involves more computational steps and potential loss of accuracy due to extra numerical integrations and spline derivatives.

Parameters:
  • times (1D ndarray) – Time array to compute quaternions for. If None, use internal equispaced grid self.times.

  • torch_single_precision (bool) – If True, use single precision for torch tensors, slightly faster.

Returns:

Quaternions evaluated in time array.

Return type:

(N, 4) ndarray

static metadata()[source]

Return metadata describing this waveform class implementation.

Returns: dict: Metadata dictionary with the following keys:

  • type (str): Type of waveform, e.g., ‘aligned_spin’.

  • f_ref_spin (bool): Whether reference frequency spin is supported.

  • modes (bool): Whether individual mode generation is implemented.

  • polarizations (bool): Whether both polarizations are provided.

  • implemented_domain (str): Domain of implementation (‘time’ or ‘frequency’).

  • approximant (str): Name of the waveform approximant.

  • implementation (str): Name of the code implementing it.

  • conditioning_routines (bool): Whether waveform conditioning routines are available.

phenomxpy.phenomt.internals

Classes for waveform quantities, amplitude and phase coefficients for the aligned-spin PhenomT models.

class phenomxpy.phenomt.internals.Cache(**kwargs)[source]

Bases: object

Auxiliary class to store quantities that will be recycled (e.g. imr_phase22) It transform kwargs into attributes of the object.

class phenomxpy.phenomt.internals.pAmp(pwf, pphase22)[source]

Bases: object

Class for computing amplitude coefficients and define amplitude ansatze.

Parameters:
  • pWF (pWF) – pWF structure with waveform parameters

  • pPhase22 (pPhase) – pPhase structure for the 22 mode to be used by subdominant harmonics.

_der_complex_amp_orientation(time, return_phase=False)[source]

Compute derivative of complex inspiral amplitude.

Can return the derivative of the absolute value or of the phase.

Derivation in Mathematica.

Parameters:
  • time (float or 1D ndarray) – where to evaluate the derivative

  • return_phase (bool) –

    • True: return derivative of the phase of the complex amplitude.

    • False: return derivative of the absolutie value

Returns:

Derivative complex amplitude.

Return type:

float

_set_inspiral_coefficients()[source]

Compute coefficients of pseudo-PN terms by solving a system with collocation points.

A c = B A is a matrix with the values of the powers of x at the times of the collocation points. B is a vector with the values of the collocation points: (collocation point fit - pn_ansatz) / fac0 / x c is the solution vector for the free coefficients.

For 3 free coefficients the system is: c1 x1^4 + c2 x1^5 + c3 x1^6 = b1 c1 x2^4 + c2 x2^5 + c3 x2^6 = b2 c1 x3^4 + c2 x3^5 + c3 x3^6 = b3

_set_inspiral_collocation_points()[source]

Define inspiral collocation points. Set times (-2000, -250, -150)M and read parameter space fits. Fits are for the full strain amplitude without any rescaling.

_set_inspiral_cut()[source]

Transition time between inspiral and intermediate region for the amplitude (t=-150M).

_set_intermediate_coefficients()[source]

Compute coefficients for amplitude intermediate ansatz by solving a system with collocation points.

_set_pn_coefficients()[source]

PN coefficients for complex amplitude

3PN non-spinning Eq 9.4 [4]. 3.5PN non-spinning Eq. 43 :cite:`Faye_2012. 1.5 PN spinning Eq 4.17 [5]. 2 PN spinning Eq. 4.27 :cite:`Buonanno.

Transformation to python code in Mathematica.

There is a factor missing for each mode because they were rotated so that the real part is closer to the absolute value. The factors for each mode to recover the expressions in the paper are: 22 1, 21 i, 33 -i, 44 -1, 55 i. These factors are included through offsets in the phase, see pPhase._set_offsets.

_set_ringdown_coefficients()[source]

Set coefficients for amplitude ringdown ansatz

_set_ringdown_cut()[source]

Transition time between intermediate and ringdown region for the amplitude (from parameter space fits).

imr_amplitude(times, cache=None)[source]

Amplitude function for full IMR region. Piecewise of inspiral, intermediate and ringdown regions.

Parameters:
  • times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

  • cache (Cache) – Cache object storing x_insp for the subdominant modes

Returns:

IMR amplitude for one harmonic.

Return type:

float or 1Darray

inspiral_ansatz_amplitude(times, cache=None)[source]

Inspiral ansatz amplitude. PN augmented with 3 pseudo-PN terms. Eq. 14 [2].

The values for x can be read from cache for the subdominant harmonics.

Parameters:
  • times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

  • cache (Cache) – Cache object storing x_insp for the subdominant modes

Returns:

Inspiral amplitude

Return type:

float or 1D ndarray

intermediate_ansatz_amplitude(times)[source]

Intermediate ansatz amplitude.

Eq. 30 [2].

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz.

Returns:

Intermediate amplitude

Return type:

float or 1D ndarray

ringdown_ansatz_amplitude(times)[source]

Ringdown ansatz amplitude.

Eq. 26 [2] (the second line in the paper misses the \(e^{\alpha t}\) term).

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz.

Returns:

Ringdown amplitude.

Return type:

float or 1D ndarray

class phenomxpy.phenomt.internals.pPhase(pwf, pPhase22=None, omegaCutPNAMP=0, phiCutPNAMP=0)[source]

Bases: object

Class for computing omega and phase coefficients and define the ansatze.

Parameters:
  • pWF (pWF) – pWF structure with waveform parameters

  • pPhase22 (pPhase) – pPhase object for the 22 mode to be used for the higher modes.

  • omegaCutPNAMP (float) – Omega contribution from complex amplitude at transtion time pAmp.inspiral_cut.

  • phiCutPNAMP (float) – Phase contribution from complex amplitude at transtion time pAmp.inspiral_cut.

_get_time_of_freq(freq)[source]

Find the time corresponding to an input frequency by numerically solve using imr_omega.

_set_inspiral_coefficients()[source]

Compute the omega pseudo-PN terms coefficients by solving a system of equations with collocation points. See Eq. 15 [2].

_set_inspiral_collocation_points()[source]

Define the set of collocation points for omega inspiral See Eq. 11 [2].

_set_inspiral_cut()[source]

Transition time between inspiral and intermediate regions For the 22= -5/(eta * 0.81^8). For HM = -150.0

_set_intermediate_coefficients()[source]

Compute coefficients for intermediate ansatz omega by solving a system of equations with collocation points. See Eqs. 28, 29, 31 and surroundings [2].

_set_offsets()[source]

The PN amplitude coefficients in pAmp._set_pn_coefficients have been multiplied by a factor so that the real part is dominant and positive, approximating the absolute value. The correct complex amplitudes are put back by accordingly correcting the phase. See Eq. 13 in arxiv:2012.11923

E.g.: the complete 21 complex amplitude has a global factor with I. But the PN amplitude coefficient does not have it. An equivalent multiplication by I is achieved by adding pi/2 to the phase.

_set_phase_continuity()[source]

The phase is the integration of the omega ansatz in each region. Setup the constants of integration so that the phase is continuous between regions.

The intermediate and ringdown regions are shifted respect to the inspiral one.

_set_pn_coefficients()[source]

Omega PN coefficients for TaylorT3.

Eqs. A5 [1]. Paper misses the term eta3 235925 / 1769472 at 3PN order.

Transformation to python code in Mathematica.

_set_powers_of_5()[source]

Set useful powers of 5 for phase_inspiral_ansatz. Array stored in self.powers_of_5

_set_ringdown_coefficients()[source]

Coefficients for ringdown ansatz omega. See Eq. 25, 27a [2].

_set_ringdown_cut()[source]

Transition time between intermediate and ringdown regions. Set to zero (peak time of 22).

_set_wf_length()[source]

Set internal length of the waveform assuming that it is equispaced.

imr_omega(times, **kwargs)[source]

Omega function for full IMR region. Piecewise of inspiral, intermediate and ringdown regions.

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

IMR omega.

Return type:

float or 1D ndarray

imr_phase(times, cache=None)[source]

Phase function for full IMR region. Piecewise of inspiral, intermediate and ringdown regions.

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

IMR phase.

Return type:

float or 1D ndarray

inspiral_ansatz_omega(times)[source]

Inspiral ansatz omega PN ansatz augmented with 6 pseudo-PN terms. Eq. 6b, 7 [2].

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

Inspiral omega.

Return type:

float or 1D ndarray

inspiral_ansatz_phase(times, cache=None)[source]

Inspiral ansatz phase. Integration of omega ansatz. For the higher harmonics the 22 phase is rescaled by m/2

Parameters:
  • times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

  • cache (Cache) – Cache struct storing 22 phase to be used by subdominant harmonics.

Returns:

Inspiral phase.

Return type:

float or 1D ndarray

intermediate_ansatz_omega(times)[source]

Intermediate ansatz omega. Eq. 15 [2].

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

Intermediate omega.

Return type:

float or 1D ndarray

intermediate_ansatz_phase(times)[source]

Intermediate ansatz phase. Integration of omega ansatz.

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

Intermediate phase.

Return type:

float or 1D ndarray

pn_ansatz_omega(theta)[source]

PN ansatz omega, TaylorT3 based. Eq. 6b [2].

Parameters:

theta (float or 1D ndarray) – Where to evaluate the ansatz. \(\\theta = (-\eta * t / 5)^{-1/8}\).

Returns:

TaylorT3 omega.

Return type:

float or 1D ndarray

pn_ansatz_phase(thetabar)[source]

PN ansatz phase. Integration of omega ansatz. Only used to compute one value of thetabar needed for _set_phase_continuity.

ringdown_ansatz_omega(times)[source]

Ringdown ansatz omega. Eq. 25 [2].

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

Ringdown omega.

Return type:

float or 1D ndarray

ringdown_ansatz_phase(times)[source]

Ringdown ansatz phase. Integration of omega ansatz.

Parameters:

times (float or 1D ndarray) – Times in NR units where to evaluate the ansatz

Returns:

Ringdown phase.

Return type:

float or 1D ndarray

class phenomxpy.phenomt.internals.pWF(params: pWFParams | dict | None = None, **kwargs)[source]

Bases: object

Structure storing common waveform quantities and options for all the modes.

Parameters:
  • eta (float) – Symmetric mass ratio [0, 0.25].

  • s1 (floats or (3,) ndarrays) – Spinz components or cartesian spin vectors. s1 corresponds to the most massive object

  • s2 (floats or (3,) ndarrays) – Spinz components or cartesian spin vectors. s1 corresponds to the most massive object

  • f_min (float) – Minimum frequency. In Hz if total_mass is provided, if not in units of mass.

  • f_ref (float) – Reference frequency. In Hz if total_mass is provided, if not in units of mass.

  • total_mass (float) – Total mass in solar masses.

  • delta_t (float) – Time spacing. In seconds if total_mass is provided, if not in units of mass.

  • delta_f (float) – Frequency spacing for Fourier transform in Hz. Only used for conditioning (condition = True).

  • eccentricity (float) – Initial eccentricity defined at f_ref. [0, 1]

  • mean_anomaly (float)

  • inclination (float) – Inclination angle in radians. [0, \(\pi\)]

  • phi_ref (float) – Azimuthal angle in radians for Ylms defined as \(\pi/2\) - phi_ref.

  • polarization_angle (float) – Polarization angle in radians.

  • distance (float) – Distance in Megaparsecs.

  • f_max (float) – Maximum Fourier frequency. If delta_t is not provided then delta_t = 0.5 / f_max.

  • condition (bool) – Compute conditioning parameters and generated conditioned waveforms when evaluated.

  • rtol (float) – Tolerances used for the solver computing tmin from f_min and tref from f_ref.

  • atol (float) – Tolerances used for the solver computing tmin from f_min and tref from f_ref.

  • cuda (bool) – If True, use cupy if installed to run on the GPU.

  • numba_ansatze (bool) – When evaluating the ansatze in the full time array, use the numba version. Deactivated when using cuda.

  • resize_series (bool) – If True, resize the series to match the input delta_f or adjust to a power of 2 length.

  • high_pass_filter_lal (bool) – If True, apply a high-pass filter using the LALSuite wrapper.

  • compute_hlms_at_once (bool) – If True, compute all hlms at once and build strain. If False, compute hlms individually in a loop to save memory.

class phenomxpy.phenomt.internals.pWFHM(mode=None, pWF_input=None, **kwargs)[source]

Bases: pWF

Subclass to add mode specific quantities to an input pWF

If no pWF is given, then a new pWF is created.

Parameters:
  • mode (list [l,m]) – indices of the mode

  • pWF_input (pWF) – pWF structure to be recycled

  • **kwargs – Parameters to initialize a new pWF when pWF_input is not provided.

class phenomxpy.phenomt.internals.pWFParams(*, eta: float, s1: list, s2: list, f_min: float, f_ref: float | None = None, total_mass: float = 0, delta_t: float = 0, delta_f: float = 0, eccentricity: float = 0, mean_anomaly: float = 0, inclination: float = 0, phi_ref: float = 0, polarization_angle: float = 0, distance: float = 0, f_max: float | None = None, condition: bool = False, rtol: float = 1e-12, atol: float = 1e-12, cuda: bool = False, numba_ansatze: bool = True, compute_hlms_at_once: bool = False, high_pass_filter_lal: bool = False, resize_series: bool = False, tref: float | None = None, tmin: float | None = None)[source]

Bases: BaseModel

_abc_impl = <_abc._abc_data object>
atol: float
check_f_max()[source]
check_f_ref()[source]
check_parameters()[source]
compute_hlms_at_once: bool
condition: bool
cuda: bool
delta_f: float
delta_t: float
distance: float
eccentricity: float
eta: float
f_max: float | None
f_min: float
f_ref: float | None
high_pass_filter_lal: bool
inclination: float
input_tref_tmin()[source]
mean_anomaly: float
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

numba_ansatze: bool
phi_ref: float
polarization_angle: float
resize_series: bool
rtol: float
s1: list
s2: list
tmin: float | None
total_mass: float
tref: float | None
classmethod warn_unknown_fields(values)[source]

Warning about unknown arguments provided to pWF

phenomxpy.phenomt.fits

Parameter space fits for collocation points and other quantities.

phenomxpy.phenomt.fits.IMRPhenomT_Inspiral_Amp_CP(pWF, idx)[source]
phenomxpy.phenomt.fits.IMRPhenomT_Inspiral_Freq_CP(pWF, idx)[source]
phenomxpy.phenomt.fits.IMRPhenomT_Inspiral_TaylorT3_t0(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_Intermediate_Amp_CP1(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_Intermediate_Freq_CP1(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_PeakAmp(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_PeakFrequency(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_RD_Freq_C2(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_RD_Freq_C3(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_Ringdown_Amp_C3(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomT_fdampfit(finalDimlessSpin, mode)[source]

Damping frequency fundamental mode.

phenomxpy.phenomt.fits.IMRPhenomT_fdampn2fit(finalDimlessSpin, mode)[source]

Damping frequency of the second overtone

phenomxpy.phenomt.fits.IMRPhenomT_fringfit(finalDimlessSpin, mode)[source]

Ringdown frequency fundamental mode.

phenomxpy.phenomt.fits.IMRPhenomT_tshift(pWF)[source]
phenomxpy.phenomt.fits.IMRPhenomX_FinalMass2017(eta, s1, s2)[source]

Final mass fit for aligned spin

phenomxpy.phenomt.fits.IMRPhenomX_FinalSpin2017(eta, s1, s2)[source]

Final spin fit for aligned spin

phenomxpy.phenomt.fits.IMRPhenomX_PrecessingFinalSpin2017(eta, chi1L, chi2L, chi_inplane)[source]

Final precessing spin formula as function of aligned final spin

phenomxpy.phenomt.fits._IMRPhenomT_Inspiral_Amp_CP(eta, S, dchi, delta, mode, idx)[source]

Fit for collocation point for inspiral amplitude ansatz

phenomxpy.phenomt.fits._IMRPhenomT_Inspiral_Freq_CP(eta, S, dchi, delta, idx)[source]

Fit for collocation point used for the inspiral frequency ansatz

phenomxpy.phenomt.fits._IMRPhenomT_Inspiral_TaylorT3_t0(eta, S, dchi, delta)[source]
Calibrated value of TaylorT3 t0 parameter for matching frequency at TaylorT3 theta=0.33.

If 4 regions are selected for reconstruction, first inspiral region will be employ TaylorT3 with this value of t0. With this, it is ensured that the early inspiral is described by the proper TaylorT3 PN description. If 3 regions are selected, this will be still employed for computing the value of TaylorT3 at theta=0.33 for setting the first collocation point.

phenomxpy.phenomt.fits._IMRPhenomT_Intermediate_Amp_CP1(eta, S, dchi, delta, mode)[source]

Fit for collocation point for intermediate amplitude ansatz

phenomxpy.phenomt.fits._IMRPhenomT_Intermediate_Freq_CP1(eta, S, dchi, delta, mode)[source]

Fit for collocation point used intermediate frequency ansatz

phenomxpy.phenomt.fits._IMRPhenomT_PeakAmp(eta, S, dchi, delta, mode)[source]

Fit for the peak amplitude of every mode.

phenomxpy.phenomt.fits._IMRPhenomT_PeakFrequency(eta, S, dchi, delta, mode)[source]

Fit for peak frequency for each mode

phenomxpy.phenomt.fits._IMRPhenomT_RD_Freq_C2(eta, S, dchi, delta, mode)[source]

Fit for coefficient c2 in ringdown frequency ansatz

phenomxpy.phenomt.fits._IMRPhenomT_RD_Freq_C3(eta, S, dchi, delta, mode)[source]

Fit for coefficient c3 in ringdown frequency ansatz

phenomxpy.phenomt.fits._IMRPhenomT_Ringdown_Amp_C3(eta, S, dchi, mode)[source]

Fit for amplitude ansatz coefficient

phenomxpy.phenomt.fits._IMRPhenomT_tshift(eta, S, dchi, mode)[source]

Time shift between the peak amplitudes of the higher modes respect to the 22 mode.

phenomxpy.phenomt.numba_ansatze

Rewrite amplitude, phase ansatze to use numba

There are functions for evaluation in one single point and in a time array, which is parallelize with prange.

Unfortunately this requires some code duplication respect to the ansatze defined in internals.py.

phenomxpy.phenomt.numba_ansatze.combine_amp_phase(amp, phase)[source]

Numba version to build waveform from arrays of amplitude and phase.

phenomxpy.phenomt.numba_ansatze.njit_inspiral_22_phase(times, eta, powers_of_5, pn_coefficients, pseudo_pn_coefficients, phOffInsp)[source]

Numba version of phenomt.internals.inspiral_ansatz_phase for the 22 mode in an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_22_phase(time, eta, powers_of_5, pn_coefficients, pseudo_pn_coefficients, phOffInsp)[source]

Numba version of phenomt.internals.inspiral_ansatz_phase for the 22 mode in one time step.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_ansatz_amplitude(x, fac0, pn_real_coeffs, pn_imag_coeffs, pseudo_pn_coeffs)[source]

Numba version of phenomt.internals.inspiral_ansatz_amplitude for one time step.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_ansatz_amplitude_array(x, fac0, pn_real_coeffs, pn_imag_coeffs, pseudo_pn_coeffs)[source]

Numba version of phenomt.internals.inspiral_ansatz_amplitude for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_ansatz_domega(time, eta, pn_coefficients, coefficients)[source]

Numba version for the first derivative of phenomt.internals.inspiral_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_ansatz_omega(time, eta, pn_coefficients, coefficients)[source]

Numba version of phenomt.internals.inspiral_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_inspiral_ansatz_omega_array(times, eta, pn_coefficients, pseudo_coefficients)[source]

Numba version of phenomt.internals.inspiral_ansatz_omega for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_amplitude(time, alpha1RD, mergerC1, mergerC2, mergerC3, mergerC4, tshift)[source]

Numba version of phenomt.internals.intermediate_ansatz_amplitude for one time step.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_amplitude_array(times, alpha1RD, mergerC1, mergerC2, mergerC3, mergerC4, tshift)[source]

Numba version of phenomt.internals.intermediate_ansatz_amplitude for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_omega(times, alpha1RD, omegaPeak, omegaRING, domegaPeak, omegaMergerC1, omegaMergerC2, omegaMergerC3)[source]

Numba version of phenomt.internals.intermediate_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_omega_array(times, alpha1RD, omegaPeak, omegaRING, domegaPeak, omegaMergerC1, omegaMergerC2, omegaMergerC3)[source]

Numba version of phenomt.internals.intermediate_ansatz_omega for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_phase(time, alpha1RD, omegaMergerC1, omegaMergerC2, omegaMergerC3, omegaPeak, domegaPeak, omegaRING, phOffMerger)[source]

Numba version of phenomt.internals.intermediate_ansatz_phase for the 22 mode in one time step.

phenomxpy.phenomt.numba_ansatze.numba_intermediate_ansatz_phase_array(times, alpha1RD, omegaMergerC1, omegaMergerC2, omegaMergerC3, omegaPeak, domegaPeak, omegaRING, phOffMerger)[source]

Numba version of phenomt.internals.intermediate_ansatz_phase for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_pn_ansatz_22_phase(thetabar, eta, powers_of_5, pn_coefficients)[source]

Numba version of phenomt.internals.pn_ansatz_phase for the 22 mode in one time step.

phenomxpy.phenomt.numba_ansatze.numba_pn_ansatz_omega(theta, coefficients)[source]

Numba version of phenomt.internals.pn_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_pn_ansatz_omega_array(theta, coefficients)[source]

Numba version of phenomt.internals.pn_ansatz_omega for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_amplitude(time, c1_prec, c2_prec, c3, c4_prec, alpha1RD_prec, tshift)[source]

Numba version of phenomt.internals.ringdown_ansatz_amplitude for one time step.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_amplitude_array(times, c1_prec, c2_prec, c3, c4_prec, alpha1RD_prec, tshift)[source]

Numba version of phenomt.internals.ringdown_ansatz_amplitude for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_domega(time, c1, c2, c3, c4)[source]

Numba version for the first derivative of phenomt.internals.ringdown_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_omega(times, c1, c2, c3, c4, omegaRING)[source]

Numba version of phenomt.internals.ringdown_ansatz_omega for one time step.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_omega_array(times, c1, c2, c3, c4, omegaRING)[source]

Numba version of phenomt.internals.ringdown_ansatz_omega for an array of time steps.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_phase(time, c1_prec, c2, c3, c4, omegaRING_prec, phOffRD)[source]

Numba version of phenomt.internals.ringdown_ansatz_phase for one time step.

phenomxpy.phenomt.numba_ansatze.numba_ringdown_ansatz_phase_array(times, c1_prec, c2, c3, c4, omegaRING_prec, phOffRD)[source]

Numba version of phenomt.internals.ringdown_ansatz_phase for an array of time steps.