Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-6c6b863
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralComputeParams.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 David Churches, Duncan Brown, Jolien Creighton, B.S. Sathyaprakash, Craig Robinson
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 <lal/LALInspiralBank.h>
21
22/**
23 * \ingroup LALInspiralBank_h
24 * \brief This function takes as input \f$\tau_{0}\f$, \f$\tau_{3}\f$ and \f$f_a\f$ (the lower frequency of the detectors
25 * sensitivity), it then calculates \f$m\f$ (the total mass of the binary), \f$\eta\f$ (the
26 * symmetric mass ratio) and the individual mass of the compact objects.
27 * \author Churches, D. K.
28 *
29 * We start with the definition of the chirp times \f$\tau_{0}\f$ and \f$\tau_{3}\f$,
30 * \f{equation}{
31 * \tau_{0} = \frac{5}{256 (\pi f_{a} )^{8/3} m^{5/3} \eta}
32 * \f}
33 * and
34 * \f{equation}{
35 * \tau_{3} = \frac{1}{8 (\pi^{2} f_{a}^{5} )^{1/3} m^{2/3} \eta}
36 * \f}
37 * These equations may be inverted to yield
38 * \f{equation}{
39 * m = \frac{5}{32 \pi^{2} f_{a}} \frac{\tau_{3}}{\tau_{0}}
40 * \f}
41 * and
42 * \f{equation}{
43 * \eta = \left( \frac{2 \pi^{2}}{25 f_{a}^{3}} \frac{\tau_{0}^{2}}{\tau_{3}^{5}}
44 * \right)^{1/3}\f}
45 * The individual masses may be calculated as follows. We have
46 *
47 * \f{equation}{
48 * \label{mass1}
49 * m = m_{1} + m_{2}
50 * \f}
51 * and
52 * \f{equation}{
53 * \label{eta1}
54 * \eta = \frac{m_{1} m_{2}}{(m_{1} + m_{2})^{2}}
55 * \f}
56 * From \eqref{mass1} we may eliminate either \f$m_{1}\f$ or \f$m_{2}\f$,
57 * \f{equation}{
58 * m_{1} = m - m_{2}
59 * \f}
60 * This may be substituted into \eqref{eta1} to give
61 * \f{equation}{
62 * \eta = \frac{(m - m_{2}) m_{2}}{\left[ (m - m{2}) + m_{2} \right]^{2}}
63 * \f}
64 * which may be re--arranged to give
65 * \f{equation}{
66 * m_{2}^{2} - m m_{2} + \eta m^{2} = 0
67 * \f}
68 * i.e. \
69 * \f{equation}{
70 * m_{2} = \frac{ m \pm \sqrt{m^{2}(1 - 4 \eta) }}{2}
71 * \f}
72 * Therefore, since we know that \f$\eta \leq 1/4\f$, real roots are guaranteed.
73 * If we had eliminated \f$m_{2}\f$ rather than \f$m_{1}\f$ then we would have arrived at an identical
74 * expression for
75 * \f$m_{1}\f$, and so of one object has mass
76 * \f{equation}{
77 * m_{1} = \frac{m + \sqrt{m^{2}(1-4 \eta)}}{2}
78 * \f}
79 * then the other object must have mass
80 * \f{equation}{
81 * m_{2} = \frac{m - \sqrt{m^{2}(1-4 \eta)}}{2}
82 * \f}
83 */
84void LALInspiralComputeParams(LALStatus *status, /**< LAL status pointer */
85 InspiralTemplate *pars, /**< [out] inspiral wave parameter structure */
86 InspiralBankParams bankParams, /**< [in] the parameters of the template bank */
87 InspiralCoarseBankIn coarseIn /**< [in] input parameters specifying the coarse bank */
88 )
89{
90
91
94 ASSERT (pars, status, LALINSPIRALBANKH_ENULL, LALINSPIRALBANKH_MSGENULL);
95
96 pars->fLower = coarseIn.fLower;
97
98 ASSERT (bankParams.x0 > 0., status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
99 ASSERT (bankParams.x1 > 0., status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
100/*ASSERT (bankParams.x1 < bankParams.x0, status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);*/
101 ASSERT ((INT4)coarseIn.space >= 0, status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
102 ASSERT ((INT4)coarseIn.space <= 1, status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
103
104 switch (coarseIn.space) {
105 case Tau0Tau2:
106 pars->t0 = bankParams.x0;
107 pars->t2 = bankParams.x1;
108 pars->massChoice = t02;
109 break;
110 case Tau0Tau3:
111 pars->t0 = bankParams.x0;
112 pars->t3 = bankParams.x1;
113 pars->massChoice = t03;
114 break;
115 default:
117 {
118 LALPrintError("LALInspiralComputeParams: No choice for parameter space");
119 }
120 }
121 LALInspiralParameterCalc(status->statusPtr, pars);
122 pars->fCutoff = 1.L/(pow(6.L,1.5L) * LAL_PI * pars->totalMass * LAL_MTSUN_SI);
124
126 RETURN (status);
127}
void LALInspiralParameterCalc(LALStatus *status, InspiralTemplate *params)
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define LAL_PI
#define LAL_MTSUN_SI
int32_t INT4
#define lalDebugLevel
LALINFO
int LALPrintError(const char *fmt,...)
@ t03
chirptimes and , and
Definition: LALInspiral.h:185
@ t02
chirptimes and
Definition: LALInspiral.h:184
#define LALINSPIRALBANKH_ENULL
Null pointer.
void LALInspiralComputeParams(LALStatus *status, InspiralTemplate *pars, InspiralBankParams bankParams, InspiralCoarseBankIn coarseIn)
This function takes as input , and (the lower frequency of the detectors sensitivity),...
#define LALINSPIRALBANKH_ESIZE
Invalid input range.
@ Tau0Tau2
space of chirptimes
@ Tau0Tau3
space of chirptimes
This is a structure needed in the inner workings of the LALInspiralCreateCoarseBank code.
REAL8 x1
the second coordinate, chosen to be either or
REAL8 x0
the first coordinate, chosen to be always
Input for choosing a template bank.
REAL8 fLower
Lower frequency cutoff.
CoordinateSpace space
enum that decides whether to use or in constructing the template bank
The inspiral waveform parameter structure containing information about the waveform to be generated.
Definition: LALInspiral.h:205
REAL8 t2
first post-Newtonian chirp time in seconds (input/output)
Definition: LALInspiral.h:295
REAL8 totalMass
total mass of the binary in solar mass (input/output)
Definition: LALInspiral.h:292
REAL8 fCutoff
upper frequency cutoff in Hz to be used in generating the waveform; If the last stable orbit frequenc...
Definition: LALInspiral.h:213
REAL8 t3
1.5 post-Newtonian chirp time in seconds (input/output)
Definition: LALInspiral.h:296
REAL8 t0
Newtonain chirp time in seconds (input/output)
Definition: LALInspiral.h:294
InputMasses massChoice
The pair of (mass) parameters given (see structure defining this member for more details) (input)
Definition: LALInspiral.h:323
REAL8 fLower
lower frequency cutoff of the detector in Hz (input)
Definition: LALInspiral.h:217