Internal (not SWIG'd) Auxiliary functions for phenomenological model development. More...
Prototypes | |
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... | |
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... | |
size_t | PhenomInternal_NextPow2 (const size_t n) |
Return the closest higher power of 2. More... | |
int | PhenomInternal_AlignedSpinEnforcePrimaryIsm1 (REAL8 *m1, REAL8 *m2, REAL8 *chi1z, REAL8 *chi2z) |
Given m1 with aligned-spin chi1z and m2 with aligned-spin chi2z. More... | |
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... | |
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 atan2(x, y) More... | |
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... | |
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... | |
static double | EradRational0815_s (double eta, double s) |
Formula to predict the total radiated energy. More... | |
double | PhenomInternal_EradRational0815 (double eta, double chi1, double chi2) |
Wrapper function for EradRational0815_s. More... | |
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... | |
Internal (not SWIG'd) Auxiliary functions for phenomenological model development.
Helper functions for phenomenological waveform models Cannot be used through python SWIG wrapping. NOTE: The convention for naming functions in there is to use the prefix 'PhenomInternal_' This is to avoid the use of defining functions as static and therefore not able to be used by other modules by including LALSimIMRPhenomInternalUtils.h.
Definition in file LALSimIMRPhenomInternalUtils.c.
Go to the source code of this file.
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.
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.
size_t PhenomInternal_NextPow2 | ( | const size_t | n | ) |
Return the closest higher power of 2.
Definition at line 84 of file LALSimIMRPhenomInternalUtils.c.
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
[out] | m1 | mass of body 1 |
[out] | m2 | mass of body 2 |
[out] | chi1z | aligned-spin component of body 1 |
[out] | chi2z | aligned-spin component of body 2 |
Definition at line 98 of file LALSimIMRPhenomInternalUtils.c.
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.
[out] | m1 | mass of body 1 |
[out] | m2 | mass of body 2 |
[out] | chi1x | x-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
[out] | chi1y | y-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
[out] | chi1z | z-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
[out] | chi2x | x-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
[out] | chi2y | y-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
[out] | chi2z | z-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
Definition at line 139 of file LALSimIMRPhenomInternalUtils.c.
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.
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.
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)
f_orb_hz | Orbtial frequency (Hz) |
m1 | mass of primary in SI (kg) |
m2 | mass of secondary in SI (kg) |
s1x | x-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
s1y | y-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
s1z | z-component of the dimensionless spin of object 1 w.r.t. Lhat = (0,0,1) |
s2x | x-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
s2y | y-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
s2z | z-component of the dimensionless spin of object 2 w.r.t. Lhat = (0,0,1) |
f_0 | Reference Gravitational Wave frequency (Hz) |
ExpansionOrder | Keep 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.
|
static |
Formula to predict the total radiated energy.
Equation 3.7 and 3.8 arXiv:1508.07250 Input parameter s defined around Equation 3.7 and 3.8.
Definition at line 298 of file LALSimIMRPhenomInternalUtils.c.
double PhenomInternal_EradRational0815 | ( | double | eta, |
double | chi1, | ||
double | chi2 | ||
) |
Wrapper function for EradRational0815_s.
Definition at line 311 of file LALSimIMRPhenomInternalUtils.c.
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.