LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomX_PNR_internals.c File Reference

Prototypes

INT4 IMRPhenomX_PNR_GetAndSetPNRVariables (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 This function computes the required single-spin quantities used to parameterize the MR tuned functions from arXiv:2107.08876. More...
 
INT4 IMRPhenomX_PNR_PopulateStructs (IMRPhenomXWaveformStruct **pWF_SingleSpin, IMRPhenomXPrecessionStruct **pPrec_SingleSpin, IMRPhenomX_PNR_alpha_parameters **alphaParams, IMRPhenomX_PNR_beta_parameters **betaParams, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 These two functions create and populate the required parameter structs for PNR. More...
 
void IMRPhenomX_PNR_FreeStructs (IMRPhenomXWaveformStruct **pWF_SingleSpin, IMRPhenomXPrecessionStruct **pPrec_SingleSpin, IMRPhenomX_PNR_alpha_parameters **alphaParams, IMRPhenomX_PNR_beta_parameters **betaParams)
 
INT4 IMRPhenomX_PNR_GeneratePNRGamma (REAL8Sequence *gamma, const REAL8Sequence *freqs, const REAL8Sequence *alpha, const REAL8Sequence *beta)
 This function computes the frequency integral outlined in Eq. More...
 
int IMRPhenomX_PNR_GeneratePNRGamma_FromInterpolants (REAL8Sequence *gamma, const REAL8Sequence *freqs, IMRPhenomX_PNR_angle_spline *ab_splines)
 This function computes the frequency integral outlined in Eq. More...
 
REAL8 IMRPhenomX_PNR_alphadot_cosbeta (REAL8 f, IMRPhenomX_PNR_angle_spline *params)
 Wrapper function for computing the integrand in Eq. More...
 
REAL8 IMRPhenomX_PNR_LinearFrequencyMap (REAL8 Mf, REAL8 ell, REAL8 emm, REAL8 Mf_lower, REAL8 Mf_upper, REAL8 Mf_RD_22, REAL8 Mf_RD_lm, UINT4 INSPIRAL)
 Computes a linear frequency map for the HM PNR angles based on the linear frequency mapping used originally in PhenomHM (Eq. More...
 
REAL8 IMRPhenomX_PNR_LinearFrequencySlope (REAL8 emm, REAL8 Mf_lower, REAL8 Mf_upper, REAL8 Mf_RD_22, REAL8 Mf_RD_lm)
 Computes the slope of the linear frequency interpolation mapping used for the HM PNR angles. More...
 
INT4 IMRPhenomX_PNR_LinearFrequencyMapTransitionFrequencies (REAL8 *Mf_low, REAL8 *Mf_high, REAL8 emmprime, REAL8 Mf_RD_22, REAL8 Mf_RD_lm, IMRPhenomXPrecessionStruct *pPrec)
 Compute the transition frequencies for the HM PNR angle mapping. More...
 
REAL8 IMRPhenomX_PNR_HMInterpolationDeltaF (REAL8 f_min, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 Here we compute an appropriate deltaF to be used when generating the (2,2) angle interpolants and mapping them to the HMs. More...
 
INT4 IMRPhenomX_PNR_CheckTwoSpin (IMRPhenomXPrecessionStruct *pPrec)
 This function quickly checks to see if we expect two-spin effects to be present in the inspiral precession angles. More...
 
REAL8 IMRPhenomX_PNR_AngleAtFRef (const REAL8Sequence *angle, const REAL8 f_ref, const REAL8Sequence *freqs, const REAL8 deltaF)
 Evaluates a function at two points and interpolates between them. More...
 
REAL8 IMRPhenomX_PNR_LinearInterpolate (REAL8 a0, REAL8 a1, REAL8 f0, REAL8 f1, REAL8 feval)
 Evaluates a function at two points and interpolates between them. More...
 
INT4 IMRPhenomX_PNR_RemapThetaJSF (REAL8 beta_ref, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 This code recomputes the skymapped locations in the J-frame using the new value of beta computed from the model. More...
 
REAL8 IMRPhenomX_PNR_GenerateEffectiveRingdownFreq (IMRPhenomXWaveformStruct *pWF, UINT4 ell, UINT4 emmprime, LALDict *lalParams)
 This code recomputes the skymapped locations in the J-frame using the new value of beta computed from the model. More...
 
void IMRPhenomX_PNR_AngleParameterDebugPrint (IMRPhenomX_PNR_alpha_parameters *alphaParams, IMRPhenomX_PNR_beta_parameters *betaParams)
 Print various parameters in the angle structs. More...
 
REAL8 IMRPhenomX_PNR_AnglesWindow (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 
REAL8 IMRPhenomX_PNR_CoprecWindow (IMRPhenomXWaveformStruct *pWF)
 
INT4 IMRPhenomX_PNR_SetPhaseAlignmentParams (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
 
INT4 IMRPhenomXHM_PNR_SetPhaseAlignmentParams (INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 
void IMRPhenomX_PNR_EnforceXASPhaseAlignment (double *linb, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPhaseCoefficients *pPhase)
 
void IMRPhenomXHM_PNR_EnforceXHMPhaseAlignment (double *lina, double *linb, INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, LALDict *lalParams)
 
INT4 IMRPhenomX_PNR_GetAndSetCoPrecParams (IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
 

Go to the source code of this file.

Macros

#define omp   ignore
 
#define DEBUG   0
 

Macro Definition Documentation

◆ omp

#define omp   ignore
Author
Eleanor Hamilton, Sebastian Khan, Jonathan E. Thompson

Definition at line 39 of file LALSimIMRPhenomX_PNR_internals.c.

◆ DEBUG

#define DEBUG   0

Definition at line 43 of file LALSimIMRPhenomX_PNR_internals.c.

Function Documentation

◆ IMRPhenomX_PNR_GetAndSetPNRVariables()

INT4 IMRPhenomX_PNR_GetAndSetPNRVariables ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

This function computes the required single-spin quantities used to parameterize the MR tuned functions from arXiv:2107.08876.

We place these quantities in the already-existing precession struct to avoid extensive code modifications.

Parameters
pWFPhenomX waveform struct
pPrecPhenomX precession struct

Definition at line 55 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_PopulateStructs()

INT4 IMRPhenomX_PNR_PopulateStructs ( IMRPhenomXWaveformStruct **  pWF_SingleSpin,
IMRPhenomXPrecessionStruct **  pPrec_SingleSpin,
IMRPhenomX_PNR_alpha_parameters **  alphaParams,
IMRPhenomX_PNR_beta_parameters **  betaParams,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  lalParams 
)

These two functions create and populate the required parameter structs for PNR.

  • First, we check to see if we need to do the two-spin mapping; if so, the approximate single-spin PhenomX structs are computed.
  • Next we compute the structs for alpha and beta.
  • Finally, the second function is a wrapper for cleaning up memory.
Parameters
pWF_SingleSpinPhenomX waveform struct with single spin parameters
pPrec_SingleSpinPhenomX precession struct with single spin parameters
alphaParamsalpha paramter struct
betaParamsbeta paramter struct
pWFPhenomX waveform struct
pPrecPhenomX precession struct
lalParamsLAL dictionary struct

Definition at line 183 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_FreeStructs()

void IMRPhenomX_PNR_FreeStructs ( IMRPhenomXWaveformStruct **  pWF_SingleSpin,
IMRPhenomXPrecessionStruct **  pPrec_SingleSpin,
IMRPhenomX_PNR_alpha_parameters **  alphaParams,
IMRPhenomX_PNR_beta_parameters **  betaParams 
)

Definition at line 289 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_GeneratePNRGamma()

INT4 IMRPhenomX_PNR_GeneratePNRGamma ( REAL8Sequence gamma,
const REAL8Sequence freqs,
const REAL8Sequence alpha,
const REAL8Sequence beta 
)

This function computes the frequency integral outlined in Eq.

A7 of arXiv:2107.08876.

Given frequency arrays of alpha and beta, compute spline interpolants and then use Boole's rule to numerically integrate.

Parameters
gammagamma frequency series (rad)
freqsinput frequencies (Hz)
alphaalpha frequency series (rad)
betabeta frequency series (rad)

Definition at line 325 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_GeneratePNRGamma_FromInterpolants()

int IMRPhenomX_PNR_GeneratePNRGamma_FromInterpolants ( REAL8Sequence gamma,
const REAL8Sequence freqs,
IMRPhenomX_PNR_angle_spline ab_splines 
)

This function computes the frequency integral outlined in Eq.

A7 of arXiv:2107.08876.

Given spline interpolants of alpha and beta, compute use Boole's rule to numerically integrate.

Parameters
gammafrequency series for gamma (rad)
freqsinput frequencies (Hz)
ab_splinespnr angle spline struct

Definition at line 388 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_alphadot_cosbeta()

REAL8 IMRPhenomX_PNR_alphadot_cosbeta ( REAL8  f,
IMRPhenomX_PNR_angle_spline params 
)

Wrapper function for computing the integrand in Eq.

A7 of arXiv:2107.08876

Parameters
ffrequency (Hz)
paramspnr angle interpolant struct

Definition at line 420 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_LinearFrequencyMap()

REAL8 IMRPhenomX_PNR_LinearFrequencyMap ( REAL8  Mf,
REAL8  ell,
REAL8  emm,
REAL8  Mf_lower,
REAL8  Mf_upper,
REAL8  Mf_RD_22,
REAL8  Mf_RD_lm,
UINT4  INSPIRAL 
)

Computes a linear frequency map for the HM PNR angles based on the linear frequency mapping used originally in PhenomHM (Eq.

5 of arXiv:1708.00404)

The specifics are given in Eq. #### of FIXME: add documentation

Parameters
Mfgeometric evaluation frequency
ellpolar index
emmazimuthal index
Mf_lowerlower geometric transition frequency
Mf_upperupper geometric transition frequency
Mf_RD_22(2,2) geometric ringdown frequency
Mf_RD_lm(l,m) geometric ringdown frequency
INSPIRALflag to toggle inspiral scaling only

Definition at line 438 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_LinearFrequencySlope()

REAL8 IMRPhenomX_PNR_LinearFrequencySlope ( REAL8  emm,
REAL8  Mf_lower,
REAL8  Mf_upper,
REAL8  Mf_RD_22,
REAL8  Mf_RD_lm 
)

Computes the slope of the linear frequency interpolation mapping used for the HM PNR angles.

See Eq. ### of FIXME: add citation

Parameters
emmazimuthal index
Mf_lowerlower geometric transition frequency
Mf_upperupper geometric transition frequency
Mf_RD_22(2,2) geometric ringdown frequency
Mf_RD_lm(l,m) geometric ringdown frequency

Definition at line 486 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_LinearFrequencyMapTransitionFrequencies()

INT4 IMRPhenomX_PNR_LinearFrequencyMapTransitionFrequencies ( REAL8 Mf_low,
REAL8 Mf_high,
REAL8  emmprime,
REAL8  Mf_RD_22,
REAL8  Mf_RD_lm,
IMRPhenomXPrecessionStruct pPrec 
)

Compute the transition frequencies for the HM PNR angle mapping.

See Eq. ### of FIXME: add documentation

Parameters
Mf_lowlower transition frequency
Mf_highupper transition frequency
emmprimeazimuthal index
Mf_RD_22(2,2) geometric ringdown frequency
Mf_RD_lm(l,m) geometric ringdown frequency
pPrecPhenomX precession struct

Definition at line 510 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_HMInterpolationDeltaF()

REAL8 IMRPhenomX_PNR_HMInterpolationDeltaF ( REAL8  f_min,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Here we compute an appropriate deltaF to be used when generating the (2,2) angle interpolants and mapping them to the HMs.

FIXME: add documentation

Parameters
f_minminimum starting frequency (Hz)
pWFPhenomX waveform struct
pPrecPhenomX precession struct

Definition at line 542 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_CheckTwoSpin()

INT4 IMRPhenomX_PNR_CheckTwoSpin ( IMRPhenomXPrecessionStruct pPrec)

This function quickly checks to see if we expect two-spin effects to be present in the inspiral precession angles.

Parameters
pPrecPhenomX precession struct

Definition at line 656 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_AngleAtFRef()

REAL8 IMRPhenomX_PNR_AngleAtFRef ( const REAL8Sequence angle,
const REAL8  f_ref,
const REAL8Sequence freqs,
const REAL8  deltaF 
)

Evaluates a function at two points and interpolates between them.

Parameters
angleinput angle array (rad)
f_refreference frequency value (Hz)
freqsevaluation frequency
deltaFevaluation frequency

Definition at line 676 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_LinearInterpolate()

REAL8 IMRPhenomX_PNR_LinearInterpolate ( REAL8  a0,
REAL8  a1,
REAL8  f0,
REAL8  f1,
REAL8  feval 
)

Evaluates a function at two points and interpolates between them.

Parameters
a0function evaluated at f0
a1function evaluated at f1
f0lower frequency value
f1upper frequency value
fevalevaluation frequency

Definition at line 709 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_RemapThetaJSF()

INT4 IMRPhenomX_PNR_RemapThetaJSF ( REAL8  beta_ref,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  lalParams 
)

This code recomputes the skymapped locations in the J-frame using the new value of beta computed from the model.

This beta corresponds to the orientation of the maximal emission direction relative to J, as opposed to the orientation of L.

This code is mostly copied from LAlSimIMRPhenomX_precession.c with slight modifications.

Parameters
beta_refreference opening angle (rad)
pWFPhenomX waveform struct
pPrecPhenomX precession struct
lalParamsLAL dictionary struct

Definition at line 734 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_GenerateEffectiveRingdownFreq()

REAL8 IMRPhenomX_PNR_GenerateEffectiveRingdownFreq ( IMRPhenomXWaveformStruct pWF,
UINT4  ell,
UINT4  emmprime,
LALDict *  lalParams 
)

This code recomputes the skymapped locations in the J-frame using the new value of beta computed from the model.

This beta corresponds to the orientation of the maximal emission direction relative to J, as opposed to the orientation of L.

This code is mostly copied from LAlSimIMRPhenomX_precession.c with slight modifications.

Parameters
pWFPhenomX waveform struct
ellpolar index
emmprimeazimuthal index
lalParamsLAL Dictionary struct

Definition at line 987 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_AngleParameterDebugPrint()

void IMRPhenomX_PNR_AngleParameterDebugPrint ( IMRPhenomX_PNR_alpha_parameters alphaParams,
IMRPhenomX_PNR_beta_parameters betaParams 
)

Print various parameters in the angle structs.

Parameters
alphaParamsalpha parameter struct
betaParamsbeta parameter struct

Definition at line 1027 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_AnglesWindow()

REAL8 IMRPhenomX_PNR_AnglesWindow ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 1080 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_CoprecWindow()

REAL8 IMRPhenomX_PNR_CoprecWindow ( IMRPhenomXWaveformStruct pWF)

Definition at line 1123 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_SetPhaseAlignmentParams()

INT4 IMRPhenomX_PNR_SetPhaseAlignmentParams ( IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec 
)

Definition at line 1184 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomXHM_PNR_SetPhaseAlignmentParams()

INT4 IMRPhenomXHM_PNR_SetPhaseAlignmentParams ( INT4  ell,
INT4  emm,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPrecessionStruct pPrec,
LALDict *  lalParams 
)

Definition at line 1265 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_EnforceXASPhaseAlignment()

void IMRPhenomX_PNR_EnforceXASPhaseAlignment ( double *  linb,
IMRPhenomXWaveformStruct pWF,
IMRPhenomXPhaseCoefficients pPhase 
)

Definition at line 1301 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomXHM_PNR_EnforceXHMPhaseAlignment()

void IMRPhenomXHM_PNR_EnforceXHMPhaseAlignment ( double *  lina,
double *  linb,
INT4  ell,
INT4  emm,
IMRPhenomXWaveformStruct pWF,
LALDict *  lalParams 
)

Definition at line 1349 of file LALSimIMRPhenomX_PNR_internals.c.

◆ IMRPhenomX_PNR_GetAndSetCoPrecParams()

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

Definition at line 1423 of file LALSimIMRPhenomX_PNR_internals.c.