LALInspiral 5.0.3.1-eeff03c
RingUtils.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Duncan Brown, Jolien Creighton, Warren Anderson
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 _RING_H
21#define _RING_H
22
23#include <lal/LALDatatypes.h>
24
25#if defined(__cplusplus)
26extern "C" {
27#elif 0
28} /* so that editors will match preceding brace */
29#endif
30
31
32/**
33 * \defgroup RingUtils_h Header RingUtils_h
34 * \ingroup lalinspiral_inject
35 * \author Jolien Creighton
36 *
37 * \brief Black hole ringdown waveform generation.
38 *
39 * ### Synopsis ###
40 *
41 * \code
42 * #include <lal/RingUtils.h>
43 * \endcode
44 *
45 * Routines for generating waveforms for black hole ringdown.
46 *
47 * The ringdown waveform is an exponentially-damped sinusoid
48 * \f{equation}{
49 * r(t) = \left\{
50 * \begin{array}{ll}
51 * e^{-\pi ft/Q}\cos(2\pi ft + \phi_0) & \mbox{for } t\ge0 \\
52 * 0 & \mbox{for } t<0
53 * \end{array}
54 * \right.
55 * \f}
56 * where \f$f\f$ is the central frequency of the ringdown waveform, \f$Q\f$ is
57 * the quality factor, and \f$\phi_0\f$ is the initial phase of the waveform.
58 * Note that Ref. \cite JDECreighton99 adopted the
59 * normalization convention \f$q(t)=(2\pi)^{1/2}r(t)\f$.
60 *
61 * For a black hole ringdown, the gravitational waveform produced, averaged
62 * over the various angles, is
63 * \f{equation}{
64 * h(t) = A_qq(t)
65 * \f}
66 * where the central frequency and quality of the ringdown are determined from
67 * the mass and spin of the black holes. An analytic approximation
68 * yields \cite EWLeaver85 ,\cite FEcheverria89
69 * \f{equation}{
70 * f \simeq 32\,\textrm{kHz}\times[1-0.63(1-{\hat{a}})^{3/10}](M_\odot/M)
71 * \f}
72 * and
73 * \f{equation}{
74 * Q \simeq 2(1-{\hat{a}})^{-9/20}
75 * \f}
76 * with the black hole mass given by \f$M\f$ and its spin by \f$S={\hat{a}}GM^2/c\f$
77 * (where \f$G\f$ is Newton's constant and \f$c\f$ is the speed of light). The
78 * dimensionless spin parameter \f${\hat{a}}\f$ lies between zero (for a
79 * Schwarzschild black hole) and unity (for an extreme Kerr black hole).
80 * The amplitude of the waveform depends on these quantities as well as the
81 * distance \f$r\f$ to the source and the fractional mass loss \f$\epsilon\f$ radiated
82 * in gravitational waves \cite JDECreighton99 :
83 * \f{equation}{
84 * A_q = 2.415\times10^{-21}Q^{-1/2}[1-0.63(1-{\hat{a}})^{3/10}]^{-1/2}
85 * \left(\frac{\textrm{Mpc}}{r}\right)
86 * \left(\frac{M}{M_\odot}\right)
87 * \left(\frac{\epsilon}{0.01}\right)^{1/2}.
88 * \f}
89 * Note that this is the amplitude factor for the waveform \f$q(t)\f$, whereas
90 * the amplitude factor for \f$r(t)\f$ would be \f$(2\pi)^{1/2}A_q\f$.
91 *
92 * The mismatch between two nearby templates is given by \f$ds^2\f$, which can be
93 * thought of as the line interval for a mismatch-based metric on the \f$(f,Q)\f$
94 * parameter space \cite Owen_96 ,\cite JDECreighton99 :
95 * \f{equation}{
96 * ds^2 = \frac{1}{8} \biggl\{ \frac{3+16Q^4}{Q^2(1+4Q^2)^2}\,dQ^2
97 * - 2\frac{3+4Q^2}{fQ(1+4Q^2)}\,dQ\,df + \frac{3+8Q^2}{f^2}\,df^2 \biggr\}.
98 * \f}
99 * When expressed in terms of \f$\log f\f$ rather than \f$f\f$, the metric coefficients
100 * depend on \f$Q\f$ alone. We can exploit this property for the task of template
101 * placement. The method is the following: First, choose a "surface" of
102 * constant \f$Q=Q_{\mathrm{\scriptstyle min}}\f$, and on this surface place
103 * templates at intervals in \f$\phi=\log f\f$ of \f$d\phi=d\ell/\surd g_{\phi\phi}\f$
104 * for the entire range of \f$\phi\f$. Here,
105 * \f$d\ell=\surd(2ds^2_{\mathrm{\scriptstyle threshold}})\f$. Then choose the
106 * next surface of constant \f$Q\f$ with \f$dQ=d\ell/\surd g_{QQ}\f$ and repeat the
107 * placement of templates on this surface. This can be iterated until the
108 * entire range of \f$Q\f$ has been covered; the collection of templates should now
109 * cover the entire parameter region with no point in the region being farther
110 * than \f$ds^2_{\mathrm{\scriptstyle threshold}}\f$ from the nearest template.
111 *
112 * ### Algorithm ###
113 *
114 * The waveform generation routines use recurrance relations for both the
115 * exponentially-decaying envelope and for the co-sinusoid.
116 *
117 * The template placement algorithm is described above.
118 *
119 */
120/** @{ */
121
122/**\name Error Codes */
123/** @{ */
124#define RINGH_ENULL 01 /**< Null pointer */
125#define RINGH_ENNUL 02 /**< Non-null pointer */
126#define RINGH_EALOC 04 /**< Memory allocation error */
127/** @} */
128
129/** \cond DONT_DOXYGEN */
130#define RINGH_MSGENULL "Null pointer"
131#define RINGH_MSGENNUL "Non-null pointer"
132#define RINGH_MSGEALOC "Memory allocation error"
133/** \endcond */
134
135/**
136 * This structure contains a bank of ringdown waveforms.
137 */
138typedef struct
139tagRingTemplateBank
140{
141 UINT4 numTmplt; /**< The number of templates in the bank */
142 SnglRingdownTable *tmplt; /**< Array of ringdown templates */
143}
145
146/**
147 * This structure contains the parameters required for generating a ringdown
148 * template bank.
149 */
150typedef struct
151tagRingTemplateBankInput
152{
153 REAL4 minQuality; /**< The minimum quality factor in the bank */
154 REAL4 maxQuality; /**< The maximum quality factor in the bank */
155 REAL4 minFrequency; /**< The minimum central frequency in the bank (in Hz) */
156 REAL4 maxFrequency; /**< The minimum central frequency in the bank (in Hz) */
157 REAL4 maxMismatch; /**< The maximum mismatch allowed between templates in the bank */
158 REAL4 templatePhase; /**< The phase of the ringdown templates, in radians;
159 * Zero is a cosine-phase template;
160 * \f$-\pi/2\f$ is a sine-phase template.
161 */
162 REAL4 templateDistance; /**< UNDOCUMENTED */
163 REAL4 templateEpsilon; /**< UNDOCUMENTED */
164}
166
167/* ---------- Function prototypes ---------- */
168
175REAL4 XLALSpinBinaryFinalBHSpin( REAL4 eta, REAL4 mass1, REAL4 mass2, REAL4 spin1x, REAL4 spin2x,
176 REAL4 spin1y, REAL4 spin2y, REAL4 spin1z, REAL4 spin2z );
179REAL4 XLALBlackHoleRingHRSS( REAL4 f, REAL4 Q, REAL4 amplitude, REAL4 plus, REAL4 cross );
184
186 REAL4TimeSeries *output, SnglRingdownTable *input );
188 REAL4TimeSeries *output, SnglRingdownTable *input, REAL4 dynRange );
191
192
193/** @} */
194
195#if 0
196{ /* so that editors will match succeeding brace */
197#elif defined(__cplusplus)
198}
199#endif
200
201#endif /* _RING_H */
double REAL8
uint32_t UINT4
float REAL4
static const INT4 r
static const INT4 a
REAL8 XLALRingdownTimeError(const SnglRingdownTable *table, REAL8 lal_ring_ds_sq)
Definition: RingUtils.c:292
int XLALComputeBlackHoleRing(REAL4TimeSeries *output, SnglRingdownTable *input, REAL4 dynRange)
This routine computes a waveform for a black hole with the specified physical parameters (in the inpu...
Definition: RingUtils.c:399
REAL4 XLALNonSpinBinaryFinalBHSpin(REAL4 eta)
Definition: RingUtils.c:127
REAL4 XLALBlackHoleRingHRSS(REAL4 f, REAL4 Q, REAL4 amplitude, REAL4 plus, REAL4 cross)
Definition: RingUtils.c:219
REAL4 XLALBlackHoleRingEpsilon(REAL4 f, REAL4 Q, REAL4 r, REAL4 amplitude)
Definition: RingUtils.c:204
REAL4 XLALBlackHoleRingFrequency(REAL4 M, REAL4 a)
Definition: RingUtils.c:115
REAL4 XLALBlackHoleRingMass(REAL4 f, REAL4 Q)
Definition: RingUtils.c:88
REAL4 XLALBlackHoleRingAmplitude(REAL4 f, REAL4 Q, REAL4 r, REAL4 epsilon)
Definition: RingUtils.c:189
int XLALComputeRingTemplate(REAL4TimeSeries *output, SnglRingdownTable *input)
This routine computes the ringdown waveform.
Definition: RingUtils.c:320
REAL4 XLALBlackHoleRingSpin(REAL4 Q)
Definition: RingUtils.c:71
void XLALDestroyRingTemplateBank(RingTemplateBank *bank)
Destroys a RingTemplateBank.
Definition: RingUtils.c:487
REAL4 XLALSpinBinaryFinalBHSpin(REAL4 eta, REAL4 mass1, REAL4 mass2, REAL4 spin1x, REAL4 spin2x, REAL4 spin1y, REAL4 spin2y, REAL4 spin1z, REAL4 spin2z)
Definition: RingUtils.c:145
REAL4 XLALBlackHoleRingQuality(REAL4 a)
Definition: RingUtils.c:98
REAL8 XLAL2DRingMetricDistance(REAL8 fa, REAL8 fb, REAL8 Qa, REAL8 Qb)
Definition: RingUtils.c:226
REAL4 XLALNonSpinBinaryFinalBHMass(REAL4 eta, REAL4 mass1, REAL4 mass2)
Definition: RingUtils.c:134
RingTemplateBank * XLALCreateRingTemplateBank(RingTemplateBankInput *input)
This routine creates a bank of ringdown templates that cover a set range in the parameters and .
Definition: RingUtils.c:458
REAL8 XLAL3DRingTimeMinimum(REAL8 fa, REAL8 fb, REAL8 Qa, REAL8 Qb)
Definition: RingUtils.c:269
REAL8 XLAL3DRingMetricDistance(REAL8 fa, REAL8 fb, REAL8 Qa, REAL8 Qb, REAL8 dt)
Definition: RingUtils.c:242
This structure contains a bank of ringdown waveforms.
Definition: RingUtils.h:140
SnglRingdownTable * tmplt
Array of ringdown templates.
Definition: RingUtils.h:142
UINT4 numTmplt
The number of templates in the bank.
Definition: RingUtils.h:141
This structure contains the parameters required for generating a ringdown template bank.
Definition: RingUtils.h:152
REAL4 templatePhase
The phase of the ringdown templates, in radians; Zero is a cosine-phase template; is a sine-phase te...
Definition: RingUtils.h:158
REAL4 maxMismatch
The maximum mismatch allowed between templates in the bank.
Definition: RingUtils.h:157
REAL4 minFrequency
The minimum central frequency in the bank (in Hz)
Definition: RingUtils.h:155
REAL4 minQuality
The minimum quality factor in the bank.
Definition: RingUtils.h:153
REAL4 maxFrequency
The minimum central frequency in the bank (in Hz)
Definition: RingUtils.h:156
REAL4 maxQuality
The maximum quality factor in the bank.
Definition: RingUtils.h:154
REAL4 templateDistance
UNDOCUMENTED.
Definition: RingUtils.h:162
REAL4 templateEpsilon
UNDOCUMENTED.
Definition: RingUtils.h:163