LALInspiralSetParams.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 David Churches, Duncan Brown, Jolien Creighton, 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="LALInspiralSetParamsCV">
00021 Author: Churches, D. K and Sathyaprakash, B.S.
00022 $Id: LALInspiralSetParams.c,v 1.15 2007/06/08 14:41:42 bema Exp $
00023 </lalVerbatim>  */
00024 
00025 /*  <lalLaTeX>
00026 
00027 \subsection{Module \texttt{LALInspiralSetParams.c}}
00028 
00029 A routine that fills an \texttt{InspiralTemplate} structure
00030 based on the values in the \texttt{InspiralCoarseBankIn} structure.
00031 
00032 \subsubsection*{Prototypes}
00033 \vspace{0.1in}
00034 \input{LALInspiralSetParamsCP}
00035 \idx{LALInspiralSetParams()}
00036 \begin{itemize}
00037    \item \texttt{tempPars,} Output
00038    \item \texttt{coarseIn,} Input
00039 \end{itemize}
00040 
00041 \subsubsection*{Description}
00042 
00043 This function takes as an input a structure of type 
00044 \texttt{InspiralCoarseBankIn} and it fills up the
00045 elements of a structure of type \texttt{InspiralTemplate}.
00046 The function sets the fields 
00047 \texttt{massChoice}, \texttt{ieta}, \texttt{signalAmplitude},
00048 \texttt{tSampling}, \texttt{fLower}, \texttt{fCutoff}, 
00049 \texttt{order},
00050 \texttt{approximant}, \texttt{nStartPad}, \texttt{nEndPad}.
00051 
00052 \subsubsection*{Algorithm}
00053 
00054 
00055 \subsubsection*{Uses}
00056 \begin{verbatim}
00057 None
00058 \end{verbatim}
00059 
00060 \subsubsection*{Notes}
00061 
00062 \vfill{\footnotesize\input{LALInspiralSetParamsCV}}
00063 
00064 </lalLaTeX>  */
00065 
00066 #include <stdio.h>
00067 #include <lal/LALInspiralBank.h>
00068 
00069 NRCSID (LALINSPIRALSETPARAMSC, "Id: $");
00070 
00071 /*  <lalVerbatim file="LALInspiralSetParamsCP"> */
00072 
00073 void LALInspiralSetParams(LALStatus            *status, 
00074                           InspiralTemplate     *tempPars, 
00075                           InspiralCoarseBankIn coarseIn) 
00076 {  /*  </lalVerbatim>  */
00077 
00078    INITSTATUS (status, "LALInspiralSetParams", LALINSPIRALSETPARAMSC);
00079    ATTATCHSTATUSPTR(status);
00080    ASSERT (tempPars,  status, LALINSPIRALBANKH_ENULL, LALINSPIRALBANKH_MSGENULL);
00081    ASSERT ((INT4)coarseIn.space >= 0, status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
00082    ASSERT ((INT4)coarseIn.space <= 1, status, LALINSPIRALBANKH_ESIZE, LALINSPIRALBANKH_MSGESIZE);
00083 
00084    switch (coarseIn.space) {
00085       case Tau0Tau2:
00086          tempPars->massChoice = t02;
00087          break;
00088       case Tau0Tau3:
00089          tempPars->massChoice = t03;
00090          break;
00091       default: /* JC: DEFAULT CASE ADDED HERE */
00092          ABORT( status, 9999, "Default case in switch." );
00093    }
00094 
00095    tempPars->ieta = 1;
00096    tempPars->signalAmplitude = 1.;
00097    tempPars->tSampling = coarseIn.tSampling;
00098    tempPars->fLower = coarseIn.fLower;
00099    tempPars->fCutoff = coarseIn.fUpper;
00100    tempPars->order = coarseIn.order;
00101    tempPars->approximant = coarseIn.approximant;
00102    tempPars->nStartPad = 0;
00103    tempPars->nEndPad = 0;
00104    tempPars->Theta = 0.;
00105    tempPars->OmegaS = 0.;
00106    tempPars->startTime = 0.;
00107    tempPars->startPhase = 0.;
00108    tempPars->spin1[0] = tempPars->spin1[1] = tempPars->spin1[2] = 0.;
00109    tempPars->spin2[0] = tempPars->spin2[1] = tempPars->spin2[2] = 0.;
00110    tempPars->inclination = 0.;
00111    tempPars->eccentricity = 0.;
00112 
00113    DETATCHSTATUSPTR(status);
00114    RETURN(status);
00115 }

Generated on Thu Aug 28 03:12:29 2008 for LAL by  doxygen 1.5.2