LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomInternalUtils.h
Go to the documentation of this file.
1 #ifndef _LALSIM_IMR_PHENOMINTERNALUTILS_H
2 #define _LALSIM_IMR_PHENOMINTERNALUTILS_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #ifdef __GNUC__
9 #define UNUSED __attribute__ ((unused))
10 #else
11 #define UNUSED
12 #endif
13 
14 #include <stdbool.h>
15 #include <lal/LALDatatypes.h>
16 #include <lal/LALStdlib.h>
17 #include <lal/XLALError.h>
18 #include <gsl/gsl_math.h>
19 #include <lal/Sequence.h>
20 #include <lal/LALSimIMR.h>
21 #include <lal/SphericalHarmonics.h>
22 
23 // UNUSED void PhenomInternal_UtilsTest(void);
24 
25 /**
26  * Tolerance used below which numbers are treated as zero for the calculation of atan2
27  */
28 #define PhenomInternal_MAX_TOL_ATAN 1.0e-15
29 
31 
32 UNUSED bool PhenomInternal_approx_equal(REAL8 x, REAL8 y, REAL8 epsilon);
33 
34 UNUSED void PhenomInternal_nudge(REAL8 *x, REAL8 X, REAL8 epsilon);
35 
36 UNUSED size_t PhenomInternal_NextPow2(const size_t n);
37 
38 UNUSED int PhenomInternal_AlignedSpinEnforcePrimaryIsm1(REAL8 *m1, REAL8 *m2, REAL8 *chi1z, REAL8 *chi2z);
39 
40 UNUSED int PhenomInternal_PrecessingSpinEnforcePrimaryIsm1(REAL8 *m1, REAL8 *m2, REAL8 *chi1x, REAL8 *chi1y, REAL8 *chi1z, REAL8 *chi2x, REAL8 *chi2y, REAL8 *chi2z);
41 
42 UNUSED void PhenomInternal_ComputeIMRPhenomPv3CartesianToPolar(REAL8 *polar, REAL8 *azimuthal, REAL8 *magnitude, REAL8 x, REAL8 y, REAL8 z);
43 
44 UNUSED double PhenomInternal_EradRational0815_s(double eta, double s);
45 UNUSED double PhenomInternal_EradRational0815(double eta, double chi1, double chi2);
46 
47 UNUSED double PhenomInternal_OrbAngMom3PN(
48  const double f_orb_hz,
49  const double m1,
50  const double m2,
51  const double s1x,
52  const double s1y,
53  const double s1z,
54  const double s2x,
55  const double s2y,
56  const double s2z,
57  const double f_0,
58  const int ExpansionOrder);
59 
61  COMPLEX16FrequencySeries *hptilde,
62  COMPLEX16FrequencySeries *hctilde,
63  COMPLEX16FrequencySeries *hlmtilde,
64  REAL8 theta,
65  REAL8 phi,
66  INT4 l,
67  INT4 m,
68  INT4 sym);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* _LALSIM_IMR_PHENOMINTERNALUTILS_H */
UNUSED 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.
UNUSED 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.
UNUSED REAL8 PhenomInternal_atan2tol(REAL8 x, REAL8 y, REAL8 tol)
atan2 wrapper that returns 0 when both magnitudes of x and y are below tol, otherwise it returns atan...
UNUSED 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.
UNUSED int PhenomInternal_AlignedSpinEnforcePrimaryIsm1(REAL8 *m1, REAL8 *m2, REAL8 *chi1z, REAL8 *chi2z)
Given m1 with aligned-spin chi1z and m2 with aligned-spin chi2z.
UNUSED 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).
UNUSED double PhenomInternal_EradRational0815_s(double eta, double s)
UNUSED 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.
UNUSED size_t PhenomInternal_NextPow2(const size_t n)
Return the closest higher power of 2.
UNUSED double PhenomInternal_EradRational0815(double eta, double chi1, double chi2)
Wrapper function for EradRational0815_s.
UNUSED void PhenomInternal_nudge(REAL8 *x, REAL8 X, REAL8 epsilon)
If x and X are approximately equal to relative accuracy epsilon then set x = X.
int s
Definition: bh_qnmode.c:137
int l
Definition: bh_qnmode.c:135
double theta
Definition: bh_sphwf.c:118
double REAL8
int32_t INT4
static const INT4 m