LALInspiral 5.0.3.1-eeff03c
GenerateInspiral.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Drew Keppel, Duncan Brown, Gareth Jones, Peter Shawhan, Thomas Cokelaer, Laszlo Vereb
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 _GENERATEINSPIRAL_H
21#define _GENERATEINSPIRAL_H
22
23#include <lal/GeneratePPNInspiral.h>
24#include <lal/LALDatatypes.h>
25#include <lal/LALInspiral.h>
26#include <lal/LIGOMetadataTables.h>
27#include <lal/SimulateCoherentGW.h>
28
29#if defined(__cplusplus)
30extern "C" {
31#elif 0
32} /* so that editors will match preceding brace */
33#endif
34
35/**
36 * \defgroup GenerateInspiral_h Header GenerateInspiral.h
37 * \ingroup lalinspiral_inject
38 * \author Cokelaer, T.
39 *
40 * \brief %Header file for the inspiral injection interface code.
41 *
42 * The code contained in GenerateInspiral.c is an interface between the
43 * injection package and the inspiral package. More precisely, the
44 * function GenerateInspiral.c is used within the FindChirpSimulation.c
45 * file of the FindChirp package in order to inject waveforms into real
46 * data. The injection is done through the inject package in order to
47 * take into account the interferometer position, binary orientation ...
48 *
49 * GenerateInspiral has the capability of injecting both waveform designed
50 * within the inspiral package (TaylorT1, T2, T3, PadeT1, EOB, and spinning
51 * waveform) and the inject package (so-called PPN waveform).
52 * also a test code as well which allows to check the output of
53 * code. It is called InjectionInterfaceTest.c
54 *
55 * ### Synopsis ###
56 *
57 * \code
58 * #include <lal/GenerateInspiral.h>
59 * \endcode
60 *
61 * <dl>
62 * <dt><tt>LALGenerateInspiral()</tt></dt><dd> create an inspiral binary
63 * waveform generated either by the \ref lalinspiral_inspiral (#EOB,
64 * #EOBNR, #PadeT1, #TaylorT1, #TaylorT2, #TaylorT3, #SpinTaylor, #PhenSpinTaylorRD, #SpinQuadTaylor)
65 * or the \c inject package (#GeneratePPN). It is used in the module
66 * \c FindChirpSimulation in \ref lalinspiral_findchirp.
67 *
68 * There are three parsed arguments
69 * <ul>
70 * <li> a \c CoherentGW structure which stores amplitude,
71 * frequency and phase of the waveform (output)</li>
72 * <li> a \c thisEvent structure which provides some
73 * waveform parameters (input)</li>
74 * <li> a \c PPNParamStruc which gives some input
75 * parameters needed by the GeneratePPN waveform generation. That
76 * arguments is also used as an output by all the different
77 * approximant (output/input).</li>
78 * </ul>
79 *
80 * The input must be composed of a valid thisEvent structure as well as
81 * the variable deltaT of the PPNParamStruc. All others variables
82 * of the PPNParamStruc are populated within that function.</dd>
83 *
84 * <dt><tt>XLALGenerateInspiralPopulatePPN()</tt></dt><dd> Populate the
85 * PPNParamsStruc with the input argument \c thisEvent. That
86 * structure is used by both inspiral waveforms inject waveforms.</dd>
87 *
88 * <dt><tt>XLALGenerateInspiralPopulateInspiral()</tt></dt><dd> Populate the
89 * InspiralTemplate structure if the model chosen belongs to the
90 * inspiral package.
91 * </dd>
92 * </dl>
93 *
94 * ### Notes ###
95 *
96 * Inject only time-domain waveforms for the time being such as GeneratePPN,
97 * TaylorT1, TaylorT2, TaylorT3, PadeT1 and EOB , SpinTaylor, PhenSpinTaylorRD.
98 *
99 */
100/** @{ */
101
102/**\name Error Codes */
103/** @{ */
104#define GENERATEINSPIRALH_ENORM 0 /**< Normal exit */
105#define GENERATEINSPIRALH_ENULL 1 /**< Null pointer */
106#define GENERATEINSPIRALH_EDFDT 2 /**< Waveform sampling interval is too large */
107#define GENERATEINSPIRALH_EZERO 3 /**< inclination zero for SpinTaylor waveform */
108/** @} */
109
110/** \cond DONT_DOXYGEN */
111#define GENERATEINSPIRALH_MSGENORM "Normal exit"
112#define GENERATEINSPIRALH_MSGENULL "Null pointer"
113#define GENERATEINSPIRALH_MSGEDFDT "Waveform sampling interval is too large"
114#define GENERATEINSPIRALH_MSGEZERO "inclination zero for SpinTaylor waveform"
115/** \endcond */
116
117
118/**
119 * \name Parameter for the EOB at 3PN.
120 * In principle, the three following parameter should be set to zero.
121 */
122/** @{ */
123#define GENERATEINSPIRAL_ZETA2 0.
124#define GENERATEINSPIRAL_OMEGAS 0.
125#define GENERATEINSPIRAL_THETA 0.
126/** @} */
127
128/** \name For the spinning case, might be changed later or include in the injection itself */
129/** @{ */
130#define GENERATEINSPIRAL_SOURCETHETA 1.
131#define GENERATEINSPIRAL_SOURCEPHI 2.
132/** @} */
133
134/** Default low freqnecy cutoff for injections */
135#define GENERATEINSPIRAL_DEFAULT_FLOWER 40
136
137
138void
141 CoherentGW *waveform,
143 PPNParamStruc *ppnParamsInputOutput
144 );
145
146int
148 PPNParamStruc * _LAL_RESTRICT_ ppnParams,
149 SimInspiralTable * _LAL_RESTRICT_ thisEvent
150 );
151
152int
154 InspiralTemplate * _LAL_RESTRICT_ inspiralParams,
155 SimInspiralTable * _LAL_RESTRICT_ thisEvent,
156 PPNParamStruc * _LAL_RESTRICT_ ppnParams
157 );
158
159/** @} */
160
161#if 0
162{ /* so that editors will match succeeding brace */
163#elif defined(__cplusplus)
164}
165#endif
166
167#endif /* _GENERATEINSPIRAL_H */
int XLALGenerateInspiralPopulateInspiral(InspiralTemplate *_LAL_RESTRICT_ inspiralParams, SimInspiralTable *_LAL_RESTRICT_ thisEvent, PPNParamStruc *_LAL_RESTRICT_ ppnParams)
int XLALGenerateInspiralPopulatePPN(PPNParamStruc *_LAL_RESTRICT_ ppnParams, SimInspiralTable *_LAL_RESTRICT_ thisEvent)
void LALGenerateInspiral(LALStatus *status, CoherentGW *waveform, SimInspiralTable *params, PPNParamStruc *ppnParamsInputOutput)
The inspiral waveform parameter structure containing information about the waveform to be generated.
Definition: LALInspiral.h:205
This structure stores the parameters for constructing a restricted post-Newtonian waveform.