LALInspiral 5.0.3.1-eeff03c
FindChirp.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Sukanta Bose, Chad Hanna, Darren Woods, Diego Fazi, Drew Keppel, Duncan Brown, Eirini Messaritaki, Gareth Jones, Jolien Creighton, Patrick Brady, Anand Sengupta, Stephen Fairhurst, Craig Robinson , Sean Seader, Thomas Cokelaer
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/*-----------------------------------------------------------------------
21 *
22 * File Name: FindChirp.h
23 *
24 * Author: Allen, B., Brown, D. A. and Creighton, J. D. E.
25 *
26 *-----------------------------------------------------------------------
27 */
28
29#ifndef _FINDCHIRPH_H
30#define _FINDCHIRPH_H
31
32#include <lal/LALDatatypes.h>
33#include <lal/LIGOMetadataTables.h>
34
35#if defined(__cplusplus)
36extern "C" {
37#elif 0
38} /* so that editors will match preceding brace */
39#endif
40
41
42/**
43 * \defgroup FindChirp_h Header FindChirp.h
44 * \ingroup lalinspiral_findchirp
45 * \author Allen, B., Brown, D. A. and Creighton, J. D. E.
46 *
47 * \brief This header provides core prototypes, structures and functions to
48 * filter interferometer data for binary inspiral chirps.
49 *
50 * ### Synopsis ###
51 *
52 * \code
53 * #include <lal/FindChirp.h>
54 * \endcode
55 *
56 * Each function in findchirp falls into one of four classes:
57 * <ol>
58 * <li> Generate management functions which are independent of the type of
59 * filtering implemented. The prototypes for these functions are provided by
60 * this header file.</li>
61 *
62 * <li> Functions for filtering data for time domain and frequency domain
63 * templates with an unknown amplitude and phase. These are the functions
64 * that implement matched filtering for time domain templates (TaylorT1,
65 * TaylorT2, TaylorT2, PadeT1, EOB and GeneratePPN) and matched filtering
66 * for post-Newtonian frequency domain templates (FindChirpSP). The main
67 * filter function <tt>FindChirpFilterSegment()</tt> is prototyped in
68 * this header file.
69 * Full documentation of the filtering algorithm used can be found in the
70 * documentation of the module \ref FindChirpFilter.c.</li>
71 * </ol>
72 *
73 * The goal of all the filtering functions is to determine if the
74 * (calibrated) output of the interferometer \f$s(t)\f$ contains a gravitational wave
75 * \f$h(t)\f$ in the presence of the detector noise \f$n(t)\f$. When the interferometer
76 * is operating properly
77 * \f{equation}{
78 * s(t) = \left\{ \begin{array}{ll}
79 * n(t) + h(t) & \textrm{signal present},\\
80 * n(t) & \textrm{signal absent}.
81 * \end{array}\right.
82 * \f}
83 * The detection of signals of known form in noise is a classic problem of signal
84 * processing \cite WeinZub62 and can be answered by the construction of a
85 * <em>detection statistic</em> and a test to see if the statistic is above some
86 * pre-assigned threshold. The construction of the various detection
87 * statistics used for each the three types of search are described in the modules
88 * that implement the search.
89 *
90 */
91/** @{ */
92
93/**\name Error Codes */
94/** @{ */
95#define FINDCHIRPH_ENULL 1 /**< Null pointer */
96#define FINDCHIRPH_ENNUL 2 /**< Non-null pointer */
97#define FINDCHIRPH_EALOC 3 /**< Memory allocation error */
98#define FINDCHIRPH_ENUMZ 5 /**< Invalid number of points in segment */
99#define FINDCHIRPH_ESEGZ 6 /**< Invalid number of segments */
100#define FINDCHIRPH_ECHIZ 7 /**< Invalid number of chi squared bins */
101#define FINDCHIRPH_EDTZO 8 /**< deltaT is zero or negative */
102#define FINDCHIRPH_ETRNC 10 /**< Duration of inverse spectrum in time domain is negative */
103#define FINDCHIRPH_EFLOW 11 /**< Inverse spectrum low frequency cutoff is negative */
104#define FINDCHIRPH_EFREE 12 /**< Error freeing memory */
105#define FINDCHIRPH_ERHOT 15 /**< Rhosq threshold is negative */
106#define FINDCHIRPH_ECHIT 16 /**< Chisq threshold is negative */
107#define FINDCHIRPH_ECRUP 17 /**< Chirp length or invSpecTrunc too long for length of data segment */
108#define FINDCHIRPH_ESMSM 18 /**< Size mismatch between vectors */
109#define FINDCHIRPH_EHETR 19 /**< Attempting to simulate heterodyned GW */
110#define FINDCHIRPH_EDFDT 20 /**< Waveform sampling interval is too large */
111#define FINDCHIRPH_EAPRX 21 /**< Incorrect waveform approximant */
112#define FINDCHIRPH_EUAPX 22 /**< Unknown waveform approximant */
113#define FINDCHIRPH_ECHTZ 23 /**< Length of chirp is zero or negative */
114#define FINDCHIRPH_EMASS 24 /**< Invalid mass parameters for template generation */
115#define FINDCHIRPH_EWVFM 25 /**< Unknown injection waveform */
116#define FINDCHIRPH_EBCVC 25 /**< BCVC code: thetav not in [-pi, pi]. */
117#define FINDCHIRPH_EMAPX 26 /**< Mismatch in waveform approximant */
118#define FINDCHIRPH_EPTFW 27 /**< Error generating PTF waveform */
119#define FINDCHIRPH_EIGEN 28 /**< Error computing eigenvalues */
120#define FINDCHIRPH_EIMRW 29 /**< Error computing IMR waveform */
121#define FINDCHIRPH_EFLOX 30 /**< Error computing variable flower */
122/** @} */
123
124/** \cond DONT_DOXYGEN */
125#define FINDCHIRPH_MSGENULL "Null pointer"
126#define FINDCHIRPH_MSGENNUL "Non-null pointer"
127#define FINDCHIRPH_MSGEALOC "Memory allocation error"
128#define FINDCHIRPH_MSGENUMZ "Invalid number of points in segment"
129#define FINDCHIRPH_MSGESEGZ "Invalid number of segments"
130#define FINDCHIRPH_MSGECHIZ "Invalid number of chi squared bins"
131#define FINDCHIRPH_MSGEDTZO "deltaT is zero or negative"
132#define FINDCHIRPH_MSGETRNC "Duration of inverse spectrum in time domain is negative"
133#define FINDCHIRPH_MSGEFLOW "Inverse spectrum low frequency cutoff is negative"
134#define FINDCHIRPH_MSGEFREE "Error freeing memory"
135#define FINDCHIRPH_MSGERHOT "Rhosq threshold is negative"
136#define FINDCHIRPH_MSGECHIT "Chisq threshold is negative"
137#define FINDCHIRPH_MSGECRUP "Chirp length or invSpecTrunc too long for length of data segment"
138#define FINDCHIRPH_MSGESMSM "Size mismatch between vectors"
139#define FINDCHIRPH_MSGEHETR "Attempting to simulate heterodyned GW"
140#define FINDCHIRPH_MSGEDFDT "Waveform sampling interval is too large"
141#define FINDCHIRPH_MSGEAPRX "Incorrect waveform approximant"
142#define FINDCHIRPH_MSGEUAPX "Unknown waveform approximant"
143#define FINDCHIRPH_MSGECHTZ "Length of chirp is zero or negative"
144#define FINDCHIRPH_MSGEMASS "Invalid mass parameters for template generation"
145#define FINDCHIRPH_MSGEWVFM "Unknown injection waveform"
146#define FINDCHIRPH_MSGEBCVC "BCVC code: thetav not in [-pi, pi]."
147#define FINDCHIRPH_MSGEMAPX "Mismatch in waveform approximant"
148#define FINDCHIRPH_MSGEPTFW "Error generating PTF waveform"
149#define FINDCHIRPH_MSGEIGEN "Error computing eigenvalues"
150#define FINDCHIRPH_MSGEIMRW "Error computing IMR waveform"
151#define FINDCHIRPH_MSGEFLOX "Error calculating an appropriate value of f_low"
152/** \endcond */
153
154/* ---------- typedefs of input structures used by functions in findchirp ---------- */
155
156/** @} */
157
158/*
159 *
160 * function prototypes for initialization, finalization and filter functions
161 *
162 */
163
164void
167 REAL4TimeSeries *chan,
168 SimInspiralTable *events,
170 );
171
172#if 0
173{ /* so that editors will match succeeding brace */
174#elif defined(__cplusplus)
175}
176#endif
177
178#endif /* _FINDCHIRPH_H */
void LALFindChirpInjectSignals(LALStatus *status, REAL4TimeSeries *chan, SimInspiralTable *events, COMPLEX8FrequencySeries *resp)