LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomX_precession.c File Reference

Prototypes

int IMRPhenomXGetAndSetPrecessionVariables (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, REAL8 m1_SI, REAL8 m2_SI, REAL8 chi1x, REAL8 chi1y, REAL8 chi1z, REAL8 chi2x, REAL8 chi2y, REAL8 chi2z, LALDict *lalParams, INT4 debug_flag)
 Function to populate the IMRPhenomXPrecessionStruct: More...
 
INT4 IMRPhenomX_SetPrecessingRemnantParams (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 
void Get_alphaepsilon_atfref (REAL8 *alpha_offset, REAL8 *epsilon_offset, UINT4 mprime, IMRPhenomXPrecessionStruct *pPrec, IMRPhenomXWaveformStruct *pWF)
 Get alpha and epsilon offset depending of the mprime (second index of the non-precessing mode) More...
 
REAL8 XLALSimIMRPhenomXLPNAnsatz (REAL8 v, REAL8 LNorm, REAL8 L0, REAL8 L1, REAL8 L2, REAL8 L3, REAL8 L4, REAL8 L5, REAL8 L6, REAL8 L7, REAL8 L8, REAL8 L8L)
 This is a convenient wrapper function for PN orbital angular momentum. More...
 
REAL8 XLALSimIMRPhenomXL2PNNS (const REAL8 v, const REAL8 eta)
 2PN non-spinning orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3} More...
 
REAL8 XLALSimIMRPhenomXL3PNAS (const REAL8 v, const REAL8 eta, const REAL8 chi1L, const REAL8 chi2L, const REAL8 delta)
 3PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3} More...
 
REAL8 XLALSimIMRPhenomXL4PNAS (const REAL8 v, const REAL8 eta, const REAL8 chi1L, const REAL8 chi2L, const REAL8 delta)
 4PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3} More...
 
REAL8 XLALSimIMRPhenomXL4PNLOSIAS (const REAL8 v, const REAL8 eta, const REAL8 chi1L, const REAL8 chi2L, const REAL8 delta)
 4PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3} More...
 
REAL8 XLALSimIMRPhenomXPNEuleralphaNNLO (const REAL8 f, const REAL8 eta, const REAL8 chi1L, const REAL8 chi2L, const REAL8 chip, const REAL8 alpha0)
 External wrapper function to next-to-next-to-leading (NNLO) in spin-orbit expression for the PN Euler angle alpha. More...
 
REAL8 XLALSimIMRPhenomXPNEulerepsilonNNLO (REAL8 f, REAL8 eta, REAL8 chi1L, REAL8 chi2L, REAL8 chip, REAL8 epsilon0)
 External wrapper to NNLO PN epsilon angle. More...
 
double IMRPhenomX_PN_Euler_alpha_NNLO (IMRPhenomXPrecessionStruct *pPrec, const double omega, const double omega_cbrt2, const double omega_cbrt, const double logomega)
 Internal function to calculate alpha using pre-cached NNLO PN expressions. More...
 
double IMRPhenomX_PN_Euler_epsilon_NNLO (IMRPhenomXPrecessionStruct *pPrec, const double omega, const double omega_cbrt2, const double omega_cbrt, const double logomega)
 Internal function to calculate epsilon using pre-cached NNLO PN expressions. More...
 
int IMRPhenomXPTwistUp22 (const REAL8 Mf, const COMPLEX16 hAS, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, COMPLEX16 *hp, COMPLEX16 *hc)
 Core twisting up routine, see Section III A of arXiv:2004.06503. More...
 
int IMRPhenomXWignerdCoefficients_cosbeta (REAL8 *cos_beta_half, REAL8 *sin_beta_half, const REAL8 cos_beta)
 
int IMRPhenomXWignerdCoefficients (REAL8 *cos_beta_half, REAL8 *sin_beta_half, const REAL8 v, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 
int IMRPhenomXPCheckMaxOpeningAngle (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 Helper function to check if maximum opening angle > pi/2 or pi/4 and issues a warning. More...
 
double IMRPhenomX_L_norm_3PN_of_v (const double v, const double v2, const double L_norm, IMRPhenomXPrecessionStruct *pPrec)
 Returns the 3PN accurate orbital angular momentum as implemented in LALSimInspiralFDPrecAngles_internals.c. More...
 
vector IMRPhenomX_Return_phi_zeta_costhetaL_MSA (const double v, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 Wrapper to generate \(\phi_z\), \(\zeta\) and \(\cos \theta_L\) at a given frequency. More...
 
int IMRPhenomX_Initialize_MSA_System (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, int ExpansionOrder)
 This function initializes all the core variables required for the MSA system. More...
 
double IMRPhenomX_psiofv (const double v, const double v2, const double psi0, const double psi1, const double psi2, const IMRPhenomXPrecessionStruct *pPrec)
 
vector IMRPhenomX_Return_Roots_MSA (double LNorm, double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 Here we solve for the roots of Eq 21 in Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967: More...
 
double IMRPhenomX_JNorm_MSA (const double LNorm, IMRPhenomXPrecessionStruct *pPrec)
 Get norm of J using Eq 41 of Chatziioannou et al, PRD 95, 104004, (2017) More...
 
double IMRPhenomX_Return_SNorm_MSA (const double v, IMRPhenomXPrecessionStruct *pPrec)
 Get norm of S, see PRD 95, 104004, (2017) More...
 
vector IMRPhenomX_Return_Spin_Evolution_Coefficients_MSA (const double LNorm, const double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 Get coefficients for Eq 21 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967. More...
 
vector IMRPhenomX_Return_Constants_c_MSA (const double v, const double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 Get c constants from Appendix B (B6, B7, B8) of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967. More...
 
vector IMRPhenomX_Return_Constants_d_MSA (const double LNorm, const double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 Get d constants from Appendix B (B9, B10, B11) of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967. More...
 
double IMRPhenomX_costhetaLJ (const double L_norm, const double J_norm, const double S_norm)
 Calculate (L dot J) More...
 
double IMRPhenomX_Return_Psi_MSA (double v, double v2, const IMRPhenomXPrecessionStruct *pPrec)
 Get \(\psi\) using Eq 51 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967: More...
 
double IMRPhenomX_Return_Psi_dot_MSA (const double v, const IMRPhenomXPrecessionStruct *pPrec)
 Get \(\dot{\psi}\) using Eq 24 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967: More...
 
double IMRPhenomX_Return_phiz_MSA (const double v, const double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 Get \(\phi_z\) using Eq 66 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967: More...
 
double IMRPhenomX_Return_zeta_MSA (const double v, const IMRPhenomXPrecessionStruct *pPrec)
 Get \(\zeta\) using Eq F5 in Appendix F of Chatziioannou et al, PRD 95, 104004, (2017): More...
 
vector IMRPhenomX_Return_MSA_Corrections_MSA (double v, double LNorm, double JNorm, const IMRPhenomXPrecessionStruct *pPrec)
 
double IMRPhenomX_Get_PN_beta (const double a, const double b, const IMRPhenomXPrecessionStruct *pPrec)
 Internal function to computes the PN spin-orbit couplings. More...
 
double IMRPhenomX_Get_PN_sigma (const double a, const double b, const IMRPhenomXPrecessionStruct *pPrec)
 Internal function to compute PN spin-spin couplings. More...
 
double IMRPhenomX_Get_PN_tau (const double a, const double b, const IMRPhenomXPrecessionStruct *pPrec)
 Internal function to computes PN spin-spin couplings. More...
 
double IMRPhenomX_vector_dot_product (const vector v1, const vector v2)
 
vector IMRPhenomX_vector_cross_product (const vector v1, const vector v2)
 
double IMRPhenomX_vector_L2_norm (const vector v1)
 
vector IMRPhenomX_vector_scalar (const vector v1, const double a)
 
vector IMRPhenomX_vector_sum (const vector v1, const vector v2)
 
vector IMRPhenomX_vector_diff (const vector v1, const vector v2)
 
vector IMRPhenomX_vector_PolarToCartesian (const sphpolvector v1)
 
sphpolvector IMRPhenomX_vector_CartesianToPolar (const vector v1)
 
vector IMRPhenomX_vector_rotate_z (const REAL8 angle, const vector v1)
 Function to rotate vector about z axis by given angle. More...
 
vector IMRPhenomX_vector_rotate_y (const REAL8 angle, const vector v1)
 Function to rotate vector about y axis by given angle. More...
 
void IMRPhenomX_rotate_z (const REAL8 angle, REAL8 *vx, REAL8 *vy, REAL8 *vz)
 Function to rotate vector about z axis by given angle. More...
 
void IMRPhenomX_rotate_y (REAL8 angle, REAL8 *vx, REAL8 *vy, REAL8 *vz)
 Function to rotate vector about y axis by given angle. More...
 
REAL8 IMRPhenomX_Cartesian_to_SphericalPolar_theta (const double x, const double y, const UNUSED double z)
 
REAL8 IMRPhenomX_Cartesian_to_SphericalPolar_phi (const double x, const double y, const UNUSED double z)
 
vector IMRPhenomX_vector_PolarToCartesian_components (const REAL8 mag, const REAL8 theta, const REAL8 phi)
 
static REAL8TimeSeriesappendTS (REAL8TimeSeries *start, REAL8TimeSeries *end)
 used in numerical evaluation of Euler angles More...
 
int alphaMRD_coeff (gsl_spline spline_alpha, gsl_interp_accel accel_alpha, double fmaxPN, IMRPhenomXWaveformStruct *pWF, PhenomXPalphaMRD *alpha_params)
 Analytical continuation for alpha angle in MRD. More...
 
double alphaMRD (double Mf, PhenomXPalphaMRD *alpha_params)
 
double dalphaMRD (double Mf, PhenomXPalphaMRD *alpha_params)
 
int betaMRD_coeff (gsl_spline spline_cosb, gsl_interp_accel accel_cosb, double fmaxPN, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 Function to determine coefficients of analytical continuation of beta through MRD. More...
 
double betaMRD (double Mf, UNUSED IMRPhenomXWaveformStruct *pWF, PhenomXPbetaMRD *beta_params)
 
int gamma_from_alpha_cosbeta (double *gamma, double Mf, double deltaMf, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 
int IMRPhenomXPSpinTaylorAnglesIMR (REAL8Sequence **alphaFS, REAL8Sequence **cosbetaFS, REAL8Sequence **gammaFS, REAL8Sequence *freqsIN, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *LALparams)
 This function evaluates the SpinTaylor Euler angles on a frequency grid passed by the user. More...
 
int IMRPhenomX_SpinTaylorAnglesSplinesAll (REAL8 fmin, REAL8 fmax, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *LALparams)
 This function builds and stores splines for \(\alpha\) and \(\cos\beta\) in the frequency range covered by PN, and computes a spline for \(\gamma\) between fmin and fmax
More...
 
int IMRPhenomX_InterpolateGamma_SpinTaylor (REAL8 fmin, REAL8 fmax, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 This function computes gamma from the minimal rotation condition and stores a spline for it. More...
 
int IMRPhenomX_InterpolateAlphaBeta_SpinTaylor (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *LALparams)
 This function computes cubic splines of the alpha and beta inspiral Euler angles, which are then stored into a IMRPhenomXPrecessionStruct structure. More...
 
int IMRPhenomX_InspiralAngles_SpinTaylor (PhenomXPInspiralArrays *arrays, REAL8 chi1x, REAL8 chi1y, REAL8 chi1z, REAL8 chi2x, REAL8 chi2y, REAL8 chi2z, REAL8 fmin, int PrecVersion, IMRPhenomXWaveformStruct *pWF, LALDict *LALparams)
 Wrapper of XLALSimInspiralSpinTaylorPNEvolveOrbit : if integration is successful, stores arrays containing PN solution in a PhenomXPInspiralArrays struct
More...
 
int IMRPhenomX_Initialize_Euler_Angles (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 Wrapper of IMRPhenomX_SpinTaylorAnglesSplinesAll: fmin and fmax are determined by the function based on the mode content and binary's parameters . More...
 
int XLALSimIMRPhenomXPSpinTaylorAngles (REAL8Sequence **alphaFS, REAL8Sequence **cosbetaFS, REAL8Sequence **gammaFS, REAL8 m1_SI, REAL8 m2_SI, REAL8 s1x, REAL8 s1y, REAL8 s1z, REAL8 s2x, REAL8 s2y, REAL8 s2z, REAL8 fmin, REAL8 fmax, REAL8 deltaF, REAL8 fRef, REAL8 phiRef, LALDict *LALparams)
 XLAL function that evaluates the SpinTaylor Euler angles on a frequency grid passed by the user. More...
 
void IMRPhenomX_GetandSetModes (LALValue *ModeArray, IMRPhenomXPrecessionStruct *pPrec)
 
int IMRPhenomXPTwistUp22_NumericalAngles (const COMPLEX16 hAS, REAL8 alpha, REAL8 cos_beta, REAL8 gamma, IMRPhenomXPrecessionStruct *pPrec, COMPLEX16 *hp, COMPLEX16 *hc)
 Core twisting up routine for SpinTaylor angles. More...
 

Go to the source code of this file.

Macros

#define MIN(a, b)   (((a)<(b))?(a):(b))
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 
#define omp   ignore
 
#define DEBUG   0
 

Macro Definition Documentation

◆ MIN

#define MIN (   a,
 
)    (((a)<(b))?(a):(b))
Author
Geraint Pratten

Definition at line 45 of file LALSimIMRPhenomX_precession.c.

◆ MAX

#define MAX (   a,
 
)    (((a)>(b))?(a):(b))

Definition at line 46 of file LALSimIMRPhenomX_precession.c.

◆ omp

#define omp   ignore

Definition at line 50 of file LALSimIMRPhenomX_precession.c.

◆ DEBUG

#define DEBUG   0

Definition at line 54 of file LALSimIMRPhenomX_precession.c.

Function Documentation

◆ IMRPhenomXGetAndSetPrecessionVariables()

int IMRPhenomXGetAndSetPrecessionVariables ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
REAL8  m1_SI,
REAL8  m2_SI,
REAL8  chi1x,
REAL8  chi1y,
REAL8  chi1z,
REAL8  chi2x,
REAL8  chi2y,
REAL8  chi2z,
LALDict *  lalParams,
INT4  debug_flag 
)

Function to populate the IMRPhenomXPrecessionStruct:

  • Calculates frame transformation
  • PN Euler angles
  • Frame transformations
  • Orbital angular momenta etc

Definition at line 67 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_SetPrecessingRemnantParams()

INT4 IMRPhenomX_SetPrecessingRemnantParams ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  lalParams 
)

Definition at line 1101 of file LALSimIMRPhenomX_precession.c.

◆ Get_alphaepsilon_atfref()

void Get_alphaepsilon_atfref ( REAL8 alpha_offset,
REAL8 epsilon_offset,
UINT4  mprime,
IMRPhenomXPrecessionStruct pPrec,
IMRPhenomXWaveformStruct pWF 
)

Get alpha and epsilon offset depending of the mprime (second index of the non-precessing mode)

Parameters
[out]alpha_offsetalpha offset for mprime
[out]epsilon_offsetepsilon offset for mprime
mprimeSecond index non-precessing mode
pPrecIMRPhenomX Precession Struct
pWFIMRPhenomX Waveform Struct

Definition at line 1348 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXLPNAnsatz()

REAL8 XLALSimIMRPhenomXLPNAnsatz ( REAL8  v,
REAL8  LNorm,
REAL8  L0,
REAL8  L1,
REAL8  L2,
REAL8  L3,
REAL8  L4,
REAL8  L5,
REAL8  L6,
REAL8  L7,
REAL8  L8,
REAL8  L8L 
)

This is a convenient wrapper function for PN orbital angular momentum.

Parameters
vInput velocity
LNormOrbital angular momentum normalization
L0Newtonian orbital angular momentum (i.e. LN = 1.0*LNorm)
L10.5PN Orbital angular momentum
L21.0PN Orbital angular momentum
L31.5PN Orbital angular momentum
L42.0PN Orbital angular momentum
L52.5PN Orbital angular momentum
L63.0PN Orbital angular momentum
L73.5PN Orbital angular momentum
L84.0PN Orbital angular momentum
L8L4.0PN logarithmic orbital angular momentum term

Definition at line 1395 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXL2PNNS()

REAL8 XLALSimIMRPhenomXL2PNNS ( const REAL8  v,
const REAL8  eta 
)

2PN non-spinning orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3}

  • Bohe et al, 1212.5520v2, Eq 4.7

Definition at line 1432 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXL3PNAS()

REAL8 XLALSimIMRPhenomXL3PNAS ( const REAL8  v,
const REAL8  eta,
const REAL8  chi1L,
const REAL8  chi2L,
const REAL8  delta 
)

3PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3}

Includes linear in spin corrections up to 3.5PN

  • Bohe et al, 1212.5520v2, Eq 4.7

Definition at line 1449 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXL4PNAS()

REAL8 XLALSimIMRPhenomXL4PNAS ( const REAL8  v,
const REAL8  eta,
const REAL8  chi1L,
const REAL8  chi2L,
const REAL8  delta 
)

4PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3}

  • Bohe et al, 1212.5520v2, Eq 4.7
  • Marsat, CQG, 32, 085008, (2015), arXiv:1411.4118
  • Siemonsen et al, PRD, 97, 064010, (2018), arXiv:1606.08832

Definition at line 1475 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXL4PNLOSIAS()

REAL8 XLALSimIMRPhenomXL4PNLOSIAS ( const REAL8  v,
const REAL8  eta,
const REAL8  chi1L,
const REAL8  chi2L,
const REAL8  delta 
)

4PN orbital angular momentum as a function of x = v^2 = (Pi M f)^{2/3}

  • Bohe et al, 1212.5520v2, Eq 4.7
  • Marsat, CQG, 32, 085008, (2015), arXiv:1411.4118
  • Siemonsen et al, PRD, 97, 064010, (2018), arXiv:1606.08832

Definition at line 1506 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXPNEuleralphaNNLO()

REAL8 XLALSimIMRPhenomXPNEuleralphaNNLO ( const REAL8  f,
const REAL8  eta,
const REAL8  chi1L,
const REAL8  chi2L,
const REAL8  chip,
const REAL8  alpha0 
)

External wrapper function to next-to-next-to-leading (NNLO) in spin-orbit expression for the PN Euler angle alpha.

This expression is derived by PN re-expanding and averaging over the orientation of the spin in the orbital plane.

Parameters
fGeometric frequency
etaSymmetric mass rato
chi1LDimensionless aligned spin of larger BH
chi2LDimensionless aligned spin of smaller BH
chipEffective precession parameter: Schmidt, Ohme, Hannam, PRD, 91,024043 (2015)
alpha0Euler angle at reference Frequency, defines a constant offset

Definition at line 1545 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXPNEulerepsilonNNLO()

REAL8 XLALSimIMRPhenomXPNEulerepsilonNNLO ( REAL8  f,
REAL8  eta,
REAL8  chi1L,
REAL8  chi2L,
REAL8  chip,
REAL8  epsilon0 
)

External wrapper to NNLO PN epsilon angle.

See documentation above XLALSimIMRPhenomXPNEuleralphaNNLO.

Parameters
fGeometric frequency
etaSymmetric mass rato
chi1LDimensionless aligned spin of larger BH
chi2LDimensionless aligned spin of smaller BH
chipEffective precession parameter: Schmidt, Ohme, Hannam, PRD, 91,024043 (2015)
epsilon0Euler angle at reference Frequency, defines a constant offset

Definition at line 1604 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_PN_Euler_alpha_NNLO()

double IMRPhenomX_PN_Euler_alpha_NNLO ( IMRPhenomXPrecessionStruct pPrec,
const double  omega,
const double  omega_cbrt2,
const double  omega_cbrt,
const double  logomega 
)

Internal function to calculate alpha using pre-cached NNLO PN expressions.

Parameters
pPrecIMRPhenomX Precession Struct
omegaOrbital frequency
omega_cbrt2Orbital frequency
omega_cbrtCubic root of orbital frequency
logomegaNatural logarithm of orbital frequency

Definition at line 1663 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_PN_Euler_epsilon_NNLO()

double IMRPhenomX_PN_Euler_epsilon_NNLO ( IMRPhenomXPrecessionStruct pPrec,
const double  omega,
const double  omega_cbrt2,
const double  omega_cbrt,
const double  logomega 
)

Internal function to calculate epsilon using pre-cached NNLO PN expressions.

Parameters
pPrecIMRPhenomX Precession Struct
omegaOrbital frequency
omega_cbrt2Orbital frequency
omega_cbrtCubic root of orbital frequency
logomegaNatural logarithm of orbital frequency

Definition at line 1687 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXPTwistUp22()

int IMRPhenomXPTwistUp22 ( const REAL8  Mf,
const COMPLEX16  hAS,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
COMPLEX16 hp,
COMPLEX16 hc 
)

Core twisting up routine, see Section III A of arXiv:2004.06503.

Parameters
MfFrequency (Hz)
hASUnderlying aligned-spin IMRPhenomXAS strain
pWFIMRPhenomX Waveform Struct
pPrecIMRPhenomXP Precession Struct
[out]hph_+ polarization \(\tilde h_+\)
[out]hch_x polarization \(\tilde h_x\)

Definition at line 1711 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXWignerdCoefficients_cosbeta()

int IMRPhenomXWignerdCoefficients_cosbeta ( REAL8 cos_beta_half,
REAL8 sin_beta_half,
const REAL8  cos_beta 
)
Parameters
[out]cos_beta_halfcos(beta/2)
[out]sin_beta_halfsin(beta/2)
cos_betacos(beta)

Definition at line 1870 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXWignerdCoefficients()

int IMRPhenomXWignerdCoefficients ( REAL8 cos_beta_half,
REAL8 sin_beta_half,
const REAL8  v,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)
Parameters
[out]cos_beta_halfcos(beta/2)
[out]sin_beta_halfsin(beta/2)
vCubic root of (Pi * Frequency (geometric))
pWFIMRPhenomX waveform struct
pPrecIMRPhenomX precession struct

Definition at line 1883 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXPCheckMaxOpeningAngle()

int IMRPhenomXPCheckMaxOpeningAngle ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Helper function to check if maximum opening angle > pi/2 or pi/4 and issues a warning.

See discussion in https://dcc.ligo.org/LIGO-T1500602

Parameters
pWFIMRPhenomX Waveform Struct
pPrecIMRPhenomXP Precession Struct

Definition at line 1911 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_L_norm_3PN_of_v()

double IMRPhenomX_L_norm_3PN_of_v ( const double  v,
const double  v2,
const double  L_norm,
IMRPhenomXPrecessionStruct pPrec 
)

Returns the 3PN accurate orbital angular momentum as implemented in LALSimInspiralFDPrecAngles_internals.c.

Definition at line 1954 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_phi_zeta_costhetaL_MSA()

vector IMRPhenomX_Return_phi_zeta_costhetaL_MSA ( const double  v,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Wrapper to generate \(\phi_z\), \(\zeta\) and \(\cos \theta_L\) at a given frequency.

Parameters
vVelocity
pWFIMRPhenomX waveform struct
pPrecIMRPhenomX precession struct

Definition at line 1961 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Initialize_MSA_System()

int IMRPhenomX_Initialize_MSA_System ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
int  ExpansionOrder 
)

This function initializes all the core variables required for the MSA system.

This will be called first.

Definition at line 2029 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_psiofv()

double IMRPhenomX_psiofv ( const double  v,
const double  v2,
const double  psi0,
const double  psi1,
const double  psi2,
const IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 2831 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Roots_MSA()

vector IMRPhenomX_Return_Roots_MSA ( double  LNorm,
double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Here we solve for the roots of Eq 21 in Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967:

  • Roots for (d S^2)/(d t^2) = -A^2 (S^2 -S+^2)(S^2 - S-^2)(S^2 - S3^2)
  • Returns Spl2 (S+^2), Smi2 (S-^2) and S3^2
  • Note: agrees with independent implementation in Mathematica

Definition at line 2844 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_JNorm_MSA()

double IMRPhenomX_JNorm_MSA ( const double  LNorm,
IMRPhenomXPrecessionStruct pPrec 
)

Get norm of J using Eq 41 of Chatziioannou et al, PRD 95, 104004, (2017)

Definition at line 2962 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_SNorm_MSA()

double IMRPhenomX_Return_SNorm_MSA ( const double  v,
IMRPhenomXPrecessionStruct pPrec 
)

Get norm of S, see PRD 95, 104004, (2017)

Definition at line 2971 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Spin_Evolution_Coefficients_MSA()

vector IMRPhenomX_Return_Spin_Evolution_Coefficients_MSA ( const double  LNorm,
const double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Get coefficients for Eq 21 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967.

Definition at line 3009 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Constants_c_MSA()

vector IMRPhenomX_Return_Constants_c_MSA ( const double  v,
const double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Get c constants from Appendix B (B6, B7, B8) of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967.

Definition at line 3066 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Constants_d_MSA()

vector IMRPhenomX_Return_Constants_d_MSA ( const double  LNorm,
const double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Get d constants from Appendix B (B9, B10, B11) of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967.

Definition at line 3118 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_costhetaLJ()

double IMRPhenomX_costhetaLJ ( const double  L_norm,
const double  J_norm,
const double  S_norm 
)

Calculate (L dot J)

Definition at line 3139 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Psi_MSA()

double IMRPhenomX_Return_Psi_MSA ( double  v,
double  v2,
const IMRPhenomXPrecessionStruct pPrec 
)

Get \(\psi\) using Eq 51 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967:

  • Here \(\psi\) is the phase of S as in Eq 23
  • Note that the coefficients are defined in Appendix C (C1 and C2)

Definition at line 3155 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_Psi_dot_MSA()

double IMRPhenomX_Return_Psi_dot_MSA ( const double  v,
const IMRPhenomXPrecessionStruct pPrec 
)

Get \(\dot{\psi}\) using Eq 24 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967:

Definition at line 3163 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_phiz_MSA()

double IMRPhenomX_Return_phiz_MSA ( const double  v,
const double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Get \(\phi_z\) using Eq 66 of Chatziioannou et al, PRD 95, 104004, (2017), arXiv:1703.03967:

  • The coefficients are given in Appendix D (D15 - D26)

Definition at line 3181 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_zeta_MSA()

double IMRPhenomX_Return_zeta_MSA ( const double  v,
const IMRPhenomXPrecessionStruct pPrec 
)

Get \(\zeta\) using Eq F5 in Appendix F of Chatziioannou et al, PRD 95, 104004, (2017):

Definition at line 3245 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Return_MSA_Corrections_MSA()

vector IMRPhenomX_Return_MSA_Corrections_MSA ( double  v,
double  LNorm,
double  JNorm,
const IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 3283 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Get_PN_beta()

double IMRPhenomX_Get_PN_beta ( const double  a,
const double  b,
const IMRPhenomXPrecessionStruct pPrec 
)

Internal function to computes the PN spin-orbit couplings.

As in LALSimInspiralFDPrecAngles.c cf https://git.ligo.org/lscsoft/lalsuite/-/blob/master/lalsimulation/lib/LALSimInspiralFDPrecAngles_internals.c#L798

Definition at line 3432 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Get_PN_sigma()

double IMRPhenomX_Get_PN_sigma ( const double  a,
const double  b,
const IMRPhenomXPrecessionStruct pPrec 
)

Internal function to compute PN spin-spin couplings.

As in LALSimInspiralFDPrecAngles.c cf https://git.ligo.org/lscsoft/lalsuite/-/blob/master/lalsimulation/lib/LALSimInspiralFDPrecAngles_internals.c#L806

Definition at line 3441 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Get_PN_tau()

double IMRPhenomX_Get_PN_tau ( const double  a,
const double  b,
const IMRPhenomXPrecessionStruct pPrec 
)

Internal function to computes PN spin-spin couplings.

As in LALSimInspiralFDPrecAngles.c

Definition at line 3449 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_dot_product()

double IMRPhenomX_vector_dot_product ( const vector  v1,
const vector  v2 
)

Definition at line 3457 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_cross_product()

vector IMRPhenomX_vector_cross_product ( const vector  v1,
const vector  v2 
)

Definition at line 3463 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_L2_norm()

double IMRPhenomX_vector_L2_norm ( const vector  v1)

Definition at line 3473 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_scalar()

vector IMRPhenomX_vector_scalar ( const vector  v1,
const double  a 
)

Definition at line 3479 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_sum()

vector IMRPhenomX_vector_sum ( const vector  v1,
const vector  v2 
)

Definition at line 3489 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_diff()

vector IMRPhenomX_vector_diff ( const vector  v1,
const vector  v2 
)

Definition at line 3498 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_PolarToCartesian()

vector IMRPhenomX_vector_PolarToCartesian ( const sphpolvector  v1)

Definition at line 3507 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_CartesianToPolar()

sphpolvector IMRPhenomX_vector_CartesianToPolar ( const vector  v1)

Definition at line 3519 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_rotate_z()

vector IMRPhenomX_vector_rotate_z ( const REAL8  angle,
const vector  v1 
)

Function to rotate vector about z axis by given angle.

Definition at line 3531 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_rotate_y()

vector IMRPhenomX_vector_rotate_y ( const REAL8  angle,
const vector  v1 
)

Function to rotate vector about y axis by given angle.

Definition at line 3543 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_rotate_z()

void IMRPhenomX_rotate_z ( const REAL8  angle,
REAL8 vx,
REAL8 vy,
REAL8 vz 
)

Function to rotate vector about z axis by given angle.

Definition at line 3556 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_rotate_y()

void IMRPhenomX_rotate_y ( REAL8  angle,
REAL8 vx,
REAL8 vy,
REAL8 vz 
)

Function to rotate vector about y axis by given angle.

Definition at line 3573 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Cartesian_to_SphericalPolar_theta()

REAL8 IMRPhenomX_Cartesian_to_SphericalPolar_theta ( const double  x,
const double  y,
const UNUSED double  z 
)

Definition at line 3589 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Cartesian_to_SphericalPolar_phi()

REAL8 IMRPhenomX_Cartesian_to_SphericalPolar_phi ( const double  x,
const double  y,
const UNUSED double  z 
)

Definition at line 3600 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_vector_PolarToCartesian_components()

vector IMRPhenomX_vector_PolarToCartesian_components ( const REAL8  mag,
const REAL8  theta,
const REAL8  phi 
)

Definition at line 3609 of file LALSimIMRPhenomX_precession.c.

◆ appendTS()

static REAL8TimeSeries* appendTS ( REAL8TimeSeries start,
REAL8TimeSeries end 
)
static

used in numerical evaluation of Euler angles

Definition at line 3624 of file LALSimIMRPhenomX_precession.c.

◆ alphaMRD_coeff()

int alphaMRD_coeff ( gsl_spline  spline_alpha,
gsl_interp_accel  accel_alpha,
double  fmaxPN,
IMRPhenomXWaveformStruct pWF,
PhenomXPalphaMRD alpha_params 
)

Analytical continuation for alpha angle in MRD.

Definition at line 3641 of file LALSimIMRPhenomX_precession.c.

◆ alphaMRD()

double alphaMRD ( double  Mf,
PhenomXPalphaMRD alpha_params 
)

Definition at line 3698 of file LALSimIMRPhenomX_precession.c.

◆ dalphaMRD()

double dalphaMRD ( double  Mf,
PhenomXPalphaMRD alpha_params 
)

Definition at line 3708 of file LALSimIMRPhenomX_precession.c.

◆ betaMRD_coeff()

int betaMRD_coeff ( gsl_spline  spline_cosb,
gsl_interp_accel  accel_cosb,
double  fmaxPN,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Function to determine coefficients of analytical continuation of beta through MRD.

Definition at line 3719 of file LALSimIMRPhenomX_precession.c.

◆ betaMRD()

double betaMRD ( double  Mf,
UNUSED IMRPhenomXWaveformStruct pWF,
PhenomXPbetaMRD beta_params 
)

Definition at line 3798 of file LALSimIMRPhenomX_precession.c.

◆ gamma_from_alpha_cosbeta()

int gamma_from_alpha_cosbeta ( double *  gamma,
double  Mf,
double  deltaMf,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 3821 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXPSpinTaylorAnglesIMR()

int IMRPhenomXPSpinTaylorAnglesIMR ( REAL8Sequence **  alphaFS,
REAL8Sequence **  cosbetaFS,
REAL8Sequence **  gammaFS,
REAL8Sequence freqsIN,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  LALparams 
)

This function evaluates the SpinTaylor Euler angles on a frequency grid passed by the user.

Used in LALSimIMRPhenomX.c.

Parameters
[out]alphaFSAlpha angle frequency series [out]
[out]cosbetaFScos(Beta) angle frequency series [out]
[out]gammaFSGamma angle frequency series [out]
[in]freqsINFrequency grid on which Euler angles will be evaluated [in]
[in]pWFWaveform structure [in]
[in]pPrecPrecession structure [in]
LALparamsLAL Dictionary struct

Definition at line 3864 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_SpinTaylorAnglesSplinesAll()

int IMRPhenomX_SpinTaylorAnglesSplinesAll ( REAL8  fmin,
REAL8  fmax,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  LALparams 
)

This function builds and stores splines for \(\alpha\) and \(\cos\beta\) in the frequency range covered by PN, and computes a spline for \(\gamma\) between fmin and fmax

Parameters
[in]fminMinimum frequency of the gamma spline [in]
[in]fmaxMaximum frequency of the gamma spline [in]
[in]pWFWaveform structure [in]
[in]pPrecPrecession structure [in]
LALparamsLAL Dictionary struct

Definition at line 3988 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_InterpolateGamma_SpinTaylor()

int IMRPhenomX_InterpolateGamma_SpinTaylor ( REAL8  fmin,
REAL8  fmax,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

This function computes gamma from the minimal rotation condition and stores a spline for it.

Parameters
fminstarting frequency (Hz)
fmaxmaximum frequency (Hz)
[in]pWFWaveform structure [in]
[in]pPrecPrecession structure [in]

Definition at line 4030 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_InterpolateAlphaBeta_SpinTaylor()

int IMRPhenomX_InterpolateAlphaBeta_SpinTaylor ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  LALparams 
)

This function computes cubic splines of the alpha and beta inspiral Euler angles, which are then stored into a IMRPhenomXPrecessionStruct structure.

  • If the user passed PhenomXPFinalSpinMod=4, the function corrects the estimate for the final precessing spin based on the result of the PN integration.
  • For versions 32*, the function also computes the parameters needed to obtain a smooth MRD continuation of alpha/beta.
  • The memory allocated for the PN arrays is freed at the end of this function.
Parameters
[in]pWFWaveform structure [in]
[in]pPrecPrecession structure [in]
LALparamsLAL Dictionary struct

Definition at line 4135 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_InspiralAngles_SpinTaylor()

int IMRPhenomX_InspiralAngles_SpinTaylor ( PhenomXPInspiralArrays arrays,
REAL8  chi1x,
REAL8  chi1y,
REAL8  chi1z,
REAL8  chi2x,
REAL8  chi2y,
REAL8  chi2z,
REAL8  fmin,
int  PrecVersion,
IMRPhenomXWaveformStruct pWF,
LALDict *  LALparams 
)

Wrapper of XLALSimInspiralSpinTaylorPNEvolveOrbit : if integration is successful, stores arrays containing PN solution in a PhenomXPInspiralArrays struct

Parameters
[out]arraysStruct containing solutions returned by PNEvolveOrbit
chi1xx-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) at fRef
chi1yy-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) at fRef
chi1zz-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) at fRef
chi2xx-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) at fRef
chi2yy-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) at fRef
chi2zz-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) at fRef
fminminimum frequency (Hz)
PrecVersionprecessing version (int)
pWFWaveform structure [in]
LALparamsLAL Dictionary struct

Definition at line 4315 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_Initialize_Euler_Angles()

int IMRPhenomX_Initialize_Euler_Angles ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  lalParams 
)

Wrapper of IMRPhenomX_SpinTaylorAnglesSplinesAll: fmin and fmax are determined by the function based on the mode content and binary's parameters .

Used in LALSimIMRPhenomXPHM.c

Definition at line 4665 of file LALSimIMRPhenomX_precession.c.

◆ XLALSimIMRPhenomXPSpinTaylorAngles()

int XLALSimIMRPhenomXPSpinTaylorAngles ( REAL8Sequence **  alphaFS,
REAL8Sequence **  cosbetaFS,
REAL8Sequence **  gammaFS,
REAL8  m1_SI,
REAL8  m2_SI,
REAL8  s1x,
REAL8  s1y,
REAL8  s1z,
REAL8  s2x,
REAL8  s2y,
REAL8  s2z,
REAL8  fmin,
REAL8  fmax,
REAL8  deltaF,
REAL8  fRef,
REAL8  phiRef,
LALDict *  LALparams 
)

XLAL function that evaluates the SpinTaylor Euler angles on a frequency grid passed by the user.

Used in LALSimIMRPhenomX.c.

Parameters
[out]alphaFSAlpha angle frequency series [out]
[out]cosbetaFScos(Beta) angle frequency series [out]
[out]gammaFSGamma angle frequency series [out]
m1_SIMass of companion 1 (kg)
m2_SIMass of companion 2 (kg)
s1xx component of primary spin
s1yy component of primary spin
s1zz component of primary spin
s2xx component of secondary spin
s2yy component of secondary spin
s2zz component of secondary spin
fminstarting GW frequency (Hz)
fmaxmaximum GW frequency (Hz)
deltaFstarting GW frequency (Hz)
fRefreference GW frequency (Hz)
phiRefreference orbital phase (rad)
LALparamsLAL Dictionary struct

Definition at line 4711 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomX_GetandSetModes()

void IMRPhenomX_GetandSetModes ( LALValue *  ModeArray,
IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 4898 of file LALSimIMRPhenomX_precession.c.

◆ IMRPhenomXPTwistUp22_NumericalAngles()

int IMRPhenomXPTwistUp22_NumericalAngles ( const COMPLEX16  hAS,
REAL8  alpha,
REAL8  cos_beta,
REAL8  gamma,
IMRPhenomXPrecessionStruct pPrec,
COMPLEX16 hp,
COMPLEX16 hc 
)

Core twisting up routine for SpinTaylor angles.

Parameters
hASUnderlying aligned-spin IMRPhenomXAS strain
alphacosbeta Euler angle series
cos_betacosbeta Euler angle series
gammagamma Euler angle series
pPrecIMRPhenomXP Precession Struct
[out]hph_+ polarization \(\tilde h_+\)
[out]hch_x polarization \(\tilde h_x\)

Definition at line 4919 of file LALSimIMRPhenomX_precession.c.