ComputeSkyBinary.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Chris Messenger, Jolien Creighton
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="ComputeSkyBinaryHV">
00021 Author: Messenger, C.J., Berukoff, S.J., Papa, M.A. 
00022 $Id: ComputeSkyBinary.h,v 1.5 2007/06/08 14:41:50 bema Exp $
00023 ************************************* </lalVerbatim> */
00024 
00025 /* <lalLaTeX> 
00026 \section{Header \texttt{ComputeSkyBinary.h}}
00027 \label{s:ComputeSkyBinary.h}
00028 Computes phase coefficients necessary for a correct demodulation for a source in a binary system.
00029 
00030 \subsection*{Synopsis}
00031 \begin{verbatim}
00032 #include <lal/ComputeSkyBinary.h>
00033 \end{verbatim}
00034 
00035 \noindent  The methods employed here follow very closely those used within \verb@ComputeSky()@.  
00036 Note that at present this code simply corrects for the Doppler modulation present in a polynomial 
00037 frequency function for signals from sources in elliptical orbits.  It does not account for general 
00038 relativistic effects.
00039 
00040 At the risk of repeating existing documentation, but in the interests of clarity much of the 
00041 following can also be found in the \verb@ComputeSky()@ documentation.  Recall that a demodulated 
00042 Fourier Transform (DeFT) is given by 
00043 
00044 \begin{equation}
00045 \hat{x}_b({\vec{\lambda}})=
00046 \sum_{\alpha =0}^{M-1}\sum_{k=0}^{N-1}\tilde{x}_{\alpha k}\left[\frac{1}{N}\sum_{j=0}^{N-1}e^{-2\pi i(\Phi_{\alpha jb}(\vec{\lambda})-\frac{jk}{N})}\right]
00047 \label{demod_FT}
00048 \end{equation}
00049 
00050 The index $b$ defines the DeFT frequency bin, the index $\alpha$ loops through
00051 the SFTs that build the DeFT, $k$ runs on all the SFT frequency bins, and $j$
00052 is a time index that runs on each SFT.  As shown in section
00053 \ref{s:LALDemod.h}, the next step in the development of the demodulation
00054 technique involves Taylor expanding the phase model about the temporal
00055 midpoint of each short segment of data, while retaining only first order
00056 terms.  At this point it is neccessary to clearly define some quantities. 
00057 Times as defined at the chosen detector are denoted by $t$, times defined at the 
00058 solar system barycenter (SSB) are denoted by $T$, and the retarded time measured at an inertial
00059 reference point (chosen as the SSB) at a distance from the source are denote by $t^{\prime}$.
00060 
00061 The Taylor expansion of $\Phi (t)$ about the temporal midpoint
00062 $t_{\alpha,1/2}$ is
00063 
00064 \begin{equation}
00065 \Phi_{\alpha}(t) = \Phi(t_{\alpha,1/2})+\left[t-t_{\alpha,1/2}\right]\frac{d\Phi}{dt}(t_{\alpha,1/2})\label{taylor2} \\
00066 \end{equation}
00067 
00068 For each value of $\alpha$, this expression consists of either constant or linear terms in time.  
00069 With the particular time discretization chosen in this code, $t=t_{0}+(N\alpha+j)\ T_{obs}/NM$, we have
00070 
00071 \begin{equation}
00072 \label{time}
00073 \left[t-t_{\alpha,1/2}\right]=\frac{\ T_{obs}}{M}\left(\frac{j}{N}-\frac{1}{2}\right)=\mathcal{T}_{s}\left(\frac{j}{N}-\frac{1}{2}\right),
00074 \end{equation}
00075 
00076 where $\mathcal{T}_{s}$ is the short time baseline of the $M$ short FTs.  On
00077 the other hand, the phase can also be expressed as a function of SSB time $T$
00078 (i.e. the time at the solar system barycenter).  We will assume the source to
00079 be at rest in this reference frame.  If we now adopt the notation $\Delta
00080 t^{\prime}_{\alpha}\equiv\left[t^{\prime}(T(t_{\alpha,1/2}))-
00081 t^{\prime}(T(t_{0}))\right]$ and $\dot{t^{\prime}}_{\alpha}\equiv dt^{\prime}/dt({\alpha,1/2})$,
00082 the phase terms described in Eq .\ref{taylor2} become (neglecting constants)
00083 
00084 \begin{eqnarray}
00085 \Phi(t_{\alpha,1/2})   & = & f_{0}(\Delta t^{\prime}_{\alpha})+\frac{1}{2}f_{1}(\Delta t^{\prime}_{\alpha})^{2}
00086 +\frac{1}{3}f_{2}(\Delta t^{\prime}_{\alpha})^{3}+\frac{1}{4}f_{3}(\Delta t^{\prime}_{\alpha})^{4}+\frac{1}{5}f_{4}(\Delta t^{\prime}_{\alpha})^{5}
00087 +\frac{1}{6}f_{5}(\Delta t^{\prime}_{\alpha})^{6}, \nonumber\label{phi} \\
00088                                          &   & \\
00089 \frac{d\Phi}{dt}(t_{\alpha,1/2})         & = & \dot{t^{\prime}}_{\alpha}\left(f_{0}+ f_{1}(\Delta t^{\prime}_{\alpha})
00090 +f_{2}(\Delta t^{\prime}_{\alpha})^{2}+f_{3}(\Delta t^{\prime}_{\alpha})^{3}
00091 +f_{4}(\Delta t^{\prime}_{\alpha})^{4}+f_{5}(\Delta t^{\prime}_{\alpha})^{5}\right). \label{dphi}
00092 \end{eqnarray}
00093 
00094 Note that the polynomial phase function is expressed as a function of the retarded time $t^{\prime}$ and subsequently
00095 the intrinsic frequency and it`s derivitives ($f_{i}$) are defined at the chosen inertial reference frame (SSB). 
00096 
00097 In order to calculate, for each value of $\alpha$, the quantities $\dot{t^{\prime}}_{\alpha}$ and
00098 $\Delta t^{\prime}_{\alpha}$, we must now look at the binary system in more detail.  At present
00099 we reference section \ref{s:GenerateSpinOrbitCW.h} where the definition of all the following orbital variables
00100 can be found.  For a given set of orbital input parameters we obtain the eccentric anomoly $E$ by
00101 numerically solving 
00102 
00103 \begin{eqnarray}\label{bintime}
00104   T(t_{\alpha})-T_{p}&=&\frac{P}{2\pi}\left[E+\left(p\sin{E}+q\left(\cos{E}-1\right)\right)\right].
00105 \end{eqnarray}
00106 
00107 where the quantities $p$ and $q$, dependent only on the orbital parameters
00108 of the source system, are given by
00109 
00110 \begin{eqnarray}
00111 \label{pq}
00112 p&=&\frac{2\pi}{P}\frac{a}{c}\sin{i}\sqrt{1-e^{2}}\cos{\omega}-e \nonumber \\
00113 q&=&\frac{2\pi}{P}\frac{a}{c}\sin{i}\sin{\omega}.
00114 \end{eqnarray}
00115 
00116 $T(t_{\alpha})$ is returned via a call to \verb@LALBarycenter@ and $a\sin{i},P,T_{p},\omega,e$ 
00117 are the projected semi-major axis (projected along the line of sight), the orbital period, the 
00118 time of observed periapse passage as measured 
00119 in the SSB, the argument of periapse, and the orbital eccentricity respectively.  Having defined $E$ 
00120 (where the source is in it`s orbit) at a given detector time $t_{\alpha}$ we can calculate the derivitive 
00121 of the retarded source time $\prime{t}$ with respect to the SSB time $T$.  This is given by 
00122 
00123 \begin{equation}\label{binderiv}
00124  \frac{dt^{\prime}}{dT}=\frac{[1-e\cos{E}]}{\left[1+pcos{E}-q\sin{E}\right]}.
00125 \end{equation}
00126 
00127 The quantity $\dot{t^{\prime}}_{\alpha}$ can now be expressed as
00128 
00129 \begin{equation}\label{binderivtwo}
00130 \dot{t^{\prime}}_{\alpha}=\frac{dT}{dt}\frac{dt^{\prime}}{dT},
00131 \end{equation}
00132 
00133 where $dT/dt$ is returned via a call to \verb@LALBarycenter()@.
00134 
00135 We can now rewrite Eq. \ref{taylor2} and by grouping together the terms in $j$ (linear
00136 in $t$) in order to save computations, we have
00137 
00138 \begin{equation}
00139 \Phi_{\alpha}(t)=\sum_{s=0}^{n_{spin}}f_{s}A_{s\alpha}+\frac{j}{N}\sum_{s=0}^{n_{spin}}f_{s}B_{s\alpha},
00140 \label{phasecalc}
00141 \end{equation}
00142 
00143 where $n_{spin}$ is the maximum order of spindown parameter.
00144 
00145 Thus, for a given sky position and set of orbital parameters, the quantities $\dot{t^{\prime}}_{\alpha}$ and
00146 $\Delta t^{\prime}_{\alpha}$ are calculated only once, just as in \verb@ComputeSky()@.  The analytical constants 
00147 defined in Eq \ref{phasecalc} now become
00148 
00149 \begin{equation}
00150 A_{s \alpha}=\frac{1}{s+1}\Delta (t^{\prime}_{\alpha})^{s+1}-\frac{1}{2}\mathcal{T}_{SFT}\dot{t^{\prime}}_{\alpha}\Delta (t^{\prime}_{\alpha})^{s}
00151 \end{equation}
00152 \begin{equation}
00153 B_{s \alpha}=\mathcal{T}_{SFT}\dot{t^{\prime}}_{\alpha}\Delta (t^{\prime}_{\alpha})^{s}.
00154 \end{equation}
00155 
00156 It is these constants that form the input to the function \verb@LALDemod()@.
00157 
00158 </lalLaTeX> */
00159 
00160 #ifndef _COMPUTESKYBINARY_H
00161 #define _COMPUTESKYBINARY_H
00162  
00163 #include <lal/LALStdlib.h>
00164 #include <lal/LALBarycenter.h>
00165 #include <lal/Date.h>
00166  
00167 #ifdef __cplusplus
00168 extern "C" {
00169 #endif
00170 
00171   NRCSID( COMPUTESKYBINARYH, "$Id: ComputeSkyBinary.h,v 1.5 2007/06/08 14:41:50 bema Exp $" );
00172   
00173   /* Author-defined error codes */
00174   /* <lalLaTeX>  
00175      \subsection*{Error conditions}
00176      \vspace{0.1in}
00177      \input{ComputeSkyBinaryHErrorTable}
00178      
00179      </lalLaTeX> */
00180   
00181 /* <lalErrTable file="ComputeSkyBinaryHErrorTable"> */
00182 #define COMPUTESKYBINARYH_ENULL 1
00183 #define COMPUTESKYBINARYH_ENNUL 2
00184 #define COMPUTESKYBINARYH_ERANG 3
00185 #define COMPUTESKYBINARYH_ENEGA 4
00186 #define COMPUTESKYBINARYH_MSGENULL "Null Pointer"
00187 #define COMPUTESKYBINARYH_MSGENNUL "Non-Null Pointer"
00188 #define COMPUTESKYBINARYH_MSGERANG "Input parameter out of range"
00189 #define COMPUTESKYBINARYH_MSGENEGA "Bad Negative Value"
00190 /* </lalErrTable>  */
00191 
00192 /* <lalLaTeX>
00193 \subsection*{Structures}
00194 
00195 \begin{verbatim}
00196 struct CSBParams
00197 \end{verbatim}
00198 \index{\texttt{CSBParams}}
00199 
00200 \noindent This structure contains the parameters for the \verb@ComputeSkyBinary()@ routine.  The parameters are:
00201 
00202 \begin{description}
00203 \item[\texttt{INT8 spinDwnOrder}] The maximal number of spindown parameters per spindown parameter set.
00204 \item[\texttt{INT8 mObsSFT}] The number of SFTs in the observation time.
00205 \item[\texttt{REAL8 tSFT}] The timescale of one SFT.
00206 \item[\texttt{LIGOTimeGPS *tGPS}] An array containing the GPS times of the first datum from each SFT.
00207 \item[\texttt{REAL8 *skyPos}] The array containing the sky patch coordinates.
00208 \item[\texttt{REAL8 SemimajorAxis}] The projected speed-of-light-normalised semi-major axis of the orbit (in seconds).
00209 \item[\texttt{REAL8 OrbitalPeriod}] The orbital period (in seconds).
00210 \item[\texttt{REAL8 ArgPeriapse}] The argument of the periapse (in radians).
00211 \item[\texttt{REAL8 OrbitalEccentricity}] The orbital eccentricity.
00212 \item[\texttt{LIGOTimeGPS TperiapseSSB}] A time of observed periapse passage as defined in the SSB.
00213 \end{description}
00214 
00215 </lalLaTeX> */
00216 
00217 /* The following quantity represents the required accuracy for the timing of the binary orbit in seconds */
00218 #define ACC 1e-9
00219 
00220 typedef struct
00221 tagCSBParams
00222 {
00223         INT8            spinDwnOrder;   /* max spindown parameter order */
00224         INT8            mObsSFT;        /* number of coherent timescales */
00225         REAL8           tSFT;           /* timescale of SFT */
00226         LIGOTimeGPS     *tGPS;          /* GPS time of 1st data sample of each SFT */
00227         REAL8           *skyPos;        /* array of sky positions */
00228         REAL8           SemiMajorAxis;  /* orbital radius of binary (in sec) */
00229         REAL8           OrbitalPeriod;         /* Period of binary (in sec) */
00230         REAL8           OrbitalEccentricity; /* Orbital eccentricy */
00231         REAL8           ArgPeriapse;    /* Argument of Periapse */
00232         LIGOTimeGPS     TperiapseSSB;   /* Instance of periapse passage measured in the SSB frame */
00233         BarycenterInput *baryinput;     
00234         EmissionTime *emit;
00235         EarthState *earth;
00236         EphemerisData *edat;
00237 }
00238 CSBParams;
00239 
00240 /* <lalLaTeX>
00241 \newpage\input{ComputeSkyBinaryHV}
00242 \newpage\input{ComputeSkyBinaryC}
00243 </lalLaTeX> */
00244 
00245 void LALComputeSkyBinary (LALStatus *status, 
00246                         REAL8           *skyConst, 
00247                         INT8            iSkyCoh,
00248                         CSBParams       *params);
00249                 
00250 
00251 #ifdef __cplusplus
00252 }
00253 #endif
00254 
00255 #endif /* _COMPUTESKYBINARY_H */

Generated on Mon Sep 8 03:06:34 2008 for LAL by  doxygen 1.5.2