Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-ea7c608
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralAmplitude.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Anand Sengupta, Thomas Cokelaer, Drew Keppel
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 * \author Cokelaer T.
22 * \file
23 * \ingroup LALInspiral_h
24 *
25 * \brief Given an inspiral template structure containing the binary distance
26 * and a set of mass parameters, that module provides functions to compute
27 * the related amplitude.
28 *
29 * ### Description ###
30 *
31 * The inspiral template structure can stored (1) the distance of the binary (2)
32 * a set of binary masses such as the two masses or the total mass and eta and (3)
33 * an amplitude which is arbitrary fixed to unity when templates are computed.
34 *
35 * However we might need to have a template with the physical amplitude (for instance
36 * to deal with injections). The function \c XLALInspiralRestrictedAmplitude
37 * takes an InspiralTemplate structure as input/output to return the restricted
38 * Newtonian amplitude by using the following formula.
39 *
40 * \f{equation}{
41 * A = \frac{4c}{d \eta} M^{-5./3.}
42 * \f}
43 *
44 * where \f$d\f$ is in Mpc and \f$M\f$ in solar mass. The result is stored in the signalAmplitude
45 * variable of the inspiral template structure.
46 *
47 * ### Uses ###
48 *
49 * When appropriate this function calls:\\
50 * \c XLALInspiralParameterCalc
51 *
52 */
53
54#include <lal/LALInspiral.h>
55
56int
58{
59 if (params == NULL)
61 if ((INT4)params->massChoice < 0)
63 if ((INT4)params->massChoice > 15)
65
66 if (params->massChoice != totalMassAndEta)
67 {
69 {
71 }
72 }
73
74 params->signalAmplitude = 4. * params->totalMass * params->eta / (LAL_PC_SI * 1e6 *params->distance / LAL_MRSUN_SI);
75
76 return XLAL_SUCCESS;
77}
int XLALInspiralParameterCalc(InspiralTemplate *params)
int XLALInspiralRestrictedAmplitude(InspiralTemplate *params)
#define LAL_PC_SI
#define LAL_MRSUN_SI
int32_t INT4
@ totalMassAndEta
total mass and symmetric mass ratio
Definition: LALInspiral.h:180
#define XLAL_ERROR(...)
XLAL_SUCCESS
XLAL_EFAULT
XLAL_EFUNC
XLAL_EDOM
XLAL_FAILURE
The inspiral waveform parameter structure containing information about the waveform to be generated.
Definition: LALInspiral.h:205
double distance