LALSimulation  5.4.0.1-fe68b98
LALSimUtils.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 J. 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 /**
21  * @addtogroup LALSimUtils_h Header LALSimUtils.h
22  * @ingroup lalsimulation_general
23  * @brief Miscellaneous routines.
24  */
25 
26 #ifndef _LALSIMUTILS_H
27 #define _LALSIMUTILS_H
28 
29 #if defined(__cplusplus)
30 extern "C" {
31 #elif 0
32 } /* so that editors will match preceding brace */
33 #endif
34 
35 #include <lal/LALDatatypes.h>
36 
37 /** @{ */
38 
39 /**
40  * @brief Ratio of horizon distance to sense-monitor range.
41  *
42  * This factor is used in XLALMeasureStandardSirenSenseMonitorRange().
43  *
44  * `sensemon_range = horizon_dist / LAL_HORIZON_DISTANCE_OVER_SENSEMON_RANGE`
45  *
46  * The factor can be computed using Monte Carlo methods; its value has been
47  * found to be 2.264778 +- 0.000002. This constant keeps it to only 5
48  * decimal places however.
49  *
50  * @sa Appendix D of
51  * Bruce Allen, Warren G. Anderson, Patrick R. Brady, Duncan A. Brown, and
52  * Jolien D. E. Creighton, "FINDCHIRP: An algorithm for detection of
53  * gravitational waves from inspiraling compact binaries", Phys. Rev. D @b 85,
54  * 122006 (2012) http://dx.doi.org/10.1103/PhysRevD.85.122006
55  */
56 #define LAL_HORIZON_DISTANCE_OVER_SENSEMON_RANGE 2.26478
57 
60 double XLALMeasureStandardSirenSNR(const REAL8FrequencySeries *psd, double f_min, double f_max);
61 double XLALMeasureSNRFD(const COMPLEX16FrequencySeries *htilde, const REAL8FrequencySeries *psd, double f_min, double f_max);
62 double XLALMeasureSNR(const REAL8TimeSeries *h, const REAL8FrequencySeries *psd, double f_min, double f_max);
63 
64 /** @} */
65 
66 #if 0
67 { /* so that editors will match succeeding brace */
68 #elif defined(__cplusplus)
69 }
70 #endif
71 
72 #endif
double XLALMeasureStandardSirenHorizonDistance(const REAL8FrequencySeries *psd, double f_min, double f_max)
Computes the horizon distance for a binary neutron star standard siren signal for a given one-sided d...
Definition: LALSimUtils.c:236
double XLALMeasureStandardSirenSenseMonitorRange(const REAL8FrequencySeries *psd, double f_min, double f_max)
Computes the sense-monitor range for a binary neutron star standard siren signal for a given one-side...
Definition: LALSimUtils.c:179
double XLALMeasureSNR(const REAL8TimeSeries *h, const REAL8FrequencySeries *psd, double f_min, double f_max)
Measures the characteristic signal-to-noise ratio of a gravitational waveform.
Definition: LALSimUtils.c:587
double XLALMeasureSNRFD(const COMPLEX16FrequencySeries *htilde, const REAL8FrequencySeries *psd, double f_min, double f_max)
Measures the characteristic signal-to-noise ratio of a gravitational waveform represented in the freq...
Definition: LALSimUtils.c:473
double XLALMeasureStandardSirenSNR(const REAL8FrequencySeries *psd, double f_min, double f_max)
Computes the characteristic signal-to-noise for a binary neutron star standard siren signal located a...
Definition: LALSimUtils.c:297
double f_min
Definition: unicorn.c:22
double f_max
Definition: unicorn.c:23