LAL  7.5.0.1-08ee4f4
LALLIGOIPsd.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007 Bernd Machenschalk, David Churches, Duncan Brown,
3  * Jolien Creighton, Kipp Cannon
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with with program; see the file COPYING. If not, write to the Free
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301 USA
19  */
20 
21 
22 #include <lal/LALAtomicDatatypes.h>
23 #include <lal/LALNoiseModels.h>
24 
25 #ifdef __GNUC__
26 #define UNUSED __attribute__ ((unused))
27 #else
28 #define UNUSED
29 #endif
30 
31 /**
32  * \ingroup LALNoiseModels_h
33  * \brief Calculate the Initial LIGO SRD noise spectral density at given a
34  * frequency. The input is frequency in Hz, and the return value is the
35  * noise spectral density, \f$S_{h}(f)\f$, for that frequency.
36  *
37  * The noise PSD is based on data provided by K. Blackburn (see \cite dis2001) and
38  * is approximated by the following:
39  *
40  * \f[
41  * S_h(f) = 9 \times 10^{-46} \left[ \left( 4.49 \frac{f}{f_0}
42  * \right)^{-56} + 0.16 \left( \frac{f}{f_0} \right)^{-4.52} + 0.52 + 0.32
43  * \left( \frac{f}{f_0} \right)^2 \right]
44  * \f]
45  *
46  * Multiply the return value of this function by \f$2 \Delta f\f$ to put it in
47  * the same units as used by the LAL average spectrum functions like
48  * XLALWhitenCOMPLEX16FrequencySeries().
49  */
51 {
52  double f_over_f0 = f / 150;
53 
54  return 9e-46 * (pow(4.49 * f_over_f0, -56) + 0.16 * pow(f_over_f0, -4.52) + 0.52 + 0.32 * pow(f_over_f0, 2));
55 }
56 
57 
58 /**
59  * \ingroup LALNoiseModels_h
60  * \brief Legacy LAL wrapper of XLALLIGOIPsd(). Note that the return value is
61  * scaled up by $s_0 = 10^{46}/9.$ In otherwords, the expected noise PSD is
62  * \f$9 \times 10^{-46}\f$ times the return value.
63  * \deprecated Use XLALLIGOIPsd() instead.
64  */
65 void LALLIGOIPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
66 {
67  XLAL_PRINT_DEPRECATION_WARNING("XLALLIGOIPsd");
68  *psd = XLALLIGOIPsd(f) / 9e-46;
69 }
static double f(double theta, double y, double xi)
Definition: XLALMarcumQ.c:258
double REAL8
Double precision real floating-point number (8 bytes).
void LALLIGOIPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
Legacy LAL wrapper of XLALLIGOIPsd().
Definition: LALLIGOIPsd.c:65
REAL8 XLALLIGOIPsd(REAL8 f)
Calculate the Initial LIGO SRD noise spectral density at given a frequency.
Definition: LALLIGOIPsd.c:50
#define XLAL_PRINT_DEPRECATION_WARNING(replacement)
Prints a deprecation warning at the "warning" verbosity level.
Definition: XLALError.h:228
LAL status structure, see The LALStatus structure for more details.
Definition: LALDatatypes.h:947