Skip to content

LALSimIMRPhenomX precession

Functions:

Name Description
IMRPhenomX_rotate_y

Rotate a 3D vector v = (vx, vy, vz) about the y-axis by a given angle.

IMRPhenomX_rotate_z

Rotate a 3D vector v = (vx, vy, vz) about the z-axis by given angle.

XLALSimIMRPhenomXLPNAnsatz

Compute orbital angular momentum using post-Newtonian expansion

XLALSimIMRPhenomXUtilsHztoMf

Convert frequency from Hz to geometric units (Mf).

compute_evolved_spin_given_setup

Compute precession angles for mode emm using pre-computed MSA setup.

compute_msa_precession_setup

Compute MSA precession constants invariant to emm and Mf.

compute_thetaJN_kappa_and_zeta

Compute thetaJN, Nz_Jf, Nx_Jf, phiJ_Sf, kappa, and zeta_polarization.

get_phiJ_Sf

Compute phiJ_Sf based on tolerance condition.

MSAPrecessionSetup dataclass ¤

Pre-computed MSA precession constants that are invariant to emm and Mf.

Compute once via compute_msa_precession_setup and pass into compute_evolved_spin_given_setup inside any jax.vmap over modes.

IMRPhenomX_rotate_y(angle, v) ¤

Rotate a 3D vector v = (vx, vy, vz) about the y-axis by a given angle. Args: angle: scalar angle in radians (JAX array or float) v: array-like of shape (3,) representing [vx, vy, vz] Returns: rotated vector as a JAX array of shape (3,)

IMRPhenomX_rotate_z(angle, v) ¤

Rotate a 3D vector v = (vx, vy, vz) about the z-axis by given angle. Args: angle: scalar angle in radians (JAX array or float) v: array-like of shape (3,) representing [vx, vy, vz] Returns: rotated vector as a JAX array of shape (3,)

XLALSimIMRPhenomXLPNAnsatz(v: FloatLike, LNorm: FloatLike, L0: FloatLike, L1: FloatLike, L2: FloatLike, L3: FloatLike, L4: FloatLike, L5: FloatLike, L6: FloatLike, L7: FloatLike, L8: FloatLike, L8L: FloatLike) -> FloatLike ¤

Compute orbital angular momentum using post-Newtonian expansion

Parameters:

Name Type Description Default
v FloatLike

Input velocity (FloatLike)

required
LNorm FloatLike

Orbital angular momentum normalization (FloatLike)

required
L0 FloatLike

Newtonian orbital angular momentum (FloatLike)

required
L1 FloatLike

0.5PN Orbital angular momentum (FloatLike)

required
L2 FloatLike

1.0PN Orbital angular momentum (FloatLike)

required
L3 FloatLike

1.5PN Orbital angular momentum (FloatLike)

required
L4 FloatLike

2.0PN Orbital angular momentum (FloatLike)

required
L5 FloatLike

2.5PN Orbital angular momentum (FloatLike)

required
L6 FloatLike

3.0PN Orbital angular momentum (FloatLike)

required
L7 FloatLike

3.5PN Orbital angular momentum (FloatLike)

required
L8 FloatLike

4.0PN Orbital angular momentum (FloatLike)

required
L8L FloatLike

4.0PN logarithmic orbital angular momentum term (FloatLike)

required

Returns: FloatLike: Orbital angular momentum

XLALSimIMRPhenomXUtilsHztoMf(fHz: FloatLike, Mtot_Msun: FloatLike) -> FloatLike ¤

Convert frequency from Hz to geometric units (Mf).

Parameters:

Name Type Description Default
fHz FloatLike

Frequency in Hz

required
Mtot_Msun FloatLike

Total mass in solar masses

required

Returns:

Name Type Description
FloatLike FloatLike

Geometric frequency Mf

compute_evolved_spin_given_setup(Mf: Float[Array, ' n_freq'] | FloatLike, emm: int | Array, setup: MSAPrecessionSetup) -> tuple[Float[Array, ' n_freq'], Float[Array, ' n_freq'], Float[Array, ' n_freq']] ¤

Compute precession angles for mode emm using pre-computed MSA setup.

This is the emm-dependent part of compute_evolved_spin_using_msa. Suitable for use inside jax.vmap over harmonic modes.

Parameters:

Name Type Description Default
Mf Float[Array, ' n_freq'] | FloatLike

Dimensionless frequency array.

required
emm int | Array

Azimuthal mode number m.

required
setup MSAPrecessionSetup

Pre-computed MSAPrecessionSetup from compute_msa_precession_setup.

required

Returns:

Type Description
tuple[Float[Array, ' n_freq'], Float[Array, ' n_freq'], Float[Array, ' n_freq']]

alpha, epsilon, cos_beta arrays over Mf.

compute_msa_precession_setup(mass_1: FloatLike, mass_2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi1z: FloatLike, chi2x: FloatLike, chi2y: FloatLike, chi2z: FloatLike, reference_frequency: float, kappa: FloatLike, phiJ_Sf: FloatLike) -> MSAPrecessionSetup ¤

Compute MSA precession constants invariant to emm and Mf.

Replaces the emm-invariant prefix of compute_evolved_spin_using_msa. Call once per waveform evaluation; pass the result to compute_evolved_spin_given_setup inside any vmap over modes.

compute_thetaJN_kappa_and_zeta(mass_1: FloatLike, mass_2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi1z: FloatLike, chi2x: FloatLike, chi2y: FloatLike, chi2z: FloatLike, LRef: FloatLike, phiRef_In: FloatLike, inclination: FloatLike) -> tuple[FloatLike, FloatLike, FloatLike, FloatLike, FloatLike, FloatLike] ¤

Compute thetaJN, Nz_Jf, Nx_Jf, phiJ_Sf, kappa, and zeta_polarization.

Fuses compute_thetaJN_and_kappa with compute_zeta_polarization so that the total angular momentum vector J0, thetaJ_Sf, and phiJ_Sf are computed only once instead of twice.

Returns:

Type Description
tuple[FloatLike, FloatLike, FloatLike, FloatLike, FloatLike, FloatLike]

thetaJN, Nz_Jf, Nx_Jf, phiJ_Sf, kappa, zeta_polarization

get_phiJ_Sf(tol_condition, J0_Sf) ¤

Compute phiJ_Sf based on tolerance condition.

Since convention_condition is always False, this simplifies to: - If tol_condition is True: return 0.0 - Otherwise: return atan2(J0_Sf[1], J0_Sf[0])