LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomInternalUtils.h File Reference

Prototypes

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 atan2(x, y) More...
 
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. More...
 
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. More...
 
UNUSED size_t PhenomInternal_NextPow2 (const size_t n)
 Return the closest higher power of 2. More...
 
UNUSED int PhenomInternal_AlignedSpinEnforcePrimaryIsm1 (REAL8 *m1, REAL8 *m2, REAL8 *chi1z, REAL8 *chi2z)
 Given m1 with aligned-spin chi1z and m2 with aligned-spin chi2z. More...
 
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). More...
 
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. More...
 
UNUSED double PhenomInternal_EradRational0815_s (double eta, double s)
 
UNUSED double PhenomInternal_EradRational0815 (double eta, double chi1, double chi2)
 Wrapper function for EradRational0815_s. More...
 
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. More...
 
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. More...
 

Go to the source code of this file.

Macros

#define PhenomInternal_MAX_TOL_ATAN   1.0e-15
 Tolerance used below which numbers are treated as zero for the calculation of atan2. More...
 

Macro Definition Documentation

◆ PhenomInternal_MAX_TOL_ATAN

#define PhenomInternal_MAX_TOL_ATAN   1.0e-15

Tolerance used below which numbers are treated as zero for the calculation of atan2.

Definition at line 28 of file LALSimIMRPhenomInternalUtils.h.

Function Documentation

◆ PhenomInternal_atan2tol()

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 atan2(x, y)

Definition at line 202 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_approx_equal()

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.

Note that x and y are compared to relative accuracy, so this function is not suitable for testing whether a value is approximately zero.

Definition at line 54 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_nudge()

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.

If X = 0 then use an absolute comparison.

Definition at line 64 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_NextPow2()

UNUSED size_t PhenomInternal_NextPow2 ( const size_t  n)

Return the closest higher power of 2.

Definition at line 84 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_AlignedSpinEnforcePrimaryIsm1()

UNUSED int PhenomInternal_AlignedSpinEnforcePrimaryIsm1 ( REAL8 m1,
REAL8 m2,
REAL8 chi1z,
REAL8 chi2z 
)

Given m1 with aligned-spin chi1z and m2 with aligned-spin chi2z.

Enforce that m1 >= m2 and swap spins accordingly. Enforce that the primary object (heavier) is indexed by 1. To be used with aligned-spin waveform models. There is another function for precessing waveform models. This is currently not used

Parameters
[out]m1mass of body 1
[out]m2mass of body 2
[out]chi1zaligned-spin component of body 1
[out]chi2zaligned-spin component of body 2

Definition at line 98 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_PrecessingSpinEnforcePrimaryIsm1()

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).

Enforce that m1 >= m2 and swap spins accordingly. Enforce that the primary object (heavier) is indexed by 1. To be used with precessing-spin waveform models.

Parameters
[out]m1mass of body 1
[out]m2mass of body 2
[out]chi1xx-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
[out]chi1yy-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
[out]chi1zz-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
[out]chi2xx-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)
[out]chi2yy-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)
[out]chi2zz-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)

Definition at line 139 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_ComputeIMRPhenomPv3CartesianToPolar()

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.

https://en.wikipedia.org/wiki/Spherical_coordinate_system#Cartesian_coordinates

Definition at line 217 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_EradRational0815_s()

UNUSED double PhenomInternal_EradRational0815_s ( double  eta,
double  s 
)

◆ PhenomInternal_EradRational0815()

UNUSED double PhenomInternal_EradRational0815 ( double  eta,
double  chi1,
double  chi2 
)

Wrapper function for EradRational0815_s.

Definition at line 311 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_OrbAngMom3PN()

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.

Used to compute the orbital angular momentum at 3PN order at a single frequency. We assume that Lhat = (0,0,1)

Parameters
f_orb_hzOrbtial frequency (Hz)
m1mass of primary in SI (kg)
m2mass of secondary in SI (kg)
s1xx-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
s1yy-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
s1zz-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1)
s2xx-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)
s2yy-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)
s2zz-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1)
f_0Reference Gravitational Wave frequency (Hz)
ExpansionOrderKeep terms upto ExpansionOrder in precession angles phi_z and zeta (1,2,3,4,5 or -1 for all orders)

Definition at line 244 of file LALSimIMRPhenomInternalUtils.c.

◆ PhenomInternal_IMRPhenomHMFDAddMode()

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.

Adapted from LALSimIMREOBNRv2HMROMUtilities.c

Definition at line 329 of file LALSimIMRPhenomInternalUtils.c.