SimulateSB.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Jolien Creighton, Tania Regimbau, Teviet Creighton, John Whelan
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="SimulateSBHV">
00021 Author: Sukanta Bose
00022 $Id: SimulateSB.h,v 1.6 2007/06/08 14:41:47 bema Exp $ 
00023 *********************************************************** </lalVerbatim> */
00024 
00025 /********************************************************** <lalLaTeX>
00026 \section{Header \texttt{SimulateSB.h}}
00027 \label{inject:s:SimulateSB.h}
00028 
00029 Provides prototype and error code information for the modules needed
00030 to simulate a stochastic background signal (whitened, if desired) in a pair of 
00031 detectors, given the appropriate representations of the 
00032 detector transfer function in each detector. 
00033 
00034 \subsection*{Synopsis}
00035 \begin{verbatim}
00036 #include <lal/SimulateSB.h>
00037 \end{verbatim}
00038 
00039 \noindent 
00040 
00041 \subsection*{Error conditions}
00042 \input{SimulateSBHE}
00043 
00044 \subsection*{Structures}
00045 
00046 *********************************************************** </lalLaTeX> */
00047 
00048 #ifndef _SIMULATESB_H
00049 #define _SIMULATESB_H
00050 
00051 
00052 #include <lal/LALStdlib.h>
00053 #include <lal/DetectorSite.h>
00054 #include <lal/Units.h>
00055 #include <lal/RealFFT.h>
00056 
00057 #ifdef  __cplusplus
00058 extern "C" {
00059 #endif
00060 
00061   NRCSID( SIMULATESBH, "$Id: SimulateSB.h,v 1.6 2007/06/08 14:41:47 bema Exp $" );
00062   
00063 /***************** <lalErrTable file="SimulateSBHE"> */
00064 
00065 #define SIMULATESBH_ENULLP          1
00066 #define SIMULATESBH_ENONPOSLEN      2
00067 #define SIMULATESBH_ENONPOSDELTAF   3
00068 #define SIMULATESBH_ENONPOSDELTAT   4
00069 #define SIMULATESBH_ENEGFMIN        5
00070 #define SIMULATESBH_EMMTIME         6
00071 #define SIMULATESBH_EMMHETERO       7
00072 #define SIMULATESBH_EMMFMIN         8
00073 #define SIMULATESBH_EMMDELTAF       9
00074 #define SIMULATESBH_EMMLEN         10
00075 #define SIMULATESBH_EOORFREF       11
00076 #define SIMULATESBH_ENONPOSOMEGA   12
00077 #define SIMULATESBH_EALOC          13
00078 #define SIMULATESBH_ENONZEROHETERO 14
00079 #define SIMULATESBH_EWRONGUNITS    15
00080 #define SIMULATESBH_ECOMPTIME      16
00081 #define SIMULATESBH_ENOTYETHETERO 255
00082 
00083 #define SIMULATESBH_MSGENULLP         "Null pointer"
00084 #define SIMULATESBH_MSGENONPOSLEN     "Negative or zero length for data member of time series" 
00085 #define SIMULATESBH_MSGENONPOSDELTAF  "Negative or zero frequency spacing" 
00086 #define SIMULATESBH_MSGENONPOSDELTAT  "Negative or zero time spacing" 
00087 #define SIMULATESBH_MSGENEGFMIN       "Negative start frequency" 
00088 #define SIMULATESBH_MSGEMMTIME        "Mismatch in epochs"
00089 #define SIMULATESBH_MSGEMMHETERO      "Mismatch in heterodyning frequencies"
00090 #define SIMULATESBH_MSGEMMFMIN        "Mismatch in start frequencies"
00091 #define SIMULATESBH_MSGEMMDELTAF      "Mismatch in frequency spacings"
00092 #define SIMULATESBH_MSGEMMLEN         "Mismatch in sequence lengths"
00093 #define SIMULATESBH_MSGEOORFREF       "Out of range reference frequency"
00094 #define SIMULATESBH_MSGENONPOSOMEGA   "Negative stochastic background strength"
00095 #define SIMULATESBH_MSGEALOC         "Memory allocation error"
00096 #define SIMULATESBH_MSGENONZEROHETERO "Non-zero heterodyning frequency specified for real time series"
00097 #define SIMULATESBH_MSGEWRONGUNITS    "Inconsistent input units"
00098 #define SIMULATESBH_MSGECOMPTIME      "Time domain data complex instead of real"
00099 #define SIMULATESBH_MSGENOTYETHETERO  "Non-zero heterodyning frequency not yet implemented"
00100 
00101 /************************************ </lalErrTable> */
00102 
00103   /*************************************************************
00104    *                                                           *
00105    *       Structures and prototypes associated with           *
00106    *             SimulateSB.c                  *
00107    *                                                           *
00108    *************************************************************/
00109 
00110 /********************************************************** <lalLaTeX>
00111 
00112 \subsubsection*{Structures associated with 
00113   \texttt{SimulateSB.c}
00114   (Sec.~\ref{inject:ss:SimulateSB.c})}
00115 
00116 \subsubsection*{\texttt{struct SSSimStochBGOutput}}
00117 \idx[Type]{SSSimStochBGOutput}
00118 
00119 \noindent Contains the output data produced by 
00120 \texttt{LALSSSimStochBGTimeSeries()}. It comprises of a pair of 
00121 (real) time-series simulated stochastic background signal in the outputs of 
00122 a given pair of detectors. The fields are:
00123 
00124 \begin{description}
00125 \item[\texttt{REAL4TimeSeries *SSimStochBG1}]
00126 Simulated stochastic background signal in the output of 
00127 the first detector.
00128 \item[\texttt{REAL4TimeSeries *SSimStochBG2}]
00129 Simulated stochastic background signal in the output of 
00130 the second detector.
00131 \end{description}
00132 
00133 *********************************************************** </lalLaTeX> */
00134 
00135   typedef struct tagSSSimStochBGOutput {
00136     REAL4TimeSeries    *SSimStochBG1;
00137     REAL4TimeSeries    *SSimStochBG2;
00138   } SSSimStochBGOutput;
00139   
00140 /*********************************************************** <lalLaTeX> 
00141                                                                
00142 \subsubsection*{\texttt{struct SSSimStochBGInput}}
00143 \idx[Type]{SSSimStochBGInput}
00144                                                                
00145 \noindent Contains the input data needed by 
00146 \texttt{LALSSSimStochBGTimeSeries()}
00147 to calculate the whitened stochastic background signal in the output of 
00148 a detector.
00149 The fields are:
00150 
00151 \begin{description}
00152 \item[\texttt{REAL4FrequencySeries *omegaGW}] The spectrum 
00153 $\Omega_{\scriptstyle{\rm GW}}(f)$ of the stochastic gravitational-wave
00154 background.
00155 \item[\texttt{COMPLEX8FrequencySeries *whiteningFilter1}]
00156 The frequency-domain response function $\tilde{R}_1(f)$ for the first detector.
00157 \item[\texttt{COMPLEX8FrequencySeries *whiteningFilter2}]
00158 The frequency-domain response function $\tilde{R}_2(f)$ for the second detector.
00159 \end{description}
00160 
00161 *********************************************************** </lalLaTeX> */
00162 
00163   typedef struct tagSSSimStochBGInput {
00164     REAL4FrequencySeries     *omegaGW;
00165     COMPLEX8FrequencySeries  *whiteningFilter1;
00166     COMPLEX8FrequencySeries  *whiteningFilter2;
00167   } SSSimStochBGInput;
00168 
00169   typedef struct tagSSSimStochBGStrainInput {
00170     REAL4FrequencySeries     *omegaGW;
00171   } SSSimStochBGStrainInput;
00172   
00173   
00174 /*********************************************************** <lalLaTeX> 
00175 
00176 
00177 \subsubsection*{\texttt{struct SSSimStochBGParams}}
00178 \idx[Type]{SSSimStochBGParams}
00179 
00180 \noindent Contains the parameters used by \texttt{LALSSSimStochBGTimeSeries()} 
00181 to compute the whitened stochastic background signal in the output of an 
00182 interferometric detector. The fields are:
00183 
00184 \begin{description}
00185 \item[\texttt{UINT4 length}]
00186 The number of points in the output time series.
00187 
00188 \item[\texttt{REAL8 deltaT}]
00189 The temporal spacing of the output time series.
00190 
00191 \item[\texttt{INT4 seed}]
00192 The random number seed for the stochastic simulation.
00193 
00194 \item[\texttt{LALDetector *detector1}]
00195 The site location and orientation information of first detector involved in 
00196 the stochastic background search.
00197 
00198 \item[\texttt{LALDetector *detector2}]
00199 The site location and orientation information of second detector involved in 
00200 the stochastic background search.
00201 
00202 \item[\texttt{LALUnit SSimStochBGTimeSeries1Unit}]
00203 The unit field of the stochastic background, expressed as a Real4 
00204 time series, in detector 1.
00205 
00206 \item[\texttt{LALUnit SSimStochBGTimeSeries2Unit}]
00207 The unit field of the stochastic background, expressed as a Real4 
00208 time series, in detector 2.
00209 
00210 \end{description}
00211 *********************************************************** </lalLaTeX> */
00212 
00213   typedef struct tagSSSimStochBGParams {
00214     UINT4        length;   /* time length of output vector data samples */
00215     REAL8        deltaT;   /* time spacing */
00216     INT4         seed;     /* for random numbers x, y */
00217     LALDetector  detectorOne; 
00218     LALDetector  detectorTwo;
00219     LALUnit      SSimStochBGTimeSeries1Unit;    
00220     LALUnit      SSimStochBGTimeSeries2Unit;
00221   } SSSimStochBGParams;
00222 
00223   typedef struct tagSSSimStochBGStrainParams {
00224     UINT4        length1,length2;   /* time length of output vector data samples */
00225     REAL8        deltaT1, deltaT2;   /* time spacing */
00226     INT4         seed;     /* for random numbers x, y */
00227     LALDetector  detectorOne; 
00228     LALDetector  detectorTwo;
00229     LALUnit      SSimStochBGTimeSeries1Unit;    
00230     LALUnit      SSimStochBGTimeSeries2Unit;
00231   } SSSimStochBGStrainParams;
00232 
00233 
00234   void
00235   LALSSSimStochBGTimeSeries( LALStatus                  *status,
00236                              SSSimStochBGOutput           *output, 
00237                              SSSimStochBGInput            *input,
00238                              SSSimStochBGParams           *params );
00239 
00240   void
00241   LALSSSimStochBGStrainTimeSeries( LALStatus                  *status,
00242                              SSSimStochBGOutput           *output, 
00243                              SSSimStochBGStrainInput            *input,
00244                              SSSimStochBGStrainParams           *params );
00245   
00246 #ifdef  __cplusplus
00247 }
00248 #endif
00249 
00250 #endif /* _SIMULATESB_H */
00251   
00252 /********************************************************** <lalLaTeX>
00253                                                               
00254 \vfill{\footnotesize\input{SimulateSBHV}}
00255                                                               
00256 \newpage\input{SimulateSBC}
00257 %\newpage\input{SimulateSBTestC}
00258 *********************************************************** </lalLaTeX> */

Generated on Sun Sep 7 03:07:14 2008 for LAL by  doxygen 1.5.2