LALInspiralLongestTemplateInBank.c

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 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="LALInspiralLongestTemplateInBankCV">
00021 Author: Sathyaprakash, B.S.
00022 </lalVerbatim>  */
00023 
00024 /*  <lalLaTeX>
00025 
00026 \subsection{Module \texttt{LALInspiralLongestTemplateInBank.c}}
00027 To find the longest template in a template bank.
00028 
00029 \subsubsection*{Prototypes}
00030 \vspace{0.1in}
00031 \input{LALInspiralLongestTemplateInBankCP}
00032 \idx{LALInspiralLongestTemplateInBank()}
00033 
00034 \subsubsection*{Description}
00035 Given the parameters of a template bank find the longest template
00036 in the bank. This is done by looking at the duration for which
00037 a signal corresponding to smallest masses lasts. One simply calls
00038 the {\tt LALInspiralWaveLength} code for a system consisting
00039 of two stars each of mass {\tt mMin.}
00040 
00041 \subsubsection*{Algorithm}
00042 
00043 \subsubsection*{Uses}
00044 \begin{verbatim}
00045 LALInspiralParameterCalc 
00046 LALInspiralWaveLength 
00047 \end{verbatim}
00048 
00049 \subsubsection*{Notes}
00050 
00051 \vfill{\footnotesize\input{LALInspiralLongestTemplateInBankCV}}
00052 
00053 </lalLaTeX>  */
00054 
00055 #include <lal/LALInspiralBank.h>
00056  
00057 NRCSID (INSPIRALSEARCHC, "$Id: LALInspiralLongestTemplateInBank.c,v 1.2 2007/06/08 14:41:42 bema Exp $");
00058 
00059 /*  <lalVerbatim file="LALInspiralLongestTemplateInBankCP"> */
00060 void
00061 LALInspiralLongestTemplateInBank
00062    (
00063    LALStatus            *status, 
00064    UINT4                *templateLength,
00065    InspiralCoarseBankIn *coarseIn
00066    )
00067 {  /*  </lalVerbatim>  */
00068 
00069    InspiralTemplate param;
00070    INITSTATUS (status, "LALInspiralLongestTemplateInBank", INSPIRALSEARCHC);
00071    ATTATCHSTATUSPTR(status);
00072    ASSERT (coarseIn,  status, LALINSPIRALBANKH_ENULL, LALINSPIRALBANKH_MSGENULL);
00073    param.startTime = 0.0;
00074    param.startPhase = 0.0;
00075    param.nStartPad = 0;
00076    param.nEndPad = 0;
00077    param.ieta = 1;
00078    param.Theta = 0.;
00079    param.OmegaS = 0.;
00080    param.mass1 = coarseIn->mMin;
00081    param.mass2 = coarseIn->mMin;
00082    param.fLower = coarseIn->fLower;
00083    param.fCutoff = coarseIn->fUpper;
00084    param.tSampling = coarseIn->tSampling;
00085    param.signalAmplitude = 1.;
00086    param.order = coarseIn->order;
00087    param.approximant = coarseIn->approximant;
00088    param.massChoice = m1Andm2;
00089    LALInspiralParameterCalc (status->statusPtr, &param);
00090    CHECKSTATUSPTR(status);
00091    *templateLength = 0;
00092    LALInspiralWaveLength (status->statusPtr, templateLength, param);
00093    CHECKSTATUSPTR(status);
00094    DETATCHSTATUSPTR(status);
00095    RETURN(status);
00096 }
00097 

Generated on Tue Oct 7 02:40:01 2008 for LAL by  doxygen 1.5.2