LALSimulation  5.4.0.1-fe68b98
LALSimIMRPhenomXHM.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2019 Marta Colleoni, Cecilio García Quirós
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19 
20 #ifndef _LALSIM_IMR_PHENOMXHM_H
21 #define _LALSIM_IMR_PHENOMXHM_H
22 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include <math.h>
29 #include <complex.h>
30 
31 #include <lal/LALStdlib.h>
32 #include <lal/LALConstants.h>
33 #include <lal/Date.h>
34 #include <lal/FrequencySeries.h>
35 #include <lal/TimeSeries.h>
36 #include <lal/TimeFreqFFT.h>
37 #include <lal/Units.h>
38 #include <lal/LALSimInspiral.h>
39 
40 
41 // /* Returns the Fourier domain strain of just one negative mode: h_l-m. This quantity is zero for negative frequencies.
42 // However the positive mode h_lm is zero for positive frequencies and for the negative frequencies is equal to (-1)^l h*_l-m(-f).
43 // This is a wrapper function that use XLALSimIMRPhenomXASGenerateFD for the 22 mode and XLALSimIMRPhenomXHMOneMode for the higher modes. */
44 
45 
47 
49  COMPLEX16FrequencySeries **htildelm, /**< [out] hlm for one mode **/
50  const REAL8Sequence *freqs_In, /**< fmin, fmax [Hz] **/
51  IMRPhenomXWaveformStruct *pWF, /**< structure of the 22 mode **/
52  UINT4 ell, /**< first index of the mode **/
53  UINT4 emm, /**< second index of the mode **/
54  LALDict *lalParams /**< extra params **/
55 );
56 
57 /* Compute the frequency array and initialize htildelm to the corresponding length. */
58 int SetupWFArrays(
59  REAL8Sequence **freqs, /**< [out] frequency grid [Hz] */
60  COMPLEX16FrequencySeries **htildelm, /**< [out] Frequency domain hlm GW strain */
61  const REAL8Sequence *freqs_In, /**< fmin, fmax [Hz] */
62  IMRPhenomXWaveformStruct *pWF, /**< Waveform structure with parameters */
63  LIGOTimeGPS ligotimegps_zero /**< = {0,0} */
64 );
65 
66 /* Compute XHM phase and phase derivative for a given Mf using the inputs as shown below. This function has been created to reduce code duplication in the PNR Coprecessing model. See IMRPhenomX_FullPhase_22 for the analagous XAS function. Both functions are designed to be used in in initialization routines, and not for evaluating the phase at many frequencies. */
68  double *phase,
69  double *dphase,
70  REAL8 Mf,
71  INT4 ell,
72  INT4 emm,
74  LALDict *lalParams
75 );
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* _LALSIM_IMR_PHENOMXHM_H */
int SetupWFArrays(REAL8Sequence **freqs, COMPLEX16FrequencySeries **htildelm, const REAL8Sequence *freqs_In, IMRPhenomXWaveformStruct *pWF, LIGOTimeGPS ligotimegps_zero)
int IMRPhenomXHMGenerateFDOneMode(COMPLEX16FrequencySeries **htildelm, const REAL8Sequence *freqs_In, IMRPhenomXWaveformStruct *pWF, UINT4 ell, UINT4 emm, LALDict *lalParams)
double REAL8
uint32_t UINT4
int32_t INT4
INT4 IMRPhenomXHM_Phase_for_Initialization(double *phase, double *dphase, REAL8 Mf, INT4 ell, INT4 emm, IMRPhenomXWaveformStruct *pWF, LALDict *lalParams)