LAL  7.5.0.1-08ee4f4
LALETBPsd.c
Go to the documentation of this file.
1 /*
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with with program; see the file COPYING. If not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16 * MA 02110-1301 USA
17 *
18 */
19 
20 #include <lal/LALNoiseModels.h>
21 
22 /**
23  * \author Craig Robinson
24  * \ingroup LALNoiseModels_h
25  * \brief Function to calculate the noise power spectral density of the projected ET-B detector.
26  *
27  * Fit taken from a Matlab script by T. Dent which can be found at:
28  * https://workarea.et-gw.eu/et/WG4-Astrophysics/base-sensitivity/
29  */
31 {
32 
33  /* Constants for calculating the fit */
34  const REAL8 c1 = 2.39e-27;
35  const REAL8 c2 = 0.349;
36  const REAL8 c3 = 1.76;
37  const REAL8 c4 = 0.409;
38 
39  const REAL8 p1 = -15.64;
40  const REAL8 p2 = -2.145;
41  const REAL8 p3 = -0.12;
42  const REAL8 p4 = 1.10;
43 
44  REAL8 xt;
45  REAL8 psd;
46 
47  if ( f <= 0 )
49 
50  xt = f / 100.;
51 
52  psd = c1 * pow( xt, p1 )
53  + c2 * pow( xt, p2 )
54  + c3 * pow( xt, p3 )
55  + c4 * pow( xt, p4 );
56 
57  return 1.0e-50 * psd * psd;
58 
59 }
static const UINT4 c1
Definition: LALCityHash.c:146
static const UINT4 c2
Definition: LALCityHash.c:147
static double f(double theta, double y, double xi)
Definition: XLALMarcumQ.c:258
double REAL8
Double precision real floating-point number (8 bytes).
REAL8 XLALETBPsd(REAL8 f)
Function to calculate the noise power spectral density of the projected ET-B detector.
Definition: LALETBPsd.c:30
#define XLAL_ERROR_REAL8(...)
Macro to invoke a failure from a XLAL routine returning a REAL8.
Definition: XLALError.h:752
@ XLAL_EINVAL
Invalid argument.
Definition: XLALError.h:409