LALSimulation  5.4.0.1-fe68b98
LALSimInspiralTestingGRCorrections.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Walter Del Pozzo
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 _LALSIMINSPIRALTESTINGGRCORRECTIONS_H
21 #define _LALSIMINSPIRALTESTINGGRCORRECTIONS_H
22 
23 #if defined(__cplusplus)
24 extern "C" {
25 #elif 0
26 } /* so that editors will match preceding brace */
27 #endif
28 
29 #include <stdlib.h>
30 #include <math.h>
31 #include <lal/Date.h>
32 #include <lal/FrequencySeries.h>
33 #include <lal/LALConstants.h>
34 #include <lal/LALDatatypes.h>
35 #include <lal/LALSimInspiral.h>
36 
37 
38 /* Main function for waveform generation. Accepts a GR waveform htilde, binary parameters, testing-GR parameters, and paremeters
39  * that determine how the correction will be tapered. Calls PNCorrections to compute non-GR corrections to phase, then
40  * PhaseCorrectionsPhasing to smoothly taper the correction to the baseline GR waveform.
41  */
42 int XLALSimInspiralTestingGRCorrections(COMPLEX16FrequencySeries *htilde, /**< input htilde, will be modified in place */
43  const UINT4 l, /**< UNDOCUMENTED */
44  const UINT4 m, /**< UNDOCUMENTED */
45  const REAL8 m1_SI, /**< UNDOCUMENTED */
46  const REAL8 m2_SI, /**< UNDOCUMENTED */
47  const REAL8 chi1z, /**< UNDOCUMENTED */
48  const REAL8 chi2z, /**< UNDOCUMENTED */
49  const REAL8 f_low, /**< UNDOCUMENTED */
50  const REAL8 f_ref, /**< UNDOCUMENTED */
51  const REAL8 f_window_div_f_Peak, /**< Frequency at which to attach non-GR and GR waveforms, inputted as a fraction of f_Peak (should be between 0 and 1) */
52  const REAL8 NCyclesStep, /**< Number of GW cycles over which to taper the non-GR phase correction */
53  LALDict *LALpars /**< input linked list of testing gr parameters */
54 );
55 
56 /* Accepts binary parameters and testing-GR parameters, computes the PN phase corrections specified by the testing-GR parameters and stores in PNPhasingSeries pfa */
57 void XLALSimInspiralPNCorrections(PNPhasingSeries *pfa, const REAL8 m1, const REAL8 m2, const REAL8 chi1L, const REAL8 chi2L, const REAL8 chi1sq, const REAL8 chi2sq, const REAL8 chi1dotchi2, const REAL8 qm_def1, const REAL8 qm_def2, LALDict *LALpars);
58 
59 /* Accepts GR baseline waveform htilde, PN phase corrections pfa and parameters that determine how the correction will be tapered.
60  * Tapers the phase correction by multiplying the second derivative of the correction w.r.t. frequency by a Heaviside function
61  * and then integrating back to recover the phase. Finally, adds the phaes correction to the waveform and stores in htilde.
62  */
63 int XLALSimInspiralPhaseCorrectionsPhasing(COMPLEX16FrequencySeries *htilde, /**< input htilde, will be modified in place */
64  const REAL8Sequence *freqs, /**< UNDOCUMENTED */
65  const UINT4 m, /**< UNDOCUMENTED */
66  const UINT4 iStart, /**< UNDOCUMENTED */
67  const UINT4 iRef, /**< UNDOCUMENTED */
68  const UINT4 iPeak, /**< UNDOCUMENTED */
69  PNPhasingSeries pfa, /**< UNDOCUMENTED */
70  const REAL8 mtot, /**< UNDOCUMENTED */
71  const REAL8 eta, /**< UNDOCUMENTED */
72  const REAL8 f_window_div_f_Peak, /**< UNDOCUMENTED */
73  const REAL8 iStartFinal, /**< UNDOCUMENTED */
74  const REAL8 NCyclesStep /**< Choose number of GW cycles over which to taper the non-GR phase correction */
75  );
76 
77 /* Main function for waveform generation for signals with dynamical scalarization. Accepts a GR waveform htilde, binary parameters,
78  * testing-GR parameters, and paremeters that determine how the corrections will be tapered. Calls PNCorrections to compute
79  * non-GR corrections to phase, then PhaseCorrectionsPhasing to smoothly taper the correction to the baseline GR waveform.
80  */
81 
82 REAL8 PNPhase(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot); /* Returns phase computed from PN coefficients pfa at frequency f*/
83 REAL8 PNPhaseDerivative(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot); /* Returns derivative of phase w.r.t. frequency computed from PN coefficients pfa at frequency f*/
84 REAL8 PNPhaseSecondDerivative(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot); /* Returns second derivative of phase w.r.t. frequency computed from PN coefficients pfa at frequency f*/
85 
86 #if 0
87 { /* so that editors will match succeeding brace */
88 #elif defined(__cplusplus)
89 }
90 #endif
91 
92 #endif /* _LALSIMINSPIRALTESTINGGRCORRECTIONS_H */
int XLALSimInspiralPhaseCorrectionsPhasing(COMPLEX16FrequencySeries *htilde, const REAL8Sequence *freqs, const UINT4 m, const UINT4 iStart, const UINT4 iRef, const UINT4 iPeak, PNPhasingSeries pfa, const REAL8 mtot, const REAL8 eta, const REAL8 f_window_div_f_Peak, const REAL8 iStartFinal, const REAL8 NCyclesStep)
REAL8 PNPhase(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot)
REAL8 PNPhaseDerivative(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot)
REAL8 PNPhaseSecondDerivative(REAL8 f, UINT4 m, PNPhasingSeries pfa, const REAL8 mtot)
int XLALSimInspiralTestingGRCorrections(COMPLEX16FrequencySeries *htilde, const UINT4 l, const UINT4 m, const REAL8 m1_SI, const REAL8 m2_SI, const REAL8 chi1z, const REAL8 chi2z, const REAL8 f_low, const REAL8 f_ref, const REAL8 f_window_div_f_Peak, const REAL8 NCyclesStep, LALDict *LALpars)
void XLALSimInspiralPNCorrections(PNPhasingSeries *pfa, const REAL8 m1, const REAL8 m2, const REAL8 chi1L, const REAL8 chi2L, const REAL8 chi1sq, const REAL8 chi2sq, const REAL8 chi1dotchi2, const REAL8 qm_def1, const REAL8 qm_def2, LALDict *LALpars)
int l
Definition: bh_qnmode.c:135
double REAL8
uint32_t UINT4
static const INT4 m