SkyAnnulus.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Alexander Dietz, Robert Adam Mercer
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 
00022 
00023 #ifndef _SKYANNULUS_H  /* Double-include protection. */
00024 #define _SKYANNULUA_H
00025 
00026 #if 0
00027 <lalLaTeX>
00028 \subsection{Module \texttt{SkyAnnulus.c}}
00029 
00030 \noindent
00031 Provides methods to calculate the annulus given two or three detectors with a certain time differe
00032 nce.
00033 
00034 \subsubsection*{Prototypes}
00035 \vspace{0.1in}
00036 \input{SkyAnnulusCP}
00037 \idx{LALComputeSingleAnnulus(
00038                    LALStatus          *status,
00039                    INT2Vector         *sky,
00040                    LALPlaceAndGPS     *placetime1,
00041                    LALPlaceAndGPS     *placetime2,
00042                    REAL4              dtErr,
00043                    INT2               nx,
00044                    INT2               ny)}
00045 \idx{LALComputeTripleAnnuli( LALStatus          *status,
00046                        INT2Vector         **sky,
00047                        LALPlaceAndGPS     *placetime1,
00048                        LALPlaceAndGPS     *placetime2,
00049                        LALPlaceAndGPS     *placetime3,
00050                        REAL4              dtErr,
00051                        INT2               nx,
00052                        INT2               ny)}
00053 \idx{LALExistTripleAnnuli( LALStatus
00054                            *status,
00055                      INT2               *exist,
00056                      LALPlaceAndGPS     *placetime1,
00057                      LALPlaceAndGPS     *placetime2,
00058                      LALPlaceAndGPS     *placetime3,
00059                      REAL4              dtErr,
00060                      INT2               nx,
00061                      INT2               ny)}
00062 
00063 \subsubsection*{Description}
00064 
00065 %\noident
00066 \texttt{LALComputeSingleAnnulus} calculates the single annulus when two detectors and two times are given in \texttt{placetime1} and \texttt{placetime2} assuming an error in time resolution of \texttt{dtErr}. The result is a vector \texttt{sky} with dimensions \texttt{nx}x\texttt{ny} representing the whole sky. The index of the vector ($\mathrm{index} = i + j\cdot nx$) represents the coordinates ($\alpha=360^\circ \cdot i / nx$ and $\delta= 180^\circ \cdot i / ny -90$.
00067 If the desired position lies within the annulus the element of the vector is 1, 0 else. 
00068 \texttt{LALComputeTripleAnnuli} calculates the annuli when {\em three} detectors and times are given. 
00069 The result is a vector of four vectors, with the first vector (index 0) containing the complete overlap of all annuli and the next three vectors (indixes 1,2,3) containing the annuli of two of the time intervals each.
00070 \texttt{LALExistTripleAnnuli} just checks if there is at least one position in the sky overlapped by all three annuli created with \texttt{LALComputeTripleAnnuli}.
00071 If that is the case, \texttt{exist} will contain the value 1, 0 else.
00072 
00073 
00074 \subsubsection*{Algorithm}
00075 
00076 %\noindent
00077 
00078 \subsubsection*{Uses}
00079 
00080                                                                                                                                                                                                                                                                                                                                                                                                                 \noindent For each module it is not needed to allocate memory for the structure \texttt{sky}, this is done in the code. The only array needed for \texttt{LALComputeTripleAnnuli} is an array \texttt{sky} of pointers to \texttt{INT2Vector}  with 4 elements.
00081 
00082 \subsubsection*{Notes}
00083 %% Any relevant notes.
00084 
00085 \vfill{\footnotesize\input{SkyAnnulusCV}}
00086 
00087 </lalLaTeX>
00088 #endif
00089 
00090 
00091 #include <lal/DetectorSite.h>
00092 #include <lal/SkyCoordinates.h>
00093 #include <lal/Date.h>
00094 #include <lal/TimeDelay.h>
00095 
00096 NRCSID( COMPUTESKYPOSH, "$Id: SkyAnnulus.h,v 1.5 2007/06/08 14:41:43 bema Exp $" );
00097 
00098 
00099 
00100 void
00101 LALComputeSingleAnnulus ( 
00102                    LALStatus          *status,
00103                    INT2Vector         *sky,
00104                    LALPlaceAndGPS     *placetime1,
00105                    LALPlaceAndGPS     *placetime2,
00106                    REAL4              dtErr,
00107                    INT2               nx,
00108                    INT2               ny
00109                    );
00110 
00111 void
00112 LALComputeTripleAnnuli ( 
00113                        LALStatus          *status,
00114                        INT2Vector         **sky,
00115                        LALPlaceAndGPS     *placetime1,
00116                        LALPlaceAndGPS     *placetime2,
00117                        LALPlaceAndGPS     *placetime3,
00118                        REAL4              dtErr,
00119                        INT2               nx,
00120                        INT2               ny
00121                        );
00122 
00123 void
00124 LALExistTripleAnnuli( 
00125                      LALStatus          *status,
00126                      INT2               *exist,
00127                      LALPlaceAndGPS     *placetime1,
00128                      LALPlaceAndGPS     *placetime2,
00129                      LALPlaceAndGPS     *placetime3,
00130                      REAL4              dtErr,
00131                      INT2               nx,
00132                      INT2               ny
00133                      );
00134 
00135 
00136 
00137 #endif

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