LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomPv3HM.h
Go to the documentation of this file.
1 #ifndef _LALSIM_IMR_PHENOMPv3HM_H
2 #define _LALSIM_IMR_PHENOMPv3HM_H
3 
4 #ifdef __cplusplus
5 extern "C"
6 {
7 #endif
8 
9 #include <lal/LALSimIMR.h>
10 #include <lal/LALDict.h>
11 
12 /* IMRPhenomPv3 - uses the angles from arXiv 1703.03967*/
14 
15 /* default and constant value places lhat = (0,0,1) */
16 #define LHAT_COS_THETA 1.0 /* Cosine of Polar angle of orbital angular momentum */
17 #define LHAT_PHI 0.0 /* Azimuthal angle of orbital angular momentum */
18 
19 /* structs */
20 
21 /**
22  * Structure storing initial and derived variables for IMRPhenomPv3HM
23  */
24 typedef struct tagPhenomPv3HMStorage
25 {
26  INT4 PRECESSING; /**< integer to signify if system is precessing, 1 for false (not precessing), 0 for true (precessing) */
27  /* input parameters */
28  REAL8 m1_SI; /**< mass of primary in SI (kg) */
29  REAL8 m2_SI; /**< mass of secondary in SI (kg) */
30  REAL8 chi1x; /**< x-component of dimensionless spin on primary w.r.t. Lhat = (0,0,1) */
31  REAL8 chi1y; /**< y-component of dimensionless spin on primary w.r.t. Lhat = (0,0,1) */
32  REAL8 chi1z; /**< z-component of dimensionless spin on primary w.r.t. Lhat = (0,0,1) */
33  REAL8 chi2x; /**< x-component of dimensionless spin on secondary w.r.t. Lhat = (0,0,1) */
34  REAL8 chi2y; /**< y-component of dimensionless spin on secondary w.r.t. Lhat = (0,0,1) */
35  REAL8 chi2z; /**< z-component of dimensionless spin on secondary w.r.t. Lhat = (0,0,1) */
36  REAL8 distance_SI; /**< distance to source in SI (m) */
37  REAL8 inclination; /**< inclination - used to compute the angle thetaJN (rad) */
38  REAL8 phiRef; /**< */
39  REAL8 deltaF; /**< frequency spacing (Hz) */
40  REAL8 f_min; /**< starting GW frequency (Hz) */
41  REAL8 f_max; /**< ending GW frequency (Hz) */
42  REAL8 f_ref; /**< reference GW frequency (Hz) */
43  /* derived parameters */
44  REAL8 m1_Msun; /**< mass of primary in solar masses */
45  REAL8 m2_Msun; /**< mass of secondary in solar masses */
46  REAL8 Mtot_SI; /**< total mass in SI (kg) */
47  REAL8 Mtot_Msun; /**< total mass in solar masses */
48  REAL8 eta; /**< Symmetric mass ratio*/
49  REAL8 q; /* with m1>=m2 so q>=1 */
50  REAL8 Msec; /**< Total mass in seconds */
51  REAL8 f_ref_Orb_Hz; /**< Reference orbital frequency (Hz) [It's the reference GW frequency converted to orbital frequency] */
52  REAL8 twopi_Msec; /**< LAL_TWOPI * Msec */
53  REAL8 amp0; /**< frequency domain physical scaling */
54  /* variables used when rotating input parameters (LAL frame) into PhenomP intrinsic parameters */
55  REAL8 chip; /**< effective precessing parameter */
56  REAL8 thetaJN; /**< Angle between J0 and line of sight (z-direction) */
57  REAL8 alpha0; /**< Initial value of alpha angle (azimuthal precession angle) */
58  REAL8 phi_aligned; /**< Initial phase to feed the underlying aligned-spin model */
59  REAL8 zeta_polariz; /**< Angle to rotate the polarizations */
60  /* compute spins in polar coordinates */
61  REAL8 chi1_mag; /**< dimensionless spin magnitude on primary */
62  REAL8 chi1_theta; /**< polar angle w.r.t. Lhat = (0,0,1) on primary */
63  REAL8 chi1_phi; /**< azimuthal angle w.r.t. Lhat = (0,0,1) on primary */
64  REAL8 chi2_mag; /**< dimensionless spin magnitude on secondary */
65  REAL8 chi2_theta; /**< polar angle w.r.t. Lhat = (0,0,1) on secondary */
66  REAL8 chi2_phi; /**< azimuthal angle w.r.t. Lhat = (0,0,1) on secondary */
67  /* Precession angles at reference frequency */
68  REAL8 alphaRef; /**< azimuthal precession angle at f_ref */
69  REAL8 epsilonRef; /**< epsilon precession angle at f_ref */
70  REAL8 betaRef; /**< beta (opening angle) precession angle at f_ref */
71  // REAL8 t_corr; /**< time shift for peak */
72  // REAL8 finspin; /**< final spin */
74 
75 /* function prototypes */
76 
77 static LALDict *IMRPhenomPv3HM_setup_mode_array(LALDict *extraParams);
78 
79 static int init_PhenomPv3HM_Storage(PhenomPv3HMStorage *p, sysq *q, REAL8 m1_SI, REAL8 m2_SI, REAL8 S1x, REAL8 S1y, REAL8 S1z, REAL8 S2x, REAL8 S2y, REAL8 S2z, const REAL8 distance, const REAL8 inclination, const REAL8 phiRef, const REAL8 deltaF, const REAL8 f_min, const REAL8 f_max, const REAL8 f_ref);
80 
81 static int IMRPhenomPv3HM_check_mode_array(LALValue *ModeArray);
82 
83 static int IMRPhenomPv3HM_Compute_Mode(COMPLEX16FrequencySeries **hptilde, COMPLEX16FrequencySeries **hctilde, UINT4 ell, INT4 mprime, const REAL8 Mtot_Msun, PhenomPv3HMStorage *pv3HM, SphHarmFrequencySeries **hlmsD, sysq *pAngles, REAL8Sequence *freqs_seq);
84 
85 static int IMRPhenomPv3HM_Compute_a_b_e(REAL8 *alpha, REAL8 *beta, REAL8 *mprime_epsilon, REAL8 fHz, INT4 mprime, const REAL8 twopi_Msec, PhenomPv3HMStorage *pv3HM, sysq *pAngles);
86 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif /* _LALSIM_IMR_PHENOMPv3HM_H */
static int IMRPhenomPv3HM_check_mode_array(LALValue *ModeArray)
static int init_PhenomPv3HM_Storage(PhenomPv3HMStorage *p, sysq *q, REAL8 m1_SI, REAL8 m2_SI, REAL8 S1x, REAL8 S1y, REAL8 S1z, REAL8 S2x, REAL8 S2y, REAL8 S2z, const REAL8 distance, const REAL8 inclination, const REAL8 phiRef, const REAL8 deltaF, const REAL8 f_min, const REAL8 f_max, const REAL8 f_ref)
static int IMRPhenomPv3HM_wigner_loop(COMPLEX16 *Term1, COMPLEX16 *Term2, INT4 ell, INT4 mprime, IMRPhenomPv3HMYlmStruct *ylms, IMRPhenomPv3HMAlphaStruct *als, IMRPhenomPv3HMWignderStruct *wigs)
static int IMRPhenomPv3HM_Compute_a_b_e(REAL8 *alpha, REAL8 *beta, REAL8 *mprime_epsilon, REAL8 fHz, INT4 mprime, const REAL8 twopi_Msec, PhenomPv3HMStorage *pv3HM, sysq *pAngles)
static int IMRPhenomPv3HM_Compute_Mode(COMPLEX16FrequencySeries **hptilde, COMPLEX16FrequencySeries **hctilde, UINT4 ell, INT4 mprime, const REAL8 Mtot_Msun, PhenomPv3HMStorage *pv3HM, SphHarmFrequencySeries **hlmsD, sysq *pAngles, REAL8Sequence *freqs_seq)
static LALDict * IMRPhenomPv3HM_setup_mode_array(LALDict *extraParams)
static double beta(const double a, const double b, const sysq *system)
Internal function that computes the spin-orbit couplings.
double complex COMPLEX16
double REAL8
uint32_t UINT4
int32_t INT4
static const INT4 q
double alpha
Definition: sgwb.c:106
a strcut to keep the complex exponential terms of the alpha precession angle
a strcut to keep the wigner-d matrix elements
a strcut to keep the spherical harmonic terms
Structure storing initial and derived variables for IMRPhenomPv3HM.
REAL8 chi2_theta
polar angle w.r.t.
REAL8 f_ref_Orb_Hz
Reference orbital frequency (Hz) [It's the reference GW frequency converted to orbital frequency].
REAL8 distance_SI
distance to source in SI (m)
REAL8 eta
Symmetric mass ratio.
REAL8 deltaF
frequency spacing (Hz)
REAL8 m2_Msun
mass of secondary in solar masses
REAL8 alphaRef
azimuthal precession angle at f_ref
REAL8 inclination
inclination - used to compute the angle thetaJN (rad)
REAL8 Msec
Total mass in seconds.
REAL8 f_max
ending GW frequency (Hz)
REAL8 m2_SI
mass of secondary in SI (kg)
REAL8 twopi_Msec
LAL_TWOPI * Msec.
REAL8 epsilonRef
epsilon precession angle at f_ref
REAL8 chi2_mag
dimensionless spin magnitude on secondary
REAL8 chi1_phi
azimuthal angle w.r.t.
REAL8 amp0
frequency domain physical scaling
REAL8 Mtot_Msun
total mass in solar masses
REAL8 alpha0
Initial value of alpha angle (azimuthal precession angle)
REAL8 phi_aligned
Initial phase to feed the underlying aligned-spin model.
REAL8 zeta_polariz
Angle to rotate the polarizations.
REAL8 m1_SI
mass of primary in SI (kg)
REAL8 chi2_phi
azimuthal angle w.r.t.
REAL8 chi2z
z-component of dimensionless spin on secondary w.r.t.
REAL8 f_min
starting GW frequency (Hz)
REAL8 chi2x
x-component of dimensionless spin on secondary w.r.t.
REAL8 chi1y
y-component of dimensionless spin on primary w.r.t.
REAL8 chi1_mag
dimensionless spin magnitude on primary
REAL8 chip
effective precessing parameter
REAL8 chi1z
z-component of dimensionless spin on primary w.r.t.
REAL8 chi1x
x-component of dimensionless spin on primary w.r.t.
REAL8 Mtot_SI
total mass in SI (kg)
REAL8 m1_Msun
mass of primary in solar masses
REAL8 chi1_theta
polar angle w.r.t.
REAL8 chi2y
y-component of dimensionless spin on secondary w.r.t.
REAL8 betaRef
beta (opening angle) precession angle at f_ref
REAL8 f_ref
reference GW frequency (Hz)
REAL8 thetaJN
Angle between J0 and line of sight (z-direction)
INT4 PRECESSING
integer to signify if system is precessing, 1 for false (not precessing), 0 for true (precessing)
double f_min
Definition: unicorn.c:22
double f_max
Definition: unicorn.c:23