00001 /* 00002 * Copyright (C) 2007 Jolien Creighton, Maria Alessandra Papa, Steve Berukoff 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="LALComputeAMHV"> 00021 Author: Berukoff, S.J. 00022 $Id: LALComputeAM.h,v 1.8 2007/12/19 19:44:29 reinhard Exp $ 00023 *** </lalVerbatim> */ 00024 00025 /* <lalLaTeX> 00026 \section{Header \texttt{LALComputeAM.h}} 00027 \label{s:LALComputeAM.h} 00028 Computes filter components for amplitude demodulation. 00029 00030 \subsection*{Synposis} 00031 \begin{verbatim} 00032 #include <lal/LALComputeAM.h> 00033 \end{verbatim} 00034 00035 \noindent In order to compute the optimal statistic for pulsar searches, one must take account of the various modulations that change the emitted, (fairly) simple sinusoid into a non-trivial function of parameters. The frequency evolution of the signal (spindown effects, Doppler modulation, etc.) have already been accounted for; this routine filters the amplitude modulation effects. 00036 00037 </lalLaTeX> */ 00038 00039 00040 #ifndef _LALCOMPUTEAM_H 00041 #define _LALCOMPUTEAM_H 00042 00043 #include <math.h> 00044 #include <lal/DetResponse.h> 00045 #include <lal/DetectorSite.h> 00046 #include "LALBarycenter.h" 00047 00048 #ifdef __cplusplus 00049 extern "C" { 00050 #endif 00051 00052 NRCSID (LALCOMPUTEAMH, "$Id: LALComputeAM.h"); 00053 00054 /* Author-defined error codes */ 00055 /* <lalLaTeX> 00056 \subsection*{Error conditions} 00057 \vspace{0.1in} 00058 \input{LALComputeAMHErrorTable} 00059 </lalLaTeX> */ 00060 00061 /* <lalErrTable file="LALComputeAMHErrorTable"> */ 00062 #define LALCOMPUTEAMH_ENOTS 1 00063 #define LALCOMPUTEAMH_EBCERR 2 00064 #define LALCOMPUTEAMH_EESERR 3 00065 #define LALCOMPUTEAMH_EEPH 4 00066 #define LALCOMPUTEAMH_EDAS 5 00067 #define LALCOMPUTEAMH_EFRD 6 00068 00069 #define LALCOMPUTEAMH_MSGENOTS "Input LIGOTimeGPS Vector is wrong size or NULL" 00070 #define LALCOMPUTEAMH_MSGEBCERR "Baryinput pointer is invalid" 00071 #define LALCOMPUTEAMH_MSGEESERR "EarthState structure invalid, or pointer NULL" 00072 #define LALCOMPUTEAMH_MSGEEPH "Ephemeris Table invalid, or pointer NULL" 00073 #define LALCOMPUTEAMH_MSGEDAS "Detector and source information invalid, or pointer NULL" 00074 #define LALCOMPUTEAMH_MSGEFRD "Detector geometry information invalid, or pointer NULL" 00075 /* </lalErrTable> */ 00076 00077 /* <lalLaTeX> 00078 \subsection*{Structures} 00079 00080 \begin{verbatim} 00081 struct AMCoeffs 00082 \end{verbatim} 00083 \index{\texttt{AMCoeffs}} 00084 00085 \noindent This structure contains the output of the routine: $a(t)$, $b(t)$, and the scalar products therein. That is: 00086 00087 \begin{description} 00088 \item[\texttt{REAL4Vector *a}] The function $a(t)$ 00089 \item[\texttt{REAL4Vector *b}] The function $b(t)$ 00090 \item[\texttt{REAL4 A}] The scalar product $(a||a)$ 00091 \item[\texttt{REAL4 B}] The scalar product $(b||b)$ 00092 \item[\texttt{REAL4 C}] The scalar product $(a||b)$ 00093 \item[\texttt{REAL4 D}] The quantity $AB-C^{2}$ 00094 \end{description} 00095 00096 \begin{verbatim} 00097 struct CmplxAMCoeffs 00098 \end{verbatim} 00099 \index{\texttt{CmplxAMCoeffs}} 00100 00101 \noindent This structure contains the AM co\"{e}fficients $a$ and $b$ 00102 in the case of a complex detector tensor, and some relevant scalar 00103 products. That is: 00104 00105 \begin{description} 00106 \item[\texttt{COMPLEX8Vector *a}] The $a$ co\"{e}fficient evaluated at the relevant times 00107 \item[\texttt{COMPLEX8Vector *b}] The $b$ co\"{e}fficient evaluated at the relevant times 00108 \item[\texttt{REAL4 A}] The scalar product $(a||a)$ 00109 \item[\texttt{REAL4 B}] The scalar product $(b||b)$ 00110 \item[\texttt{REAL4 C}] The scalar product $(a||b)$ 00111 \item[\texttt{REAL4 E}] The scalar product $(a||ib)$ 00112 \item[\texttt{REAL4 D}] The quantity $AB-C^{2}-E^{2}$ 00113 \end{description} 00114 00115 \begin{verbatim} 00116 struct AMCoeffsParams 00117 \end{verbatim} 00118 \index{\texttt{AMCoeffsParams}} 00119 00120 \noindent This structure contains the parameters for the routine. They include: 00121 00122 \begin{description} 00123 \item[\texttt{BarycenterInput *baryinput}] Parameters from $LALBarycenter()$ 00124 \item[\texttt{EarthState *earth}] The state of the earth at time t 00125 \item[\texttt{EphemerisDate *edat}] Pointer to the ephemerides 00126 \item[\texttt{LALDetAndSource *das}] Detector and source information 00127 \item[\texttt{LALFrDetector}] Detector geometry information 00128 \item[\texttt{REAL4 polAngle}] Polarization angle 00129 \item[\texttt{LALLeapSecAccuracy leapAcc}] Leap sec accuracy 00130 \end{description} 00131 </lalLaTeX> */ 00132 00133 typedef struct AMCoeffsTag 00134 { 00135 REAL4Vector *a; /**< the function a(t) */ 00136 REAL4Vector *b; /**< the function b(t) */ 00137 REAL4 A; /**< the scalar product (a||a) */ 00138 REAL4 B; /**< the scalar product (b||b) */ 00139 REAL4 C; /**< the scalar product (a||b) */ 00140 REAL4 D; /**< the quantity AB-C^2 */ 00141 } AMCoeffs; 00142 00143 typedef struct CmplxAMCoeffsTag 00144 { 00145 COMPLEX8Vector *a; /**< the a coefficient evaluated at the relevant times */ 00146 COMPLEX8Vector *b; /**< the b coefficient evaluated at the relevant times */ 00147 } CmplxAMCoeffs; 00148 00149 typedef struct AMCoeffsParamsTag 00150 { 00151 BarycenterInput *baryinput; /**< data from Barycentring routine */ 00152 EarthState *earth; /**< from LALBarycenter() */ 00153 EphemerisData *edat; /**< the ephemerides */ 00154 LALDetAndSource *das; /**< det and source information */ 00155 LALFrDetector *det; /**< detector geometry */ 00156 REAL4 polAngle; /**< polarization angle */ 00157 LALLeapSecAccuracy leapAcc; /**< accuracy in def of leap sec */ 00158 } AMCoeffsParams; 00159 00160 00161 /* <lalLaTeX> 00162 \newpage\input{LALComputeAMHV} 00163 \newpage\input{LALComputeAMC} 00164 </lalLaTeX> */ 00165 00166 void LALComputeAM (LALStatus *status, 00167 AMCoeffs *coe, 00168 LIGOTimeGPS *ts, 00169 AMCoeffsParams *params); 00170 00171 #ifdef __cplusplus 00172 } 00173 #endif 00174 00175 #endif /* _LALCOMPUTEAM_H */
1.5.2