LALInspiralTiming2.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 David Churches, 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="LALInspiralTiming2CV">
00021 Author: Sathyaprakash, B. S.
00022 $Id: LALInspiralTiming2.c,v 1.5 2007/08/20 11:51:40 thomas Exp $
00023 </lalVerbatim>  */
00024 
00025 /*  <lalLaTeX>
00026 
00027 \subsection{Module \texttt{LALInspiralTiming2.c}}
00028 
00029 Module used in solving the timing and phasing functions in quadrature for the
00030 {\tt Approximant TaylorT2}.
00031 
00032 \subsubsection*{Prototypes}
00033 \vspace{0.1in}
00034 \input{LALInspiralTiming2CP}
00035 \index{\verb&LALInspiralTiming2()&}
00036 
00037 \subsubsection*{Description}
00038 
00039 Given $t$ and $v$ this module computes the quantity
00040 \begin{equation}
00041 {\tt tofv} = t - t_C - t_N(v) \sum t_k v^k,
00042 \end{equation}
00043 where the coefficients $t_k$ and the Newtonian value $t_N$ are all defined
00044 in Table~\ref{table:flux}.
00045 
00046 \subsubsection*{Algorithm}
00047 None
00048 
00049 
00050 \subsubsection*{Uses}
00051 None
00052 
00053 \subsubsection*{Notes}
00054 None
00055 
00056 
00057 \vfill{\footnotesize\input{LALInspiralTiming2CV}}
00058 
00059 </lalLaTeX>  */
00060 
00061 #include <lal/LALStdlib.h>
00062 #include <lal/LALInspiral.h>
00063 
00064 NRCSID (LALINSPIRALTIMING2C, "$Id: LALInspiralTiming2.c,v 1.5 2007/08/20 11:51:40 thomas Exp $");
00065 
00066 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00067 void 
00068 LALInspiralTiming2_0PN (
00069    LALStatus *status,
00070    REAL8     *toff,
00071    REAL8      f,
00072    void      *params
00073    ) 
00074 { /* </lalVerbatim>  */
00075 
00076   InspiralToffInput *toffIn;
00077   REAL8 v, v8;
00078 
00079   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00080   ATTATCHSTATUSPTR(status);
00081 
00082   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00083   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00084   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00085 
00086   toffIn = (InspiralToffInput *) params;
00087 
00088   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00089 
00090 
00091   v = pow(toffIn->piM * f,oneby3);
00092   v8 = pow(v,8.);
00093 
00094   *toff = - toffIn->t + toffIn->tc
00095         + toffIn->tN / v8;
00096 
00097   DETATCHSTATUSPTR(status);
00098   RETURN(status);
00099 }
00100 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00101 void 
00102 LALInspiralTiming2_2PN (
00103    LALStatus *status,
00104    REAL8     *toff,
00105    REAL8      f,
00106    void      *params
00107    ) 
00108 { /* </lalVerbatim>  */
00109 
00110   InspiralToffInput *toffIn;
00111   REAL8 v, v2, v8;
00112 
00113   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00114   ATTATCHSTATUSPTR(status);
00115 
00116   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00117   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00118   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00119 
00120   toffIn = (InspiralToffInput *) params;
00121 
00122   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00123 
00124 
00125   v = pow(toffIn->piM * f,oneby3);
00126   v2 = v*v;
00127   v8 = v2*v2*v2*v2;
00128 
00129   *toff = - toffIn->t + toffIn->tc
00130         + toffIn->tN / v8 * (1. 
00131         + toffIn->t2 * v2);
00132 
00133 
00134   DETATCHSTATUSPTR(status);
00135   RETURN(status);
00136 }
00137 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00138 void 
00139 LALInspiralTiming2_3PN (
00140    LALStatus *status,
00141    REAL8     *toff,
00142    REAL8      f,
00143    void      *params
00144    ) 
00145 { /* </lalVerbatim>  */
00146 
00147   InspiralToffInput *toffIn;
00148   REAL8 v, v2, v3, v8;
00149 
00150   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00151   ATTATCHSTATUSPTR(status);
00152 
00153   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00154   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00155   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00156 
00157   toffIn = (InspiralToffInput *) params;
00158 
00159   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00160 
00161 
00162   v = pow(toffIn->piM * f,oneby3);
00163   v2 = v*v;
00164   v3 = v2*v;
00165   v8 = v3*v3*v2;
00166 
00167   *toff = - toffIn->t + toffIn->tc
00168         + toffIn->tN / v8 * (1. 
00169         + toffIn->t2 * v2
00170         + toffIn->t3 * v3);
00171 
00172   DETATCHSTATUSPTR(status);
00173   RETURN(status);
00174 }
00175 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00176 void 
00177 LALInspiralTiming2_4PN (
00178    LALStatus *status,
00179    REAL8     *toff,
00180    REAL8      f,
00181    void      *params
00182    ) 
00183 { /* </lalVerbatim>  */
00184 
00185   InspiralToffInput *toffIn;
00186   REAL8 v, v2, v3, v4, v8;
00187 
00188   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00189   ATTATCHSTATUSPTR(status);
00190 
00191   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00192   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00193   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00194 
00195   toffIn = (InspiralToffInput *) params;
00196 
00197   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00198 
00199 
00200   v = pow(toffIn->piM * f,oneby3);
00201   v2 = v*v;
00202   v3 = v2*v;
00203   v4 = v3*v;
00204   v8 = v4*v4;
00205 
00206   *toff = - toffIn->t + toffIn->tc
00207         + toffIn->tN / v8 * (1. 
00208         + toffIn->t2 * v2
00209         + toffIn->t3 * v3
00210         + toffIn->t4 * v4);
00211 
00212   DETATCHSTATUSPTR(status);
00213   RETURN(status);
00214 }
00215 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00216 void 
00217 LALInspiralTiming2_5PN (
00218    LALStatus *status,
00219    REAL8     *toff,
00220    REAL8      f,
00221    void      *params
00222    ) 
00223 { /* </lalVerbatim>  */
00224 
00225   InspiralToffInput *toffIn;
00226   REAL8 v, v2, v3, v4, v5, v8;
00227 
00228   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00229   ATTATCHSTATUSPTR(status);
00230 
00231   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00232   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00233   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00234 
00235   toffIn = (InspiralToffInput *) params;
00236 
00237   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00238 
00239 
00240   v = pow(toffIn->piM * f,oneby3);
00241   v2 = v*v;
00242   v3 = v2*v;
00243   v4 = v3*v;
00244   v5 = v4*v;
00245   v8 = v4*v4;
00246 
00247   *toff = - toffIn->t + toffIn->tc
00248         + toffIn->tN / v8 * (1. 
00249         + toffIn->t2 * v2
00250         + toffIn->t3 * v3
00251         + toffIn->t4 * v4
00252         + toffIn->t5 * v5);
00253 
00254   DETATCHSTATUSPTR(status);
00255   RETURN(status);
00256 }
00257 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00258 void 
00259 LALInspiralTiming2_6PN (
00260    LALStatus *status,
00261    REAL8     *toff,
00262    REAL8      f,
00263    void      *params
00264    ) 
00265 { /* </lalVerbatim>  */
00266 
00267   InspiralToffInput *toffIn;
00268   REAL8 v, v2, v3, v4, v5, v6, v8;
00269 
00270   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00271   ATTATCHSTATUSPTR(status);
00272 
00273   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00274   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00275   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00276 
00277   toffIn = (InspiralToffInput *) params;
00278 
00279   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00280 
00281 
00282   v = pow(toffIn->piM * f,oneby3);
00283   v2 = v*v;
00284   v3 = v2*v;
00285   v4 = v3*v;
00286   v5 = v4*v;
00287   v6 = v5*v;
00288   v8 = v6*v2;
00289 
00290   *toff = - toffIn->t + toffIn->tc
00291         + toffIn->tN / v8 * (1. 
00292         + toffIn->t2 * v2
00293         + toffIn->t3 * v3
00294         + toffIn->t4 * v4
00295         + toffIn->t5 * v5
00296         + (toffIn->t6 + toffIn->tl6 * log(4*v)) * v6);
00297 
00298   DETATCHSTATUSPTR(status);
00299   RETURN(status);
00300 }
00301 /*  <lalVerbatim file="LALInspiralTiming2CP"> */   
00302 void 
00303 LALInspiralTiming2_7PN (
00304    LALStatus *status,
00305    REAL8     *toff,
00306    REAL8      f,
00307    void      *params
00308    ) 
00309 { /* </lalVerbatim>  */
00310 
00311   InspiralToffInput *toffIn;
00312   REAL8 v, v2, v3, v4, v5, v6, v7, v8;
00313 
00314   INITSTATUS (status, "LALInspiralTiming2", LALINSPIRALTIMING2C);
00315   ATTATCHSTATUSPTR(status);
00316 
00317   ASSERT(toff, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00318   ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL);
00319   ASSERT(f > 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00320 
00321   toffIn = (InspiralToffInput *) params;
00322 
00323   ASSERT(toffIn->t >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE);
00324 
00325 
00326   v = pow(toffIn->piM*f, oneby3);
00327   v2 = v*v;
00328   v3 = v2*v;
00329   v4 = v3*v;
00330   v5 = v4*v;
00331   v6 = v5*v;
00332   v7 = v6*v;
00333   v8 = v7*v;
00334 
00335   *toff = - toffIn->t + toffIn->tc
00336         + toffIn->tN / v8 * (1. 
00337         + toffIn->t2 * v2
00338         + toffIn->t3 * v3
00339         + toffIn->t4 * v4
00340         + toffIn->t5 * v5
00341         + (toffIn->t6 + toffIn->tl6 * log(4*v)) * v6
00342         + toffIn->t7 * v7);
00343 
00344   DETATCHSTATUSPTR(status);
00345   RETURN(status);
00346 }

Generated on Tue Oct 14 02:31:59 2008 for LAL by  doxygen 1.5.2