00001 /* 00002 * Copyright (C) 2007 Anand Sengupta, Thomas Cokelaer 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="LALInspiralAmplitudeCV"> 00021 Author: Cokelaer T. 00022 $Id: LALInspiralAmplitude.c,v 1.5 2007/06/08 14:41:49 bema Exp $ 00023 </lalVerbatim> */ 00024 00025 /* <lalLaTeX> 00026 00027 \subsection{Module \texttt{LALInspiralAmplitude.c}} 00028 Given an inspiral template structure containing the binary distance 00029 and a set of mass parameters, that module provides functions to compute 00030 the related amplitude. 00031 00032 \subsubsection*{Prototypes} 00033 \vspace{0.1in} 00034 \input{LALInspiralRestrictedAmplitudeCP} 00035 \idx{LALInspiralRestrictedAmplitude()} 00036 00037 \subsubsection*{Description} 00038 The inspiral template structure can stored (1) the distance of the binary (2) 00039 a set of binary masses such as the two masses or the total mass and eta and (3) 00040 an amplitude which is arbitrary fixed to unity when templates are computed. 00041 00042 \noindent However we might need to have a template with the physical amplitude (for instance 00043 to deal with injections). The function \texttt{LALInspiralRestrictedAmplitude} 00044 takes anInspiralTemplate structure as input/output to return the restricted 00045 Newtonian amplitude by using the following formula. 00046 00047 \begin{equation} 00048 A = \frac{4c}{d \eta} M^{-5./3.} 00049 \end{equation} 00050 00051 \noindent where $d$ is in Mpc and $M$ in solar mass. The result is stored in the signalAmplitude 00052 variable of the inspiral template structure. 00053 00054 00055 00056 \subsubsection*{Uses} 00057 When appropriate this function calls:\\ 00058 \texttt{LALInspiralParameterCalc} 00059 00060 \subsubsection*{Notes} 00061 00062 \vfill{\footnotesize\input{LALInspiralAmplitudeCV}} 00063 </lalLaTeX> */ 00064 00065 00066 00067 #include <lal/LALInspiral.h> 00068 00069 00070 NRCSID (LALINSPIRALAMPLITUDEC, "$Id: LALInspiralAmplitude.c,v 1.5 2007/06/08 14:41:49 bema Exp $"); 00071 00072 /* <lalVerbatim file="LALInspiralRestrictedAmplitudeCP"> */ 00073 void 00074 LALInspiralRestrictedAmplitude (LALStatus *status, 00075 InspiralTemplate *params ) 00076 { /* </lalVerbatim> */ 00077 00078 00079 INITSTATUS (status, "LALInspiralAmplitude", LALINSPIRALAMPLITUDEC ); 00080 ATTATCHSTATUSPTR(status); 00081 00082 ASSERT(params, status, LALINSPIRALH_ENULL, LALINSPIRALH_MSGENULL); 00083 ASSERT((INT4)params->massChoice >= 0, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE); 00084 ASSERT((INT4)params->massChoice <= 14, status, LALINSPIRALH_ESIZE, LALINSPIRALH_MSGESIZE); 00085 00086 if (params->massChoice != totalMassAndEta) 00087 { 00088 LALInspiralParameterCalc(status->statusPtr, params ); 00089 CHECKSTATUSPTR(status); 00090 } 00091 00092 00093 params->signalAmplitude = 4. * params->totalMass * params->eta / (LAL_PC_SI * 1e6 *params->distance / LAL_MRSUN_SI); 00094 00095 DETATCHSTATUSPTR(status); 00096 RETURN(status); 00097 } 00098
1.5.2