00001 /* 00002 * Copyright (C) 2007 Duncan Brown, Jolien Creighton, B.S. Sathyaprakash 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 /* <lalVerbatim file="LALEtaTau02CV"> 00021 Author: Sathyaprakash, B. S. 00022 $Id: LALEtaTau02.c,v 1.10 2007/06/08 14:41:49 bema Exp $ 00023 </lalVerbatim> */ 00024 00025 /* <lalLaTeX> 00026 00027 \subsection{Module \texttt{LALEtaTau02.c}} 00028 Given $\tau_0$ and $\tau_2$ compute the mass ratio $\eta.$ 00029 \subsubsection*{Prototypes} 00030 \vspace{0.1in} 00031 \input{LALEtaTau02CP} 00032 \idx{LALEtaTau02()} 00033 00034 \subsubsection*{Description} 00035 Given $\tau_0$ and $\tau_2$ one can determine $\eta$ by solving 00036 \begin{equation} 00037 -\eta^{2/5} \tau_2 + A_2 \left ( \frac {\tau_0}{A_0} \right )^{3/5} 00038 \left (1 + B_2\eta \right ) = 0, 00039 \end{equation} 00040 where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ $A_2 = 3715 / [64512 (\pi f_s)^2],$ 00041 $B_2 = 4620/3715.$ 00042 This function returns the LHS of the above 00043 equation in \texttt{x} for a given \texttt{eta}. 00044 00045 \subsubsection*{Algorithm} 00046 None. 00047 00048 \subsubsection*{Uses} 00049 None. 00050 00051 \subsubsection*{Notes} 00052 The {\tt void pointer} {\tt *p} should point to a {\tt struct} 00053 of type {\tt EtaTau02In:}\\[10pt] 00054 {\tt 00055 void *p;\\ 00056 EtaTau02In q;\\[5pt] 00057 00058 $\ldots$\\ 00059 p = (void *) \&q;\\ 00060 } 00061 00062 </lalLaTeX> */ 00063 00064 00065 #include <lal/LALInspiral.h> 00066 00067 NRCSID (LALETATAU02C, "$Id: LALEtaTau02.c,v 1.10 2007/06/08 14:41:49 bema Exp $"); 00068 /* <lalVerbatim file="LALEtaTau02CP"> */ 00069 void 00070 LALEtaTau02( 00071 LALStatus *status, 00072 REAL8 *x, 00073 REAL8 eta, 00074 void *p 00075 ) 00076 { /* </lalVerbatim> */ 00077 EtaTau02In *q; 00078 00079 INITSTATUS(status, "LALEtaTau02", LALETATAU02C); 00080 ATTATCHSTATUSPTR(status); 00081 ASSERT (p, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL); 00082 ASSERT(eta > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE); 00083 00084 q = (EtaTau02In *) p; 00085 *x = -q->t2 + q->A2/pow(eta,0.4) * (1. + q->B2*eta); 00086 DETATCHSTATUSPTR(status); 00087 RETURN(status); 00088 }
1.5.2