LALSimulation  5.4.0.1-fe68b98
LALSimNoisePSD.c
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2007 Jolien Creighton
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 #include <math.h>
21 #include <stdio.h>
22 
23 #include <lal/LALConstants.h>
24 #include <lal/LALStdlib.h>
25 #include <lal/LALString.h>
26 #include <lal/FrequencySeries.h>
27 #include <lal/Units.h>
28 #include <lal/LALSimReadData.h>
29 #include <lal/LALSimNoise.h>
30 
31 // PSD units
32 static LALUnit strainSquaredPerHertzUnit = { 0, { 0, 0, 1, 0, 0, 2, 0}, { 0, 0, 0, 0, 0, 0, 0} };
33 
34 // Values for iLIGO
35 
36 #define LAL_ILIGO_ARMLENGTH_SI 3995.0
37 #define LAL_ILIGO_LASER_POWER_BS_SI 250.0
38 #define LAL_ILIGO_LASER_WAVELENGTH_SI 1.064e-6
39 #define LAL_ILIGO_FINESSE 220.0
40 #define LAL_ILIGO_MIRROR_MASS_SI 11.0
41 #define LAL_ILIGO_TEMPERATURE_SI 290.0
42 #define LAL_ILIGO_THERMAL_STACK_FREQ_SI 10.0
43 #define LAL_ILIGO_THERMAL_SUSP_FREQ_SI 0.76
44 #define LAL_ILIGO_THERMAL_SUSP_QUAL 1e6
45 #define LAL_ILIGO_THERMAL_COAT_FREQ_SI 1e4
46 #define LAL_ILIGO_THERMAL_COAT_QUAL 1e6
47 
48 // Values for aLIGO
49 
50 // these ones seem vaguely well motivated
51 #define LAL_ALIGO_ARMLENGTH_SI 3995.0
52 #define LAL_ALIGO_LASER_POWER_LOW_SI 25.0
53 #define LAL_ALIGO_LASER_POWER_HIGH_SI 125.0
54 #define LAL_ALIGO_LASER_WAVELENGTH_SI 1.064e-6
55 #define LAL_ALIGO_MIRROR_MASS_SI 40.0
56 #define LAL_ALIGO_MIRROR_LOSS 37.5e-6
57 #define LAL_ALIGO_BS_LOSS 0.002
58 #define LAL_ALIGO_ITM_TRANSMITTANCE 0.014
59 #define LAL_ALIGO_PRM_TRANSMITTANCE 0.027
60 #define LAL_ALIGO_SRM_TRANSMITTANCE 0.2
61 // these ones are not physically motivated
62 // but seem to be phenomenologically rightish
63 #define LAL_ALIGO_TEMPERATURE_SI 290.0
64 #define LAL_ALIGO_THERMAL_SUSP_FREQ_SI 9.0
65 #define LAL_ALIGO_THERMAL_SUSP_QUAL 6e10
66 #define LAL_ALIGO_THERMAL_COAT_FREQ_SI 1e4
67 #define LAL_ALIGO_THERMAL_COAT_QUAL 6e6
68 
69 /* prefix for noise psd files provided by LIGO-T0900288 */
70 #define T0900288 "LIGO-T0900288-v3-"
71 
72 /* prefix for noise psd files provided by LIGO-P1200087 */
73 #define P1200087 "LIGO-P1200087-v18-"
74 
75 /* prefix for noise psd files provided by LIGO-P1600143 */
76 #define P1600143 "LIGO-P1600143-v18-"
77 
78 /* prefix for noise psd files provided by LIGO-T1600593 */
79 #define T1600593 "LIGO-T1600593-v1-"
80 
81 /* prefix for noise psd files provided by LIGO-T1800042 */
82 #define T1800042 "LIGO-T1800042-v5-"
83 
84 /* prefix for noise psd files provided by LIGO-T1800044 */
85 #define T1800044 "LIGO-T1800044-v5-"
86 
87 /* prefix for noise psd files provided by LIGO-T1800044 */
88 #define T1800545 "LIGO-T1800545-v1-"
89 
90 #define DEPRECATED_PSD(OLD_PSD, NEW_PSD) \
91 int OLD_PSD(REAL8FrequencySeries *psd, double flow) { \
92  XLAL_PRINT_DEPRECATION_WARNING ( #NEW_PSD ); \
93  return NEW_PSD(psd, flow); \
94 }
95 
96 /**
97  * @addtogroup LALSimNoisePSD_c
98  * @brief Routines to compute noise power spectral densities for
99  * gravitational-wave detectors.
100  * @{
101  */
102 
103 /**
104  * @name Routines to Generate Component Noise PSDs
105  * @{
106  */
107 
108 /**
109  * Provides a rather ad-hoc estimate of the seismic noise power spectral density
110  * at a given frequency.
111  *
112  * This is a crude estimate based on characteristic frequencies for the
113  * pendulum and the stack. What is computed is
114  * \f[
115  * S_h(f) = L^{-2} S_g(f) (f_{\mathrm{pend}}/f)^4
116  * (f_{\mathrm{stack}}/f)^{4n_{\mathrm{stack}}}
117  * \f]
118  * where
119  * \f[
120  * S_g(f) = 10^{-18}\,\mathrm{m}^2\,\mathrm{Hz}^{-1}\times(10\,\mathrm{Hz}/f)^4
121  * \f]
122  * is the displacement power spectrum of ground motion.
123  *
124  * @warning The transfer function is only correct at frequencies above the
125  * specified characteristic pendulum and stack frequencies.
126  */
128  double f, /**< frequency (Hz) */
129  double L, /**< arm length (m) */
130  double f_pend, /**< characteristic frequency of pendulum suspension (Hz) */
131  double f_stack, /**< characteristic frequency of isolation stack (Hz) */
132  double n_stack /**< number of layers of stack */
133 )
134 {
135  double A_pend = pow(f_pend / f, 2);
136  double A_stack = pow(f_stack / f, 2 * n_stack);
137  double S_ground = 1e-18; /* m^2 / Hz */
138 
139  if (f > 10.0)
140  S_ground *= pow(10.0 / f, 4);
141 
142  return S_ground * pow(A_pend * A_stack / L, 2);
143 }
144 
145 
146 /**
147  * Provides a rather ad-hoc estimate of the suspension thermal noise power
148  * spectral density at a given frequency.
149  *
150  * This is a crude estimate based on the characteristic frequency of the
151  * pendulum suspension and its quality factor (= 1 / loss angle). What is
152  * computed is
153  * \f[
154  * S_h(f) = L^{-2} \frac{2 k T}{\pi^3 f_0^3 M Q} \left( \frac{f_0}{f} \right)^5.
155  * \f]
156  *
157  * @warning This only describes the broadband noise at frequencies above the
158  * pendulum frequency; it does not have the correct noise near the resonances.
159  */
161  double f, /**< frequency (Hz) */
162  double L, /**< arm length (m) */
163  double M, /**< mirror mass (kg) */
164  double T, /**< temperature (K) */
165  double f0, /**< pendulum frequency */
166  double Q /**< pendulum quality */
167 )
168 {
169  double fac = 2.0 * LAL_K_SI * T / (L * L * M * Q * pow(LAL_PI * f0, 3.0));
170  return fac * pow(f0 / f, 5.0);
171 }
172 
173 
174 /**
175  * Provides a rather ad-hoc estimate of the mirror thermal noise power spectral
176  * density at a given frequency.
177  *
178  * This is a crude estimate based on the characteristic frequency of the
179  * mirror/coating internal modes and their quality factor (= 1 / loss angle).
180  * What is computed is
181  * \f[
182  * S_h(f) = L^{-2} \frac{2 k T}{\pi^3 f_0^3 M Q} \frac{f_0}{f}
183  * \f]
184  *
185  * @warning This only describes the broadband noise at frequencies below the
186  * resonance frequency; it does not have the correct noise near the resonances.
187  */
189  double f, /**< frequency (Hz) */
190  double L, /**< arm length (m) */
191  double M, /**< mirror mass (kg) */
192  double T, /**< average per mirror power loss */
193  double f0, /**< average per mirror power loss */
194  double Q /**< average per mirror power loss */
195 )
196 {
197  double fac = 2.0 * LAL_K_SI * T / (L * L * M * Q * pow(LAL_PI * f0, 3.0));
198  return fac * (f0 / f);
199 }
200 
201 
202 /**
203  * Computes the shot noise in strain-equivalent units using a conventional
204  * model appropriate to initial interferometric detectors.
205  *
206  * Uses the formula for shot noise from
207  *
208  */
210  double f, /**< frequency (Hz) */
211  double P_BS, /**< laser power on beamsplitter (W) */
212  double lambda, /**< laser wavelength (m) */
213  double L, /**< arm length (m) */
214  double finesse, /**< arm cavity finesse */
215  double eta /**< effective quantum efficiency of photodiode */
216 )
217 {
218  double tau_s = L*finesse/(LAL_PI*LAL_C_SI); // cavity storage time
219  double f_pole = 1.0 / (4.0*LAL_PI*tau_s);
220  double S_DC = ((LAL_PI*LAL_HBAR_SI*lambda*f_pole*f_pole)/(LAL_C_SI*eta*P_BS)); // DC limit of shot noise
221  COMPLEX16 C_FAC; // normalized sensing function
222  C_FAC = cexp(2.0*LAL_PI*I*f*L/LAL_C_SI) * sinh(2.0*LAL_PI*f_pole*L/LAL_C_SI) / csinh((2.0*LAL_PI*f_pole*L/LAL_C_SI)*(1.0 + I*(f/f_pole)));
223  return S_DC / pow(cabs(C_FAC), 2);
224 }
225 
226 /**
227  * Computes the quantum noise (shot noise and radiation pressure noise)
228  * according to Buonanno and Chen, Phys. Rev. D 64 0402006 (2001).
229  *
230  * This code is adapted from the GWINC matlab function shotrad.m which includes
231  * updated losses by Kirk McKenzie.
232  *
233  * For simplicity, only losses from the mirrors are included. Losses from
234  * coupling and from the SRC are ignored. (These could be included as
235  * effective losses in A_BS if needed.) A fixed photdiode quantum efficiency of
236  * eta = 0.9 is used.
237  *
238  * @note This code is adapted from GWINC.
239  */
241  double f, /**< frequency (Hz) */
242  double I0, /**< laser power (W) */
243  double lambda, /**< laser wavelength (m) */
244  double L, /**< arm length (m) */
245  double M, /**< mirror mass (kg) */
246  double A, /**< average per mirror power loss */
247  double A_BS, /**< power loss at beam splitter */
248  double T_ITM, /**< transmittance of ITM */
249  double T_PRM, /**< transmittance of PRM */
250  double T_SRM, /**< transmittance of SRM */
251  double ds, /**< detuning phase (rad) */
252  double zeta, /**< demod/detection/homodyne phase */
253  double eta /**< quantum efficiency of photodiode */
254 )
255 {
256  /* This code is adapted from GWINC */
257  double Omega = 2.0*LAL_PI*f; // [BC, table 1] Signal angular frequency [rad/s]
258  double omega_0 = 2.0*LAL_PI*LAL_C_SI/lambda; // [BC, table 1] Laser angular frequency [rad/s]
259  double lambda_SR = A_BS;
260  double lambda_PD = 1.0 - eta;
261  double tau = sqrt(T_SRM); // SRM Transmittance [amplitude]
262  double rho = sqrt(1.0 - tau*tau); // SRM Reflectivity [amplitude]
263  double phi = (LAL_PI-ds)/2.0; // [BC, between 2.14 & 2.15] SR Detuning
264  double lambda_arm = A*2.0; // [BC, after 5.2] Round Trip loss in arm [Power]
265  double gamma_ac = T_ITM*LAL_C_SI/(4.0*L); // [KLMTV-PRD2001] Arm cavity half bandwidth [1/s]
266  double epsilon = lambda_arm/(2.0*gamma_ac*L/LAL_C_SI); // [BC, after 5.2] Loss coefficent for arm cavity
267  double r1 = sqrt(1.0 - T_ITM); // ITM Reflectivity
268  double rarm = r1 - T_ITM * sqrt(1.0 - 2.0*A) / (1.0 - r1*sqrt(1.0 - 2.0*A)); // Arm Cavity Reflectivity
269  double G_PRC = T_PRM/pow(1.0 + sqrt(1.0 - T_PRM)*rarm*sqrt(1.0 - A_BS), 2.0); // Power Recycling Gain
270  double I_0 = G_PRC*I0; // [BC, table 1] Power at BS [W]
271  double I_SQL = (M*L*L*pow(gamma_ac,4.0))/(4.0*omega_0); // [BC, 2.14] Power to reach free mass SQL [W]
272  double Kappa = 2.0*((I_0/I_SQL)*pow(gamma_ac,4.0))/(Omega*Omega*(gamma_ac*gamma_ac+Omega*Omega)); // [BC, 2.13] Effective Radiation Pressure Coupling
273  double beta = atan(Omega/gamma_ac); // [BnC, after 2.11] Phase shift of GW SB in arm
274  double h_SQL = sqrt(8.0*LAL_HBAR_SI/(M*pow(Omega*L,2.0))); // [BnC, 2.12] SQL Strain
275 
276  // Coefficients [BC, Equations 5.8 to 5.12]
277  COMPLEX16 C11_L = sqrt(1.0-lambda_PD) * ( (1.0+rho*rho) * ( cos(2.0*phi) + Kappa/2.0 * sin(2.0*phi) ) - 2.0*rho*cos(2.0*beta) - 1.0/4.0*epsilon * ( -2.0 * (1.0+cexp(2.0*I*beta))*(1.0+cexp(2.0*I*beta)) * rho + 4.0 * (1.0+rho*rho) * pow(cos(beta),2.0)*cos(2.0*phi) + ( 3.0+cexp(I*2.0*beta) ) * Kappa * (1.0+rho*rho) * sin(2.0*phi) ) + lambda_SR * ( cexp(2.0*I*beta)*rho-1.0/2.0 * (1.0+rho*rho) * ( cos(2.0*phi)+Kappa/2.0 * sin(2.0*phi) ) ) );
278  COMPLEX16 C22_L = C11_L;
279  COMPLEX16 C12_L = sqrt(1.0-lambda_PD) * tau*tau * ( - ( sin(2.0*phi) + Kappa*pow(sin(phi),2.0) )+ 1.0/2.0*epsilon*sin(phi) * ( (3.0+cexp(2.0*I*beta)) * Kappa * sin(phi) + 4.0*pow(cos(beta),2.0) * cos(phi)) + 1.0/2.0*lambda_SR * ( sin(2.0*phi)+Kappa*pow(sin(phi),2.0)) );
280  COMPLEX16 C21_L = sqrt(1.0-lambda_PD) * tau*tau * ( (sin(2.0*phi)-Kappa*pow(cos(phi),2.0) ) + 1.0/2.0*epsilon*cos(phi) * ( (3.0+cexp(2.0*I*beta) )*Kappa*sin(phi) - 4.0*pow(cos(beta),2.0)*sin(phi) ) + 1.0/2.0*lambda_SR * ( -sin(2.0*phi) + Kappa*pow(cos(phi),2.0)) );
281 
282  COMPLEX16 D1_L = sqrt(1.0-lambda_PD) * ( - (1.0+rho*cexp(2.0*I*beta) ) * sin(phi) + 1.0/4.0*epsilon * ( 3.0+rho+2.0*rho*cexp(4.0*I*beta) + cexp(2.0*I*beta)*(1.0+5.0*rho) ) * sin(phi)+ 1.0/2.0*lambda_SR * cexp(2.0*I*beta) * rho * sin(phi) );
283  COMPLEX16 D2_L = sqrt(1.0-lambda_PD) * ( - (-1.0+rho*cexp(2.0*I*beta) ) * cos(phi) + 1.0/4.0*epsilon * ( -3.0+rho+2.0*rho*cexp(4.0*I*beta) + cexp(2.0*I*beta) * (-1.0+5.0*rho) ) * cos(phi)+ 1.0/2.0*lambda_SR * cexp(2.0*I*beta) * rho * cos(phi) );
284 
285  COMPLEX16 P11 = 1.0/2.0*sqrt(1-lambda_PD) * sqrt(lambda_SR) * tau * ( -2.0*rho*cexp(2.0*I*beta)+2.0*cos(2.0*phi)+Kappa*sin(2.0*phi) );
286  COMPLEX16 P22 = P11;
287  COMPLEX16 P12 = -sqrt(1.0-lambda_PD) * sqrt(lambda_SR)*tau*sin(phi)*(2.0*cos(phi)+Kappa*sin(phi) );
288  COMPLEX16 P21 = sqrt(1.0-lambda_PD) * sqrt(lambda_SR)*tau*cos(phi)*(2.0*sin(phi)-Kappa*cos(phi) );
289 
290  COMPLEX16 Q11 = sqrt(lambda_PD) * ( cexp(-2.0*I*beta)+rho*rho*cexp(2.0*I*beta)-rho*(2.0*cos(2.0*phi)+Kappa*sin(2.0*phi)) + 1.0/2.0*epsilon*rho * (cexp(-2.0*I*beta)*cos(2.0*phi)+cexp(2.0*I*beta)* ( -2.0*rho-2.0*rho*cos(2.0*beta)+cos(2.0*phi)+Kappa*sin(2.0*phi) ) + 2.0*cos(2.0*phi)+3.0*Kappa*sin(2.0*phi))-1.0/2.0*lambda_SR*rho * ( 2.0*rho*cexp(2.0*I*beta)-2.0*cos(2.0*phi)-Kappa*sin(2.0*phi) ) );
291  COMPLEX16 Q22 = Q11;
292  COMPLEX16 Q12 = 0.0;
293  COMPLEX16 Q21 = 0.0;
294 
295  COMPLEX16 N11 = sqrt(1.0-lambda_PD) * sqrt(epsilon/2.0)*tau *(Kappa*(1.0+rho*cexp(2.0*I*beta))*sin(phi)+2.0*cos(beta)*(cexp(-I*beta)*cos(phi)-rho*cexp(I*beta)*(cos(phi)+Kappa*sin(phi))));
296  COMPLEX16 N22 = -sqrt(1.0-lambda_PD)*sqrt(2.0*epsilon)*tau*(-cexp(-I*beta)+rho*cexp(I*beta))*cos(beta)*cos(phi);
297  COMPLEX16 N12 = -sqrt(1.0-lambda_PD)*sqrt(2.0*epsilon)*tau*(cexp(-I*beta)+rho*cexp(I*beta))*cos(beta)*sin(phi);
298  COMPLEX16 N21 = sqrt(1.0-lambda_PD)*sqrt(2.0*epsilon)*tau*(-Kappa*(1.0+rho)*cos(phi)+2.0*cos(beta)*(cexp(-I*beta)+rho*cexp(I*beta))*cos(beta)*sin(phi));
299 
300 
301  //>>>>>>>> QUANTUM NOISE POWER SPECTRAL DENSITY [BC, 5.13] <<<<<<<<<<<<<<<<<
302 
303  double n = h_SQL*h_SQL/(2.0*Kappa*tau*tau*pow(cabs(D1_L*sin(zeta)+D2_L*cos(zeta)),2.0))*(
304  pow(cabs(C11_L*sin(zeta)+C21_L*cos(zeta)),2.0)+
305  pow(cabs(C12_L*sin(zeta)+C22_L*cos(zeta)),2.0)+
306  pow(cabs(P11*sin(zeta)+P21*cos(zeta)),2.0)+
307  pow(cabs(P12*sin(zeta)+P22*cos(zeta)),2.0)+
308  pow(cabs(Q11*sin(zeta)+Q21*cos(zeta)),2.0)+
309  pow(cabs(Q12*sin(zeta)+Q22*cos(zeta)),2.0)+
310  pow(cabs(N11*sin(zeta)+N21*cos(zeta)),2.0)+
311  pow(cabs(N12*sin(zeta)+N22*cos(zeta)),2.0));
312 
313  return n;
314 }
315 
316 /** @} */
317 
318 /**
319  * @name Noise PSD Routines for First-Generation Detectors
320  * @{
321  */
322 
323 /**
324  * Provides the noise power spectrum based on a phenomenological fit
325  * to the SRD curve for iLIGO.
326  *
327  * This is a fit to the data provided for the Science Requirements Document
328  * (SRD) curve for initial LIGO given, which can be found at
329  * http://www.ligo.caltech.edu/~jzweizig/distribution/LSC_Data/
330  *
331  * The Science Requirements Document is located at
332  * http://www.ligo.caltech.edu/docs/E/E950018-02.pdf
333  */
334 double XLALSimNoisePSDiLIGOSRD(double f /**< frequency (Hz) */)
335 {
336  const double aseis = 1.57271;
337  const double pseis = -14.0;
338  const double athrm = 3.80591e-19;
339  const double pthrm = -2.0;
340  const double ashot = 1.12277e-23;
341  const double fshot = 89.3676;
342  double seis = aseis * aseis * pow(f, 2.0*pseis);
343  double thrm = athrm * athrm * pow(f, 2.0*pthrm);
344  double shot = ashot * ashot * (1.0 + pow(f / fshot, 2.0));
345  return seis + thrm + shot;
346 }
347 
348 
349 /**
350  * Provides the seismic noise power spectrum for iLIGO.
351  *
352  * @note
353  * This is mostly a phenomenological fit.
354  * Only valid for f > 10 Hz.
355  */
356 double XLALSimNoisePSDiLIGOSeismic(double f /**< frequency (Hz) */)
357 {
358  double seismic;
359  /* four layers of suspension */
360  seismic = XLALSimNoisePSDSeismic(f,
364  4);
365  return seismic;
366 }
367 
368 
369 /**
370  * Provides the thermal noise (suspension + coating) power spectrum for iLIGO.
371  *
372  * @note This is a phenomenological fit to the broadband component.
373  */
374 double XLALSimNoisePSDiLIGOThermal(double f /**< frequency (Hz) */)
375 {
376  double susp;
377  double coat;
378  susp = XLALSimNoisePSDSuspTherm(f,
390  return susp + coat;
391 }
392 
393 
394 /**
395  * Provides the shot noise power spectrum for iLIGO.
396  *
397  * @note The effective quantum efficiency is one-third the actual quantum
398  * efficiency owing to the RF readout scheme. A fiducial value of 250 W
399  * of power on the beamsplitter is used.
400  */
401 double XLALSimNoisePSDiLIGOShot(double f /**< frequency (Hz) */)
402 {
403  const double eta = 0.9/3.0; // effective quantum efficiency of photodiode for RF readout
404  double shot;
405  shot = XLALSimNoisePSDShot(f,
410  eta);
411  return shot;
412 }
413 
414 
415 /**
416  * Provides the shot noise power spectrum for eLIGO.
417  *
418  * @note A fiducial value of 250 W of power on the beamsplitter is used.
419  */
420 double XLALSimNoisePSDeLIGOShot(double f /**< frequency (Hz) */)
421 {
422  const double eta = 0.9; // quantum efficiency of photodiode for DC readout
423  double shot;
424  shot = XLALSimNoisePSDShot(f,
429  eta);
430  return shot;
431 }
432 
433 
434 /**
435  * Provides the noise power spectrum for a model of the iLIGO detector.
436  *
437  * @warning Not all noise sources are correctly accounted for (in particular,
438  * there is no actuation noise modelled) so this noise spectrum does not
439  * correspond to the S5 spectrum.
440  */
441 double XLALSimNoisePSDiLIGOModel(double f /**< frequency (Hz) */)
442 {
443  double seismic;
444  double thermal;
445  double shot;
446 
447  seismic = XLALSimNoisePSDiLIGOSeismic(f);
448  thermal = XLALSimNoisePSDiLIGOThermal(f);
449  shot = XLALSimNoisePSDiLIGOShot(f);
450 
451  return shot + seismic + thermal;
452 }
453 
454 
455 /**
456  * Provides the noise power spectrum for a model of the eLIGO detector.
457  *
458  * @warning Not all noise sources are correctly accounted for so this noise
459  * spectrum does not correspond to the S6 spectrum.
460  */
461 double XLALSimNoisePSDeLIGOModel(double f /**< frequency (Hz) */)
462 {
463  double seismic;
464  double thermal;
465  double shot;
466 
467  seismic = XLALSimNoisePSDiLIGOSeismic(f);
468  thermal = XLALSimNoisePSDiLIGOThermal(f);
469  shot = XLALSimNoisePSDeLIGOShot(f);
470 
471  return shot + seismic + thermal;
472 }
473 
474 /**
475  * Provides the design noise power spectrum for Virgo based on a
476  * phenomenological fit (from the Virgo webiste) that can be approximated by the
477  * following:
478  * \f{equation}{
479  * S_h(f) =
480  * s_0 \left ( \frac {7.87f}{f_0} \right )^{-4.8} + \frac{6}{17} \frac{f_0}{f}
481  * + \left [1 + \left (\frac {f}{f_0} \right)^2 \right ],
482  * \f}
483  * where \f$s_0=10.2e-46\f$.
484  *
485  * @warning This comes from the deprecated function LALVIRGOPsd in the lal
486  * noisemodels package, which comes with no reference to the curve. An updated
487  * version of this model, with a reference would be welcomed.
488  */
489 double XLALSimNoisePSDVirgo(double f /**< frequency (Hz) */)
490 {
491  REAL8 s0, x;
492 
493  x = f/500.;
494 
495  s0 = 10.2e-46;
496 
497  return s0*( pow(7.87*x,-4.8) + 6./17./x + 1. + x*x);
498 }
499 
500 /**
501  * Provides a GEO noise power spectrum based on that from Table IV of
502  * \cite dis2001 .
503  *
504  * The comes from the deprecated function LALGEOPsd in the lal noisemodels
505  * package.
506  */
507 double XLALSimNoisePSDGEO(double f /**< frequency (Hz) */)
508 {
509  REAL8 x, seismic, thermal, shot;
510 
511  x = f/150.;
512  seismic = pow(10.,-16.) * pow(x,-30.);
513  thermal = 34. / x;
514  shot = 20. * (1 - pow(x,2.) + 0.5 * pow(x,4.)) / (1. + 0.5 * pow(x,2.));
515 
516  return 1e-46*(seismic + thermal + shot);
517 }
518 
519 
520 /**
521  * Provides a GEO-HF noise power spectrum based on a fit to Figure 6
522  * from \cite Grote2010 .
523  *
524  * The fit is good between 50Hz to 8kHz and errors between the analytic
525  * fit given and the <a href="https://intranet.aei.uni-hannover.de/geo600/geohflogbook.nsf/7e8722dffa24dea0c1256de900406c84/4837a612ac990060c12575ce004e70fd?OpenDocument">estimated curve</a> are less than 1%.
526  */
527 double XLALSimNoisePSDGEOHF(double f /**< frequency (Hz) */)
528 {
529  REAL8 f2 = f*f;
530 
531  return 7.18e-46*(1. + (f2/(1059.*1059.))) + (4.90e-41/f2) + (8.91e-43/f) + (1.6e-17/pow(f, 16.));
532 }
533 
534 
535 /**
536  * Provides a TAMA300 noise power spectrum based on that from Table IV of
537  * \cite dis2001 .
538  *
539  * The comes from the deprecated function LALTAMAPsd in the lal noisemodels
540  * package.
541  */
542 double XLALSimNoisePSDTAMA(double f /**< frequency (Hz) */)
543 {
544  REAL8 seismic, thermal, shot, x;
545 
546  x = f/400.;
547  seismic = pow(x,-5);
548  thermal = 13. / x;
549  shot = 9. * (1. + x*x);
550 
551  return 75.e-46*(seismic + thermal + shot);
552 }
553 
554 /** @} */
555 
556 /**
557  * @name Noise PSD Routines for Second Generation Detectors
558  * @{
559  */
560 
561 /**
562  * Provides the thermal noise (suspension + coating) power spectrum for aLIGO.
563  *
564  * @note This is a phenomenological fit to the broadband component.
565  */
566 double XLALSimNoisePSDaLIGOThermal(double f /**< frequency (Hz) */)
567 {
568  double susp;
569  double coat;
570  susp = XLALSimNoisePSDSuspTherm(f,
582  return susp + coat;
583 }
584 
585 
586 /**
587  * Provides the quantum noise power spectrum for aLIGO under the low-power
588  * no-signal-recycling-mirror configuration.
589  *
590  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
591  * This configuration is labelled No SRM.
592  */
593 double XLALSimNoisePSDaLIGOQuantumNoSRMLowPower(double f /**< frequency (Hz) */)
594 {
595  const double eta = 0.9; // quantum efficiency of photodiode
596  const double ds = 0.0; // detuning phase -- no SRM! (rad)
597  const double zeta = 130.0 * LAL_PI_180; // homodyne detection phase (rad)
598  double quantum;
599 
600  quantum = XLALSimNoisePSDQuantum(f,
609  1.0 /* no SRM! */,
610  ds, zeta, eta);
611 
612  return quantum;
613 }
614 
615 
616 /**
617  * Provides the quantum noise power spectrum for aLIGO under the high-power
618  * no-signal-recycling-mirror configuration.
619  *
620  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
621  * This configuration is the same a No SRM but with 125 W laser power.
622  */
623 double XLALSimNoisePSDaLIGOQuantumNoSRMHighPower(double f /**< frequency (Hz) */)
624 {
625  const double eta = 0.9; // quantum efficiency of photodiode
626  const double ds = 0.0; // detuning phase -- no SRM! (rad)
627  const double zeta = 130.0 * LAL_PI_180; // homodyne detection phase (rad)
628  double quantum;
629 
630  quantum = XLALSimNoisePSDQuantum(f,
639  1.0 /* no SRM! */,
640  ds, zeta, eta);
641 
642  return quantum;
643 }
644 
645 
646 /**
647  * Provides the quantum noise power spectrum for aLIGO under the low-power
648  * broad-band signal recycling (no detuning of the signal recycling cavity).
649  *
650  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
651  * This configuration is labelled Zero Detune, Low Power.
652  */
653 double XLALSimNoisePSDaLIGOQuantumZeroDetLowPower(double f /**< frequency (Hz) */)
654 {
655  const double eta = 0.9; // quantum efficiency of photodiode
656  const double ds = 0.0; // detuning phase (rad)
657  const double zeta = 116.0 * LAL_PI_180; // homodyne detection phase (rad)
658  double quantum;
659 
660  quantum = XLALSimNoisePSDQuantum(f,
670  ds, zeta, eta);
671 
672  return quantum;
673 }
674 
675 
676 /**
677  * Provides the quantum noise power spectrum for aLIGO under the high-power
678  * broad-band signal recycling (no detuning of the signal recycling cavity).
679  *
680  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
681  * This configuration is labelled Zero Detune, High Power.
682  */
683 double XLALSimNoisePSDaLIGOQuantumZeroDetHighPower(double f /**< frequency (Hz) */)
684 {
685  const double eta = 0.9; // quantum efficiency of photodiode
686  const double ds = 0.0; // detuning phase (rad)
687  const double zeta = 116.0 * LAL_PI_180; // homodyne detection phase (rad)
688  double quantum;
689 
690  quantum = XLALSimNoisePSDQuantum(f,
700  ds, zeta, eta);
701 
702  return quantum;
703 }
704 
705 
706 /**
707  * Provides the quantum noise power spectrum for aLIGO under the
708  * configuration tuned to optimize sensitivity to NS-NS inspirals.
709  *
710  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
711  * This configuration is labelled NS-NS Opt.
712  */
713 double XLALSimNoisePSDaLIGOQuantumNSNSOpt(double f /**< frequency (Hz) */)
714 {
715  const double eta = 0.9; // quantum efficiency of photodiode
716  const double ds = 11.0 * LAL_PI_180; // detuning phase (rad)
717  const double zeta = 103.0 * LAL_PI_180; // homodyne detection phase (rad)
718  double quantum;
719 
720  quantum = XLALSimNoisePSDQuantum(f,
730  ds, zeta, eta);
731 
732  return quantum;
733 }
734 
735 
736 /**
737  * Provides the quantum noise power spectrum for aLIGO under the
738  * configuration tuned to optimize sensitivity to 30+30 solar mass binary
739  * black holes with fixed signal recycling cavity detuning of 20 degrees.
740  *
741  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
742  * This configuration is labelled BHBH 20-degree Detune.
743  */
744 double XLALSimNoisePSDaLIGOQuantumBHBH20Deg(double f /**< frequency (Hz) */)
745 {
746  const double eta = 0.9; // quantum efficiency of photodiode
747  const double I0 = 20.0; // input power (W)
748  const double ds = 20.0 * LAL_PI_180; // detuning phase (rad)
749  const double zeta = 105.0 * LAL_PI_180; // homodyne detection phase (rad)
750  double quantum;
751 
752  quantum = XLALSimNoisePSDQuantum(f, I0,
761  ds, zeta, eta);
762 
763  return quantum;
764 }
765 
766 
767 /**
768  * Provides the quantum noise power spectrum for aLIGO under the
769  * configuration tuned to narrow-band high-frequency sensitivity around
770  * 1 kHz.
771  *
772  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
773  * This configuration is labelled High Freq.
774  */
775 double XLALSimNoisePSDaLIGOQuantumHighFrequency(double f /**< frequency (Hz) */)
776 {
777  const double eta = 0.9; // quantum efficiency of photodiode
778  const double T_SRM = 0.011; // SRM Transmittance
779  const double ds = 4.7 * LAL_PI_180; // detuning phase (rad)
780  const double zeta = 128.0 * LAL_PI_180; // homodyne detection phase (rad)
781  double quantum;
782 
783  quantum = XLALSimNoisePSDQuantum(f,
792  T_SRM, ds, zeta, eta);
793 
794  return quantum;
795 }
796 
797 
798 /**
799  * Provides the noise power spectrum for aLIGO under the low-power
800  * no-signal-recycling-mirror configuration.
801  *
802  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
803  * This configuration is labelled No SRM.
804  *
805  * @warning This includes only thermal and quantum noise. It is only valid
806  * above around 9 Hz.
807  */
808 double XLALSimNoisePSDaLIGONoSRMLowPower(double f /**< frequency (Hz) */)
809 {
810  double quantum;
811  double thermal;
812 
814  thermal = XLALSimNoisePSDaLIGOThermal(f);
815 
816  return quantum + thermal;
817 }
818 
819 
820 /**
821  * Provides the noise power spectrum for aLIGO under the high-power
822  * no-signal-recycling-mirror configuration.
823  *
824  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
825  * This configuration is the same a No SRM but with 125 W laser power.
826  *
827  * @warning This includes only thermal and quantum noise. It is only valid
828  * above around 9 Hz.
829  */
830 double XLALSimNoisePSDaLIGONoSRMHighPower(double f /**< frequency (Hz) */)
831 {
832  double quantum;
833  double thermal;
834 
836  thermal = XLALSimNoisePSDaLIGOThermal(f);
837 
838  return quantum + thermal;
839 }
840 
841 
842 /**
843  * Provides the noise power spectrum for aLIGO under the low-power
844  * broad-band signal recycling (no detuning of the signal recycling cavity).
845  *
846  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
847  * This configuration is labelled Zero Detune, Low Power.
848  *
849  * @warning This includes only thermal and quantum noise. It is only valid
850  * above around 9 Hz.
851  */
852 double XLALSimNoisePSDaLIGOZeroDetLowPower(double f /**< frequency (Hz) */)
853 {
854  double quantum;
855  double thermal;
856 
858  thermal = XLALSimNoisePSDaLIGOThermal(f);
859 
860  return quantum + thermal;
861 }
862 
863 
864 /**
865  * Provides the noise power spectrum for aLIGO under the high-power
866  * broad-band signal recycling (no detuning of the signal recycling cavity).
867  *
868  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
869  * This configuration is labelled Zero Detune, High Power.
870  *
871  * @warning This includes only thermal and quantum noise. It is only valid
872  * above around 9 Hz.
873  */
874 double XLALSimNoisePSDaLIGOZeroDetHighPower(double f /**< frequency (Hz) */)
875 {
876  double quantum;
877  double thermal;
878 
880  thermal = XLALSimNoisePSDaLIGOThermal(f);
881 
882  return quantum + thermal;
883 }
884 
885 
886 /**
887  * Provides the noise power spectrum for aLIGO under the
888  * configuration tuned to optimize sensitivity to NS-NS inspirals.
889  *
890  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
891  * This configuration is labelled NS-NS Opt.
892  *
893  * @warning This includes only thermal and quantum noise. It is only valid
894  * above around 9 Hz.
895  */
896 double XLALSimNoisePSDaLIGONSNSOpt(double f /**< frequency (Hz) */)
897 {
898  double quantum;
899  double thermal;
900 
902  thermal = XLALSimNoisePSDaLIGOThermal(f);
903 
904  return quantum + thermal;
905 }
906 
907 
908 /**
909  * Provides the noise power spectrum for aLIGO under the
910  * configuration tuned to optimize sensitivity to 30+30 solar mass binary
911  * black holes with fixed signal recycling cavity detuning of 20 degrees.
912  *
913  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
914  * This configuration is labelled BHBH 20-degree Detune.
915  *
916  * @warning This includes only thermal and quantum noise. It is only valid
917  * above around 9 Hz.
918  */
919 double XLALSimNoisePSDaLIGOBHBH20Deg(double f /**< frequency (Hz) */)
920 {
921  double quantum;
922  double thermal;
923 
925  thermal = XLALSimNoisePSDaLIGOThermal(f);
926 
927  return quantum + thermal;
928 }
929 
930 
931 /**
932  * Provides the noise power spectrum for aLIGO under the
933  * configuration tuned to narrow-band high-frequency sensitivity around
934  * 1 kHz.
935  *
936  * See: LIGO-T0900288-v3 and LIGO-T070247-01.
937  * This configuration is labelled High Freq.
938  *
939  * @warning This includes only thermal and quantum noise. It is only valid
940  * above around 9 Hz.
941  */
942 double XLALSimNoisePSDaLIGOHighFrequency(double f /**< frequency (Hz) */)
943 {
944  double quantum;
945  double thermal;
946 
948  thermal = XLALSimNoisePSDaLIGOThermal(f);
949 
950  return quantum + thermal;
951 }
952 
953 
954 /**
955  * Provides the noise power spectrum for KAGRA based on that from Eqn 5 of
956  * \cite md2012 . This is a phenomenological fit to the KAGRA spectrum from
957  * http://gwcenter.icrr.u-tokyo.ac.jp/en/researcher/parameter
958  */
959 double XLALSimNoisePSDKAGRA(double f /**< frequency (Hz) */)
960 {
961  REAL8 x = log(f / 100.);
962  REAL8 x2 = x*x;
963  REAL8 asd = 0.;
964 
965  /* calculate ASD from reference */
966  asd = 6.499e-25 * ( 9.72e-9*exp(-1.43 - 9.88*x - 0.23*x2)
967  + 1.17*exp(0.14 - 3.10*x - 0.26*x2)
968  + 1.70*exp(0.14 + 1.09*x - 0.013*x2)
969  + 1.25*exp(0.071 + 2.83*x - 4.91*x2) );
970 
971  /* return PSD */
972  return asd*asd;
973 }
974 
975 
976 /**
977  * Provides the noise power spectrum for AdvVirgo based on that from Eqn 6 of
978  * \cite md2012 . This is a phenomenological fit to the AdvVirgo spectrum from
979  * http://wwwcascina.virgo.infin.it/advirgo.
980  */
981 double XLALSimNoisePSDAdvVirgo(double f /**< frequency (Hz) */)
982 {
983  REAL8 x = log(f / 300.);
984  REAL8 x2 = x*x;
985  REAL8 asd = 0.;
986 
987  /* calculate ASD from reference */
988  asd = 1.259e-24 * ( 0.07*exp(-0.142 - 1.437*x + 0.407*x2)
989  + 3.1*exp(-0.466 - 1.043*x - 0.548*x2)
990  + 0.4*exp(-0.304 + 2.896*x - 0.293*x2)
991  + 0.09*exp(1.466 + 3.722*x - 0.984*x2) );
992 
993  /* return PSD */
994  return asd*asd;
995 }
996 
997 /** @} */
998 
999 /**
1000  * @name Noise PSD Utility Routines
1001  * @{
1002  */
1003 
1004 /**
1005  * Evaluates a power spectral density function, psdfunc, at the frequencies required
1006  * to populate the frequency series psd, with a low frequency cutoff flow.
1007  */
1009  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1010  double flow, /**< low frequency cutoff (Hz) */
1011  double (*psdfunc)(double) /**< function that provides the PSD at a specified frequency */
1012 )
1013 {
1014  size_t kmin;
1015  size_t k;
1016 
1017  /* set sample units */
1019 
1020  /* determine low frequency cutoff */
1021  if (flow < psd->f0)
1022  flow = psd->f0;
1023  if (psd->f0 == 0.0)
1024  kmin = 1; /* will set DC to zero */
1025  else
1026  kmin = (flow - psd->f0) / psd->deltaF;
1027 
1028  for (k = 0; k < kmin; ++k) /* set low frequency components to zero */
1029  psd->data->data[k] = 0.0;
1030  for (; k < psd->data->length - 1; ++k) /* evaluate psdfunc for frequencies in requested band */
1031  psd->data->data[k] = (*psdfunc)(psd->f0 + k * psd->deltaF);
1032 
1033  /* set Nyquist to zero (assumes last element is Nyquist!) */
1034  psd->data->data[psd->data->length - 1] = 0.0;
1035 
1036  return 0;
1037 }
1038 
1039 
1040 /**
1041  * Reads file fname containing two-column amplitude spectral density data file
1042  * and interpolates at the frequencies required to populate the frequency
1043  * series psd, with a low frequency cutoff @p flow. If @p flow is zero or
1044  * negative, the low frequency cutoff is the first frequency with non-zero
1045  * amplitude spectral density in the file.
1046  */
1048  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1049  double flow, /**< low frequency cutoff (Hz) */
1050  const char *fname /**< file containing amplitude spectral density data */
1051 )
1052 {
1053  double *f;
1054  double *h;
1055  size_t n;
1056  size_t i;
1057  size_t imin = 0;
1058  size_t kmin;
1059  size_t k;
1060  LALFILE *fp;
1061 
1062  /* first, read the data form the datafile */
1063  fp = XLALSimReadDataFileOpen(fname);
1064  if (!fp)
1066  n = XLALSimReadDataFile2Col(&f, &h, fp);
1067  XLALFileClose(fp);
1068  if (n == (size_t)(-1))
1070 
1071  /* take the log of the amplitude spectral density data
1072  * and record the first valid index of h */
1073  for (i = 0; i < n; ++i)
1074  if (h[i] > 0.0) {
1075  h[i] = log(h[i]);
1076  if (imin == 0)
1077  imin = i;
1078  }
1079  else
1080  h[i] = 0.0;
1081 
1082  /* set sample units */
1084 
1085  /* determine low frequency cutoff */
1086  if (flow <= 0.0) /* use lowest non-zero value in data */
1087  flow = f[imin];
1088  if (flow < psd->f0)
1089  flow = psd->f0;
1090 
1091  kmin = (flow - psd->f0) / psd->deltaF;
1092  if (kmin == 0 && psd->f0 == 0.0)
1093  kmin = 1; /* will set DC to zero */
1094 
1095  i = imin + 1;
1096  for (k = 0; k < kmin; ++k) /* set low frequency components to zero */
1097  psd->data->data[k] = 0.0;
1098  for (; k < psd->data->length - 1; ++k) {
1099  double fk = psd->f0 + k * psd->deltaF; /* target frequency */
1100  double hk;
1101  double x;
1102  /* interpolate data for this frequency value */
1103  while (f[i] < fk && i < n - 1)
1104  ++i;
1105  x = (f[i] - fk) / (f[i] - f[i-1]);
1106  hk = x * h[i-1] + (1.0 - x) * h[i];
1107  /* power spectrum is exp( 2 * log(amplitude spectrum) ) */
1108  psd->data->data[k] = exp(2.0 * hk);
1109  }
1110  /* set Nyquist to zero (assumes last element is Nyquist!) */
1111  psd->data->data[psd->data->length - 1] = 0.0;
1112 
1113  XLALFree(h);
1114  XLALFree(f);
1115  return 0;
1116 }
1117 
1118 /** @} */
1119 
1120 /**
1121  * @name Noise PSDs from LIGO-T0900288
1122  * @{
1123  */
1124 
1125 /**
1126  * Returns a frequency series psd with low frequency cutoff flow corresponding
1127  * to the "NO_SRM.txt" data file in LIGO-T0900288.
1128  */
1130  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1131  double flow /**< low frequency cutoff (Hz) */
1132 )
1133 {
1134  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "NO_SRM.txt");
1135 }
1136 
1137 /**
1138  * Returns a frequency series psd with low frequency cutoff flow corresponding
1139  * to the "ZERO_DET_low_P.txt" data file in LIGO-T0900288.
1140  */
1142  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1143  double flow /**< low frequency cutoff (Hz) */
1144 )
1145 {
1146  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "ZERO_DET_low_P.txt");
1147 }
1148 
1149 /**
1150  * Returns a frequency series psd with low frequency cutoff flow corresponding
1151  * to the "ZERO_DET_high_P.txt" data file in LIGO-T0900288.
1152  */
1154  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1155  double flow /**< low frequency cutoff (Hz) */
1156 )
1157 {
1158  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "ZERO_DET_high_P.txt");
1159 }
1160 
1161 /**
1162  * Returns a frequency series psd with low frequency cutoff flow corresponding
1163  * to the "NSNS_Opt.txt" data file in LIGO-T0900288.
1164  */
1166  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1167  double flow /**< low frequency cutoff (Hz) */
1168 )
1169 {
1170  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "NSNS_Opt.txt");
1171 }
1172 
1173 /**
1174  * Returns a frequency series psd with low frequency cutoff flow corresponding
1175  * to the "BBH_20deg.txt" data file in LIGO-T0900288.
1176  */
1178  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1179  double flow /**< low frequency cutoff (Hz) */
1180 )
1181 {
1182  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "BHBH_20deg.txt");
1183 }
1184 
1185 /**
1186  * Returns a frequency series psd with low frequency cutoff flow corresponding
1187  * to the "High_Freq.txt" data file in LIGO-T0900288.
1188  */
1190  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1191  double flow /**< low frequency cutoff (Hz) */
1192 )
1193 {
1194  return XLALSimNoisePSDFromFile(psd, flow, T0900288 "High_Freq.txt");
1195 }
1196 
1197 /** @} */
1198 
1199 /**
1200  * @name Noise PSDs from LIGO-P1200087
1201  * @{
1202  */
1203 
1204 /**
1205  * Returns a frequency series psd with low frequency cutoff flow corresponding
1206  * to the aLIGO 2015 low-sensitivity scenario in LIGO-P1200087.
1207  */
1209  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1210  double flow /**< low frequency cutoff (Hz) */
1211 )
1212 {
1213  return XLALSimNoisePSDFromFile(psd, flow,
1214  P1200087 "aLIGO_EARLY_LOW.txt");
1215 }
1216 
1217 /**
1218  * Returns a frequency series psd with low frequency cutoff flow corresponding
1219  * to the aLIGO 2015 high-sensitivity scenario in LIGO-P1200087.
1220  */
1222  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1223  double flow /**< low frequency cutoff (Hz) */
1224 )
1225 {
1226  return XLALSimNoisePSDFromFile(psd, flow,
1227  P1200087 "aLIGO_EARLY_HIGH.txt");
1228 }
1229 
1230 /**
1231  * Returns a frequency series psd with low frequency cutoff flow corresponding
1232  * to the aLIGO 2016-2017 low-sensitivity scenario in LIGO-P1200087.
1233  */
1235  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1236  double flow /**< low frequency cutoff (Hz) */
1237 )
1238 {
1239  return XLALSimNoisePSDFromFile(psd, flow,
1240  P1200087 "aLIGO_MID_LOW.txt");
1241 }
1242 
1243 /**
1244  * Returns a frequency series psd with low frequency cutoff flow corresponding
1245  * to the aLIGO 2016-2017 high-sensitivity scenario in LIGO-P1200087.
1246  */
1248  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1249  double flow /**< low frequency cutoff (Hz) */
1250 )
1251 {
1252  return XLALSimNoisePSDFromFile(psd, flow,
1253  P1200087 "aLIGO_MID_HIGH.txt");
1254 }
1255 
1256 /**
1257  * Returns a frequency series psd with low frequency cutoff flow corresponding
1258  * to the aLIGO 2017-2018 low-sensitivity scenario in LIGO-P1200087.
1259  */
1261  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1262  double flow /**< low frequency cutoff (Hz) */
1263 )
1264 {
1265  return XLALSimNoisePSDFromFile(psd, flow,
1266  P1200087 "aLIGO_LATE_LOW.txt");
1267 }
1268 
1269 /**
1270  * Returns a frequency series psd with low frequency cutoff flow corresponding
1271  * to the aLIGO 2017-2018 high-sensitivity scenario in LIGO-P1200087.
1272  */
1274  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1275  double flow /**< low frequency cutoff (Hz) */
1276 )
1277 {
1278  return XLALSimNoisePSDFromFile(psd, flow,
1279  P1200087 "aLIGO_LATE_HIGH.txt");
1280 }
1281 
1282 /**
1283  * Returns a frequency series psd with low frequency cutoff flow corresponding
1284  * to the aLIGO 2019 design sensitivity scenario in LIGO-P1200087.
1285  */
1287  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1288  double flow /**< low frequency cutoff (Hz) */
1289 )
1290 {
1291  return XLALSimNoisePSDFromFile(psd, flow,
1292  P1200087 "aLIGO_DESIGN.txt");
1293 }
1294 
1295 /**
1296  * Returns a frequency series psd with low frequency cutoff flow corresponding
1297  * to the aLIGO BNS-optimized sensitivity scenario in LIGO-P1200087.
1298  */
1300  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1301  double flow /**< low frequency cutoff (Hz) */
1302 )
1303 {
1304  return XLALSimNoisePSDFromFile(psd, flow,
1305  P1200087 "aLIGO_BNS_OPTIMIZED.txt");
1306 }
1307 
1308 /**
1309  * Returns a frequency series psd with low frequency cutoff flow corresponding
1310  * to the AdV 2016-2017 low-sensitivity scenario in LIGO-P1200087.
1311  */
1313  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1314  double flow /**< low frequency cutoff (Hz) */
1315 )
1316 {
1317  return XLALSimNoisePSDFromFile(psd, flow,
1318  P1200087 "AdV_EARLY_LOW.txt");
1319 }
1320 
1321 /**
1322  * Returns a frequency series psd with low frequency cutoff flow corresponding
1323  * to the AdV 2016-2017 high-sensitivity scenario in LIGO-P1200087.
1324  */
1326  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1327  double flow /**< low frequency cutoff (Hz) */
1328 )
1329 {
1330  return XLALSimNoisePSDFromFile(psd, flow,
1331  P1200087 "AdV_EARLY_HIGH.txt");
1332 }
1333 
1334 /**
1335  * Returns a frequency series psd with low frequency cutoff flow corresponding
1336  * to the AdV 2017-2018 low-sensitivity scenario in LIGO-P1200087.
1337  */
1339  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1340  double flow /**< low frequency cutoff (Hz) */
1341 )
1342 {
1343  return XLALSimNoisePSDFromFile(psd, flow,
1344  P1200087 "AdV_MID_LOW.txt");
1345 }
1346 
1347 /**
1348  * Returns a frequency series psd with low frequency cutoff flow corresponding
1349  * to the AdV 2017-2018 high-sensitivity scenario in LIGO-P1200087.
1350  */
1352  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1353  double flow /**< low frequency cutoff (Hz) */
1354 )
1355 {
1356  return XLALSimNoisePSDFromFile(psd, flow,
1357  P1200087 "AdV_MID_HIGH.txt");
1358 }
1359 
1360 /**
1361  * Returns a frequency series psd with low frequency cutoff flow corresponding
1362  * to the AdV 2018-2020 low-sensitivity scenario in LIGO-P1200087.
1363  */
1365  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1366  double flow /**< low frequency cutoff (Hz) */
1367 )
1368 {
1369  return XLALSimNoisePSDFromFile(psd, flow,
1370  P1200087 "AdV_LATE_LOW.txt");
1371 }
1372 
1373 /**
1374  * Returns a frequency series psd with low frequency cutoff flow corresponding
1375  * to the AdV 2018-2020 high-sensitivity scenario in LIGO-P1200087.
1376  */
1378  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1379  double flow /**< low frequency cutoff (Hz) */
1380 )
1381 {
1382  return XLALSimNoisePSDFromFile(psd, flow,
1383  P1200087 "AdV_LATE_HIGH.txt");
1384 }
1385 
1386 /**
1387  * Returns a frequency series psd with low frequency cutoff flow corresponding
1388  * to the AdV 2021 design sensitivity scenario in LIGO-P1200087.
1389  */
1391  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1392  double flow /**< low frequency cutoff (Hz) */
1393 )
1394 {
1395  return XLALSimNoisePSDFromFile(psd, flow,
1396  P1200087 "AdV_DESIGN.txt");
1397 }
1398 
1399 /**
1400  * Returns a frequency series psd with low frequency cutoff flow corresponding
1401  * to the AdV BNS-optimized sensitivity scenario in LIGO-P1200087.
1402  */
1404  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1405  double flow /**< low frequency cutoff (Hz) */
1406 )
1407 {
1408  return XLALSimNoisePSDFromFile(psd, flow,
1409  P1200087 "AdV_BNS_OPTIMIZED.txt");
1410 }
1411 
1412 /** @} */
1413 
1414 /**
1415  * @name Noise PSDs from LIGO-P1600143
1416  * @{
1417  */
1418 
1419 /**
1420  * Returns a frequency series psd with low frequency cutoff flow corresponding
1421  * to Cosmic Explorer in LIGO-P1600143.
1422  */
1424  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1425  double flow /**< low frequency cutoff (Hz) */
1426 )
1427 {
1428  return XLALSimNoisePSDFromFile(psd, flow,
1429  P1600143 "CE.txt");
1430 }
1431 
1432 /**
1433  * Returns a frequency series psd with low frequency cutoff flow corresponding
1434  * to Cosmic Explorer (pessimistic) in LIGO-P1600143.
1435  */
1437  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1438  double flow /**< low frequency cutoff (Hz) */
1439 )
1440 {
1441  return XLALSimNoisePSDFromFile(psd, flow,
1442  P1600143 "CE_Pessimistic.txt");
1443 }
1444 
1445 /**
1446  * Returns a frequency series psd with low frequency cutoff flow corresponding
1447  * to Cosmic Explorer (wideband) in LIGO-P1600143.
1448  */
1450  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1451  double flow /**< low frequency cutoff (Hz) */
1452 )
1453 {
1454  return XLALSimNoisePSDFromFile(psd, flow,
1455  P1600143 "CE_Wideband.txt");
1456 }
1457 
1458 /**
1459  * Returns a frequency series psd with low frequency cutoff flow corresponding
1460  * to Einstein Telescope in LIGO-P1600143.
1461  */
1463  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1464  double flow /**< low frequency cutoff (Hz) */
1465 )
1466 {
1467  return XLALSimNoisePSDFromFile(psd, flow,
1468  P1600143 "ET_D.txt");
1469 }
1470 
1471 /** @} */
1472 
1473 /**
1474  * @name Noise PSDs from LIGO-
1475  * @{
1476  */
1477 
1478 /**
1479  * Returns a frequency series psd with low frequency cutoff flow corresponding
1480  * to the KAGRA 2018 opening (earliest) scenario in LIGO-T1600593.
1481  */
1483  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1484  double flow /**< low frequency cutoff (Hz) */
1485 )
1486 {
1487  return XLALSimNoisePSDFromFile(psd, flow,
1488  T1600593 "KAGRA_Opening.txt");
1489 }
1490 
1491 /**
1492  * Returns a frequency series psd with low frequency cutoff flow corresponding
1493  * to the KAGRA 2019 early scenario in LIGO-T1600593.
1494  */
1496  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1497  double flow /**< low frequency cutoff (Hz) */
1498 )
1499 {
1500  return XLALSimNoisePSDFromFile(psd, flow,
1501  T1600593 "KAGRA_Early.txt");
1502 }
1503 
1504 /**
1505  * Returns a frequency series psd with low frequency cutoff flow corresponding
1506  * to the KAGRA start-of-2020 mid scenario in LIGO-T1600593.
1507  */
1509  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1510  double flow /**< low frequency cutoff (Hz) */
1511 )
1512 {
1513  return XLALSimNoisePSDFromFile(psd, flow,
1514  T1600593 "KAGRA_Mid.txt");
1515 }
1516 
1517 /**
1518  * Returns a frequency series psd with low frequency cutoff flow corresponding
1519  * to the KAGRA end-of-2020 late scenario in LIGO-T1600593.
1520  */
1522  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1523  double flow /**< low frequency cutoff (Hz) */
1524 )
1525 {
1526  return XLALSimNoisePSDFromFile(psd, flow,
1527  T1600593 "KAGRA_Late.txt");
1528 }
1529 
1530 /**
1531  * Returns a frequency series psd with low frequency cutoff flow corresponding
1532  * to the KAGRA design scenario in LIGO-T1600593.
1533  */
1535  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1536  double flow /**< low frequency cutoff (Hz) */
1537 )
1538 {
1539  return XLALSimNoisePSDFromFile(psd, flow,
1540  T1600593 "KAGRA_Design.txt");
1541 }
1542 
1543 /** @} */
1544 
1545 /**
1546  * @name Noise PSDs from LIGO-T1800042
1547  * @{
1548  */
1549 
1550 /**
1551  * Returns a frequency series psd with low frequency cutoff flow corresponding
1552  * to the A+ configuration design sensitivity scenario in LIGO-T1800042.
1553  */
1555  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1556  double flow /**< low frequency cutoff (Hz) */
1557 )
1558 {
1559  return XLALSimNoisePSDFromFile(psd, flow,
1560  T1800042 "aLIGO_APLUS.txt");
1561 }
1562 
1563 /** @} */
1564 
1565 /**
1566  * @name Noise PSDs from LIGO-T1800044
1567  * @{
1568  */
1569 
1570 /**
1571  * Returns a frequency series psd with low frequency cutoff flow corresponding
1572  * to an updated aLIGO configuration design sensitivity scenario in
1573  * LIGO-T1800044.
1574  */
1576  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1577  double flow /**< low frequency cutoff (Hz) */
1578 )
1579 {
1580  return XLALSimNoisePSDFromFile(psd, flow,
1581  T1800044 "aLIGO_DESIGN.txt");
1582 }
1583 
1584 /**
1585  * \deprecated Use XLALSimNoisePSDaLIGODesignSensitivityT1800044.
1586  */
1588 
1589 /** @} */
1590 
1591 /**
1592  * @name Noise PSDs from LIGO-T1800545
1593  * @{
1594  */
1595 
1596 /**
1597  * Returns a frequency series psd with low frequency cutoff flow corresponding
1598  * to aLIGO O3 low 120 Mpc range in LIGO-T1800545.
1599  */
1600 
1602  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1603  double flow /**< low frequency cutoff (Hz) */
1604 )
1605 {
1606  return XLALSimNoisePSDFromFile(psd, flow,
1607  T1800545 "aLIGO_O3low.txt");
1608 }
1609 
1610 /**
1611  * \deprecated Use XLALSimNoisePSDaLIGOO3LowT1800545.
1612  */
1614 
1615 /**
1616  * Returns a frequency series psd with low frequency cutoff flow corresponding
1617  * to aLIGO 140 Mpc range in LIGO-T1800545.
1618  */
1619 
1621  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1622  double flow /**< low frequency cutoff (Hz) */
1623 )
1624 {
1625  return XLALSimNoisePSDFromFile(psd, flow,
1626  T1800545 "aLIGO_140Mpc.txt");
1627 }
1628 
1629 /**
1630  * \deprecated Use XLALSimNoisePSDaLIGO140MpcT1800545.
1631  */
1633 
1634 /**
1635  * Returns a frequency series psd with low frequency cutoff flow corresponding
1636  * to aLIGO 175 Mpc range (design) in LIGO-T1800545.
1637  */
1638 
1640  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1641  double flow /**< low frequency cutoff (Hz) */
1642 )
1643 {
1644  return XLALSimNoisePSDFromFile(psd, flow,
1645  T1800545 "aLIGO_175Mpc.txt");
1646 }
1647 
1648 /**
1649  * \deprecated Use XLALSimNoisePSDaLIGO175MpcT1800545.
1650  */
1652 
1653 /**
1654  * Returns a frequency series psd with low frequency cutoff flow corresponding
1655  * to advanced Virgo 100 Mpc range (O4 intermediate) in LIGO-T1800545.
1656  */
1657 
1659  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1660  double flow /**< low frequency cutoff (Hz) */
1661 )
1662 {
1663  return XLALSimNoisePSDFromFile(psd, flow,
1664  T1800545 "AdV_O4intermediate.txt");
1665 }
1666 
1667 /**
1668  * \deprecated Use XLALSimNoisePSDAdVO4IntermediateT1800545.
1669  */
1671 
1672 /**
1673  * Returns a frequency series psd with low frequency cutoff flow corresponding
1674  * to advanced Virgo 120 Mpc range (O4 design) in LIGO-T1800545.
1675  */
1676 
1678  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1679  double flow /**< low frequency cutoff (Hz) */
1680 )
1681 {
1682  return XLALSimNoisePSDFromFile(psd, flow,
1683  T1800545 "AdV_O4.txt");
1684 }
1685 
1686 /**
1687  * \deprecated Use XLALSimNoisePSDAdVO4T1800545.
1688  */
1690 
1691 /**
1692  * Returns a frequency series psd with low frequency cutoff flow corresponding
1693  * to advanced Virgo 65 Mpc range (O3 low) in LIGO-T1800545.
1694  */
1695 
1697  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1698  double flow /**< low frequency cutoff (Hz) */
1699 )
1700 {
1701  return XLALSimNoisePSDFromFile(psd, flow,
1702  T1800545 "AdV_O3low.txt");
1703 }
1704 
1705 /**
1706  * \deprecated Use XLALSimNoisePSDAdVO3LowT1800545.
1707  */
1709 
1710 /**
1711  * Returns a frequency series psd with low frequency cutoff flow corresponding
1712  * to advanced KAGRA 128 Mpc range in LIGO-T1800545.
1713  */
1714 
1716  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1717  double flow /**< low frequency cutoff (Hz) */
1718 )
1719 {
1720  return XLALSimNoisePSDFromFile(psd, flow,
1721  T1800545 "KAGRA_128Mpc.txt");
1722 }
1723 
1724 /**
1725  * \deprecated Use XLALSimNoisePSDKAGRA128MpcT1800545.
1726  */
1728 
1729 /**
1730  * Returns a frequency series psd with low frequency cutoff flow corresponding
1731  * to advanced KAGRA 25 Mpc range in LIGO-T1800545.
1732  */
1733 
1735  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1736  double flow /**< low frequency cutoff (Hz) */
1737 )
1738 {
1739  return XLALSimNoisePSDFromFile(psd, flow,
1740  T1800545 "KAGRA_25Mpc.txt");
1741 }
1742 
1743 /**
1744  * \deprecated Use XLALSimNoisePSDKAGRA25MpcT1800545.
1745  */
1747 
1748 /**
1749  * Returns a frequency series psd with low frequency cutoff flow corresponding
1750  * to advanced KAGRA 80 Mpc range in LIGO-T1800545.
1751  */
1752 
1754  REAL8FrequencySeries *psd, /**< frequency series to be computed */
1755  double flow /**< low frequency cutoff (Hz) */
1756 )
1757 {
1758  return XLALSimNoisePSDFromFile(psd, flow,
1759  T1800545 "KAGRA_80Mpc.txt");
1760 }
1761 
1762 /**
1763  * \deprecated Use XLALSimNoisePSDKAGRA80MpcT1800545.
1764  */
1766 
1767 /** @} */
1768 
1769 /** @} */
1770 
1771 /*
1772  *
1773  * TEST CODE
1774  *
1775  */
1776 
1777 #if 0
1778 
1779 /*
1780  * This test produces plot data that should be similar to the theoretical noise
1781  * component curves for shot, seismic, suspension thermal, and mirror thermal
1782  * shown in Figure 7 of Rep. Prog. Phys. 72 (2009) 076901. It also includes the
1783  * SRD curve for iLIGO.
1784  */
1785 int test_iligo_psd(void)
1786 {
1787  const double eta = 0.9/3.0;
1788  double f;
1789  FILE *fp = fopen("psd_iligo.dat", "w");
1790  for (f = 30.0; f < 8000.0; f *= 1.01) {
1791  double S_susp;
1792  double S_coat;
1793  double S_shot;
1794  double S_seis;
1795 
1796  S_shot = XLALSimNoisePSDShot(f,
1801  eta);
1802 
1803  S_seis = XLALSimNoisePSDSeismic(f,
1807  4);
1808 
1809  S_susp = XLALSimNoisePSDSuspTherm(f,
1815 
1816  S_coat = XLALSimNoisePSDMirrorTherm(f,
1822 
1823  fprintf(fp, "%e\t%e\t%e\t%e\t%e\t%e\t%e\n", f, sqrt(S_shot + S_seis + S_susp + S_coat), sqrt(S_shot), sqrt(S_seis), sqrt(S_susp), sqrt(S_coat), sqrt(XLALSimNoisePSDiLIGOSRD(f)));
1824  }
1825  fclose(fp);
1826  return 0;
1827 }
1828 
1829 /*
1830  * This test produces plot data that should be similar to the aLIGO noise
1831  * curves shown in LIGO-T0900288-v3.
1832  */
1833 int test_aligo_psd(void)
1834 {
1835  double f;
1836  FILE *fp = fopen("psd_aligo.dat", "w");
1837  for (f = 9.0; f < 3000.0; f *= 1.01)
1838  fprintf(fp, "%e\t%e\t%e\t%e\t%e\t%e\t%e\n", f,
1842  sqrt(XLALSimNoisePSDaLIGONSNSOpt(f)),
1845  fclose(fp);
1846  return 0;
1847 }
1848 
1849 int main(void)
1850 {
1852  test_iligo_psd();
1853  test_aligo_psd();
1855  return 0;
1856 }
1857 
1858 #endif
REAL8 zeta
void LALCheckMemoryLeaks(void)
static double tau(const double a, const double b, const sysq *system)
Internal function that computes the spin-spin couplings.
static double beta(const double a, const double b, const sysq *system)
Internal function that computes the spin-orbit couplings.
int XLALSimNoisePSDaLIGOaLIGODesignSensitivityT1800044(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOAdVO4T1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOKAGRA128MpcT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOKAGRA80MpcT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOaLIGO140MpcT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOaLIGO175MpcT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOAdVO3LowT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOaLIGOO3LowT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOKAGRA25MpcT1800545(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSDaLIGOAdVO4IntermediateT1800545(REAL8FrequencySeries *psd, double flow)
#define LAL_ALIGO_PRM_TRANSMITTANCE
#define LAL_ILIGO_THERMAL_COAT_FREQ_SI
#define LAL_ILIGO_MIRROR_MASS_SI
#define LAL_ALIGO_MIRROR_MASS_SI
#define LAL_ILIGO_ARMLENGTH_SI
#define LAL_ALIGO_THERMAL_COAT_QUAL
#define LAL_ALIGO_TEMPERATURE_SI
#define LAL_ALIGO_THERMAL_SUSP_QUAL
#define LAL_ILIGO_FINESSE
#define DEPRECATED_PSD(OLD_PSD, NEW_PSD)
#define LAL_ALIGO_THERMAL_COAT_FREQ_SI
#define LAL_ALIGO_MIRROR_LOSS
#define LAL_ILIGO_LASER_WAVELENGTH_SI
#define LAL_ALIGO_BS_LOSS
static LALUnit strainSquaredPerHertzUnit
#define T1800545
#define T1600593
#define LAL_ALIGO_LASER_POWER_LOW_SI
#define LAL_ILIGO_THERMAL_COAT_QUAL
#define P1600143
#define T0900288
#define T1800042
#define LAL_ALIGO_THERMAL_SUSP_FREQ_SI
#define LAL_ILIGO_THERMAL_STACK_FREQ_SI
#define LAL_ALIGO_LASER_POWER_HIGH_SI
#define LAL_ILIGO_LASER_POWER_BS_SI
#define LAL_ILIGO_THERMAL_SUSP_QUAL
#define LAL_ALIGO_ARMLENGTH_SI
#define T1800044
#define LAL_ALIGO_ITM_TRANSMITTANCE
#define LAL_ALIGO_SRM_TRANSMITTANCE
#define P1200087
#define LAL_ILIGO_TEMPERATURE_SI
#define LAL_ALIGO_LASER_WAVELENGTH_SI
#define LAL_ILIGO_THERMAL_SUSP_FREQ_SI
size_t XLALSimReadDataFile2Col(double **xdat, double **ydat, LALFILE *fp)
Read a two-column data file.
LALFILE * XLALSimReadDataFileOpen(const char *fname)
Opens a specified data file, searching default path if necessary.
#define fprintf
int main(int argc, char *argv[])
Definition: bh_qnmode.c:226
REAL8 M
Definition: bh_qnmode.c:133
double i
Definition: bh_ringdown.c:118
double e
Definition: bh_ringdown.c:117
double(* psdfunc)(double)
double flow
const double Q
int XLALFileClose(LALFILE *file)
#define LAL_C_SI
#define LAL_K_SI
#define LAL_HBAR_SI
#define LAL_PI_180
#define LAL_PI
double complex COMPLEX16
double REAL8
void XLALFree(void *p)
int XLALSimNoisePSDKAGRA25MpcT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced KAGRA 25 Mpc ...
int XLALSimNoisePSDaLIGODesignSensitivityT1800044(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to an updated aLIGO confi...
double XLALSimNoisePSDeLIGOShot(double f)
Provides the shot noise power spectrum for eLIGO.
int XLALSimNoisePSDKAGRALateSensitivityT1600593(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the KAGRA end-of-2020 ...
int XLALSimNoisePSDaLIGOHighFrequencyGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "High_Freq....
double XLALSimNoisePSDaLIGOQuantumZeroDetHighPower(double f)
Provides the quantum noise power spectrum for aLIGO under the high-power broad-band signal recycling ...
double XLALSimNoisePSDGEO(double f)
Provides a GEO noise power spectrum based on that from Table IV of .
int XLALSimNoisePSDAdVMidHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2017-2018 high...
double XLALSimNoisePSDGEOHF(double f)
Provides a GEO-HF noise power spectrum based on a fit to Figure 6 from .
double XLALSimNoisePSDaLIGOQuantumHighFrequency(double f)
Provides the quantum noise power spectrum for aLIGO under the configuration tuned to narrow-band high...
int XLALSimNoisePSDaLIGOAPlusDesignSensitivityT1800042(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the A+ configuration d...
int XLALSimNoisePSDaLIGOBNSOptimizedSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO BNS-optimize...
int XLALSimNoisePSDaLIGOBHBH20DegGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "BBH_20deg....
double XLALSimNoisePSDSeismic(double f, double L, double f_pend, double f_stack, double n_stack)
Provides a rather ad-hoc estimate of the seismic noise power spectral density at a given frequency.
double XLALSimNoisePSDTAMA(double f)
Provides a TAMA300 noise power spectrum based on that from Table IV of .
int XLALSimNoisePSDAdVO3LowT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced Virgo 65 Mpc ...
int XLALSimNoisePSDaLIGOMidHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2016-2017 hi...
int XLALSimNoisePSDAdVEarlyHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2016-2017 high...
int XLALSimNoisePSDaLIGOEarlyLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2015 low-sen...
int XLALSimNoisePSDaLIGOLateHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2017-2018 hi...
int XLALSimNoisePSDAdVLateLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2018-2020 low-...
double XLALSimNoisePSDaLIGOQuantumNoSRMHighPower(double f)
Provides the quantum noise power spectrum for aLIGO under the high-power no-signal-recycling-mirror c...
int XLALSimNoisePSDAdVO4T1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced Virgo 120 Mpc...
int XLALSimNoisePSDAdVDesignSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2021 design se...
double XLALSimNoisePSDaLIGOThermal(double f)
Provides the thermal noise (suspension + coating) power spectrum for aLIGO.
double XLALSimNoisePSDaLIGOZeroDetHighPower(double f)
Provides the noise power spectrum for aLIGO under the high-power broad-band signal recycling (no detu...
int XLALSimNoisePSDaLIGOMidLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2016-2017 lo...
int XLALSimNoisePSDaLIGOO3LowT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to aLIGO O3 low 120 Mpc r...
int XLALSimNoisePSDFromFile(REAL8FrequencySeries *psd, double flow, const char *fname)
Reads file fname containing two-column amplitude spectral density data file and interpolates at the f...
int XLALSimNoisePSD(REAL8FrequencySeries *psd, double flow, double(*psdfunc)(double))
Evaluates a power spectral density function, psdfunc, at the frequencies required to populate the fre...
int XLALSimNoisePSDCosmicExplorerPessimisticP1600143(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to Cosmic Explorer (pessi...
double XLALSimNoisePSDaLIGONoSRMHighPower(double f)
Provides the noise power spectrum for aLIGO under the high-power no-signal-recycling-mirror configura...
int XLALSimNoisePSDaLIGONoSRMLowPowerGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "NO_SRM....
double XLALSimNoisePSDaLIGOQuantumBHBH20Deg(double f)
Provides the quantum noise power spectrum for aLIGO under the configuration tuned to optimize sensiti...
double XLALSimNoisePSDeLIGOModel(double f)
Provides the noise power spectrum for a model of the eLIGO detector.
double XLALSimNoisePSDaLIGOQuantumZeroDetLowPower(double f)
Provides the quantum noise power spectrum for aLIGO under the low-power broad-band signal recycling (...
double XLALSimNoisePSDiLIGOModel(double f)
Provides the noise power spectrum for a model of the iLIGO detector.
int XLALSimNoisePSDKAGRAMidSensitivityT1600593(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the KAGRA start-of-202...
double XLALSimNoisePSDQuantum(double f, double I0, double lambda, double L, double M, double A, double A_BS, double T_ITM, double T_PRM, double T_SRM, double ds, double zeta, double eta)
Computes the quantum noise (shot noise and radiation pressure noise) according to Buonanno and Chen,...
int XLALSimNoisePSDaLIGODesignSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2019 design ...
int XLALSimNoisePSDaLIGO175MpcT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to aLIGO 175 Mpc range (d...
double XLALSimNoisePSDaLIGONoSRMLowPower(double f)
Provides the noise power spectrum for aLIGO under the low-power no-signal-recycling-mirror configurat...
double XLALSimNoisePSDShot(double f, double P_BS, double lambda, double L, double finesse, double eta)
Computes the shot noise in strain-equivalent units using a conventional model appropriate to initial ...
int XLALSimNoisePSDaLIGOEarlyHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2015 high-se...
double XLALSimNoisePSDaLIGOHighFrequency(double f)
Provides the noise power spectrum for aLIGO under the configuration tuned to narrow-band high-frequen...
double XLALSimNoisePSDiLIGOSeismic(double f)
Provides the seismic noise power spectrum for iLIGO.
int XLALSimNoisePSDaLIGOZeroDetLowPowerGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "ZERO_DET_low_P....
int XLALSimNoisePSDaLIGOLateLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the aLIGO 2017-2018 lo...
int XLALSimNoisePSDCosmicExplorerP1600143(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to Cosmic Explorer in LIG...
double XLALSimNoisePSDaLIGOQuantumNoSRMLowPower(double f)
Provides the quantum noise power spectrum for aLIGO under the low-power no-signal-recycling-mirror co...
int XLALSimNoisePSDCosmicExplorerWidebandP1600143(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to Cosmic Explorer (wideb...
int XLALSimNoisePSDaLIGONSNSOptGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "NSNS_Opt....
int XLALSimNoisePSDKAGRADesignSensitivityT1600593(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the KAGRA design scena...
int XLALSimNoisePSDEinsteinTelescopeP1600143(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to Einstein Telescope in ...
double XLALSimNoisePSDaLIGONSNSOpt(double f)
Provides the noise power spectrum for aLIGO under the configuration tuned to optimize sensitivity to ...
int XLALSimNoisePSDaLIGO140MpcT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to aLIGO 140 Mpc range in...
double XLALSimNoisePSDAdvVirgo(double f)
Provides the noise power spectrum for AdvVirgo based on that from Eqn 6 of .
double XLALSimNoisePSDiLIGOShot(double f)
Provides the shot noise power spectrum for iLIGO.
double XLALSimNoisePSDSuspTherm(double f, double L, double M, double T, double f0, double Q)
Provides a rather ad-hoc estimate of the suspension thermal noise power spectral density at a given f...
double XLALSimNoisePSDMirrorTherm(double f, double L, double M, double T, double f0, double Q)
Provides a rather ad-hoc estimate of the mirror thermal noise power spectral density at a given frequ...
double XLALSimNoisePSDaLIGOZeroDetLowPower(double f)
Provides the noise power spectrum for aLIGO under the low-power broad-band signal recycling (no detun...
int XLALSimNoisePSDKAGRA128MpcT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced KAGRA 128 Mpc...
int XLALSimNoisePSDAdVMidLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2017-2018 low-...
int XLALSimNoisePSDKAGRA80MpcT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced KAGRA 80 Mpc ...
int XLALSimNoisePSDKAGRAEarlySensitivityT1600593(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the KAGRA 2019 early s...
double XLALSimNoisePSDiLIGOThermal(double f)
Provides the thermal noise (suspension + coating) power spectrum for iLIGO.
int XLALSimNoisePSDAdVO4IntermediateT1800545(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to advanced Virgo 100 Mpc...
int XLALSimNoisePSDKAGRAOpeningSensitivityT1600593(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the KAGRA 2018 opening...
double XLALSimNoisePSDiLIGOSRD(double f)
Provides the noise power spectrum based on a phenomenological fit to the SRD curve for iLIGO.
int XLALSimNoisePSDAdVBNSOptimizedSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV BNS-optimized ...
int XLALSimNoisePSDAdVEarlyLowSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2016-2017 low-...
double XLALSimNoisePSDKAGRA(double f)
Provides the noise power spectrum for KAGRA based on that from Eqn 5 of .
double XLALSimNoisePSDVirgo(double f)
Provides the design noise power spectrum for Virgo based on a phenomenological fit (from the Virgo we...
double XLALSimNoisePSDaLIGOQuantumNSNSOpt(double f)
Provides the quantum noise power spectrum for aLIGO under the configuration tuned to optimize sensiti...
int XLALSimNoisePSDaLIGOZeroDetHighPowerGWINC(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the "ZERO_DET_high_P....
double XLALSimNoisePSDaLIGOBHBH20Deg(double f)
Provides the noise power spectrum for aLIGO under the configuration tuned to optimize sensitivity to ...
int XLALSimNoisePSDAdVLateHighSensitivityP1200087(REAL8FrequencySeries *psd, double flow)
Returns a frequency series psd with low frequency cutoff flow corresponding to the AdV 2018-2020 high...
void XLALAbortErrorHandler(const char *func, const char *file, int line, int errnum)
#define XLAL_ERROR(...)
XLALErrorHandlerType * XLALSetErrorHandler(XLALErrorHandlerType *newHandler)
XLAL_EFUNC
list x
REAL8Sequence * data
REAL8 * data
FILE * fp