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
LALEtaTau04.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 Duncan Brown, Jolien Creighton, B.S. Sathyaprakash, 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 Sathyaprakash, B. S.
22 * \file
23 * \ingroup LALInspiral_h
24 *
25 * \brief Given \f$\tau_0\f$ and \f$\tau_4\f$ solve for the mass ratio \f$\eta.\f$
26 *
27 * ### Description ###
28 *
29 * Given \f$\tau_0\f$ and \f$\tau_4\f$ one can determine \f$\eta\f$ by solving
30 * \f{equation}{
31 * -\eta^{4/5} \tau_4 + A_4 \left ( \frac {\tau_0}{A_0} \right )^{1/5}
32 * \left (1 + B_4\eta + C_4 \eta^2 \right ) = 0,
33 * \f}
34 * where \f$A_0 = 5/[256 (\pi f_{s} )^{8/3}],\f$
35 * \f$A_4 = 5 \times 3058673/ [128 \times 1016064 (\pi f_s)^{4/3}],\f$
36 * \f$B_4 = 5429 \times 1016064 /(1008 \times 3058673),\f$ and \f$C_4 = 617 \times
37 * 1016064/(144 \times 3058673).\f$
38 * This function returns the LHS of the above
39 * equation in \c x for a given \c eta.
40 *
41 * ### Algorithm ###
42 *
43 * None.
44 *
45 * ### Uses ###
46 *
47 * None.
48 *
49 * ### Notes ###
50 *
51 * The <tt>void pointer</tt> <tt>*p</tt> should point to a \c struct
52 * of type \c EtaTau04In
53 * \code
54 * {
55 * void *p;
56 * EtaTau04In q;
57 * ...
58 * p = (void *) &q;
59 * }
60 * \endcode
61 */
62
63#include <math.h>
64#include <lal/LALInspiral.h>
65
66void
69 REAL8 *x,
70 REAL8 eta,
71 void *p
72 )
73{
74 XLAL_PRINT_DEPRECATION_WARNING("XLALEtaTau04");
75
78 ASSERT (x, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
79
80 *x = XLALEtaTau04(eta, p);
83
86}
87
90 REAL8 eta,
91 void *p
92 )
93{
94 REAL8 x;
96
97 if (p == NULL)
99 if (eta <= 0)
101
102 q = (EtaTau04In *) p;
103 x = -q->t4 + q->A4/pow(eta,0.8) * (1. + q->B4*eta + q->C4*eta*eta);
104
105 return x;
106}
void LALEtaTau04(LALStatus *status, REAL8 *x, REAL8 eta, void *p)
Definition: LALEtaTau04.c:67
REAL8 XLALEtaTau04(REAL8 eta, void *p)
Definition: LALEtaTau04.c:89
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define ABORTXLAL(sp)
double REAL8
#define LALINSPIRALH_ENULL
Arguments contained an unexpected null pointer.
Definition: LALInspiral.h:56
static const INT4 q
#define XLAL_ERROR_REAL8(...)
#define XLAL_PRINT_DEPRECATION_WARNING(replacement)
#define XLAL_IS_REAL8_FAIL_NAN(val)
XLAL_EFAULT
XLAL_EDOM
p
x