LALInspiral 5.0.3.1-eeff03c
NRWaveInject.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2006 S.Fairhurst, B. Krishnan, L.Santamaria
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 _NRWAVEINJECT_H
21#define _NRWAVEINJECT_H
22
23/* includes */
24#include <stdlib.h>
25#include <math.h>
26#include <stdio.h>
27#include <stdlib.h>
28#include <string.h>
29#include <lal/LALStdlib.h>
30#include <lal/LALConstants.h>
31#include <lal/AVFactories.h>
32#include <lal/SeqFactories.h>
33#include <lal/LIGOMetadataTables.h>
34#include <lal/NRWaveIO.h>
35#include <lal/TimeDelay.h>
36#include <lal/DetResponse.h>
37#include <lal/SphericalHarmonics.h>
38
39#ifdef __cplusplus /* C++ protection. */
40extern "C" {
41#endif
42
43/**
44 * \defgroup NRWaveInject_h Header NRWaveInject.h
45 * \ingroup lalinspiral_inject
46 * \author S.Fairhurst, B. Krishnan, L.Santamaria
47 *
48 * \brief Module for generating h(t) from Numrel waveforms
49 *
50 */
51/** @{ */
52
53/** \name Error codes */
54/** @{ */
55#define NRWAVEINJECT_ENULL 1 /**< Null pointer */
56#define NRWAVEINJECT_EFILE 2 /**< Error in file-IO */
57#define NRWAVEINJECT_ENONULL 3 /**< Not a Null pointer */
58#define NRWAVEINJECT_ENOMEM 4 /**< Memory ellocation error */
59#define NRWAVEINJECT_EVAL 5 /**< Invalid value */
60#define NRWAVEINJECT_EFORMAT 6 /**< Meta data file format incorrect */
61/** @} */
62
63/** \cond DONT_DOXYGEN */
64#define NRWAVEINJECT_MSGENULL "Null pointer"
65#define NRWAVEINJECT_MSGEFILE "Error in file-IO"
66#define NRWAVEINJECT_MSGENONULL "Not a Null pointer"
67#define NRWAVEINJECT_MSGENOMEM "Memory ellocation error"
68#define NRWAVEINJECT_MSGEVAL "Invalid value"
69#define NRWAVEINJECT_MSGEFORMAT "Meta data file format incorrect"
70/** \endcond */
71
72#define NINJA_MIN_MODE 2
73#define NINJA_MAX_MODE 5
74
75/** enum for list of numrel groups */
76typedef enum tagNumRelGroup {
90
91
94 REAL4TimeVectorSeries *tempstrain,
95 REAL4TimeVectorSeries *strain);
96
99 REAL8TimeVectorSeries *tempstrain,
100 REAL8TimeVectorSeries *strain);
101
102/* REAL4TimeVectorSeries * */
103INT4
105 REAL4TimeVectorSeries *strain,
106 UINT4 modeL,
107 INT4 modeM,
108 REAL4 inclination,
109 REAL4 coa_phase);
110
113 REAL8TimeVectorSeries *strain,
114 UINT4 modeL,
115 INT4 modeM,
116 REAL4 inclination,
117 REAL4 coa_phase);
118
119void
121 REAL8TimeSeries *plus,
122 REAL8TimeSeries *cross,
123 UINT4 modeL,
124 INT4 modeM,
125 REAL4 inclination,
126 REAL4 coa_phase);
127
130 REAL4TimeVectorSeries *strain,
131 SimInspiralTable *thisInj,
132 const CHAR *ifo,
133 INT4 sampleRate);
134
137 INT4 sampleRate);
138
141 INT4 sampleRate);
142
143INT4
145 NRWaveCatalog *nrCatalog,
146 const SimInspiralTable *inj,
147 INT4 modeL,
148 INT4 modeM);
149
151 REAL4TimeSeries *injData,
152 REAL4TimeVectorSeries *strain,
153 SimInspiralTable *thisInj,
154 CHAR *ifo,
155 REAL8 dynRange);
156
158 REAL8TimeSeries *injData,
159 REAL8TimeVectorSeries *strain,
160 SimInspiralTable *thisInj,
161 CHAR *ifo,
162 REAL8 dynRange);
163
164
165INT4
167 const REAL4TimeVectorSeries *in);
168
169INT4
171 const REAL4TimeSeries *in);
172
173INT4
175 const REAL8TimeSeries *in);
176
177INT4
179 const REAL8TimeSeries *plus,
180 const REAL8TimeSeries *cross);
181
182
183/** channel name for nr data in frame file */
184CHAR* XLALGetNinjaChannelName(const CHAR *polarisation, /**< either plus or cross */
185 UINT4 l, /**< azimuthal mode index */
186 INT4 m /**< polar mode index */);
187
189
190
191/** @} */
192
193#ifdef __cplusplus
194} /* Close C++ protection */
195#endif
196
197#endif /* Close double-include protection _NRWAVEINJECT_H */
double REAL8
char CHAR
uint32_t UINT4
int32_t INT4
float REAL4
INT4 XLALFindNRFile(NRWaveMetaData *out, NRWaveCatalog *nrCatalog, const SimInspiralTable *inj, INT4 modeL, INT4 modeM)
For given inspiral parameters, find nearest waveform in catalog of numerical relativity waveforms.
Definition: NRWaveInject.c:586
REAL4TimeSeries * XLALCalculateNRStrain(REAL4TimeVectorSeries *strain, SimInspiralTable *thisInj, const CHAR *ifo, INT4 sampleRate)
Definition: NRWaveInject.c:218
INT4 XLALOrientNRWave(REAL4TimeVectorSeries *strain, UINT4 modeL, INT4 modeM, REAL4 inclination, REAL4 coa_phase)
Takes a (sky averaged) numerical relativity waveform and returns the waveform appropriate for given c...
Definition: NRWaveInject.c:99
void LALInjectStrainGWREAL8(LALStatus *status, REAL8TimeSeries *injData, REAL8TimeVectorSeries *strain, SimInspiralTable *thisInj, CHAR *ifo, REAL8 dynRange)
REAL8TimeVectorSeries * XLALOrientNRWaveREAL8(REAL8TimeVectorSeries *strain, UINT4 modeL, INT4 modeM, REAL4 inclination, REAL4 coa_phase)
Takes a (sky averaged) numerical relativity waveform and returns the waveform appropriate for given c...
Definition: NRWaveInject.c:182
NumRelGroup
enum for list of numrel groups
Definition: NRWaveInject.h:76
INT4 XLALFindNRCoalescencePlusCrossREAL8(REAL8 *tc, const REAL8TimeSeries *plus, const REAL8TimeSeries *cross)
Definition: NRWaveInject.c:500
INT4 XLALFindNRCoalescenceTimeFromhoft(REAL8 *tc, const REAL4TimeSeries *in)
Function for calculating the coalescence time (defined to be the peak) of a NR wave This uses the pea...
Definition: NRWaveInject.c:537
INT4 XLALFindNRCoalescenceTimeREAL8(REAL8 *tc, const REAL8TimeSeries *in)
Function for calculating the coalescence time (defined to be the peak) of a NR wave.
Definition: NRWaveInject.c:559
CHAR * XLALGetNinjaChannelName(const CHAR *polarisation, UINT4 l, INT4 m)
channel name for nr data in frame file
Definition: NRWaveInject.c:845
REAL4TimeVectorSeries * XLALSumStrain(REAL4TimeVectorSeries *tempstrain, REAL4TimeVectorSeries *strain)
Takes a strain of h+ and hx data and stores it in a temporal strain in order to perform the sum over ...
Definition: NRWaveInject.c:58
void XLALOrientNRWaveTimeSeriesREAL8(REAL8TimeSeries *plus, REAL8TimeSeries *cross, UINT4 modeL, INT4 modeM, REAL4 inclination, REAL4 coa_phase)
Takes a (sky averaged) numerical relativity waveform and returns the waveform appropriate for given c...
Definition: NRWaveInject.c:140
void LALInjectStrainGW(LALStatus *status, REAL4TimeSeries *injData, REAL4TimeVectorSeries *strain, SimInspiralTable *thisInj, CHAR *ifo, REAL8 dynRange)
Definition: NRWaveInject.c:655
REAL8TimeVectorSeries * XLALSumStrainREAL8(REAL8TimeVectorSeries *tempstrain, REAL8TimeVectorSeries *strain)
Definition: NRWaveInject.c:76
INT4 XLALFindNRCoalescenceTime(REAL8 *tc, const REAL4TimeVectorSeries *in)
Function for calculating the coalescence time (defined to be the peak) of a NR wave.
Definition: NRWaveInject.c:469
REAL8TimeSeries * XLALInterpolateNRWaveREAL8(REAL8TimeSeries *in, INT4 sampleRate)
Function for interpolating time series to a given sampling rate.
Definition: NRWaveInject.c:367
REAL4TimeSeries * XLALInterpolateNRWave(REAL4TimeSeries *in, INT4 sampleRate)
Function for interpolating time series to a given sampling rate.
Definition: NRWaveInject.c:289
NumRelGroup XLALParseNumRelGroupName(CHAR *name)
Function for parsing numrel group name and converting it into a enum element.
Definition: NRWaveInject.c:880
@ NINJA_GROUP_UTB
Definition: NRWaveInject.h:85
@ NINJA_GROUP_AEI
Definition: NRWaveInject.h:77
@ NINJA_GROUP_RIT
Definition: NRWaveInject.h:81
@ NINJA_GROUP_LAST
Definition: NRWaveInject.h:88
@ NINJA_GROUP_PRINCETON
Definition: NRWaveInject.h:87
@ NINJA_GROUP_PSU
Definition: NRWaveInject.h:83
@ NINJA_GROUP_CIT
Definition: NRWaveInject.h:78
@ NINJA_GROUP_UIUC
Definition: NRWaveInject.h:86
@ NINJA_GROUP_FAU
Definition: NRWaveInject.h:84
@ NINJA_GROUP_JENA
Definition: NRWaveInject.h:80
@ NINJA_GROUP_LSU
Definition: NRWaveInject.h:79
@ NINJA_GROUP_CORNELL
Definition: NRWaveInject.h:82
static const INT4 m
List of numrel waveform metadata.
Definition: NRWaveIO.h:98
Struct containing metadata information about a single numerical relativity waveform.
Definition: NRWaveIO.h:84