IMRPhenomXPHM
Functions:
| Name | Description |
|---|---|
IMRPhenomXWignerdCoefficients_cosbeta |
Compute cos(beta/2) and sin(beta/2) from cos(beta). |
apply_polarization_rotation |
Apply polarization rotation to waveform components. |
compute_chiTot_perp |
Total perpendicular spin parameter for afinal_prec (LAL PhenomXPFinalSpinMod=4, the default). |
compute_chip |
Effective precession spin parameter chi_p. |
generate_xphm |
Generate IMRPhenomXPHM plus and cross polarizations. |
twist_21 |
Compute the twisting contributions for l=2, m'=1 mode. |
twist_22 |
Compute the twisting contributions for l=2, m'=2 mode. |
twist_32 |
Compute the twisting contributions for l=3, m'=2 mode. |
twist_33 |
Compute the twisting contributions for l=3, m'=3 mode. |
twist_44 |
Compute the twisting contributions for l=4, m'=4 mode. |
twistup |
Rotate the co-precessing frame hlm modes into the inertial (J-frame) polarisations hp, hc. |
BetaPowers
dataclass
¤
Stores powers of cos(beta/2) and sin(beta/2) for Wigner-d coefficient calculations.
Attributes:
| Name | Type | Description |
|---|---|---|
cBetah |
FloatLike
|
cos(beta/2) |
cBetah2 |
FloatLike
|
cos^2(beta/2) |
cBetah3 |
FloatLike
|
cos^3(beta/2) |
cBetah4 |
FloatLike
|
cos^4(beta/2) |
cBetah5 |
FloatLike
|
cos^5(beta/2) |
cBetah6 |
FloatLike
|
cos^6(beta/2) |
cBetah7 |
FloatLike
|
cos^7(beta/2) |
cBetah8 |
FloatLike
|
cos^8(beta/2) |
sBetah |
FloatLike
|
sin(beta/2) |
sBetah2 |
FloatLike
|
sin^2(beta/2) |
sBetah3 |
FloatLike
|
sin^3(beta/2) |
sBetah4 |
FloatLike
|
sin^4(beta/2) |
sBetah5 |
FloatLike
|
sin^5(beta/2) |
sBetah6 |
FloatLike
|
sin^6(beta/2) |
sBetah7 |
FloatLike
|
sin^7(beta/2) |
sBetah8 |
FloatLike
|
sin^8(beta/2) |
Methods:
| Name | Description |
|---|---|
from_half_angle_trig |
Constructs a BetaPowers instance from cos(beta/2) and sin(beta/2). |
from_half_angle_trig(cBetah: FloatLike, sBetah: FloatLike)
classmethod
¤
Constructs a BetaPowers instance from cos(beta/2) and sin(beta/2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cBetah
|
FloatLike
|
cos(beta/2) |
required |
sBetah
|
FloatLike
|
sin(beta/2) |
required |
Returns:
| Type | Description |
|---|---|
|
BetaPowers instance with all power values computed |
IMRPhenomXWignerdCoefficients_cosbeta(cos_beta: Float[Array, ' n_freq']) -> tuple[Float[Array, ' n_freq'], Float[Array, ' n_freq']]
¤
Compute cos(beta/2) and sin(beta/2) from cos(beta).
Uses half-angle formulas: - cos(beta/2) = sqrt((1 + cos(beta)) / 2) - sin(beta/2) = sqrt((1 - cos(beta)) / 2)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cos_beta
|
float or array
|
cos(beta). |
required |
Returns:
| Type | Description |
|---|---|
tuple[Float[Array, ' n_freq'], Float[Array, ' n_freq']]
|
tuple[float or array, float or array]: (cos(beta/2), sin(beta/2)), both always non-negative. |
apply_polarization_rotation(zeta_polarization: FloatLike, _hp, _hc) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Apply polarization rotation to waveform components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zeta_polarization
|
float
|
Polarization angle. |
required |
_hp
|
array_like
|
Plus polarization component (unrotated). |
required |
_hc
|
array_like
|
Cross polarization component (unrotated). |
required |
Returns:
| Type | Description |
|---|---|
tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
|
tuple[array_like, array_like]: Rotated plus (hp) and cross (hc) polarizations. |
compute_chiTot_perp(m1: FloatLike, m2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi2x: FloatLike, chi2y: FloatLike) -> FloatLike
¤
Total perpendicular spin parameter for afinal_prec (LAL PhenomXPFinalSpinMod=4, the default).
LALSimIMRPhenomX_precession.c lines 237-241: STot_perp = |S1_perp + S2_perp| where S_i = chi_i * (mi/M)^2 chiTot_perp = STot_perp * M^2 / m1^2
This is used by build_pWF22 (as its 'chip' argument) to compute afinal_prec via Sperp = chiTot_perp * mm1^2 = STot_perp afinal_prec = sign(a_aln) * sqrt(STot_perp^2 + a_aln^2) matching LAL's default fsflag=4 convention.
compute_chip(m1: FloatLike, m2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi2x: FloatLike, chi2y: FloatLike) -> FloatLike
¤
Effective precession spin parameter chi_p.
LALSimIMRPhenomX_precession.c lines 260-275: A1 = 2 + 3m2/(2m1), A2 = 2 + 3m1/(2m2) chip = max(A1m1^2chi1_perp, A2m2^2chi2_perp) / (A1*m1^2)
generate_xphm(mass_1: FloatLike, mass_2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi1z: FloatLike, chi2x: FloatLike, chi2y: FloatLike, chi2z: FloatLike, distance: FloatLike, inclination: FloatLike, phi0: FloatLike, frequency_array: Float[Array, ' n_freq'], reference_frequency: float) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Generate IMRPhenomXPHM plus and cross polarizations.
twist_21(cexp_i_alpha: Complex[Array, ' n_freq'], theta_JN: FloatLike, beta_powers: BetaPowers) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Compute the twisting contributions for l=2, m'=1 mode.
This function computes the sum over m of the Wigner-d matrix elements and spherical harmonics for the (2,1) mode, following eq. 3.5-3.7 in the Precessing paper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cexp_i_alpha
|
Complex[Array, ' n_freq']
|
Complex exponential e^{i*alpha} (array over frequencies) |
required |
theta_JN
|
FloatLike
|
Angle between total angular momentum and line of sight |
required |
beta_powers
|
BetaPowers
|
BetaPowers object containing powers of cos(beta/2) and sin(beta/2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hp_sum |
Complex[Array, ' n_freq']
|
Plus polarization contribution |
hc_sum |
Complex[Array, ' n_freq']
|
Cross polarization contribution |
twist_22(cexp_i_alpha: Complex[Array, ' n_freq'], theta_JN: FloatLike, beta_powers: BetaPowers) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Compute the twisting contributions for l=2, m'=2 mode.
This function computes the sum over m of the Wigner-d matrix elements and spherical harmonics for the (2,2) mode, following eq. 3.5-3.7 in the Precessing paper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cexp_i_alpha
|
Complex[Array, ' n_freq']
|
Complex exponential e^{i*alpha} (array over frequencies) |
required |
theta_JN
|
FloatLike
|
Angle between total angular momentum and line of sight |
required |
beta_powers
|
BetaPowers
|
BetaPowers object containing powers of cos(beta/2) and sin(beta/2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hp_sum |
Complex[Array, ' n_freq']
|
Plus polarization contribution |
hc_sum |
Complex[Array, ' n_freq']
|
Cross polarization contribution |
twist_32(cexp_i_alpha: Complex[Array, ' n_freq'], theta_JN: FloatLike, beta_powers: BetaPowers) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Compute the twisting contributions for l=3, m'=2 mode.
This function computes the sum over m of the Wigner-d matrix elements and spherical harmonics for the (3,2) mode, following eq. 3.5-3.7 in the Precessing paper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cexp_i_alpha
|
Complex[Array, ' n_freq']
|
Complex exponential e^{i*alpha} (array over frequencies) |
required |
theta_JN
|
FloatLike
|
Angle between total angular momentum and line of sight |
required |
beta_powers
|
BetaPowers
|
BetaPowers object containing powers of cos(beta/2) and sin(beta/2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hp_sum |
Complex[Array, ' n_freq']
|
Plus polarization contribution |
hc_sum |
Complex[Array, ' n_freq']
|
Cross polarization contribution |
twist_33(cexp_i_alpha: Complex[Array, ' n_freq'], theta_JN: FloatLike, beta_powers: BetaPowers) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Compute the twisting contributions for l=3, m'=3 mode.
This function computes the sum over m of the Wigner-d matrix elements and spherical harmonics for the (3,3) mode, following eq. 3.5-3.7 in the Precessing paper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cexp_i_alpha
|
Complex[Array, ' n_freq']
|
Complex exponential e^{i*alpha} (array over frequencies) |
required |
theta_JN
|
FloatLike
|
Angle between total angular momentum and line of sight |
required |
beta_powers
|
BetaPowers
|
BetaPowers object containing powers of cos(beta/2) and sin(beta/2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hp_sum |
Complex[Array, ' n_freq']
|
Plus polarization contribution |
hc_sum |
Complex[Array, ' n_freq']
|
Cross polarization contribution |
twist_44(cexp_i_alpha: Complex[Array, ' n_freq'], theta_JN: FloatLike, beta_powers: BetaPowers) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Compute the twisting contributions for l=4, m'=4 mode.
This function computes the sum over m of the Wigner-d matrix elements and spherical harmonics for the (4,4) mode, following eq. 3.5-3.7 in the Precessing paper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cexp_i_alpha
|
Complex[Array, ' n_freq']
|
Complex exponential e^{i*alpha} (array over frequencies) |
required |
theta_JN
|
FloatLike
|
Angle between total angular momentum and line of sight |
required |
beta_powers
|
BetaPowers
|
BetaPowers object containing powers of cos(beta/2) and sin(beta/2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
hp_sum |
Complex[Array, ' n_freq']
|
Plus polarization contribution |
hc_sum |
Complex[Array, ' n_freq']
|
Cross polarization contribution |
twistup(Mf: Float[Array, ' n_freq'] | FloatLike, mass_1: FloatLike, mass_2: FloatLike, chi1x: FloatLike, chi1y: FloatLike, chi1z: FloatLike, chi2x: FloatLike, chi2y: FloatLike, chi2z: FloatLike, phiRef_In: FloatLike, inclination: FloatLike, reference_frequency: float, hlm: Complex[Array, 'n_modes n_freq']) -> tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
¤
Rotate the co-precessing frame hlm modes into the inertial (J-frame) polarisations hp, hc. Implementation follows the lalsimulation function IMRPhenomXPHMTwistUps.
Computes the precession angles (alpha, beta, epsilon) at each frequency via MSA, applies the per-mode Wigner-d rotation and spherical-harmonic projection, sums over modes (21, 22, 32, 33, 44), and applies a final polarisation rotation by zeta.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Mf
|
Float[Array, ' n_freq'] | FloatLike
|
Dimensionless frequency array (len N). |
required |
mass_1, mass_2
|
Component masses in solar masses. |
required | |
chi1x/y/z, chi2x/y/z
|
Dimensionless spin components in the L-frame. |
required | |
phiRef_In
|
FloatLike
|
Reference orbital phase (rad). |
required |
inclination
|
FloatLike
|
Inclination angle between J and line of sight (rad). |
required |
reference_frequency
|
float
|
Reference frequency for spin evolution (Hz). |
required |
hlm
|
Complex[Array, 'n_modes n_freq']
|
Co-precessing frame modes, shape (n_modes, N). |
required |
Returns:
| Type | Description |
|---|---|
tuple[Complex[Array, ' n_freq'], Complex[Array, ' n_freq']]
|
hp, hc: Plus and cross polarisations, shape (N,). |