1 #ifndef _LALSIM_IMR_PHENOMD_INTERNALS_H
2 #define _LALSIM_IMR_PHENOMD_INTERNALS_H
88 #include <gsl/gsl_errno.h>
89 #include <gsl/gsl_spline.h>
91 #include <lal/LALStdlib.h>
92 #include <lal/LALSimIMR.h>
93 #include <lal/LALConstants.h>
95 #include <lal/FrequencySeries.h>
96 #include <lal/Units.h>
97 #include <lal/LALSimInspiral.h>
102 #define PI_M_SIXTH 0.8263074871107581108331125856317241299
110 typedef struct tagIMRPhenomDAmplitudeCoefficients {
159 typedef struct tagIMRPhenomDPhaseCoefficients {
205 typedef struct tagdeltaUtility {
227 static double chiPN(
double Seta,
double eta,
double chi1,
double chi2);
228 UNUSED
static size_t NextPow2(
const size_t n);
232 static inline double pow_2_of(
double number);
233 static inline double pow_3_of(
double number);
234 static inline double pow_4_of(
double number);
236 UNUSED
static double Subtract3PNSS(
double m1,
double m2,
double M,
double eta,
double chi1,
double chi2);
244 typedef struct tagUsefulPowers
279 typedef struct tagAmpInsPrefactors
302 typedef struct tagPhiInsPrefactors
333 return (number*number);
341 return (number*number*number);
357 static double fring(
double eta,
double chi1,
double chi2,
double finalspin);
358 static double fdamp(
double eta,
double chi1,
double chi2,
double finalspin);
366 static double rho1_fun(
double eta,
double eta2,
double xi);
367 static double rho2_fun(
double eta,
double eta2,
double xi);
368 static double rho3_fun(
double eta,
double eta2,
double xi);
374 static double gamma1_fun(
double eta,
double eta2,
double xi);
375 static double gamma2_fun(
double eta,
double eta2,
double xi);
376 static double gamma3_fun(
double eta,
double eta2,
double xi);
401 static double alpha1Fit(
double eta,
double eta2,
double xi);
402 static double alpha2Fit(
double eta,
double eta2,
double xi);
403 static double alpha3Fit(
double eta,
double eta2,
double xi);
404 static double alpha4Fit(
double eta,
double eta2,
double xi);
405 static double alpha5Fit(
double eta,
double eta2,
double xi);
411 static double beta1Fit(
double eta,
double eta2,
double xi);
412 static double beta2Fit(
double eta,
double eta2,
double xi);
413 static double beta3Fit(
double eta,
double eta2,
double xi);
420 static double sigma1Fit(
double eta,
double eta2,
double xi);
421 static double sigma2Fit(
double eta,
double eta2,
double xi);
422 static double sigma3Fit(
double eta,
double eta2,
double xi);
423 static double sigma4Fit(
double eta,
double eta2,
double xi);
438 typedef struct tagPhenDAmpAndPhasePreComp
464 LALDict *extraParams);
Tabulated Quasi-Normal Mode Information for Ringdown.
static double sigma1Fit(double eta, double eta2, double xi)
UNUSED int IMRPhenomDSetupAmpAndPhaseCoefficients(PhenDAmpAndPhasePreComp *pDPreComp, REAL8 m1, REAL8 m2, REAL8 chi1x, REAL8 chi1y, REAL8 chi1z, REAL8 chi2x, REAL8 chi2y, REAL8 chi2z, const REAL8 Rholm, const REAL8 Taulm, LALDict *extraParams)
Function to populate the PhenDAmpAndPhasePreComp struct with quantities that can be computed outside ...
static double beta2Fit(double eta, double eta2, double xi)
static UNUSED double Subtract3PNSS(double m1, double m2, double M, double eta, double chi1, double chi2)
static double PhiMRDAnsatzInt(double f, IMRPhenomDPhaseCoefficients *p, double Rholm, double Taulm)
static double DAmpMRDAnsatz(double f, IMRPhenomDAmplitudeCoefficients *p)
static UNUSED double FinalSpin0815(double eta, double chi1, double chi2)
static double alpha2Fit(double eta, double eta2, double xi)
static double DAmpInsAnsatz(double Mf, UsefulPowers *powers_of_Mf, IMRPhenomDAmplitudeCoefficients *p)
static double fdamp(double eta, double chi1, double chi2, double finalspin)
static double delta4_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double AmpIntColFitCoeff(double eta, double eta2, double chiPN)
static double amp0Func(double eta)
static double DPhiIntAnsatz(double f, IMRPhenomDPhaseCoefficients *p)
UNUSED REAL8 IMRPhenomDPhase_OneFrequency(REAL8 Mf, PhenDAmpAndPhasePreComp pD, REAL8 Rholm, REAL8 Taulm)
Function to return the phenomD phase using the IMRPhenomDSetupAmpAndPhaseCoefficients struct.
static double alpha1Fit(double eta, double eta2, double xi)
static UNUSED double IMRPhenDAmplitude(double f, IMRPhenomDAmplitudeCoefficients *p, UsefulPowers *powers_of_f, AmpInsPrefactors *prefactors)
static double sigma3Fit(double eta, double eta2, double xi)
static UNUSED void ComputeIMRPhenomDPhaseCoefficients(IMRPhenomDPhaseCoefficients *p, double eta, double chi1, double chi2, double finspin, LALDict *extraParams)
static double PhiIntAnsatz(double f, IMRPhenomDPhaseCoefficients *p)
static double beta3Fit(double eta, double eta2, double xi)
static double rho2_fun(double eta, double eta2, double xi)
static double AmpMRDAnsatz(double f, IMRPhenomDAmplitudeCoefficients *p)
static double beta1Fit(double eta, double eta2, double xi)
static double PhiInsAnsatzInt(double f, UsefulPowers *powers_of_Mf, PhiInsPrefactors *prefactors, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
static UNUSED void ComputeIMRPhenDPhaseConnectionCoefficients(IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn, PhiInsPrefactors *prefactors, double Rholm, double Taulm)
static double rho1_fun(double eta, double eta2, double xi)
static double delta2_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double alpha3Fit(double eta, double eta2, double xi)
static double fmaxCalc(IMRPhenomDAmplitudeCoefficients *p)
static double chiPN(double Seta, double eta, double chi1, double chi2)
static double pow_3_of(double number)
calc cube of number without floating point 'pow'
static double gamma2_fun(double eta, double eta2, double xi)
static double AmpInsAnsatz(double Mf, UsefulPowers *powers_of_Mf, AmpInsPrefactors *prefactors)
static double alpha5Fit(double eta, double eta2, double xi)
static double delta3_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double sigma2Fit(double eta, double eta2, double xi)
static double AmpIntAnsatz(double f, IMRPhenomDAmplitudeCoefficients *p)
static UNUSED int init_phi_ins_prefactors(PhiInsPrefactors *prefactors, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
must be called before the first usage of *prefactors
static double FinalSpin0815_s(double eta, double s)
static void ComputeDeltasFromCollocation(IMRPhenomDAmplitudeCoefficients *p)
static double delta1_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static double gamma1_fun(double eta, double eta2, double xi)
static double pow_4_of(double number)
calc fourth power of number without floating point 'pow'
UsefulPowers powers_of_pi
useful powers of LAL_PI, calculated once and kept constant - to be initied with a call to init_useful...
static double alpha4Fit(double eta, double eta2, double xi)
static double rho3_fun(double eta, double eta2, double xi)
static double delta0_fun(IMRPhenomDAmplitudeCoefficients *p, DeltaUtility *d)
static UNUSED double IMRPhenDPhase(double f, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn, UsefulPowers *powers_of_f, PhiInsPrefactors *prefactors, double Rholm, double Taulm)
static double sigma4Fit(double eta, double eta2, double xi)
static double fring(double eta, double chi1, double chi2, double finalspin)
static double DPhiIntTemp(double ff, IMRPhenomDPhaseCoefficients *p)
static bool StepFunc_boolean(const double t, const double t1)
static double pow_2_of(double number)
calc square of number without floating point 'pow'
static int init_amp_ins_prefactors(AmpInsPrefactors *prefactors, IMRPhenomDAmplitudeCoefficients *p)
must be called before the first usage of *prefactors
static UNUSED size_t NextPow2(const size_t n)
static double gamma3_fun(double eta, double eta2, double xi)
static UNUSED void ComputeIMRPhenomDAmplitudeCoefficients(IMRPhenomDAmplitudeCoefficients *p, double eta, double chi1, double chi2, double finspin)
static double DPhiMRD(double f, IMRPhenomDPhaseCoefficients *p, double Rholm, double Taulm)
static int init_useful_powers(UsefulPowers *p, REAL8 number)
must be called before the first usage of *p
static double DPhiInsAnsatzInt(double ff, IMRPhenomDPhaseCoefficients *p, PNPhasingSeries *pn)
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 ...
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.
A struct the store the amplitude and phase structs for phenomD.
AmpInsPrefactors amp_prefactors
IMRPhenomDPhaseCoefficients pPhi
PhiInsPrefactors phi_prefactors
IMRPhenomDAmplitudeCoefficients pAmp
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,...