NRWaveInject.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006 S.Fairhurst, B. Krishnan, L.Santamaria
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 
00021 /** \defgroup NRWaveInject
00022  * \ingroup inject 
00023  * \author S.Fairhurst, B. Krishnan, L.Santamaria
00024  * 
00025  * \brief Module for generating h(t) from Numrel waveforms
00026  *
00027 
00028  *
00029  */
00030  
00031 /** \file NRWaveInject.h
00032  *  \ingroup NRWaveInject  
00033  * \date $Date: 2008/08/18 01:52:30 $
00034  *
00035  * 
00036  */
00037 
00038 #ifndef _NRWAVEINJECT_H
00039 #define _NRWAVEINJECT_H
00040 
00041 /* includes */
00042 #include <stdlib.h>
00043 #include <math.h>
00044 #include <stdio.h>
00045 #include <stdlib.h>
00046 #include <string.h>
00047 #include <lal/LALStdlib.h>
00048 #include <lal/LALConstants.h>
00049 #include <lal/AVFactories.h>
00050 #include <lal/SeqFactories.h>
00051 #include <lal/LIGOMetadataTables.h>
00052 #include <lal/NRWaveIO.h>
00053 #include <lal/TimeDelay.h>
00054 #include <lal/DetResponse.h>
00055 
00056 #ifdef  __cplusplus   /* C++ protection. */
00057 extern "C" {
00058 #endif
00059 
00060 NRCSID( NRWAVEINJECTH, "$Id: NRWaveInject.h,v 1.31 2008/08/18 01:52:30 badri Exp $");
00061 
00062 
00063 #define NRWAVEINJECT_ENULL        1
00064 #define NRWAVEINJECT_EFILE        2
00065 #define NRWAVEINJECT_ENONULL  3
00066 #define NRWAVEINJECT_ENOMEM   4
00067 #define NRWAVEINJECT_EVAL         5
00068 #define NRWAVEINJECT_EFORMAT  6
00069 
00070 #define NRWAVEINJECT_MSGENULL   "Null pointer"
00071 #define NRWAVEINJECT_MSGEFILE   "Error in file-IO"
00072 #define NRWAVEINJECT_MSGENONULL "Not a Null pointer"
00073 #define NRWAVEINJECT_MSGENOMEM  "Memory ellocation error"
00074 #define NRWAVEINJECT_MSGEVAL    "Invalid value"
00075 #define NRWAVEINJECT_MSGEFORMAT "Meta data file format incorrect"
00076 
00077 
00078 #define NINJA_MIN_MODE 2
00079 #define NINJA_MAX_MODE 5
00080 
00081 /* enum for list of numrel groups */
00082 typedef enum{
00083   NINJA_GROUP_AEI = 0,
00084   NINJA_GROUP_CIT,  
00085   NINJA_GROUP_LSU,
00086   NINJA_GROUP_JENA,
00087   NINJA_GROUP_RIT,
00088   NINJA_GROUP_CORNELL,
00089   NINJA_GROUP_PSU,
00090   NINJA_GROUP_FAU,
00091   NINJA_GROUP_UTB,  
00092   NINJA_GROUP_UIUC,
00093   NINJA_GROUP_PRINCETON,
00094   NINJA_GROUP_LAST
00095 } NumRelGroup;
00096 
00097 
00098 REAL4TimeVectorSeries *
00099 XLALSumStrain( 
00100     REAL4TimeVectorSeries *tempstrain,  
00101     REAL4TimeVectorSeries *strain);
00102 
00103 REAL8TimeVectorSeries *
00104 XLALSumStrainREAL8( 
00105     REAL8TimeVectorSeries *tempstrain,
00106     REAL8TimeVectorSeries *strain);
00107 
00108 /* REAL4TimeVectorSeries * */
00109 INT4
00110 XLALOrientNRWave( 
00111     REAL4TimeVectorSeries *strain,
00112     UINT4                  modeL,
00113     INT4                   modeM,
00114     REAL4                  inclination,
00115     REAL4                  coa_phase);
00116 
00117 REAL8TimeVectorSeries *
00118 XLALOrientNRWaveREAL8( 
00119     REAL8TimeVectorSeries *strain,     
00120     UINT4                  modeL,      
00121     INT4                   modeM,      
00122     REAL4                  inclination,
00123     REAL4                  coa_phase);
00124 
00125 REAL4TimeSeries *
00126 XLALCalculateNRStrain( 
00127     REAL4TimeVectorSeries *strain, 
00128     SimInspiralTable      *thisInj,
00129     CHAR                  *ifo,
00130     INT4                   sampleRate);
00131 
00132 REAL4TimeSeries *
00133 XLALInterpolateNRWave( REAL4TimeSeries *in,
00134                        INT4      sampleRate);
00135 
00136 INT4 
00137 XLALFindNRFile( NRWaveMetaData *out,
00138                 NRWaveCatalog *nrCatalog,
00139                 const SimInspiralTable  *inj,
00140                 INT4  modeL, 
00141                 INT4  modeM);
00142 
00143 REAL4TimeVectorSeries *
00144 XLALSumStrain( 
00145     REAL4TimeVectorSeries *tempstrain,     /**< storing variable */ 
00146     REAL4TimeVectorSeries *strain          /**< variable to add  */);
00147 
00148 void LALInjectStrainGW( LALStatus *status, 
00149                         REAL4TimeSeries *injData, 
00150                         REAL4TimeVectorSeries *strain, 
00151                         SimInspiralTable *thisInj, 
00152                         CHAR *ifo, 
00153                         REAL8 dynRange);
00154 
00155 void LALInjectStrainGWREAL8( LALStatus                 *status,
00156                              REAL8TimeSeries           *injData,
00157                              REAL8TimeVectorSeries     *strain,
00158                              SimInspiralTable          *thisInj,
00159                              CHAR                      *ifo,
00160                              REAL8                     dynRange);
00161 
00162 
00163 INT4
00164 XLALFindNRCoalescenceTime(REAL8 *tc, 
00165                           const REAL4TimeVectorSeries *in);
00166 
00167 INT4
00168 XLALFindNRCoalescenceTimeFromhoft(REAL8 *tc, 
00169                                   const REAL4TimeSeries *in);
00170 
00171 
00172 /** Spin weighted Spherical Harmonic  */
00173 INT4 
00174 XLALSphHarm ( COMPLEX16 *out, /**< [out] the value of Y2_lm(theta,phi) */
00175               UINT4   L,  /**< the aziuhtal quantum number */
00176               INT4    M,  /**< the M value */
00177               REAL4   theta, /**< position - azimuthal angle */
00178               REAL4   phi ); /**< position - polar angle */
00179   
00180 /** channel name for nr data in frame file */
00181 CHAR* XLALGetNinjaChannelName(CHAR *polarisation, /**< either plus or cross */
00182                               UINT4 l, /**< azimuthal mode index */
00183                               INT4 m );/**< polar mode index */
00184 
00185 NumRelGroup XLALParseNumRelGroupName( CHAR *name);
00186 
00187 #ifdef  __cplusplus
00188 }                /* Close C++ protection */
00189 #endif
00190 
00191 #endif           /* Close double-include protection _NRWAVEINJECT_H */
00192 

Generated on Mon Oct 13 02:32:00 2008 for LAL by  doxygen 1.5.2