56 return !gsl_fcmp(
x,
y, epsilon);
76 if (fabs(*
x - X) < epsilon)
87 return (
size_t)pow(2, ceil(log2(n)));
105 REAL8 chi1z_tmp, chi2z_tmp, m1_tmp, m2_tmp;
127 to enfore that m1 should be the larger mass.\
128 After trying to enforce this m1 = %f and m2 = %f\n", *m1, *m2);
150 REAL8 m1_tmp, m2_tmp;
151 REAL8 chi1x_tmp, chi1y_tmp, chi1z_tmp;
152 REAL8 chi2x_tmp, chi2y_tmp, chi2z_tmp;
191 to enfore that m1 should be the larger mass.\
192 After trying to enforce this m1 = %f and m2 = %f\n",
205 if (fabs(
a) < tol && fabs(b) < tol)
227 *magnitude = sqrt(
x*
x +
y*
y + z*z );
232 *polar = acos( z / *magnitude );
245 const double f_orb_hz,
255 const int ExpansionOrder
259 const double mul = 1.0;
260 const double phl = 0.0;
271 L_norm_3PN_Seq->
data[0] = 0.;
272 freqs_seq->
data[0] = f_orb_hz;
278 L_norm_3PN_Seq, freqs_seq,
283 f_0, ExpansionOrder);
286 double L_norm_3PN = L_norm_3PN_Seq->
data[0];
300 double eta2 = eta * eta;
301 double eta3 = eta2 * eta;
303 return (eta * (0.055974469826360077 + 0.5809510763115132 * eta - 0.9606726679372312 * eta2 + 3.352411249771192 * eta3) *
304 (1. + (-0.0030302335878845507 - 2.0066110851351073 * eta + 7.7050567802399215 * eta2) *
s)) /
305 (1. + (-0.6714403054720589 - 1.4756929437702908 * eta + 7.304676214885011 * eta2) *
s);
314 double Seta = sqrt(1.0 - 4.0 * eta);
315 double m1 = 0.5 * (1.0 + Seta);
316 double m2 = 0.5 * (1.0 - Seta);
317 double m1s = m1 * m1;
318 double m2s = m2 * m2;
320 double s = (m1s * chi1 + m2s * chi2) / (m1s + m2s);
352 COMPLEX16 factorp = 0.5 * (Y + minus1l * Ymstar);
353 COMPLEX16 factorc = -I * 0.5 * (Y - minus1l * Ymstar);
357 hptilde->
data->
data[j] += factorp * hlm;
358 hctilde->
data->
data[j] += factorc * hlm;
369 hptilde->
data->
data[j] += factorp * hlm;
370 hctilde->
data->
data[j] += factorc * hlm;
int XLALOrbitalAngMom3PNSpinning(REAL8Sequence *L_norm_3PN, REAL8Sequence *f_orb_hz, const double m1, const double m2, const double mul, const double phl, double mu1, double ph1, double ch1, double mu2, double ph2, double ch2, const double f_0, const int ExpansionOrder)
Standalone function to compute the magnitude of L divided by GMsquare_over_c to 3PN order with spin t...
void PhenomInternal_ComputeIMRPhenomPv3CartesianToPolar(REAL8 *polar, REAL8 *azimuthal, REAL8 *magnitude, REAL8 x, REAL8 y, REAL8 z)
function to convert from 3d cartesian components to polar angles and vector magnitude.
double PhenomInternal_OrbAngMom3PN(const double f_orb_hz, const double m1, const double m2, const double s1x, const double s1y, const double s1z, const double s2x, const double s2y, const double s2z, const double f_0, const int ExpansionOrder)
Wrapper function for XLALOrbitalAngMom3PNSpinning.
double PhenomInternal_EradRational0815(double eta, double chi1, double chi2)
Wrapper function for EradRational0815_s.
int PhenomInternal_IMRPhenomHMFDAddMode(COMPLEX16FrequencySeries *hptilde, COMPLEX16FrequencySeries *hctilde, COMPLEX16FrequencySeries *hlmtilde, REAL8 theta, REAL8 phi, INT4 l, INT4 m, INT4 sym)
helper function to multiple hlm with Ylm.
bool PhenomInternal_approx_equal(REAL8 x, REAL8 y, REAL8 epsilon)
This function determines whether x and y are approximately equal to a relative accuracy epsilon.
int PhenomInternal_AlignedSpinEnforcePrimaryIsm1(REAL8 *m1, REAL8 *m2, REAL8 *chi1z, REAL8 *chi2z)
Given m1 with aligned-spin chi1z and m2 with aligned-spin chi2z.
static double EradRational0815_s(double eta, double s)
Formula to predict the total radiated energy.
size_t PhenomInternal_NextPow2(const size_t n)
Return the closest higher power of 2.
REAL8 PhenomInternal_atan2tol(REAL8 a, REAL8 b, REAL8 tol)
atan2 wrapper that returns 0 when both magnitudes of x and y are below tol, otherwise it returns atan...
int PhenomInternal_PrecessingSpinEnforcePrimaryIsm1(REAL8 *m1, REAL8 *m2, REAL8 *chi1x, REAL8 *chi1y, REAL8 *chi1z, REAL8 *chi2x, REAL8 *chi2y, REAL8 *chi2z)
Given m1 with spins (chi1x, chi1y, chi1z) and m2 with spins (chi2x,chi2y,chi2z).
void PhenomInternal_nudge(REAL8 *x, REAL8 X, REAL8 epsilon)
If x and X are approximately equal to relative accuracy epsilon then set x = X.
#define PhenomInternal_MAX_TOL_ATAN
Tolerance used below which numbers are treated as zero for the calculation of atan2.
void XLALDestroyREAL8Sequence(REAL8Sequence *sequence)
REAL8Sequence * XLALCreateREAL8Sequence(size_t length)
COMPLEX16 XLALSpinWeightedSphericalHarmonic(REAL8 theta, REAL8 phi, int s, int l, int m)
#define XLAL_PRINT_INFO(...)
#define XLAL_CHECK(assertion,...)