1 #ifndef _LALSIM_IMR_PHENOMX_PNR_INTERNALS_H
2 #define _LALSIM_IMR_PHENOMX_PNR_INTERNALS_H
43 #include <lal/LALStdlib.h>
44 #include <lal/LALSimIMR.h>
45 #include <lal/LALConstants.h>
46 #include <lal/LALDatatypes.h>
47 #include <lal/Sequence.h>
48 #include <lal/LALDict.h>
49 #include <lal/XLALError.h>
51 #include <lal/FrequencySeries.h>
52 #include <lal/LALSimInspiral.h>
55 #include <gsl/gsl_spline.h>
56 #include <gsl/gsl_integration.h>
58 typedef struct tagIMRPhenomX_PNR_angle_spline
REAL8 IMRPhenomX_PNR_AnglesWindow(IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
void IMRPhenomX_PNR_FreeStructs(IMRPhenomXWaveformStruct **pWF_SingleSpin, IMRPhenomXPrecessionStruct **pPrec_SingleSpin, IMRPhenomX_PNR_alpha_parameters **alphaParams, IMRPhenomX_PNR_beta_parameters **betaParams)
REAL8 IMRPhenomX_PNR_alphadot_cosbeta(REAL8 f, IMRPhenomX_PNR_angle_spline *params)
Wrapper function for computing the integrand in Eq.
void IMRPhenomX_PNR_AngleParameterDebugPrint(IMRPhenomX_PNR_alpha_parameters *alphaParams, IMRPhenomX_PNR_beta_parameters *betaParams)
Print various parameters in the angle structs.
INT4 IMRPhenomX_PNR_CheckTwoSpin(IMRPhenomXPrecessionStruct *pPrec)
This function quickly checks to see if we expect two-spin effects to be present in the inspiral prece...
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...
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.
INT4 IMRPhenomX_PNR_GetAndSetCoPrecParams(IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
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 map...
REAL8 IMRPhenomX_PNR_CoprecWindow(IMRPhenomXWaveformStruct *pWF)
INT4 IMRPhenomXHM_PNR_SetPhaseAlignmentParams(INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, LALDict *lalParams)
void IMRPhenomX_PNR_EnforceXASPhaseAlignment(double *linb, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPhaseCoefficients *pPhase)
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 orig...
INT4 IMRPhenomX_PNR_GeneratePNRGamma(REAL8Sequence *gamma, const REAL8Sequence *freqs, const REAL8Sequence *alpha, const REAL8Sequence *beta)
This function computes the frequency integral outlined in Eq.
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...
INT4 IMRPhenomX_PNR_GetAndSetPNRVariables(IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
This function computes the required single-spin quantities used to parameterize the MR tuned function...
INT4 IMRPhenomX_PNR_SetPhaseAlignmentParams(IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
void IMRPhenomXHM_PNR_EnforceXHMPhaseAlignment(double *lina, double *linb, INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, LALDict *lalParams)
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.
REAL8 IMRPhenomX_PNR_LinearInterpolate(REAL8 a0, REAL8 a1, REAL8 f0, REAL8 f1, REAL8 feval)
Evaluates a function at two points and interpolates between them.
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.
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.
INT4 IMRPhenomX_PNR_GeneratePNRGamma_FromInterpolants(REAL8Sequence *gamma, const REAL8Sequence *freqs, IMRPhenomX_PNR_angle_spline *ab_splines)
This function computes the frequency integral outlined in Eq.
static double beta(const double a, const double b, const sysq *system)
Internal function that computes the spin-orbit couplings.
gsl_spline * beta_spline
beta cubic spline
gsl_interp_accel * beta_acc
beta cubic spline accelerator
gsl_interp_accel * alpha_acc
alpha cubic spline accelerator
gsl_interp_accel * gamma_acc
gamma cubic spline accelerator
gsl_spline * gamma_spline
gamma cubic spline
gsl_spline * alpha_spline
alpha cubic spline