42 #ifndef PHENOMXHMDEBUG
77 REAL8 chiperp_antisymmetric = 0.0;
78 REAL8 theta_antisymmetric = 0.0;
83 REAL8 chis = sqrt((m1 * m1 * chi1x + m2 * m2 * chi2x) * (m1 * m1 * chi1x + m2 * m2 * chi2x) + (m1 * m1 * chi1y + m2 * m2 * chi2y) * (m1 * m1 * chi1y + m2 * m2 * chi2y)) / (m1 * m1);
86 REAL8 antisymmetric_chis = sqrt((m1 * m1 * chi1x - m2 * m2 * chi2x) * (m1 * m1 * chi1x - m2 * m2 * chi2x) + (m1 * m1 * chi1y - m2 * m2 * chi2y) * (m1 * m1 * chi1y - m2 * m2 * chi2y)) / (m1 * m1);
87 chiperp_antisymmetric = sin((
q - 1.0) *
LAL_PI) * sin((
q - 1.0) *
LAL_PI) * pPrec->
chi_p + cos((
q - 1.0) *
LAL_PI) * cos((
q - 1.0) *
LAL_PI) * antisymmetric_chis;
91 chiperp = pPrec->
chi_p;
92 chiperp_antisymmetric = pPrec->
chi_p;
96 REAL8 chi_mag = sqrt(chipar * chipar + chiperp * chiperp);
99 REAL8 chi_mag_antisymmetric = sqrt(chipar * chipar + chiperp_antisymmetric * chiperp_antisymmetric);
103 if (chi_mag >= 1.0e-6)
111 if (chi_mag_antisymmetric >= 1.0e-6)
113 theta_antisymmetric = acos(chipar / chi_mag_antisymmetric);
117 theta_antisymmetric = 0.0;
132 REAL8 xf = sqrt(Xfparr * Xfparr + Xfperp * Xfperp);
160 printf(
"\nSetting PNR-related single-spin quantities:\n");
198 "Error: IMRPhenomX_PNR_PopulateStructs called without PNR angle activated!\n");
226 "Error: IMRPhenomXSetWaveformVariables failed.\n");
231 (*pWF_SingleSpin)->PNR_SINGLE_SPIN = 1;
251 "Error: IMRPhenomXGetAndSetPrecessionVariables failed.\n");
260 "Error: IMRPhenomX_PNR_precompute_alpha_coefficients failed.\n");
266 "Error: IMRPhenomX_PNR_alpha_connection_parameters failed.\n");
274 "Error: IMRPhenomX_PNR_precompute_beta_coefficients failed.\n");
280 "Error: IMRPhenomX_PNR_beta_connection_parameters failed.\n");
295 if (*pWF_SingleSpin != NULL)
299 if (*pPrec_SingleSpin != NULL)
301 if((*pPrec_SingleSpin)->pWF22AS)
303 LALFree((*pPrec_SingleSpin)->pWF22AS);
307 if (*alphaParams != NULL)
311 if (*betaParams != NULL)
342 gsl_spline *alpha_spline = gsl_spline_alloc(gsl_interp_cspline, freqs->
length);
343 gsl_spline *beta_spline = gsl_spline_alloc(gsl_interp_cspline, freqs->
length);
345 gsl_interp_accel *alpha_acc = gsl_interp_accel_alloc();
346 gsl_interp_accel *beta_acc = gsl_interp_accel_alloc();
348 gsl_spline_init(alpha_spline, freqs->
data,
alpha->data, freqs->
length);
349 gsl_spline_init(beta_spline, freqs->
data,
beta->data, freqs->
length);
358 gamma->data[0] = 0.0;
363 for (
size_t i = 1;
i < freqs->
length;
i++)
372 gsl_spline_free(alpha_spline);
373 gsl_spline_free(beta_spline);
375 gsl_interp_accel_free(alpha_acc);
376 gsl_interp_accel_free(beta_acc);
400 gamma->data[0] = 0.0;
405 for (
size_t i = 1;
i < freqs->
length;
i++)
425 REAL8 alphadot = gsl_spline_eval_deriv(
params->alpha_spline, f,
params->alpha_acc);
428 return -1.0 * alphadot * cos(
beta);
450 if ((ell == 2) && (emm == 2))
458 return 2.0 * Mf / emm;
463 Mf_lower <= Mf_upper,
465 "Error: Low-frequency cutoff is greater than high-frequency cutoff in IMRPhenomX_PNR_LinearFrequencyMap.\n");
470 return Mf - (Mf_RD_lm - Mf_RD_22);
475 REAL8 B = 2.0 * Mf_lower / emm;
477 return A * (Mf - Mf_lower) +
B;
496 Mf_lower <= Mf_upper,
498 "Error: Low-frequency cutoff is greater than high-frequency cutoff in IMRPhenomX_PNR_LinearFrequencySlope.\n");
501 return (Mf_upper - (Mf_RD_lm - Mf_RD_22) - 2.0 * Mf_lower / emm) / (Mf_upper - Mf_lower);
526 *Mf_high = 1.1 * (pPrec->
PNR_HM_Mfhigh + (Mf_RD_lm - Mf_RD_22));
529 if ((*Mf_high < 0.0)||((Mf_RD_lm - Mf_RD_22 < 0.0)&&(*Mf_high < pPrec->PNR_HM_Mfhigh / 2.0))){
567 REAL8 eta_term = sqrt(1.0 - 4.0 * pWF->
eta);
568 REAL8 numerator = 3.0 *
LAL_PI * Mf * Mf * Mf * Mf * Mf * error_tolerance * (1.0 + eta_term);
569 REAL8 denominator = 7.0 + 13.0 * eta_term;
570 REAL8 constant = 4.0 * sqrt(2.0 / 5.0);
588 REAL8 v06 = v02 * v02 * v02;
592 REAL8 dpsi =
g0 * deltam *
LAL_PI / (4.0 * v06) * (3.0 + 2.0 * psi1 * v0 + psi2 * v02);
594 REAL8 dpsiInv = fabs(1.0 / dpsi);
608 REAL8 L_fmin = pWF->
Mtot * pWF->
Mtot *
XLALSimIMRPhenomXLPNAnsatz(v0, pWF->
eta / v0, pPrec->
L0, pPrec->
L1, pPrec->
L2, pPrec->
L3, pPrec->
L4, pPrec->
L5, pPrec->
L6, pPrec->
L7, pPrec->
L8, pPrec->
L8L);
616 char fileSpecIII[40];
617 sprintf(fileSpecIII,
"PNR_HM_interpolation_data.dat");
618 fileangle = fopen(fileSpecIII,
"w");
620 fprintf(fileangle,
"dpsi = %.16e \n", dpsi);
623 fprintf(fileangle,
"pPrec->SL = %.16e \n", pPrec->
SL);
624 fprintf(fileangle,
"pPrec->LRef = %.16e \n\n", pPrec->
LRef);
625 fprintf(fileangle,
"L_fmin = %.16e \n\n", L_fmin);
626 fprintf(fileangle,
"betaMin = %.16e \n", betaMin);
627 fprintf(fileangle,
"betaMax = %.16e \n", betaMax);
632 if ((betaMin < 0.01) && (betaMin / betaMax < 0.55))
642 if ((deltaF_twospin < deltaF_alpha) && !isnan(dpsi))
645 return (deltaF_twospin < 1
e-2) ? 1
e-2 : deltaF_twospin;
649 return (deltaF_alpha < 1
e-2) ? 1
e-2 : deltaF_alpha;
694 "Error: f_ref does not fall within the evaluated frequencies of the angle in IMRPhenomX_PNR_AngleAtFRef.\n");
696 size_t idx_fmin = (size_t)(
f_min / deltaF);
697 size_t idx_eval = (f_ref ==
f_min) ? 0 : (
size_t)(f_ref / deltaF) - idx_fmin;
698 size_t idx_eval_p1 = idx_eval + 1;
701 angle->
data[idx_eval], angle->
data[idx_eval_p1],
702 freqs->
data[idx_eval], freqs->
data[idx_eval_p1],
718 (f0 <= feval) && (feval <= f1),
720 "Error: the evaluation frequency is not between the two sampling frequencies in IMRPhenomX_PNR_LinearInterpolate.\n");
723 return a0 + (feval - f0) * (a1 - a0) / (f1 - f0);
747 if ((pPrec->
J0 < 1
e-10))
752 if (chi_in_plane < 1
e-3)
766 if (!(convention == 0 || convention == 1 || convention == 5 || convention == 6 || convention == 7))
768 XLAL_ERROR(
XLAL_EINVAL,
"Error: IMRPhenomXPConvention not recognized. Requires version 0, 1, 5, 6 or 7.\n");
814 printf(
"\nAligned-spin case.\n");
841 pPrec->
alpha0 = atan2(tmp_y, tmp_x);
861 tmp_x = pPrec->
Nx_Sf;
862 tmp_y = pPrec->
Ny_Sf;
863 tmp_z = pPrec->
Nz_Sf;
869 pPrec->
Nx_Jf = tmp_x;
870 pPrec->
Ny_Jf = tmp_y;
871 pPrec->
Nz_Jf = tmp_z;
892 tmp_x = pPrec->
Xx_Sf;
893 tmp_y = pPrec->
Xy_Sf;
894 tmp_z = pPrec->
Xz_Sf;
953 const REAL8 yphi = 0.0;
1001 if ((ell == 2) & (emmprime == 2))
1014 effRD = pWFHM->
fRING;
1035 sprintf(fileSpec,
"pnr_angle_parameters.dat");
1037 fileparams = fopen(fileSpec,
"w");
1039 fprintf(fileparams,
"~~~~~~ Alpha Coefficients ~~~~~~\n");
1040 fprintf(fileparams,
"A1 = %.16e\n", alphaParams->
A1);
1041 fprintf(fileparams,
"A2 = %.16e\n", alphaParams->
A2);
1042 fprintf(fileparams,
"A3 = %.16e\n", alphaParams->
A3);
1043 fprintf(fileparams,
"A4 = %.16e\n\n", alphaParams->
A4);
1045 fprintf(fileparams,
"~~~~~~ Beta Coefficients ~~~~~~\n");
1046 fprintf(fileparams,
"B0 = %.16e\n", betaParams->
B0);
1047 fprintf(fileparams,
"B1 = %.16e\n", betaParams->
B1);
1048 fprintf(fileparams,
"B2 = %.16e\n", betaParams->
B2);
1049 fprintf(fileparams,
"B3 = %.16e\n", betaParams->
B3);
1050 fprintf(fileparams,
"B4 = %.16e\n", betaParams->
B4);
1051 fprintf(fileparams,
"B5 = %.16e\n\n", betaParams->
B5);
1053 fprintf(fileparams,
"~~~~~~ Connection Values Alpha ~~~~~~\n");
1065 fprintf(fileparams,
"~~~~~~ Connection Values Beta ~~~~~~\n");
1085 double window_q_boundary = 8.5;
1086 double window_chi_boundary = 0.85;
1088 double window_width_q = 3.5;
1089 double window_width_chi = 0.35;
1091 double window_q_argument = (pWF->
q - window_q_boundary ) / window_width_q;
1092 double window_chi_argument = (pPrec->
chi_singleSpin - window_chi_boundary) / window_width_chi;
1095 double window_q_value;
1096 if ( (window_q_argument>0) && (window_q_argument<=1) ){
1097 window_q_value = 0.5*cos( window_q_argument *
LAL_PI ) + 0.5;
1098 }
else if ( window_q_argument>1 ) {
1105 double window_chi_value;
1106 if ( (window_chi_argument>0) && (window_chi_argument<=1) ){
1107 window_chi_value = 0.5*cos( window_chi_argument *
LAL_PI ) + 0.5;
1108 }
else if ( window_chi_argument>1 ) {
1109 window_chi_value = 0;
1111 window_chi_value = 1;
1115 double angles_window = window_q_value * window_chi_value;
1117 return angles_window;
1129 double window_q_boundary = 8.0;
1130 double window_theta_boundary = 150.0*
LAL_PI/180.0;
1131 double window_a1_boundary = 0.8;
1133 double width_window_q = 0.50;
1134 double width_window_theta = 0.50;
1135 double width_window_a1 = 0.02;
1137 double window_q_argument = (pWF->
q - window_q_boundary )/ width_window_q;
1138 double window_theta_argument = (pWF->
theta_LS - window_theta_boundary )/ width_window_theta;
1139 double window_a1_argument = (pWF->
a1 - window_a1_boundary )/ width_window_a1;
1146 double window_q_value;
1147 if ( (window_q_argument>0) && (window_q_argument<=1) ){
1148 window_q_value = 0.5*cos( window_q_argument *
LAL_PI ) + 0.5;
1149 }
else if ( window_q_argument>1 ) {
1156 double window_theta_value;
1157 if ( (window_theta_argument>0) && (window_theta_argument<=1) ){
1158 window_theta_value = 0.5*cos( window_theta_argument *
LAL_PI ) + 0.5;
1159 }
else if ( window_theta_argument>1 ) {
1160 window_theta_value = 0;
1162 window_theta_value = 1;
1166 double window_a1_value;
1167 if ( (window_a1_argument>0) && (window_a1_argument<=1) ){
1168 window_a1_value = 0.5*cos( window_a1_argument *
LAL_PI ) + 0.5;
1169 }
else if ( window_a1_argument>1 ) {
1170 window_a1_value = 0;
1172 window_a1_value = 1;
1176 double pnr_window = window_q_value * window_theta_value * window_a1_value;
1235 double phase, dphase;
1280 double phase,dphase;
1309 double phi_at_f_inspiral_align;
1310 double dphi_at_f_inspiral_align;
1323 double shift_in_linb = - dphi_at_f_inspiral_align +
1327 *linb += shift_in_linb;
1360 double phi_at_f_inspiral_align;
1361 double dphi_at_f_inspiral_align;
1379 double shift_in_phase = - phi_at_f_inspiral_align +
1386 *lina = shift_in_phase;
1401 double shift_in_linb = - dphi_at_f_inspiral_align +
1405 *linb = shift_in_linb;
1458 if ( PNRForceXHMAlignment ) {
1463 if ( PNRForceXHMAlignment ){
1464 printf(
"lal>> Dev toggle for XHM alignment ON in LALSimIMRPhenomX_precession.c.\n");
1471 if ( PNRUseInputCoprecDeviations && PNRUseTunedCoprec ) {
1473 XLAL_ERROR(
XLAL_EDOM,
"Error: PNRUseTunedCoprec and PNRUseInputCoprecDeviations must not be enabled simultaneously.\n");
1477 INT4 APPLY_PNR_DEVIATIONS = PNRUseTunedCoprec || PNRUseInputCoprecDeviations;
1481 if ( APPLY_PNR_DEVIATIONS && PNRForceXHMAlignment ) {
1501 double theta_LS = acos( cos_theta );
1506 double pnr_window = 0.0;
1507 if (PNRUseTunedCoprec) {
1516 if ( PNRUseTunedCoprec ){
1542 printf(
"** >>>>>>>>>>>> PhenomXCP Model domain >>>>>>>>>>> **\n");
1543 printf(
"theta : %f\n",theta_LS*180.0/
LAL_PI);
1544 printf(
"eta : %f\n",pWF->
eta);
1545 printf(
"a1 : %f\n",a1);
1546 printf(
"** >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> **\n\n");
1550 if( PNRUseTunedCoprec )
1604 printf(
"** >>>>> PhenomXCP Model Parameters >>>>> **\n");
1605 printf(
"MU1 : %f\n",pWF->
MU1);
1606 printf(
"MU2 : %f\n",pWF->
MU2);
1607 printf(
"MU3 : %f\n",pWF->
MU3);
1608 printf(
"MU4 : %f\n",pWF->
MU4);
1609 printf(
"NU4 : %f\n",pWF->
NU4);
1610 printf(
"NU5 : %f\n",pWF->
NU5);
1611 printf(
"NU6 : %f\n",pWF->
NU6);
1612 printf(
"ZETA1 : %f\n",pWF->
ZETA1);
1613 printf(
"ZETA2 : %f\n",pWF->
ZETA2);
1614 printf(
"** >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> **\n\n");
#define MAX_TOL_ATAN
Tolerance used below which numbers are treated as zero for the calculation of atan2.
double XLALSimPhenomUtilsMftoHz(REAL8 Mf, REAL8 Mtot_Msun)
Convert from geometric frequency to frequency in Hz.
double XLALSimPhenomUtilsHztoMf(REAL8 fHz, REAL8 Mtot_Msun)
Convert from frequency in Hz to geometric frequency.
int IMRPhenomX_PNR_precompute_alpha_coefficients(IMRPhenomX_PNR_alpha_parameters *alphaParams, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
This function evaluates the coefficients outlined in Sec 7A of arXiv:2107.08876 for alpha.
int IMRPhenomX_PNR_alpha_connection_parameters(IMRPhenomX_PNR_alpha_parameters *alphaParams, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
This function evaluates the connection frequencies Mf1 and Mf2 detailed in Sec.
int IMRPhenomX_PNR_precompute_beta_coefficients(IMRPhenomX_PNR_beta_parameters *betaParams, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec)
This function evaluates the Ansatz coefficients of beta outlined in Eq.
int IMRPhenomX_PNR_beta_connection_parameters(IMRPhenomX_PNR_beta_parameters *betaParams, IMRPhenomXWaveformStruct *pWF, IMRPhenomXPrecessionStruct *pPrec, IMRPhenomXWaveformStruct *pWF_SingleSpin, IMRPhenomXPrecessionStruct *pPrec_SingleSpin)
This function combines several functions together to compute the connection frequencies and the inspi...
double IMRPhenomXCP_MU3_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_MU2_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_ZETA2_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_MU1_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_NU5_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_NU4_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_NU6_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_NU0_l2m2(double theta, double eta, double a1)
double IMRPhenomXCP_ZETA1_l2m2(double theta, double eta, double a1)
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.
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.
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.
int IMRPhenomXSetWaveformVariables(IMRPhenomXWaveformStruct *wf, const REAL8 m1_SI, const REAL8 m2_SI, const REAL8 chi1L_In, const REAL8 chi2L_In, const REAL8 deltaF, const REAL8 fRef, const REAL8 phi0, const REAL8 f_min, const REAL8 f_max, const REAL8 distance, const REAL8 inclination, LALDict *LALParams, UNUSED const UINT4 debug)
int IMRPhenomXGetPhaseCoefficients(IMRPhenomXWaveformStruct *pWF, IMRPhenomXPhaseCoefficients *pPhase)
INT4 IMRPhenomX_FullPhase_22(double *phase, double *dphase, double Mf, IMRPhenomXPhaseCoefficients *pPhase, IMRPhenomXWaveformStruct *pWF)
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.
void IMRPhenomX_rotate_y(REAL8 angle, REAL8 *vx, REAL8 *vy, REAL8 *vz)
Function to rotate vector about y axis by given angle.
void IMRPhenomX_rotate_z(const REAL8 angle, REAL8 *vx, REAL8 *vy, REAL8 *vz)
Function to rotate vector about z axis by given angle.
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:
void IMRPhenomXHM_SetHMWaveformVariables(int ell, int emm, IMRPhenomXHMWaveformStruct *wf, IMRPhenomXWaveformStruct *wf22, QNMFits *qnms, LALDict *LALParams)
void IMRPhenomXHM_Initialize_QNMs(QNMFits *qnms)
REAL8 XLALSimIMRPhenomXFinalSpin2017(REAL8 eta, REAL8 chi1L, REAL8 chi2L)
Final Dimensionless Spin, X Jimenez-Forteza et al, PRD, 95, 064024, (2017), arXiv:1611....
REAL8 XLALSimIMRPhenomXatan2tol(REAL8 a, REAL8 b, REAL8 tol)
REAL8 XLALSimIMRPhenomXchiEff(REAL8 eta, REAL8 chi1L, REAL8 chi2L)
Effective aligned spin parameter.
static double beta(const double a, const double b, const sysq *system)
Internal function that computes the spin-orbit couplings.
void * XLALMalloc(size_t n)
INT4 IMRPhenomXHM_Phase_for_Initialization(double *phase, double *dphase, double Mf, INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, LALDict *lalParams)
COMPLEX16 XLALSpinWeightedSphericalHarmonic(REAL8 theta, REAL8 phi, int s, int l, int m)
#define XLAL_CHECK(assertion,...)
REAL8 derivative_alpha_upper
derivative at connection frequency
REAL8 derivative_alpha_lower
derivative at connection frequency
REAL8 A3
MR Ansatz coefficient.
REAL8 alpha_interp_2
intermediate coefficient
REAL8 A1
MR Ansatz coefficient.
REAL8 alpha_lower
alpha at connection frequency
REAL8 A4
MR Ansatz coefficient.
REAL8 alpha_interp_0
intermediate coefficient
REAL8 Mf_alpha_lower
connection frequency
REAL8 alpha_interp_3
intermediate coefficient
REAL8 Mf_alpha_upper
connection frequency
REAL8 A2
MR Ansatz coefficient.
REAL8 alpha_upper
alpha at connection frequency
REAL8 alpha_interp_1
intermediate coefficient
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_spline * alpha_spline
alpha cubic spline
REAL8 derivative_beta_lower
REAL8 derivative_beta_upper
REAL8 Ny_Sf
Line-of-sight vector component in L frame.
REAL8 PNR_q_window_lower
Boundary values for PNR angle transition window.
REAL8 QArunz_Jf
Component of triad basis vector Q in J frame, arXiv:0810.5336.
REAL8 QAruny_Jf
Component of triad basis vector Q in J frame, arXiv:0810.5336.
INT4 IMRPhenomXReturnCoPrec
REAL8 psi1
as defined in Eq.
REAL8 zeta_polarization
Angle to rotate the polarizations.
REAL8 phiJ_Sf
Azimuthal angle of in the L frame.
REAL8 thetaJ_Sf
Angle between and (z-direction)
REAL8 PNR_HM_Mflow
Mf_alpha_lower stored from alphaParams struct, 2 A4 / 7 from arXiv:2107.08876.
REAL8 thetaJN
Angle between J0 and line of sight (z-direction)
REAL8 Ny_Jf
Line-of-sight vector component in J frame.
REAL8 costheta_singleSpin
Polar angle of effective single spin, Eq.
REAL8 PArunz_Jf
Component of triad basis vector P in J frame, arXiv:0810.5336.
REAL8 Xx_Sf
Component of triad basis vector X in L frame.
REAL8 IMRPhenomXPNRInterpTolerance
IMRPhenomXWaveformStruct * pWF22AS
REAL8 PArunx_Jf
Component of triad basis vector P in J frame, arXiv:0810.5336.
REAL8 Nx_Jf
Line-of-sight vector component in J frame.
REAL8 QArunx_Jf
Component of triad basis vector Q in J frame, arXiv:0810.5336.
INT4 IMRPhenomXPrecVersion
Flag to set version of Euler angles used.
REAL8 psi2
as defined in Eq.
UINT4 PNRInspiralScaling
Enforce inpsiral scaling for HM angles outside of calibration window.
INT4 IMRPhenomXPNRUseTunedCoprec
REAL8 alpha_offset
Offset for .
REAL8 Nz_Jf
Line-of-sight vector component in LJ frame.
REAL8 alpha0
Coefficient of .
REAL8 chi_singleSpin_antisymmetric
magnitude of effective single spin of a two spin system for the antisymmetric waveform
REAL8 PAruny_Jf
Component of triad basis vector P in J frame, arXiv:0810.5336.
INT4 IMRPhenomXPNRUseTunedCoprec33
REAL8 Nz_Sf
Line-of-sight vector component in L frame.
REAL8 Xy_Sf
Component of triad basis vector X in L frame.
REAL8 chi_singleSpin
Magnitude of effective single spin used for tapering two-spin angles, Eq.
REAL8 theta_antisymmetric
Polar angle effective single spin for antisymmetric waveform.
REAL8 PNR_chi_window_lower
REAL8 PNR_chi_window_upper
REAL8 Xz_Sf
Component of triad basis vector X in L frame.
REAL8 Nx_Sf
Line-of-sight vector component in L frame.
REAL8 PNR_HM_Mfhigh
Mf_beta_lower stored from betaParams struct, Eq.
REAL8 costheta_final_singleSpin
Polar angle of approximate final spin, see technical document FIXME: add reference.
INT4 IMRPhenomXPNRUseInputCoprecDeviations