97 static double chiPN(
double Seta,
double eta,
double chi1,
double chi2)
102 double chi_s = (chi1 + chi2);
103 double chi_a = (chi1 - chi2);
105 return 0.5 * (chi_s * (1.0 - eta * 76.0 / 113.0) + Seta * chi_a);
114 return (
size_t) pow(2,ceil(log2(n)));
143 double eta2 = eta*eta;
144 double eta3 = eta2*eta;
150 return eta*(3.4641016151377544 - 4.399247300629289*eta +
151 9.397292189321194*eta2 - 13.180949901606242*eta3 +
152 s*((1.0/eta - 0.0850917821418767 - 5.837029316602263*eta) +
153 (0.1014665242971878 - 2.0967746996832157*eta)*
s +
154 (-1.3546806617824356 + 4.108962025369336*eta)*s2 +
155 (-0.8676969352555539 + 2.064046835273906*eta)*
s3));
163 double Seta = sqrt(1.0 - 4.0*eta);
164 double m1 = 0.5 * (1.0 + Seta);
165 double m2 = 0.5 * (1.0 - Seta);
169 double s = (m1s * chi1 + m2s * chi2);
177 static double fring(
double eta,
double chi1,
double chi2,
double finspin) {
180 if (finspin > 1.0)
XLAL_ERROR(
XLAL_EDOM,
"PhenomD fring function: final spin > 1.0 not supported\n");
182 gsl_interp_accel *acc = gsl_interp_accel_alloc();
183 gsl_spline *iFring = gsl_spline_alloc(gsl_interp_cspline,
QNMData_length);
188 gsl_spline_free(iFring);
189 gsl_interp_accel_free(acc);
197 static double fdamp(
double eta,
double chi1,
double chi2,
double finspin) {
200 if (finspin > 1.0)
XLAL_ERROR(
XLAL_EDOM,
"PhenomD fdamp function: final spin > 1.0 not supported\n");
202 gsl_interp_accel *acc = gsl_interp_accel_alloc();
203 gsl_spline *iFdamp = gsl_spline_alloc(gsl_interp_cspline,
QNMData_length);
208 gsl_spline_free(iFdamp);
209 gsl_interp_accel_free(acc);
219 double sixth = pow(number, 1.0 / 6.0);
220 p->third = sixth * sixth;
222 p->two_thirds =
p->third *
p->third;
223 p->four_thirds = number *
p->third;
224 p->five_thirds =
p->four_thirds *
p->third;
225 p->two = number * number;
226 p->seven_thirds =
p->third *
p->two;
227 p->eight_thirds =
p->two_thirds *
p->two;
228 p->inv = 1. / number;
229 double m_sixth = 1.0 / sixth;
230 p->m_seven_sixths =
p->inv * m_sixth;
231 p->m_third = m_sixth * m_sixth;
232 p->m_two_thirds =
p->m_third *
p->m_third;
233 p->m_five_thirds =
p->inv *
p->m_two_thirds;
255 static double rho1_fun(
double eta,
double eta2,
double xi) {
257 return 3931.8979897196696 - 17395.758706812805*eta
258 + (3132.375545898835 + 343965.86092361377*eta - 1.2162565819981997e6*eta2
259 + (-70698.00600428853 + 1.383907177859705e6*eta - 3.9662761890979446e6*eta2)*xi
260 + (-60017.52423652596 + 803515.1181825735*eta - 2.091710365941658e6*eta2)*xi*xi)*xi;
267 static double rho2_fun(
double eta,
double eta2,
double xi) {
269 return -40105.47653771657 + 112253.0169706701*eta
270 + (23561.696065836168 - 3.476180699403351e6*eta + 1.137593670849482e7*eta2
271 + (754313.1127166454 - 1.308476044625268e7*eta + 3.6444584853928134e7*eta2)*xi
272 + (596226.612472288 - 7.4277901143564405e6*eta + 1.8928977514040343e7*eta2)*xi*xi)*xi;
278 static double rho3_fun(
double eta,
double eta2,
double xi) {
280 return 83208.35471266537 - 191237.7264145924*eta
281 + (-210916.2454782992 + 8.71797508352568e6*eta - 2.6914942420669552e7*eta2
282 + (-1.9889806527362722e6 + 3.0888029960154563e7*eta - 8.390870279256162e7*eta2)*xi
283 + (-1.4535031953446497e6 + 1.7063528990822166e7*eta - 4.2748659731120914e7*eta2)*xi*xi)*xi;
299 + Mf * (prefactors->
one + Mf * prefactors->
two + powers_of_Mf->
two * prefactors->
three);
311 double chi1 =
p->chi1;
312 double chi2 =
p->chi2;
314 double chi12 =
p->chi12;
315 double chi22 =
p->chi22;
316 double eta2 =
p->eta2;
317 double eta3 =
p->eta3;
321 double Seta =
p->Seta;
322 double SetaPlus1 =
p->SetaPlus1;
325 prefactors->
one = ((chi1*(81*SetaPlus1 - 44*eta) + chi2*(81 - 81*Seta - 44*eta))*Pi)/48.;
326 prefactors->
four_thirds = ( (-27312085.0 - 10287648*chi22 - 10287648*chi12*SetaPlus1 + 10287648*chi22*Seta
327 + 24*(-1975055 + 857304*chi12 - 994896*chi1*chi2 + 857304*chi22)*eta
332 + chi1*(285197*SetaPlus1 - 4*(91902 + 1579*Seta)*eta - 35632*eta2)
333 + 42840*(-1.0 + 4*eta)*Pi
336 prefactors->
two = - (Pi2*(-336*(-3248849057.0 + 2943675504*chi12 - 3339284256*chi1*chi2 + 2943675504*chi22)*eta2
338 - 7*(-177520268561 + 107414046432*chi22 + 107414046432*chi12*SetaPlus1
339 - 107414046432*chi22*Seta + 11087290368*(chi1 + chi2 + chi1*Seta - chi2*Seta)*Pi
341 + 12*eta*(-545384828789 - 176491177632*chi1*chi2 + 202603761360*chi22
342 + 77616*chi12*(2610335 + 995766*Seta) - 77287373856*chi22*Seta
343 + 5841690624*(chi1 + chi2)*Pi + 21384760320*Pi2
349 prefactors->
three =
p->rho3;
360 double chi1 =
p->chi1;
361 double chi2 =
p->chi2;
366 double chi12 =
p->chi12;
367 double chi22 =
p->chi22;
368 double eta2 =
p->eta2;
369 double eta3 =
p->eta3;
372 double Seta =
p->Seta;
373 double SetaPlus1 =
p->SetaPlus1;
376 + ((chi1*(81*SetaPlus1 - 44*eta) + chi2*(81 - 81*Seta - 44*eta))*Pi)/48.
377 + ((-27312085 - 10287648*chi22 - 10287648*chi12*SetaPlus1
378 + 10287648*chi22*Seta + 24*(-1975055 + 857304*chi12 - 994896*chi1*chi2 + 857304*chi22)*eta
381 + 4*(-91902 + 1579*Seta)*eta - 35632*eta2) + chi1*(285197*SetaPlus1
382 - 4*(91902 + 1579*Seta)*eta - 35632*eta2) + 42840*(-1 + 4*eta)*Pi))/96768.
383 - (Mf*Pi2*(-336*(-3248849057.0 + 2943675504*chi12 - 3339284256*chi1*chi2 + 2943675504*chi22)*eta2 - 324322727232*eta3
384 - 7*(-177520268561 + 107414046432*chi22 + 107414046432*chi12*SetaPlus1 - 107414046432*chi22*Seta
385 + 11087290368*(chi1 + chi2 + chi1*Seta - chi2*Seta)*Pi)
386 + 12*eta*(-545384828789.0 - 176491177632*chi1*chi2 + 202603761360*chi22 + 77616*chi12*(2610335 + 995766*Seta)
387 - 77287373856*chi22*Seta + 5841690624*(chi1 + chi2)*Pi + 21384760320*Pi2)))/3.0042980352e10
399 static double gamma1_fun(
double eta,
double eta2,
double xi) {
401 return 0.006927402739328343 + 0.03020474290328911*eta
402 + (0.006308024337706171 - 0.12074130661131138*eta + 0.26271598905781324*eta2
403 + (0.0034151773647198794 - 0.10779338611188374*eta + 0.27098966966891747*eta2)*xi
404 + (0.0007374185938559283 - 0.02749621038376281*eta + 0.0733150789135702*eta2)*xi*xi)*xi;
410 static double gamma2_fun(
double eta,
double eta2,
double xi) {
412 return 1.010344404799477 + 0.0008993122007234548*eta
413 + (0.283949116804459 - 4.049752962958005*eta + 13.207828172665366*eta2
414 + (0.10396278486805426 - 7.025059158961947*eta + 24.784892370130475*eta2)*xi
415 + (0.03093202475605892 - 2.6924023896851663*eta + 9.609374464684983*eta2)*xi*xi)*xi;
421 static double gamma3_fun(
double eta,
double eta2,
double xi) {
423 return 1.3081615607036106 - 0.005537729694807678*eta
424 + (-0.06782917938621007 - 0.6689834970767117*eta + 3.403147966134083*eta2
425 + (-0.05296577374411866 - 0.9923793203111362*eta + 4.820681208409587*eta2)*xi
426 + (-0.006134139870393713 - 0.38429253308696365*eta + 1.7561754421985984*eta2)*xi*xi)*xi;
435 double gamma1 =
p->gamma1;
436 double gamma2 =
p->gamma2;
437 double gamma3 =
p->gamma3;
438 double fDMgamma3 = fDM*gamma3;
439 double fminfRD = f - fRD;
440 return exp( -(fminfRD)*gamma2 / (fDMgamma3) )
450 double gamma1 =
p->gamma1;
451 double gamma2 =
p->gamma2;
452 double gamma3 =
p->gamma3;
454 double fDMgamma3 = fDM * gamma3;
455 double pow2_fDMgamma3 =
pow_2_of(fDMgamma3);
456 double fminfRD = f - fRD;
457 double expfactor = exp(((fminfRD)*gamma2)/(fDMgamma3));
458 double pow2pluspow2 =
pow_2_of(fminfRD) + pow2_fDMgamma3;
460 return ((-2*fDM*(fminfRD)*gamma3*gamma1) / pow2pluspow2 -
461 (gamma2*gamma1)) / ( expfactor * (pow2pluspow2)) ;
471 double gamma2 =
p->gamma2;
472 double gamma3 =
p->gamma3;
477 return fabs(fRD + (fDM*(-1 + sqrt(1 -
pow_2_of(gamma2)))*gamma3)/gamma2);
479 return fabs(fRD + (-fDM*gamma3)/gamma2);
493 return p->delta0 + Mf*
p->delta1 + Mf2*(
p->delta2 + Mf*
p->delta3 +
p->delta4*Mf2);
501 double xi = -1.0 + chi;
503 return 0.8149838730507785 + 2.5747553517454658*eta
504 + (1.1610198035496786 - 2.3627771785551537*eta + 6.771038707057573*eta2
505 + (0.7570782938606834 - 2.7256896890432474*eta + 7.1140380397149965*eta2)*xi
506 + (0.1766934149293479 - 0.7978690983168183*eta + 2.1162391502005153*eta2)*xi*xi)*xi;
540 return -((d2*f15*f22*f3 - 2*d2*
f14*f23*f3 + d2*f13*f24*f3 - d2*f15*f2*f32 + d2*
f14*f22*f32
541 - d1*f13*f23*f32 + d2*f13*f23*f32 + d1*f12*f24*f32 - d2*f12*f24*f32 + d2*
f14*f2*f33
542 + 2*d1*f13*f22*f33 - 2*d2*f13*f22*f33 - d1*f12*f23*f33 + d2*f12*f23*f33 - d1*f1*f24*f33
543 - d1*f13*f2*f34 - d1*f12*f22*f34 + 2*d1*f1*f23*f34 + d1*f12*f2*f35 - d1*f1*f22*f35
544 + 4*f12*f23*f32*v1 - 3*f1*f24*f32*v1 - 8*f12*f22*f33*v1 + 4*f1*f23*f33*v1 + f24*f33*v1
545 + 4*f12*f2*f34*v1 + f1*f22*f34*v1 - 2*f23*f34*v1 - 2*f1*f2*f35*v1 + f22*f35*v1 - f15*f32*v2
546 + 3*
f14*f33*v2 - 3*f13*f34*v2 + f12*f35*v2 - f15*f22*v3 + 2*
f14*f23*v3 - f13*f24*v3
547 + 2*f15*f2*f3*v3 -
f14*f22*f3*v3 - 4*f13*f23*f3*v3 + 3*f12*f24*f3*v3 - 4*
f14*f2*f32*v3
573 return -((-(d2*f15*f22) + 2*d2*
f14*f23 - d2*f13*f24 - d2*
f14*f22*f3 + 2*d1*f13*f23*f3
574 + 2*d2*f13*f23*f3 - 2*d1*f12*f24*f3 - d2*f12*f24*f3 + d2*f15*f32 - 3*d1*f13*f22*f32
575 - d2*f13*f22*f32 + 2*d1*f12*f23*f32 - 2*d2*f12*f23*f32 + d1*f1*f24*f32 + 2*d2*f1*f24*f32
576 - d2*
f14*f33 + d1*f12*f22*f33 + 3*d2*f12*f22*f33 - 2*d1*f1*f23*f33 - 2*d2*f1*f23*f33
577 + d1*f24*f33 + d1*f13*f34 + d1*f1*f22*f34 - 2*d1*f23*f34 - d1*f12*f35 + d1*f22*f35
578 - 8*f12*f23*f3*v1 + 6*f1*f24*f3*v1 + 12*f12*f22*f32*v1 - 8*f1*f23*f32*v1 - 4*f12*f34*v1
579 + 2*f1*f35*v1 + 2*f15*f3*v2 - 4*
f14*f32*v2 + 4*f12*f34*v2 - 2*f1*f35*v2 - 2*f15*f3*v3
580 + 8*f12*f23*f3*v3 - 6*f1*f24*f3*v3 + 4*
f14*f32*v3 - 12*f12*f22*f32*v3 + 8*f1*f23*f32*v3)
605 return -((d2*f15*f2 - d1*f13*f23 - 3*d2*f13*f23 + d1*f12*f24 + 2*d2*f12*f24 - d2*f15*f3
606 + d2*
f14*f2*f3 - d1*f12*f23*f3 + d2*f12*f23*f3 + d1*f1*f24*f3 - d2*f1*f24*f3 - d2*
f14*f32
607 + 3*d1*f13*f2*f32 + d2*f13*f2*f32 - d1*f1*f23*f32 + d2*f1*f23*f32 - 2*d1*f24*f32 - d2*f24*f32
608 - 2*d1*f13*f33 + 2*d2*f13*f33 - d1*f12*f2*f33 - 3*d2*f12*f2*f33 + 3*d1*f23*f33 + d2*f23*f33
609 + d1*f12*f34 - d1*f1*f2*f34 + d1*f1*f35 - d1*f2*f35 + 4*f12*f23*v1 - 3*f1*f24*v1 + 4*f1*f23*f3*v1
610 - 3*f24*f3*v1 - 12*f12*f2*f32*v1 + 4*f23*f32*v1 + 8*f12*f33*v1 - f1*f34*v1 - f35*v1 - f15*v2
611 -
f14*f3*v2 + 8*f13*f32*v2 - 8*f12*f33*v2 + f1*f34*v2 + f35*v2 + f15*v3 - 4*f12*f23*v3 + 3*f1*f24*v3
612 +
f14*f3*v3 - 4*f1*f23*f3*v3 + 3*f24*f3*v3 - 8*f13*f32*v3 + 12*f12*f2*f32*v3 - 4*f23*f32*v3)
635 return -((-2*d2*
f14*f2 + d1*f13*f22 + 3*d2*f13*f22 - d1*f1*f24 - d2*f1*f24 + 2*d2*
f14*f3
636 - 2*d1*f13*f2*f3 - 2*d2*f13*f2*f3 + d1*f12*f22*f3 - d2*f12*f22*f3 + d1*f24*f3 + d2*f24*f3
637 + d1*f13*f32 - d2*f13*f32 - 2*d1*f12*f2*f32 + 2*d2*f12*f2*f32 + d1*f1*f22*f32 - d2*f1*f22*f32
638 + d1*f12*f33 - d2*f12*f33 + 2*d1*f1*f2*f33 + 2*d2*f1*f2*f33 - 3*d1*f22*f33 - d2*f22*f33
639 - 2*d1*f1*f34 + 2*d1*f2*f34 - 4*f12*f22*v1 + 2*f24*v1 + 8*f12*f2*f3*v1 - 4*f1*f22*f3*v1
640 - 4*f12*f32*v1 + 8*f1*f2*f32*v1 - 4*f22*f32*v1 - 4*f1*f33*v1 + 2*f34*v1 + 2*
f14*v2
641 - 4*f13*f3*v2 + 4*f1*f33*v2 - 2*f34*v2 - 2*
f14*v3 + 4*f12*f22*v3 - 2*f24*v3 + 4*f13*f3*v3
642 - 8*f12*f2*f3*v3 + 4*f1*f22*f3*v3 + 4*f12*f32*v3 - 8*f1*f2*f32*v3 + 4*f22*f32*v3)
663 return -((d2*f13*f2 - d1*f12*f22 - 2*d2*f12*f22 + d1*f1*f23 + d2*f1*f23 - d2*f13*f3 + 2*d1*f12*f2*f3
664 + d2*f12*f2*f3 - d1*f1*f22*f3 + d2*f1*f22*f3 - d1*f23*f3 - d2*f23*f3 - d1*f12*f32 + d2*f12*f32
665 - d1*f1*f2*f32 - 2*d2*f1*f2*f32 + 2*d1*f22*f32 + d2*f22*f32 + d1*f1*f33 - d1*f2*f33 + 3*f1*f22*v1
666 - 2*f23*v1 - 6*f1*f2*f3*v1 + 3*f22*f3*v1 + 3*f1*f32*v1 - f33*v1 - f13*v2 + 3*f12*f3*v2 - 3*f1*f32*v2
667 + f33*v2 + f13*v3 - 3*f1*f22*v3 + 2*f23*v3 - 3*f12*f3*v3 + 6*f1*f2*f3*v3 - 3*f22*f3*v3)
678 double f3 =
p->fmaxCalc;
679 double dfx = 0.5*(f3 - f1);
680 double f2 = f1 + dfx;
693 double v1 =
AmpInsAnsatz(f1, &powers_of_f1, &prefactors);
748 p->chi12 = chi1*chi1;
749 p->chi22 = chi2*chi2;
750 double eta2 = eta*eta;
753 double Seta = sqrt(1.0 - 4.0*eta);
755 p->SetaPlus1 = 1.0 + Seta;
757 p->q = 0.5 * (1.0 + Seta - 2.0*eta) *
p->etaInv;
758 p->chi =
chiPN(Seta, eta, chi1, chi2);
759 double xi = -1.0 +
p->chi;
761 p->fRD =
fring(eta, chi1, chi2, finspin);
762 p->fDM =
fdamp(eta, chi1, chi2, finspin);
791 p->fMRDJoin =
p->fmaxCalc;
799 double AmpIns = AmpPreFac *
AmpInsAnsatz(f, powers_of_f, prefactors);
824 static double alpha1Fit(
double eta,
double eta2,
double xi) {
826 return 43.31514709695348 + 638.6332679188081*eta
827 + (-32.85768747216059 + 2415.8938269370315*eta - 5766.875169379177*eta2
828 + (-61.85459307173841 + 2953.967762459948*eta - 8986.29057591497*eta2)*xi
829 + (-21.571435779762044 + 981.2158224673428*eta - 3239.5664895930286*eta2)*xi*xi)*xi;
835 static double alpha2Fit(
double eta,
double eta2,
double xi) {
837 return -0.07020209449091723 - 0.16269798450687084*eta
838 + (-0.1872514685185499 + 1.138313650449945*eta - 2.8334196304430046*eta2
839 + (-0.17137955686840617 + 1.7197549338119527*eta - 4.539717148261272*eta2)*xi
840 + (-0.049983437357548705 + 0.6062072055948309*eta - 1.682769616644546*eta2)*xi*xi)*xi;
846 static double alpha3Fit(
double eta,
double eta2,
double xi) {
848 return 9.5988072383479 - 397.05438595557433*eta
849 + (16.202126189517813 - 1574.8286986717037*eta + 3600.3410843831093*eta2
850 + (27.092429659075467 - 1786.482357315139*eta + 5152.919378666511*eta2)*xi
851 + (11.175710130033895 - 577.7999423177481*eta + 1808.730762932043*eta2)*xi*xi)*xi;
857 static double alpha4Fit(
double eta,
double eta2,
double xi) {
859 return -0.02989487384493607 + 1.4022106448583738*eta
860 + (-0.07356049468633846 + 0.8337006542278661*eta + 0.2240008282397391*eta2
861 + (-0.055202870001177226 + 0.5667186343606578*eta + 0.7186931973380503*eta2)*xi
862 + (-0.015507437354325743 + 0.15750322779277187*eta + 0.21076815715176228*eta2)*xi*xi)*xi;
868 static double alpha5Fit(
double eta,
double eta2,
double xi) {
870 return 0.9974408278363099 - 0.007884449714907203*eta
871 + (-0.059046901195591035 + 1.3958712396764088*eta - 4.516631601676276*eta2
872 + (-0.05585343136869692 + 1.7516580039343603*eta - 5.990208965347804*eta2)*xi
873 + (-0.017945336522161195 + 0.5965097794825992*eta - 2.0608879367971804*eta2)*xi*xi)*xi;
886 double sqrootf = sqrt(f);
887 double fpow1_5 = f * sqrootf;
889 double fpow0_75 = sqrt(fpow1_5);
891 return -(
p->alpha2/f)
892 + (4.0/3.0) * (
p->alpha3 * fpow0_75)
894 +
p->alpha4 * Rholm * atan((f -
p->alpha5 *
p->fRD) / (Rholm *
p->fDM * Taulm));
906 return (
p->alpha1 +
p->alpha2/
pow_2_of(f) +
p->alpha3/pow(f,0.25)+
p->alpha4/(
p->fDM * Taulm * (1 +
pow_2_of(f -
p->alpha5 *
p->fRD)/(
pow_2_of(
p->fDM * Taulm * Rholm)))) ) *
p->etaInv;
920 static double beta1Fit(
double eta,
double eta2,
double xi) {
922 return 97.89747327985583 - 42.659730877489224*eta
923 + (153.48421037904913 - 1417.0620760768954*eta + 2752.8614143665027*eta2
924 + (138.7406469558649 - 1433.6585075135881*eta + 2857.7418952430758*eta2)*xi
925 + (41.025109467376126 - 423.680737974639*eta + 850.3594335657173*eta2)*xi*xi)*xi;
931 static double beta2Fit(
double eta,
double eta2,
double xi) {
933 return -3.282701958759534 - 9.051384468245866*eta
934 + (-12.415449742258042 + 55.4716447709787*eta - 106.05109938966335*eta2
935 + (-11.953044553690658 + 76.80704618365418*eta - 155.33172948098394*eta2)*xi
936 + (-3.4129261592393263 + 25.572377569952536*eta - 54.408036707740465*eta2)*xi*xi)*xi;
942 static double beta3Fit(
double eta,
double eta2,
double xi) {
944 return -0.000025156429818799565 + 0.000019750256942201327*eta
945 + (-0.000018370671469295915 + 0.000021886317041311973*eta + 0.00008250240316860033*eta2
946 + (7.157371250566708e-6 - 0.000055780000112270685*eta + 0.00019142082884072178*eta2)*xi
947 + (5.447166261464217e-6 - 0.00003220610095021982*eta + 0.00007974016714984341*eta2)*xi*xi)*xi;
958 return p->beta1*Mf -
p->beta3/(3.*
pow_3_of(Mf)) +
p->beta2*log(Mf);
966 return (
p->beta1 +
p->beta3/
pow_4_of(Mf) +
p->beta2/Mf) *
p->etaInv;
974 double etaInv =
p->etaInv;
975 double beta1 =
p->beta1;
976 double beta2 =
p->beta2;
977 double beta3 =
p->beta3;
978 double C2Int =
p->C2Int;
980 return C2Int + (beta1 + beta3/
pow_4_of(ff) + beta2/ff)*etaInv;
991 static double sigma1Fit(
double eta,
double eta2,
double xi) {
993 return 2096.551999295543 + 1463.7493168261553*eta
994 + (1312.5493286098522 + 18307.330017082117*eta - 43534.1440746107*eta2
995 + (-833.2889543511114 + 32047.31997183187*eta - 108609.45037520859*eta2)*xi
996 + (452.25136398112204 + 8353.439546391714*eta - 44531.3250037322*eta2)*xi*xi)*xi;
1002 static double sigma2Fit(
double eta,
double eta2,
double xi) {
1004 return -10114.056472621156 - 44631.01109458185*eta
1005 + (-6541.308761668722 - 266959.23419307504*eta + 686328.3229317984*eta2
1006 + (3405.6372187679685 - 437507.7208209015*eta + 1.6318171307344697e6*eta2)*xi
1007 + (-7462.648563007646 - 114585.25177153319*eta + 674402.4689098676*eta2)*xi*xi)*xi;
1013 static double sigma3Fit(
double eta,
double eta2,
double xi) {
1015 return 22933.658273436497 + 230960.00814979506*eta
1016 + (14961.083974183695 + 1.1940181342318142e6*eta - 3.1042239693052764e6*eta2
1017 + (-3038.166617199259 + 1.8720322849093592e6*eta - 7.309145012085539e6*eta2)*xi
1018 + (42738.22871475411 + 467502.018616601*eta - 3.064853498512499e6*eta2)*xi*xi)*xi;
1024 static double sigma4Fit(
double eta,
double eta2,
double xi) {
1026 return -14621.71522218357 - 377812.8579387104*eta
1027 + (-9608.682631509726 - 1.7108925257214056e6*eta + 4.332924601416521e6*eta2
1028 + (-22366.683262266528 - 2.5019716386377467e6*eta + 1.0274495902259542e7*eta2)*xi
1029 + (-85360.30079034246 - 570025.3441737515*eta + 4.396844346849777e6*eta2)*xi*xi)*xi;
1045 const double logv = log(v);
1050 phasing += prefactors->
third * powers_of_Mf->
third;
1052 phasing += prefactors->
logv * logv;
1062 + prefactors->
two * powers_of_Mf->
two
1073 double sigma1 =
p->sigma1;
1074 double sigma2 =
p->sigma2;
1075 double sigma3 =
p->sigma3;
1076 double sigma4 =
p->sigma4;
1083 prefactors->
logv =
pn->vlogv[5];
1091 prefactors->
one = sigma1;
1094 prefactors->
two = sigma4 * 0.5;
1103 double sigma1 =
p->sigma1;
1104 double sigma2 =
p->sigma2;
1105 double sigma3 =
p->sigma3;
1106 double sigma4 =
p->sigma4;
1110 const double v = cbrt(Pi*Mf);
1111 const double logv = log(v);
1112 const double v2 = v * v;
1113 const double v3 = v * v2;
1114 const double v4 = v * v3;
1115 const double v5 = v * v4;
1116 const double v6 = v * v5;
1117 const double v7 = v * v6;
1118 const double v8 = v * v7;
1122 double Dphasing = 0.0;
1123 Dphasing += 2.0 *
pn->v[7] * v7;
1124 Dphasing += (
pn->v[6] +
pn->vlogv[6] * (1.0 + logv)) * v6;
1125 Dphasing +=
pn->vlogv[5] * v5;
1126 Dphasing += -1.0 *
pn->v[4] * v4;
1127 Dphasing += -2.0 *
pn->v[3] * v3;
1128 Dphasing += -3.0 *
pn->v[2] * v2;
1129 Dphasing += -4.0 *
pn->v[1] * v;
1130 Dphasing += -5.0 *
pn->v[0];
1131 Dphasing /= v8 * 3.0;
1158 double eta2 = eta*eta;
1160 p->Seta = sqrt(1.0 - 4.0*eta);
1162 p->q = 0.5*(1.0 +
p->Seta - 2.0*eta)*
p->etaInv;
1163 p->chi =
chiPN(
p->Seta, eta, chi1, chi2);
1164 double xi = -1.0 +
p->chi;
1181 p->fRD =
fring(eta, chi1, chi2, finspin);
1182 p->fDM =
fdamp(eta, chi1, chi2, finspin);
1211 double etaInv =
p->etaInv;
1216 p->fMRDJoin=0.5*
p->fRD;
1226 p->C2Int = DPhiIns - DPhiInt;
1241 double PhiIntTempVal = etaInv *
PhiIntAnsatz(
p->fMRDJoin,
p) +
p->C1Int +
p->C2Int*
p->fMRDJoin;
1243 double DPhiMRDVal =
DPhiMRD(
p->fMRDJoin,
p, Rholm, Taulm);
1244 p->C2MRD = DPhiIntTempVal - DPhiMRDVal;
1245 p->C1MRD = PhiIntTempVal - etaInv *
PhiMRDAnsatzInt(
p->fMRDJoin,
p, Rholm, Taulm) -
p->C2MRD*
p->fMRDJoin;
1271 double PhiMRD =
p->etaInv *
PhiMRDAnsatzInt(f,
p, Rholm, Taulm) +
p->C1MRD +
p->C2MRD * f;
1285 static double Subtract3PNSS(
double m1,
double m2,
double M,
double eta,
double chi1,
double chi2){
1288 REAL8 pn_ss3 = (326.75L/1.12L + 557.5L/1.8L*eta)*eta*chi1*chi2;
1289 pn_ss3 += ((4703.5L/8.4L+2935.L/6.L*m1M-120.L*m1M*m1M) + (-4108.25L/6.72L-108.5L/1.2L*m1M+125.5L/3.6L*m1M*m1M)) *m1M*m1M * chi1*chi1;
1290 pn_ss3 += ((4703.5L/8.4L+2935.L/6.L*m2M-120.L*m2M*m2M) + (-4108.25L/6.72L-108.5L/1.2L*m2M+125.5L/3.6L*m2M*m2M)) *m2M*m2M * chi2*chi2;
UsefulPowers powers_of_pi
useful powers of LAL_PI, calculated once and kept constant - to be initied with a call to init_useful...
static const double QNMData_a[]
#define PHI_fJoin_INS
Dimensionless frequency (Mf) at which the inspiral phase switches to the intermediate phase.
#define AMP_fJoin_INS
Dimensionless frequency (Mf) at which the inspiral amplitude switches to the intermediate amplitude.
static const double QNMData_fring[]
static const int QNMData_length
static const double QNMData_fdamp[]
static double sigma1Fit(double eta, double eta2, double xi)
sigma 1 phenom coefficient.
static double beta2Fit(double eta, double eta2, double xi)
beta 2 phenom coefficient.
static double PhiMRDAnsatzInt(double f, IMRPhenomDPhaseCoefficients *p, double Rholm, double Taulm)
Ansatz for the merger-ringdown phase Equation 14 arXiv:1508.07253 Rholm was added when IMRPhenomHM (h...
static double DAmpMRDAnsatz(double f, IMRPhenomDAmplitudeCoefficients *p)
first frequency derivative of AmpMRDAnsatz
static void ComputeIMRPhenDPhaseConnectionCoefficients(IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn, PhiInsPrefactors *prefactors, double Rholm, double Taulm)
This function aligns the three phase parts (inspiral, intermediate and merger-rindown) such that they...
static double alpha2Fit(double eta, double eta2, double xi)
alpha 2 phenom coefficient.
static double DAmpInsAnsatz(double Mf, UsefulPowers *powers_of_Mf, IMRPhenomDAmplitudeCoefficients *p)
Take the AmpInsAnsatz expression and compute the first derivative with respect to frequency to get th...
static double delta4_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double amp0Func(double eta)
amplitude scaling factor defined by eq.
static double IMRPhenDPhase(double f, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn, UsefulPowers *powers_of_f, PhiInsPrefactors *prefactors, double Rholm, double Taulm)
This function computes the IMR phase given phenom coefficients.
static int init_phi_ins_prefactors(PhiInsPrefactors *prefactors, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
static double alpha1Fit(double eta, double eta2, double xi)
alpha 1 phenom coefficient.
static double sigma3Fit(double eta, double eta2, double xi)
sigma 3 phenom coefficient.
static double beta3Fit(double eta, double eta2, double xi)
beta 3 phenom coefficient.
static double rho2_fun(double eta, double eta2, double xi)
rho_2 phenom coefficient.
static double AmpMRDAnsatz(double f, IMRPhenomDAmplitudeCoefficients *p)
Ansatz for the merger-ringdown amplitude.
static double beta1Fit(double eta, double eta2, double xi)
beta 1 phenom coefficient.
static double rho1_fun(double eta, double eta2, double xi)
rho_1 phenom coefficient.
static double FinalSpin0815(double eta, double chi1, double chi2)
Wrapper function for FinalSpin0815_s.
static double delta2_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double fdamp(double eta, double chi1, double chi2, double finspin)
fdamp is the complex part of the ringdown frequency 1508.07250 figure 9
static double alpha3Fit(double eta, double eta2, double xi)
alpha 3 phenom coefficient.
static double fmaxCalc(IMRPhenomDAmplitudeCoefficients *p)
Equation 20 arXiv:1508.07253 (called f_peak in paper) analytic location of maximum of AmpMRDAnsatz.
static double chiPN(double Seta, double eta, double chi1, double chi2)
PN reduced spin parameter See Eq 5.9 in http://arxiv.org/pdf/1107.1267v2.pdf.
static void ComputeIMRPhenomDPhaseCoefficients(IMRPhenomDPhaseCoefficients *p, double eta, double chi1, double chi2, double finspin, LALDict *extraParams)
A struct containing all the parameters that need to be calculated to compute the phenomenological pha...
static double gamma2_fun(double eta, double eta2, double xi)
gamma 2 phenom coefficient.
static double AmpInsAnsatz(double Mf, UsefulPowers *powers_of_Mf, AmpInsPrefactors *prefactors)
Inspiral amplitude plus rho phenom coefficents.
static double DPhiIntAnsatz(double Mf, IMRPhenomDPhaseCoefficients *p)
First frequency derivative of PhiIntAnsatz (this time with 1.
static double fring(double eta, double chi1, double chi2, double finspin)
fring is the real part of the ringdown frequency 1508.07250 figure 9
static void ComputeIMRPhenomDAmplitudeCoefficients(IMRPhenomDAmplitudeCoefficients *p, double eta, double chi1, double chi2, double finspin)
A struct containing all the parameters that need to be calculated to compute the phenomenological amp...
static double alpha5Fit(double eta, double eta2, double xi)
alpha 5 phenom coefficient.
static double PhiInsAnsatzInt(double Mf, UsefulPowers *powers_of_Mf, PhiInsPrefactors *prefactors, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
Ansatz for the inspiral phase.
static double delta3_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double sigma2Fit(double eta, double eta2, double xi)
sigma 2 phenom coefficient.
static double FinalSpin0815_s(double eta, double s)
Formula to predict the final spin.
static void ComputeDeltasFromCollocation(IMRPhenomDAmplitudeCoefficients *p)
Calculates delta_i's Method described in arXiv:1508.07253 section 'Region IIa - intermediate'.
static double delta1_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double gamma1_fun(double eta, double eta2, double xi)
gamma 1 phenom coefficient.
static double Subtract3PNSS(double m1, double m2, double M, double eta, double chi1, double chi2)
Subtract 3PN spin-spin term below as this is in LAL's TaylorF2 implementation (LALSimInspiralPNCoeffi...
static double alpha4Fit(double eta, double eta2, double xi)
alpha 4 phenom coefficient.
static double rho3_fun(double eta, double eta2, double xi)
rho_3 phenom coefficient.
static double delta0_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
The following functions (delta{0,1,2,3,4}_fun) were derived in mathematica according to the constrain...
static double PhiIntAnsatz(double Mf, IMRPhenomDPhaseCoefficients *p)
ansatz for the intermediate phase defined by Equation 16 arXiv:1508.07253
static double sigma4Fit(double eta, double eta2, double xi)
sigma 4 phenom coefficient.
static double AmpIntAnsatz(double Mf, IMRPhenomDAmplitudeCoefficients *p)
Ansatz for the intermediate amplitude.
static size_t NextPow2(const size_t n)
Return the closest higher power of 2.
static double IMRPhenDAmplitude(double f, IMRPhenomDAmplitudeCoefficients *p, UsefulPowers *powers_of_f, AmpInsPrefactors *prefactors)
This function computes the IMR amplitude given phenom coefficients.
static double DPhiIntTemp(double ff, IMRPhenomDPhaseCoefficients *p)
temporary instance of DPhiIntAnsatz used when computing coefficients to make the phase C(1) continuou...
static double DPhiInsAnsatzInt(double Mf, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
First frequency derivative of PhiInsAnsatzInt.
static bool StepFunc_boolean(const double t, const double t1)
**
static int init_amp_ins_prefactors(AmpInsPrefactors *prefactors, IMRPhenomDAmplitudeCoefficients *p)
static double gamma3_fun(double eta, double eta2, double xi)
gamma 3 phenom coefficient.
static double DPhiMRD(double f, IMRPhenomDPhaseCoefficients *p, double Rholm, double Taulm)
First frequency derivative of PhiMRDAnsatzInt Rholm was added when IMRPhenomHM (high mode) was added.
static int init_useful_powers(UsefulPowers *p, REAL8 number)
static double AmpIntColFitCoeff(double eta, double eta2, double chi)
The function name stands for 'Amplitude Intermediate Collocation Fit Coefficient' This is the 'v2' va...
Internal function for IMRPhenomD phenomenological waveform model. See LALSimIMRPhenom....
static double pow_3_of(double number)
calc cube of number without floating point 'pow'
static double pow_4_of(double number)
calc fourth power of number without floating point 'pow'
static double pow_2_of(double number)
calc square of number without floating point 'pow'
double PhenomInternal_EradRational0815(double eta, double chi1, double chi2)
Wrapper function for EradRational0815_s.
static vector d(const double L_norm, const double J_norm, const vector roots)
Internal function that returns the coefficients "d_0", "d_2" and "d_4" from 1703.03967 corresponding ...
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_VOID(assertion,...)
used to cache the recurring (frequency-independent) prefactors of AmpInsAnsatz.
Structure holding all additional coefficients needed for the delta amplitude functions.
Structure holding all coefficients for the amplitude.
Structure holding all coefficients for the phase.
used to cache the recurring (frequency-independent) prefactors of PhiInsAnsatzInt.
useful powers in GW waveforms: 1/6, 1/3, 2/3, 4/3, 5/3, 2, 7/3, 8/3, -1, -1/6, -7/6,...