| AVFactories.h | | AVFactories.h | |
| /*----------------------------------------------------------------------- | | /*----------------------------------------------------------------------- | |
| | | | |
| File Name: AVFactories.h | | File Name: AVFactories.h | |
| | | | |
| <lalVerbatim file="AVFactoriesHV"> | | <lalVerbatim file="AVFactoriesHV"> | |
|
| Revision: $Id: AVFactories.h,v 1.7 2000/11/09 23:37:19 jolien Exp $ | | Revision: $Id: AVFactoriesH.m4,v 1.2 2004/11/04 22:48:56 jolien Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| -------------------------------------------------------------------------*/ | | -------------------------------------------------------------------------*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{AVFactories.h}} | | \section{Header \texttt{AVFactories.h}} | |
| \label{s:AVFactories.h} | | \label{s:AVFactories.h} | |
| | | | |
| Provides prototype and status code information for use of CreateVector, | | Provides prototype and status code information for use of CreateVector, | |
|
| CreateArray, LALDestroyVector and DestroyArray | | CreateArray, ResizeVector, ResizeArray, DestroyVector and DestroyArray | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/AVFactories.h> | | #include <lal/AVFactories.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _AVFACTORIES_H | | #ifndef _AVFACTORIES_H | |
| #define _AVFACTORIES_H | | #define _AVFACTORIES_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
|
| | | #include <stdarg.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (AVFACTORIESH, "$Id: AVFactories.h,v 1.7 2000/11/09 23:37:19 jolien
Exp $"); | | NRCSID (AVFACTORIESH, "$Id: AVFactoriesH.m4,v 1.2 2004/11/04 22:48:56 jolie
n Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| \input{AVFactoriesHErrTab} | | \input{AVFactoriesHErrTab} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| <lalErrTable file="AVFactoriesHErrTab"> | | <lalErrTable file="AVFactoriesHErrTab"> | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 66 | |
| #define AVFACTORIESH_MSGEDPTR "Null vector/array data." | | #define AVFACTORIESH_MSGEDPTR "Null vector/array data." | |
| #define AVFACTORIESH_MSGEMALLOC "Malloc failure." | | #define AVFACTORIESH_MSGEMALLOC "Malloc failure." | |
| /* | | /* | |
| </lalErrTable> | | </lalErrTable> | |
| */ | | */ | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorFactoriesC} | | \newpage\input{VectorFactoriesC} | |
| \newpage\input{ArrayFactoriesC} | | \newpage\input{ArrayFactoriesC} | |
|
| | | | |
| | | \newpage | |
| | | \subsection{XLAL Functions} | |
| | | | |
| | | \subsubsection*{Synopsis} | |
| | | \begin{verbatim} | |
| | | #include <lal/AVFactories.h> | |
| | | | |
| | | REAL4Vector * XLALCreateVector(UINT4 length); | |
| | | REAL4Vector * XLALResizeVector(REAL4Vector *vector, UINT4 length); | |
| | | void XLALDestroyVector(REAL4Vector *vector, UINT4 length); | |
| | | | |
| | | <vectype> * XLALCreate<vectype>(UINT4 length ); | |
| | | <vectype> * XLALResize<vectype>(<vectype> *vector, UINT4 length ); | |
| | | void XLALDestroy<vectype>(<vectype> *vector); | |
| | | | |
| | | REAL4Array * XLALCreateArrayL(UINT4 ndim, ...); | |
| | | REAL4Array * XLALCreateArrayV(UINT4 ndim, UINT4 *dims); | |
| | | REAL4Array * XLALCreateArray(UINT4Vector *dimLength); | |
| | | REAL4Array * XLALResizeArrayL(REAL4Array *array, UINT4 ndim, ...); | |
| | | REAL4Array * XLALResizeArrayV(REAL4Array *array, UINT4 ndim, UINT4 *dims); | |
| | | REAL4Array * XLALResizeArray(REAL4Array *array, UINT4Vector *dimLength); | |
| | | void XLALDestroyArray(REAL4Array *array); | |
| | | | |
| | | <arrtype> * XLALCreate<arrtype>L(UINT4 ndim, ...); | |
| | | <arrtype> * XLALCreate<arrtype>V(UINT4 ndim, UINT4 *dims); | |
| | | <arrtype> * XLALCreate<arrtype>(UINT4Vector *dimLength); | |
| | | <arrtype> * XLALResize<arrtype>L(<arrtype> *array, UINT4 ndim, ...); | |
| | | <arrtype> * XLALResize<arrtype>V(<arrtype> *array, UINT4 ndim, UINT4 *dims) | |
| | | ; | |
| | | <arrtype> * XLALResize<arrtype>(<arrtype> *array, UINT4Vector *dimLength); | |
| | | void XLALDestroy<arrtype>(<arrtype> *array); | |
| | | \end{verbatim} | |
| | | \idx{XLALCreateVector} | |
| | | \idx{XLALResizeVector} | |
| | | \idx{XLALDestroyVector} | |
| | | \idx{XLALCreateArrayL} | |
| | | \idx{XLALCreateArrayV} | |
| | | \idx{XLALCreateArray} | |
| | | \idx{XLALResizeArrayL} | |
| | | \idx{XLALResizeArrayV} | |
| | | \idx{XLALResizeArray} | |
| | | \idx{XLALDestroyArray} | |
| | | \idx{XLALCreate<type>Vector} | |
| | | \idx{XLALResize<type>Vector} | |
| | | \idx{XLALDestroy<type>Vector} | |
| | | \idx{XLALCreate<type>ArrayL} | |
| | | \idx{XLALCreate<type>ArrayV} | |
| | | \idx{XLALCreate<type>Array} | |
| | | \idx{XLALResize<type>ArrayL} | |
| | | \idx{XLALResize<type>ArrayV} | |
| | | \idx{XLALResize<type>Array} | |
| | | \idx{XLALDestroy<type>Array} | |
| | | | |
| | | Here \verb+<vectype>+ is one of | |
| | | \verb+COMPLEX16Vector+, | |
| | | \verb+COMPLEX8Vector+, | |
| | | \verb+REAL8Vector+, | |
| | | \verb+REAL4Vector+, | |
| | | \verb+INT8Vector+, | |
| | | \verb+INT4Vector+, | |
| | | \verb+INT2Vector+, | |
| | | \verb+UINT8Vector+, | |
| | | \verb+UINT4Vector+, | |
| | | \verb+UINT2Vector+, or | |
| | | \verb+CHARVector+, | |
| | | and \verb+<arrtype>+ is one of | |
| | | \verb+COMPLEX16Array+, | |
| | | \verb+COMPLEX8Array+, | |
| | | \verb+REAL8Array+, | |
| | | \verb+REAL4Array+, | |
| | | \verb+INT8Array+, | |
| | | \verb+INT4Array+, | |
| | | \verb+INT2Array+, | |
| | | \verb+UINT8Array+, | |
| | | \verb+UINT4Array+, or | |
| | | \verb+UINT2Array+. | |
| | | | |
| | | \subsubsection*{Description} | |
| | | | |
| | | The \verb+XLALCreate<type>Vector+ functions create vectors of the specified | |
| | | \verb+length+ number of objects of type \verb+<type>+. The function | |
| | | \verb+XLALCreateVector+ is the same as \verb+XLALCreateREAL4Vector+. | |
| | | | |
| | | The \verb+XLALDestroy<type>Vector+ functions deallocate the memory allocati | |
| | | on | |
| | | pointed to by \verb+vector+ including its contents. The function | |
| | | \verb+XLALDestroyVector+ is the same as \verb+XLALDestroyREAL4Vector+. | |
| | | | |
| | | The \verb+XLALResize<type>Vector+ functions resize the supplied vector | |
| | | \verb+vector+ to the new size \verb+length+. If \verb+vector+ is \verb+NUL | |
| | | L+ | |
| | | then this is equivalent to \verb+XLALCreate<type>Vector+. If \verb+length+ | |
| | | is zero then this is equivalent to \verb+XLALDestroy<type>Vector+ and the | |
| | | routine returns \verb+NULL+. Otherwise, the amount of data in the vector | |
| | | is realloced using \verb+LALRealloc+. The function | |
| | | \verb+XLALResizeVector+ is the same as \verb+XLALResizeREAL4Vector+. | |
| | | | |
| | | The \verb+XLALCreate<type>Array+ | |
| | | \verb+XLALCreate<type>ArrayL+ | |
| | | \verb+XLALCreate<type>ArrayV+ | |
| | | all create an object of type \verb+<type>Array+. They differ in the way | |
| | | that the dimensions of the array are specified. The function | |
| | | \verb+XLALCreate<type>Array+ allocates an array with dimensions specified | |
| | | by the \verb+UINT4Vector+ \verb+dimLength+ which is a vector of dimension | |
| | | lengths for the array. The function | |
| | | \verb+XLALCreate<type>ArrayV+ provides these dimensions with two arguments: | |
| | | \verb+ndim+ is the number of dimensions and \verb+dims+ is an array of | |
| | | \verb+UINT4+ values for the dimensions. The function | |
| | | \verb+XLALCreate<type>ArrayL+ also specifies the dimensions as arguments. | |
| | | Here, the first argument, \verb+ndim+, is the number of dimensions, and | |
| | | this is followed by \verb+ndim+ arguments that provide the dimensions. | |
| | | Note that for this function, a maximum of 16 dimensions can be provided | |
| | | (that is, \verb+ndim+ cannot be more than 16 and there cannot be more than | |
| | | 16 arguments after the first). | |
| | | The \verb+XLALCreateArray+ | |
| | | \verb+XLALCreateArrayL+ | |
| | | \verb+XLALCreateArrayV+ | |
| | | functions are equivalent to the | |
| | | \verb+XLALCreateREAL4Array+ | |
| | | \verb+XLALCreateREAL4ArrayL+ | |
| | | \verb+XLALCreateREAL4ArrayV+ | |
| | | functions respectively. | |
| | | | |
| | | The \verb+XLALDestroy<type>Array+ functions deallocate the memory allocatio | |
| | | n | |
| | | pointed to by \verb+array+ including its contents. The function | |
| | | \verb+XLALDestroyArray+ is the same as \verb+XLALDestroyREAL4Array+. | |
| | | | |
| | | The \verb+XLALResize<type>Array+ | |
| | | \verb+XLALResize<type>ArrayL+ | |
| | | \verb+XLALResize<type>ArrayV+ | |
| | | functions resize the provided array \verb+array+. The arguments after the | |
| | | first are interpreted in the same way as for the | |
| | | \verb+XLALCreate<type>Array+ | |
| | | \verb+XLALCreate<type>ArrayL+ | |
| | | \verb+XLALCreate<type>ArrayV+ | |
| | | functions. If \verb+array+ is \verb+NULL+, the resize functions are equiva | |
| | | lent | |
| | | to the corresponding create function. If \verb+ndim+ is zero for | |
| | | \verb+XLALResize<type>ArrayL+ or | |
| | | \verb+XLALResize<type>ArrayV+, or if \verb+dimLength+ is \verb+NULL+ for | |
| | | \verb+XLALResize<type>Array+, then these functions are equivalent to | |
| | | \verb+XLALDestroy<type>Array+. | |
| | | The \verb+XLALResizeArray+ | |
| | | \verb+XLALResizeArrayL+ | |
| | | \verb+XLALResizeArrayV+ | |
| | | functions are equivalent to the | |
| | | \verb+XLALResizeREAL4Array+ | |
| | | \verb+XLALResizeREAL4ArrayL+ | |
| | | \verb+XLALResizeREAL4ArrayV+ | |
| | | functions respectively. | |
| | | | |
| | | \subsubsection*{Return Values} | |
| | | | |
| | | If successful, the create and resize functions return a pointer to the same | |
| | | data that was passed to the function. The resize functions will return | |
| | | a \verb+NULL+ pointer if the size of the new object was zero. Upon failure | |
| | | these routines will return \verb+NULL+ and will set \verb+xlalErrno+ to | |
| | | one of these values: \verb+XLAL_ENOMEM+ if a memory allocation failed, | |
| | | \verb+XLAL_EBADLEN+ if an invalid length was provided (for example, a | |
| | | zero-size allocation with a create function), \verb+XLAL_EINVAL+ if an | |
| | | invalid argument is provided (for example, if the pointer to an | |
| | | array of dimensions is \verb+NULL+). | |
| | | | |
| | | The destroy function does not return any value. If the function is passed | |
| | | a | |
| | | \verb+NULL+ pointer, it will set \verb+xlalErrno+ to \verb+XLAL_EFAULT+. | |
| | | If the function is passed an object that appears corrupted (e.g., a | |
| | | vector with zero length or will a \verb+NULL+ data pointer) it will set | |
| | | \verb+xlalErrno+ to \verb+XLAL_EINVAL+. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALCHARCreateVector(LALStatus *, CHARVector **, UINT4); | | /* | |
| void LALI2CreateVector(LALStatus *, INT2Vector **, UINT4); | | | |
| void LALI4CreateVector(LALStatus *, INT4Vector **, UINT4); | | * CHAR | |
| void LALI8CreateVector(LALStatus *, INT8Vector **, UINT4); | | */ | |
| void LALU2CreateVector(LALStatus *, UINT2Vector **, UINT4); | | CHARVector * XLALCreateCHARVector ( UINT4 length ); | |
| void LALU4CreateVector(LALStatus *, UINT4Vector **, UINT4); | | CHARVector * XLALResizeCHARVector ( CHARVector * vector, UINT4 length ); | |
| void LALU8CreateVector(LALStatus *, UINT8Vector **, UINT4); | | void XLALDestroyCHARVector ( CHARVector * vector ); | |
| void LALCreateVector(LALStatus *, REAL4Vector **, UINT4); | | void LALCHARCreateVector ( LALStatus *, CHARVector **, UINT4 ); | |
| void LALSCreateVector(LALStatus *, REAL4Vector **, UINT4); | | void LALCHARResizeVector ( LALStatus *, CHARVector **, UINT4 ); | |
| void LALDCreateVector(LALStatus *, REAL8Vector **, UINT4); | | void LALCHARDestroyVector ( LALStatus *, CHARVector ** ); | |
| void LALCCreateVector(LALStatus *, COMPLEX8Vector **, UINT4); | | | |
| void LALZCreateVector(LALStatus *, COMPLEX16Vector **, UINT4); | | /* | |
| | | | |
| void LALI2CreateArray(LALStatus *, INT2Array **, UINT4Vector *); | | * INT2 | |
| void LALI4CreateArray(LALStatus *, INT4Array **, UINT4Vector *); | | */ | |
| void LALI8CreateArray(LALStatus *, INT8Array **, UINT4Vector *); | | INT2Vector * XLALCreateINT2Vector ( UINT4 length ); | |
| void LALU2CreateArray(LALStatus *, UINT2Array **, UINT4Vector *); | | INT2Vector * XLALResizeINT2Vector ( INT2Vector * vector, UINT4 length ); | |
| void LALU4CreateArray(LALStatus *, UINT4Array **, UINT4Vector *); | | void XLALDestroyINT2Vector ( INT2Vector * vector ); | |
| void LALU8CreateArray(LALStatus *, UINT8Array **, UINT4Vector *); | | void LALI2CreateVector ( LALStatus *, INT2Vector **, UINT4 ); | |
| void LALCreateArray(LALStatus *, REAL4Array **, UINT4Vector *); | | void LALI2ResizeVector ( LALStatus *, INT2Vector **, UINT4 ); | |
| void LALSCreateArray(LALStatus *, REAL4Array **, UINT4Vector *); | | void LALI2DestroyVector ( LALStatus *, INT2Vector ** ); | |
| void LALDCreateArray(LALStatus *, REAL8Array **, UINT4Vector *); | | | |
| void LALCCreateArray(LALStatus *, COMPLEX8Array **, UINT4Vector *); | | /* | |
| void LALZCreateArray(LALStatus *, COMPLEX16Array **, UINT4Vector *); | | | |
| | | * INT2 | |
| void LALCHARDestroyVector(LALStatus *, CHARVector **); | | */ | |
| void LALI2DestroyVector(LALStatus *, INT2Vector **); | | INT2Array * XLALCreateINT2ArrayL ( UINT4, ... ); | |
| void LALI4DestroyVector(LALStatus *, INT4Vector **); | | INT2Array * XLALCreateINT2ArrayV ( UINT4, UINT4 * ); | |
| void LALI8DestroyVector(LALStatus *, INT8Vector **); | | INT2Array * XLALCreateINT2Array ( UINT4Vector * ); | |
| void LALU2DestroyVector(LALStatus *, UINT2Vector **); | | INT2Array * XLALResizeINT2ArrayL ( INT2Array *, UINT4, ... ); | |
| void LALU4DestroyVector(LALStatus *, UINT4Vector **); | | INT2Array * XLALResizeINT2ArrayV ( INT2Array *, UINT4, UINT4 * ); | |
| void LALU8DestroyVector(LALStatus *, UINT8Vector **); | | INT2Array * XLALResizeINT2Array ( INT2Array *, UINT4Vector * ); | |
| void LALDestroyVector(LALStatus *, REAL4Vector **); | | void XLALDestroyINT2Array ( INT2Array * ); | |
| void LALSDestroyVector(LALStatus *, REAL4Vector **); | | void LALI2CreateArray ( LALStatus *, INT2Array **, UINT4Vector * ); | |
| void LALDDestroyVector(LALStatus *, REAL8Vector **); | | void LALI2ResizeArray ( LALStatus *, INT2Array **, UINT4Vector * ); | |
| void LALCDestroyVector(LALStatus *, COMPLEX8Vector **); | | void LALI2DestroyArray ( LALStatus *, INT2Array ** ); | |
| void LALZDestroyVector(LALStatus *, COMPLEX16Vector **); | | | |
| | | /* | |
| void LALI2DestroyArray(LALStatus *, INT2Array **); | | | |
| void LALI4DestroyArray(LALStatus *, INT4Array **); | | * INT4 | |
| void LALI8DestroyArray(LALStatus *, INT8Array **); | | */ | |
| void LALU2DestroyArray(LALStatus *, UINT2Array **); | | INT4Vector * XLALCreateINT4Vector ( UINT4 length ); | |
| void LALU4DestroyArray(LALStatus *, UINT4Array **); | | INT4Vector * XLALResizeINT4Vector ( INT4Vector * vector, UINT4 length ); | |
| void LALU8DestroyArray(LALStatus *, UINT8Array **); | | void XLALDestroyINT4Vector ( INT4Vector * vector ); | |
| void LALDestroyArray(LALStatus *, REAL4Array **); | | void LALI4CreateVector ( LALStatus *, INT4Vector **, UINT4 ); | |
| void LALSDestroyArray(LALStatus *, REAL4Array **); | | void LALI4ResizeVector ( LALStatus *, INT4Vector **, UINT4 ); | |
| void LALDDestroyArray(LALStatus *, REAL8Array **); | | void LALI4DestroyVector ( LALStatus *, INT4Vector ** ); | |
| void LALCDestroyArray(LALStatus *, COMPLEX8Array **); | | | |
| void LALZDestroyArray(LALStatus *, COMPLEX16Array **); | | /* | |
| | | | |
| | | * INT4 | |
| | | */ | |
| | | INT4Array * XLALCreateINT4ArrayL ( UINT4, ... ); | |
| | | INT4Array * XLALCreateINT4ArrayV ( UINT4, UINT4 * ); | |
| | | INT4Array * XLALCreateINT4Array ( UINT4Vector * ); | |
| | | INT4Array * XLALResizeINT4ArrayL ( INT4Array *, UINT4, ... ); | |
| | | INT4Array * XLALResizeINT4ArrayV ( INT4Array *, UINT4, UINT4 * ); | |
| | | INT4Array * XLALResizeINT4Array ( INT4Array *, UINT4Vector * ); | |
| | | void XLALDestroyINT4Array ( INT4Array * ); | |
| | | void LALI4CreateArray ( LALStatus *, INT4Array **, UINT4Vector * ); | |
| | | void LALI4ResizeArray ( LALStatus *, INT4Array **, UINT4Vector * ); | |
| | | void LALI4DestroyArray ( LALStatus *, INT4Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * INT8 | |
| | | */ | |
| | | INT8Vector * XLALCreateINT8Vector ( UINT4 length ); | |
| | | INT8Vector * XLALResizeINT8Vector ( INT8Vector * vector, UINT4 length ); | |
| | | void XLALDestroyINT8Vector ( INT8Vector * vector ); | |
| | | void LALI8CreateVector ( LALStatus *, INT8Vector **, UINT4 ); | |
| | | void LALI8ResizeVector ( LALStatus *, INT8Vector **, UINT4 ); | |
| | | void LALI8DestroyVector ( LALStatus *, INT8Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * INT8 | |
| | | */ | |
| | | INT8Array * XLALCreateINT8ArrayL ( UINT4, ... ); | |
| | | INT8Array * XLALCreateINT8ArrayV ( UINT4, UINT4 * ); | |
| | | INT8Array * XLALCreateINT8Array ( UINT4Vector * ); | |
| | | INT8Array * XLALResizeINT8ArrayL ( INT8Array *, UINT4, ... ); | |
| | | INT8Array * XLALResizeINT8ArrayV ( INT8Array *, UINT4, UINT4 * ); | |
| | | INT8Array * XLALResizeINT8Array ( INT8Array *, UINT4Vector * ); | |
| | | void XLALDestroyINT8Array ( INT8Array * ); | |
| | | void LALI8CreateArray ( LALStatus *, INT8Array **, UINT4Vector * ); | |
| | | void LALI8ResizeArray ( LALStatus *, INT8Array **, UINT4Vector * ); | |
| | | void LALI8DestroyArray ( LALStatus *, INT8Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT2 | |
| | | */ | |
| | | UINT2Vector * XLALCreateUINT2Vector ( UINT4 length ); | |
| | | UINT2Vector * XLALResizeUINT2Vector ( UINT2Vector * vector, UINT4 length ); | |
| | | void XLALDestroyUINT2Vector ( UINT2Vector * vector ); | |
| | | void LALU2CreateVector ( LALStatus *, UINT2Vector **, UINT4 ); | |
| | | void LALU2ResizeVector ( LALStatus *, UINT2Vector **, UINT4 ); | |
| | | void LALU2DestroyVector ( LALStatus *, UINT2Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT2 | |
| | | */ | |
| | | UINT2Array * XLALCreateUINT2ArrayL ( UINT4, ... ); | |
| | | UINT2Array * XLALCreateUINT2ArrayV ( UINT4, UINT4 * ); | |
| | | UINT2Array * XLALCreateUINT2Array ( UINT4Vector * ); | |
| | | UINT2Array * XLALResizeUINT2ArrayL ( UINT2Array *, UINT4, ... ); | |
| | | UINT2Array * XLALResizeUINT2ArrayV ( UINT2Array *, UINT4, UINT4 * ); | |
| | | UINT2Array * XLALResizeUINT2Array ( UINT2Array *, UINT4Vector * ); | |
| | | void XLALDestroyUINT2Array ( UINT2Array * ); | |
| | | void LALU2CreateArray ( LALStatus *, UINT2Array **, UINT4Vector * ); | |
| | | void LALU2ResizeArray ( LALStatus *, UINT2Array **, UINT4Vector * ); | |
| | | void LALU2DestroyArray ( LALStatus *, UINT2Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT4 | |
| | | */ | |
| | | UINT4Vector * XLALCreateUINT4Vector ( UINT4 length ); | |
| | | UINT4Vector * XLALResizeUINT4Vector ( UINT4Vector * vector, UINT4 length ); | |
| | | void XLALDestroyUINT4Vector ( UINT4Vector * vector ); | |
| | | void LALU4CreateVector ( LALStatus *, UINT4Vector **, UINT4 ); | |
| | | void LALU4ResizeVector ( LALStatus *, UINT4Vector **, UINT4 ); | |
| | | void LALU4DestroyVector ( LALStatus *, UINT4Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT4 | |
| | | */ | |
| | | UINT4Array * XLALCreateUINT4ArrayL ( UINT4, ... ); | |
| | | UINT4Array * XLALCreateUINT4ArrayV ( UINT4, UINT4 * ); | |
| | | UINT4Array * XLALCreateUINT4Array ( UINT4Vector * ); | |
| | | UINT4Array * XLALResizeUINT4ArrayL ( UINT4Array *, UINT4, ... ); | |
| | | UINT4Array * XLALResizeUINT4ArrayV ( UINT4Array *, UINT4, UINT4 * ); | |
| | | UINT4Array * XLALResizeUINT4Array ( UINT4Array *, UINT4Vector * ); | |
| | | void XLALDestroyUINT4Array ( UINT4Array * ); | |
| | | void LALU4CreateArray ( LALStatus *, UINT4Array **, UINT4Vector * ); | |
| | | void LALU4ResizeArray ( LALStatus *, UINT4Array **, UINT4Vector * ); | |
| | | void LALU4DestroyArray ( LALStatus *, UINT4Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT8 | |
| | | */ | |
| | | UINT8Vector * XLALCreateUINT8Vector ( UINT4 length ); | |
| | | UINT8Vector * XLALResizeUINT8Vector ( UINT8Vector * vector, UINT4 length ); | |
| | | void XLALDestroyUINT8Vector ( UINT8Vector * vector ); | |
| | | void LALU8CreateVector ( LALStatus *, UINT8Vector **, UINT4 ); | |
| | | void LALU8ResizeVector ( LALStatus *, UINT8Vector **, UINT4 ); | |
| | | void LALU8DestroyVector ( LALStatus *, UINT8Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * UINT8 | |
| | | */ | |
| | | UINT8Array * XLALCreateUINT8ArrayL ( UINT4, ... ); | |
| | | UINT8Array * XLALCreateUINT8ArrayV ( UINT4, UINT4 * ); | |
| | | UINT8Array * XLALCreateUINT8Array ( UINT4Vector * ); | |
| | | UINT8Array * XLALResizeUINT8ArrayL ( UINT8Array *, UINT4, ... ); | |
| | | UINT8Array * XLALResizeUINT8ArrayV ( UINT8Array *, UINT4, UINT4 * ); | |
| | | UINT8Array * XLALResizeUINT8Array ( UINT8Array *, UINT4Vector * ); | |
| | | void XLALDestroyUINT8Array ( UINT8Array * ); | |
| | | void LALU8CreateArray ( LALStatus *, UINT8Array **, UINT4Vector * ); | |
| | | void LALU8ResizeArray ( LALStatus *, UINT8Array **, UINT4Vector * ); | |
| | | void LALU8DestroyArray ( LALStatus *, UINT8Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL4 | |
| | | */ | |
| | | REAL4Vector * XLALCreateREAL4Vector ( UINT4 length ); | |
| | | REAL4Vector * XLALResizeREAL4Vector ( REAL4Vector * vector, UINT4 length ); | |
| | | void XLALDestroyREAL4Vector ( REAL4Vector * vector ); | |
| | | void LALSCreateVector ( LALStatus *, REAL4Vector **, UINT4 ); | |
| | | void LALSResizeVector ( LALStatus *, REAL4Vector **, UINT4 ); | |
| | | void LALSDestroyVector ( LALStatus *, REAL4Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL4 | |
| | | */ | |
| | | REAL4Array * XLALCreateREAL4ArrayL ( UINT4, ... ); | |
| | | REAL4Array * XLALCreateREAL4ArrayV ( UINT4, UINT4 * ); | |
| | | REAL4Array * XLALCreateREAL4Array ( UINT4Vector * ); | |
| | | REAL4Array * XLALResizeREAL4ArrayL ( REAL4Array *, UINT4, ... ); | |
| | | REAL4Array * XLALResizeREAL4ArrayV ( REAL4Array *, UINT4, UINT4 * ); | |
| | | REAL4Array * XLALResizeREAL4Array ( REAL4Array *, UINT4Vector * ); | |
| | | void XLALDestroyREAL4Array ( REAL4Array * ); | |
| | | void LALSCreateArray ( LALStatus *, REAL4Array **, UINT4Vector * ); | |
| | | void LALSResizeArray ( LALStatus *, REAL4Array **, UINT4Vector * ); | |
| | | void LALSDestroyArray ( LALStatus *, REAL4Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL8 | |
| | | */ | |
| | | REAL8Vector * XLALCreateREAL8Vector ( UINT4 length ); | |
| | | REAL8Vector * XLALResizeREAL8Vector ( REAL8Vector * vector, UINT4 length ); | |
| | | void XLALDestroyREAL8Vector ( REAL8Vector * vector ); | |
| | | void LALDCreateVector ( LALStatus *, REAL8Vector **, UINT4 ); | |
| | | void LALDResizeVector ( LALStatus *, REAL8Vector **, UINT4 ); | |
| | | void LALDDestroyVector ( LALStatus *, REAL8Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL8 | |
| | | */ | |
| | | REAL8Array * XLALCreateREAL8ArrayL ( UINT4, ... ); | |
| | | REAL8Array * XLALCreateREAL8ArrayV ( UINT4, UINT4 * ); | |
| | | REAL8Array * XLALCreateREAL8Array ( UINT4Vector * ); | |
| | | REAL8Array * XLALResizeREAL8ArrayL ( REAL8Array *, UINT4, ... ); | |
| | | REAL8Array * XLALResizeREAL8ArrayV ( REAL8Array *, UINT4, UINT4 * ); | |
| | | REAL8Array * XLALResizeREAL8Array ( REAL8Array *, UINT4Vector * ); | |
| | | void XLALDestroyREAL8Array ( REAL8Array * ); | |
| | | void LALDCreateArray ( LALStatus *, REAL8Array **, UINT4Vector * ); | |
| | | void LALDResizeArray ( LALStatus *, REAL8Array **, UINT4Vector * ); | |
| | | void LALDDestroyArray ( LALStatus *, REAL8Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * COMPLEX8 | |
| | | */ | |
| | | COMPLEX8Vector * XLALCreateCOMPLEX8Vector ( UINT4 length ); | |
| | | COMPLEX8Vector * XLALResizeCOMPLEX8Vector ( COMPLEX8Vector * vector, UINT4 | |
| | | length ); | |
| | | void XLALDestroyCOMPLEX8Vector ( COMPLEX8Vector * vector ); | |
| | | void LALCCreateVector ( LALStatus *, COMPLEX8Vector **, UINT4 ); | |
| | | void LALCResizeVector ( LALStatus *, COMPLEX8Vector **, UINT4 ); | |
| | | void LALCDestroyVector ( LALStatus *, COMPLEX8Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * COMPLEX8 | |
| | | */ | |
| | | COMPLEX8Array * XLALCreateCOMPLEX8ArrayL ( UINT4, ... ); | |
| | | COMPLEX8Array * XLALCreateCOMPLEX8ArrayV ( UINT4, UINT4 * ); | |
| | | COMPLEX8Array * XLALCreateCOMPLEX8Array ( UINT4Vector * ); | |
| | | COMPLEX8Array * XLALResizeCOMPLEX8ArrayL ( COMPLEX8Array *, UINT4, ... ); | |
| | | COMPLEX8Array * XLALResizeCOMPLEX8ArrayV ( COMPLEX8Array *, UINT4, UINT4 * | |
| | | ); | |
| | | COMPLEX8Array * XLALResizeCOMPLEX8Array ( COMPLEX8Array *, UINT4Vector * ); | |
| | | void XLALDestroyCOMPLEX8Array ( COMPLEX8Array * ); | |
| | | void LALCCreateArray ( LALStatus *, COMPLEX8Array **, UINT4Vector * ); | |
| | | void LALCResizeArray ( LALStatus *, COMPLEX8Array **, UINT4Vector * ); | |
| | | void LALCDestroyArray ( LALStatus *, COMPLEX8Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * COMPLEX16 | |
| | | */ | |
| | | COMPLEX16Vector * XLALCreateCOMPLEX16Vector ( UINT4 length ); | |
| | | COMPLEX16Vector * XLALResizeCOMPLEX16Vector ( COMPLEX16Vector * vector, UIN | |
| | | T4 length ); | |
| | | void XLALDestroyCOMPLEX16Vector ( COMPLEX16Vector * vector ); | |
| | | void LALZCreateVector ( LALStatus *, COMPLEX16Vector **, UINT4 ); | |
| | | void LALZResizeVector ( LALStatus *, COMPLEX16Vector **, UINT4 ); | |
| | | void LALZDestroyVector ( LALStatus *, COMPLEX16Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * COMPLEX16 | |
| | | */ | |
| | | COMPLEX16Array * XLALCreateCOMPLEX16ArrayL ( UINT4, ... ); | |
| | | COMPLEX16Array * XLALCreateCOMPLEX16ArrayV ( UINT4, UINT4 * ); | |
| | | COMPLEX16Array * XLALCreateCOMPLEX16Array ( UINT4Vector * ); | |
| | | COMPLEX16Array * XLALResizeCOMPLEX16ArrayL ( COMPLEX16Array *, UINT4, ... ) | |
| | | ; | |
| | | COMPLEX16Array * XLALResizeCOMPLEX16ArrayV ( COMPLEX16Array *, UINT4, UINT4 | |
| | | * ); | |
| | | COMPLEX16Array * XLALResizeCOMPLEX16Array ( COMPLEX16Array *, UINT4Vector * | |
| | | ); | |
| | | void XLALDestroyCOMPLEX16Array ( COMPLEX16Array * ); | |
| | | void LALZCreateArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * ); | |
| | | void LALZResizeArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * ); | |
| | | void LALZDestroyArray ( LALStatus *, COMPLEX16Array ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL4 | |
| | | */ | |
| | | REAL4Vector * XLALCreateVector ( UINT4 length ); | |
| | | REAL4Vector * XLALResizeVector ( REAL4Vector * vector, UINT4 length ); | |
| | | void XLALDestroyVector ( REAL4Vector * vector ); | |
| | | void LALCreateVector ( LALStatus *, REAL4Vector **, UINT4 ); | |
| | | void LALResizeVector ( LALStatus *, REAL4Vector **, UINT4 ); | |
| | | void LALDestroyVector ( LALStatus *, REAL4Vector ** ); | |
| | | | |
| | | /* | |
| | | | |
| | | * REAL4 | |
| | | */ | |
| | | REAL4Array * XLALCreateArrayL ( UINT4, ... ); | |
| | | REAL4Array * XLALCreateArrayV ( UINT4, UINT4 * ); | |
| | | REAL4Array * XLALCreateArray ( UINT4Vector * ); | |
| | | REAL4Array * XLALResizeArrayL ( REAL4Array *, UINT4, ... ); | |
| | | REAL4Array * XLALResizeArrayV ( REAL4Array *, UINT4, UINT4 * ); | |
| | | REAL4Array * XLALResizeArray ( REAL4Array *, UINT4Vector * ); | |
| | | void XLALDestroyArray ( REAL4Array * ); | |
| | | void LALCreateArray ( LALStatus *, REAL4Array **, UINT4Vector * ); | |
| | | void LALResizeArray ( LALStatus *, REAL4Array **, UINT4Vector * ); | |
| | | void LALDestroyArray ( LALStatus *, REAL4Array ** ); | |
| | | | |
| /* Test program. */ | | /* Test program. */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorFactoriesTestC} | | \newpage\input{VectorFactoriesTestC} | |
| \newpage\input{ArrayFactoriesTestC} | | \newpage\input{ArrayFactoriesTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| | | | |
End of changes. 6 change blocks. |
| 52 lines changed or deleted | | 478 lines changed or added | |
|
| Date.h | | Date.h | |
|
| | | /** \file | |
| | | * \ingroup std | |
| | | * \author Chin, D. W. and Creighton, J. D. E. | |
| | | * \brief Routines for converting between various time representations. | |
| | | * | |
| | | */ | |
| /* <lalVerbatim file="DateHV"> | | /* <lalVerbatim file="DateHV"> | |
| | | | |
|
| Author: David Chin <dwchin@umich.edu> +1-734-730-1274 | | Author: David Chin <dwchin@umich.edu> +1-734-709-9119 | |
| $Id: Date.h,v 1.36 2002/05/13 21:06:05 dwchin Exp $ | | $Id: Date.h,v 1.57 2005/08/30 21:32:40 jolien Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{Date.h}} | | \section{Header \texttt{Date.h}} | |
| \label{s:Date.h} | | \label{s:Date.h} | |
| | | | |
| Provides routines for manipulating date and time information. | | Provides routines for manipulating date and time information. | |
| | | | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 73 | |
| #include <lal/LALStatusMacros.h> | | #include <lal/LALStatusMacros.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| | | | |
| #include <lal/DetectorSite.h> | | #include <lal/DetectorSite.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" | | extern "C" | |
| { | | { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (DATEH, "$Id: Date.h,v 1.36 2002/05/13 21:06:05 dwchin Exp $"); | | NRCSID (DATEH, "$Id: Date.h,v 1.57 2005/08/30 21:32:40 jolien Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| #define DATEH_ENULLINPUT 1 | | #define DATEH_ENULLINPUT 1 | |
| #define DATEH_ENULLOUTPUT 2 | | #define DATEH_ENULLOUTPUT 2 | |
| #define DATEH_EDATETOOEARLY 3 | | #define DATEH_EDATETOOEARLY 3 | |
| #define DATEH_ERANGEGPSABS 4 | | #define DATEH_ERANGEGPSABS 4 | |
| #define DATEH_EBUFFTOOSMALL 5 | | #define DATEH_EBUFFTOOSMALL 5 | |
| #define DATEH_EASCTIMEFAIL 6 | | #define DATEH_EASCTIMEFAIL 6 | |
| #define DATEH_EGPSDATETOOEARLY 7 | | #define DATEH_EGPSDATETOOEARLY 7 | |
| #define DATEH_EFORMATPARAMOUTOFRANGE 8 | | #define DATEH_EFORMATPARAMOUTOFRANGE 8 | |
| #define DATEH_EACCPARAMOUTOFRANGE 9 | | #define DATEH_EACCPARAMOUTOFRANGE 9 | |
|
| | | #define DATEH_EDECRTIMETOOLARGE 10 | |
| | | | |
| #define DATEH_MSGENULLINPUT "Input is NULL" | | #define DATEH_MSGENULLINPUT "Input is NULL" | |
| #define DATEH_MSGENULLOUTPUT "Output is NULL" | | #define DATEH_MSGENULLOUTPUT "Output is NULL" | |
| #define DATEH_MSGEDATETOOEARLY "Date too early: Julian Day can only be comp
uted for dates >= 1900-03-01" | | #define DATEH_MSGEDATETOOEARLY "Date too early: Julian Day can only be comp
uted for dates >= 1900-03-01" | |
|
| #define DATEH_MSGERANGEGPSABS "Input time out of range: only able to accura | | /* UPDATEME */ | |
| tely convert times between 1980-Jan-06 00:00:00 UTC (GPS 0) and 2002-Sep-30 | | #define DATEH_MSGERANGEGPSABS "Input time out of range: only able to accura | |
| 23:59:00 UTC (GPS 717465553)" | | tely convert times between 1980-Jan-06 00:00:00 UTC (GPS 0) and 2006-Jun-30 | |
| | | 23:59:59 UTC (GPS 835747212)" | |
| #define DATEH_MSGEBUFFTOOSMALL "Output timestamp string too small: min. siz
e = 26" | | #define DATEH_MSGEBUFFTOOSMALL "Output timestamp string too small: min. siz
e = 26" | |
| #define DATEH_MSGEASCTIMEFAIL "asctimeUNDERSCOREr() failed" | | #define DATEH_MSGEASCTIMEFAIL "asctimeUNDERSCOREr() failed" | |
| #define DATEH_MSGEGPSDATETOOEARLY "Date too early: GPS time only defined fo
r times on or after 1980-Jan-06 00:00:00 UTC" | | #define DATEH_MSGEGPSDATETOOEARLY "Date too early: GPS time only defined fo
r times on or after 1980-Jan-06 00:00:00 UTC" | |
| #define DATEH_MSGEFORMATPARAMOUTOFRANGE "Format parameter out of range: mus
t be one of LALLEAPSECunderscoreTAIUTC or LALLEAPSECunderscoreGPSUTC" | | #define DATEH_MSGEFORMATPARAMOUTOFRANGE "Format parameter out of range: mus
t be one of LALLEAPSECunderscoreTAIUTC or LALLEAPSECunderscoreGPSUTC" | |
| #define DATEH_MSGEACCPARAMOUTOFRANGE "Accuracy parameter out of range: must
be one of LALLEAPSECunderscoreSTRICT or LALLEAPSECunderscoreLOOSE" | | #define DATEH_MSGEACCPARAMOUTOFRANGE "Accuracy parameter out of range: must
be one of LALLEAPSECunderscoreSTRICT or LALLEAPSECunderscoreLOOSE" | |
|
| | | #define DATEH_MSGEDECRTIMETOOLARGE "Decrement amount too large: GPS time ca | |
| | | nnot be decremented to before the start of the GPS epoch." | |
| | | | |
| | | /* </lalErrTable> */ | |
| | | | |
| | | /** The UNIX time of the GPS origin epoch. | |
| | | * | |
| | | * 1980 6 JAN 0h UTC is 3657 days after 1970 1 JAN 0h UTC: | |
| | | * 8 standard years of 365 days = 2920 days | |
| | | * 2 leap years of 366 days = 734 days | |
| | | * 5 extra days. | |
| | | * Hence 3657*86400=315964800. | |
| | | * | |
| | | * Note that this deliberately does not account for any leap seconds in the | |
| | | * interval. POSIX:2001 defines the relation between the UNIX time | |
| | | * \c time_t \c t and a broken down time \c struct \c tm \c utc as | |
| | | * \code | |
| | | * t = utc.tm_sec + utc.tm_min*60 + utc.tm_hour*3600 | |
| | | * + utc.tm_yday*86400 + (utc.tm_year-70)*31536000 | |
| | | * + ((utc.tm_year-69)/4)*86400 - ((utc.tm_year-1)/100)*86400 | |
| | | * + ((utc.tm_year+299)/400)*86400; | |
| | | * \endcode | |
| | | * so if you were to set \c utc.tm_sec=utc.tm_min=utc.tm_hour=0, | |
| | | * \c utc.tm_yday=5, and \c utc.tm_year=80, then you get | |
| | | * \c t=315964800. That is what this is. | |
| | | */ | |
| | | #define XLAL_EPOCH_UNIX_GPS 315964800 | |
| | | #define XLAL_EPOCH_J2000_0_JD 2451545.0 /**< Julian Day of the J2000.0 epoc | |
| | | h (2000 JAN 1 12h UTC). */ | |
| | | #define XLAL_EPOCH_J2000_0_TAI_UTC 32 /**< Leap seconds (TAI-UTC) on the J2 | |
| | | 000.0 epoch (2000 JAN 1 12h UTC). */ | |
| | | #define XLAL_EPOCH_J2000_0_GPS 630763213 /**< GPS seconds of the J2000.0 ep | |
| | | och (2000 JAN 1 12h UTC). */ | |
| | | #define XLAL_EPOCH_GPS_JD 2444244.5 /**< Julian Day of the GPS epoch (1980 | |
| | | JAN 6 0h UTC) */ | |
| | | #define XLAL_EPOCH_GPS_TAI_UTC 19 /**< Leap seconds (TAI-UTC) on the GPS ep | |
| | | och (1980 JAN 6 0h UTC) */ | |
| | | #define XLAL_MJD_REF 2400000.5 /**< Reference Julian Day for Mean Julian Da | |
| | | y. */ | |
| | | #define XLAL_MODIFIED_JULIEN_DAY(utc) (XLALJulianDay(utc)-XLAL_MJD_REF) /** | |
| | | < Modified Julian Day for specified civil time structure. */ | |
| | | | |
| | | /** Converts GPS time to nano seconds stored as an INT8. */ | |
| | | INT8 XLALGPSToINT8NS( const LIGOTimeGPS *epoch ); | |
| | | | |
| | | /** Converts nano seconds stored as an INT8 to GPS time. */ | |
| | | LIGOTimeGPS * XLALINT8NSToGPS( LIGOTimeGPS *epoch, INT8 ns ); | |
| | | | |
| | | /** Sets GPS time given GPS integer seconds and residual nanoseconds. */ | |
| | | LIGOTimeGPS * XLALGPSSet( LIGOTimeGPS *epoch, INT4 gpssec, INT4 gpsnan ); | |
| | | | |
| | | /** Sets GPS time given GPS seconds as a REAL8. */ | |
| | | LIGOTimeGPS * XLALGPSSetREAL8( LIGOTimeGPS *epoch, REAL8 t ); | |
| | | | |
| | | /** Adds dt to a GPS time. */ | |
| | | LIGOTimeGPS * XLALGPSAdd( LIGOTimeGPS *epoch, REAL8 dt ); | |
| | | | |
| | | /** Difference between two GPS times. */ | |
| | | REAL8 XLALGPSDiff( const LIGOTimeGPS *t0, const LIGOTimeGPS *t1 ); | |
| | | | |
| | | /** Compares two GPS times. | |
| | | * Returns: | |
| | | * - -1 if t0 < t1 | |
| | | * - 0 if t0 == t1 | |
| | | * - 1 if t0 > t1. | |
| | | */ | |
| | | int XLALGPSCmp( const LIGOTimeGPS *t0, const LIGOTimeGPS *t1 ); | |
| | | | |
| | | /** Returns the leap seconds TAI-UTC at a given GPS second. */ | |
| | | int XLALLeapSeconds( INT4 gpssec /**< [In] Seconds relative to GPS epoch.*/ | |
| | | ); | |
| | | | |
| | | /** Returns the leap seconds TAI-UTC for a given UTC broken down time. */ | |
| | | int XLALLeapSecondsUTC( const struct tm *utc /**< [In] UTC as a broken down | |
| | | time.*/ ); | |
| | | | |
| | | /** Returns the GPS seconds since the GPS epoch for a | |
| | | * specified UTC time structure. */ | |
| | | INT4 XLALUTCToGPS( const struct tm *utc /**< [In] UTC time in a broken down | |
| | | time structure. */ ); | |
| | | | |
| | | /** Returns a pointer to a tm structure representing the time | |
| | | * specified in seconds since the GPS epoch. */ | |
| | | struct tm * XLALGPSToUTC( | |
| | | struct tm *utc, /**< [Out] Pointer to tm struct where result is stored. | |
| | | */ | |
| | | INT4 gpssec /**< [In] Seconds since the GPS epoch. */ | |
| | | ); | |
| | | | |
| | | /** Returns the Julian Day (JD) corresponding to the date given in a broken | |
| | | * down time structure. */ | |
| | | REAL8 XLALJulianDay( const struct tm *utc /**< [In] UTC time in a broken do | |
| | | wn time structure. */ ); | |
| | | | |
| | | /** Returns the Modified Julian Day (MJD) corresponding to the date given | |
| | | * in a broken down time structure. | |
| | | * | |
| | | * Note: | |
| | | * - By convention, MJD is an integer. | |
| | | * - MJD number starts at midnight rather than noon. | |
| | | * | |
| | | * If you want a Modified Julian Day that has a fractional part, simply use | |
| | | * the macro: | |
| | | * | |
| | | * #define XLAL_MODIFIED_JULIAN_DAY(utc) (XLALJulianDay(utc)-XLAL_MJD_REF) | |
| | | */ | |
| | | INT4 XLALModifiedJulianDay( const struct tm *utc /**< [In] UTC time in a br | |
| | | oken down time structure. */ ); | |
| | | | |
|
| /* </lalErrTable> | | /** Returns the Greenwich Mean Sidereal Time in RADIANS for a specified GPS | |
| | | * epoch. */ | |
| | | REAL8 XLALGreenwichMeanSiderealTime( | |
| | | const LIGOTimeGPS *epoch /**< [In] GPS time. */ | |
| | | ); | |
| | | | |
|
| <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Structures} | | \subsection*{Structures} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vfill{\footnotesize\input{DateHV}} | | \vfill{\footnotesize\input{DateHV}} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 245 | |
| | | | |
| typedef enum | | typedef enum | |
| { | | { | |
| MST_SEC, /* arc seconds */ | | MST_SEC, /* arc seconds */ | |
| MST_HRS, /* arc hours (i.e. units of Right Ascension) */ | | MST_HRS, /* arc hours (i.e. units of Right Ascension) */ | |
| MST_DEG, /* degrees */ | | MST_DEG, /* degrees */ | |
| MST_RAD /* radians */ | | MST_RAD /* radians */ | |
| } LALMSTUnits; | | } LALMSTUnits; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| | | \subsubsection*{Enumeration \texttt{LALMonth}} | |
| | | \idx[Type]{LALMonth} | |
| | | | |
| | | This enumerated type is used to define mnemonic symbols for the | |
| | | \texttt{LALUnixDate} month field (\texttt{tm\_mon}). The allowed values are | |
| | | : | |
| | | | |
| | | \medskip\noindent | |
| | | \begin{tabular}{ll} | |
| | | \verb+LALMONTH_JAN+ & January \\ | |
| | | \verb+LALMONTH_FEB+ & February \\ | |
| | | \verb+LALMONTH_MAR+ & March \\ | |
| | | \verb+LALMONTH_APR+ & April \\ | |
| | | \verb+LALMONTH_MAY+ & May \\ | |
| | | \verb+LALMONTH_JUN+ & June \\ | |
| | | \verb+LALMONTH_JUL+ & July \\ | |
| | | \verb+LALMONTH_AUG+ & August \\ | |
| | | \verb+LALMONTH_SEP+ & September \\ | |
| | | \verb+LALMONTH_OCT+ & October \\ | |
| | | \verb+LALMONTH_NOV+ & November \\ | |
| | | \verb+LALMONTH_DEC+ & December | |
| | | \end{tabular} | |
| | | \bigskip | |
| | | | |
| | | </lalLaTeX> */ | |
| | | | |
| | | typedef enum | |
| | | { | |
| | | LALMONTH_JAN = 0, | |
| | | LALMONTH_FEB = 1, | |
| | | LALMONTH_MAR = 2, | |
| | | LALMONTH_APR = 3, | |
| | | LALMONTH_MAY = 4, | |
| | | LALMONTH_JUN = 5, | |
| | | LALMONTH_JUL = 6, | |
| | | LALMONTH_AUG = 7, | |
| | | LALMONTH_SEP = 8, | |
| | | LALMONTH_OCT = 9, | |
| | | LALMONTH_NOV = 10, | |
| | | LALMONTH_DEC = 11 | |
| | | } LALMonth; | |
| | | | |
| | | /* <lalLaTeX> | |
| \subsubsection*{Enumeration \texttt{LALLeapSecAccuracy}} | | \subsubsection*{Enumeration \texttt{LALLeapSecAccuracy}} | |
| \idx[Type]{LALLeapSecAccuracy} | | \idx[Type]{LALLeapSecAccuracy} | |
| | | | |
| This enumerated type is used as a parameter for \texttt{LALGPStoUTC()}, | | This enumerated type is used as a parameter for \texttt{LALGPStoUTC()}, | |
| \texttt{LALUTCtoGPS()}, and \texttt{LALLeapSecs()} to specify if complete | | \texttt{LALUTCtoGPS()}, and \texttt{LALLeapSecs()} to specify if complete | |
| accuracy is required in use of leap seconds. The allowed values are: | | accuracy is required in use of leap seconds. The allowed values are: | |
| | | | |
| \medskip\noindent | | \medskip\noindent | |
| \begin{tabular}{ll} | | \begin{tabular}{ll} | |
| \verb+LALLEAPSEC_LOOSE+ & may miss leap seconds \\ | | \verb+LALLEAPSEC_LOOSE+ & may miss leap seconds \\ | |
| | | | |
| skipping to change at line 165 | | skipping to change at line 313 | |
| will continue execution. | | will continue execution. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| typedef enum | | typedef enum | |
| { | | { | |
| LALLEAPSEC_LOOSE, | | LALLEAPSEC_LOOSE, | |
| LALLEAPSEC_STRICT | | LALLEAPSEC_STRICT | |
| } LALLeapSecAccuracy; | | } LALLeapSecAccuracy; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| | | \subsubsection*{Enumeration \texttt{LALGPSCompareResult}} | |
| | | \idx[Type]{LALGPSCompareResult} | |
| | | | |
| | | This enumerated type is used as the output type for | |
| | | \texttt{LALCompareGPS()}. The allowed values are: | |
| | | | |
| | | \medskip\noindent | |
| | | \begin{tabular}{ll} | |
| | | \verb+LALGPS_EARLIER+ & GPS1 < GPS2 \\ | |
| | | \verb+LALGPS_EQUAL+ & GPS1 = GPS2 \\ | |
| | | \verb+LALGPS_LATER+ & GPS1 > GPS2 | |
| | | \end{tabular} | |
| | | \bigskip | |
| | | </lalLaTeX> */ | |
| | | typedef enum | |
| | | { | |
| | | LALGPS_EARLIER = -1, | |
| | | LALGPS_EQUAL = 0, | |
| | | LALGPS_LATER = 1 | |
| | | } LALGPSCompareResult; | |
| | | | |
| | | /* <lalLaTeX> | |
| | | | |
| \subsubsection*{Enumeration \texttt{LALLeapSecFormat}} | | \subsubsection*{Enumeration \texttt{LALLeapSecFormat}} | |
| \idx[Type]{LALLeapSecFormat} | | \idx[Type]{LALLeapSecFormat} | |
| | | | |
| This enumerated type is used as a parameter for \texttt{LALLeapSecs()} to | | This enumerated type is used as a parameter for \texttt{LALLeapSecs()} to | |
| specify whether TAI-UTC or GPS-UTC should be returned. TAI-UTC is the | | specify whether TAI-UTC or GPS-UTC should be returned. TAI-UTC is the | |
| total number of leap seconds added to UTC since the TAI epoch. GPS-UTC is | | total number of leap seconds added to UTC since the TAI epoch. GPS-UTC is | |
| the total number of leap seconds added since the GPS epoch. These two | | the total number of leap seconds added since the GPS epoch. These two | |
| quantities are related by: TAI-UTC = GPS-UTC + 19. | | quantities are related by: TAI-UTC = GPS-UTC + 19. | |
| | | | |
| | | | |
| skipping to change at line 195 | | skipping to change at line 365 | |
| { | | { | |
| LALLEAPSEC_TAIUTC, | | LALLEAPSEC_TAIUTC, | |
| LALLEAPSEC_GPSUTC | | LALLEAPSEC_GPSUTC | |
| } LALLeapSecFormat; | | } LALLeapSecFormat; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsubsection*{Structure \texttt{LALUnixDate}} | | \subsubsection*{Structure \texttt{LALUnixDate}} | |
| \idx[Type]{LALUnixDate} | | \idx[Type]{LALUnixDate} | |
| | | | |
|
| This structure is just the standard Unix \texttt{tm} structure. We shall | | This structure is just the standard Unix \texttt{tm} structure, described | |
| | | in the man page for \texttt{ctime(3)}. We shall | |
| {\em always} ignore the daylight savings time field, \verb+tm_isdst+. | | {\em always} ignore the daylight savings time field, \verb+tm_isdst+. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| * The standard Unix tm structure | | * The standard Unix tm structure | |
| */ | | */ | |
| typedef struct | | typedef struct | |
| tm | | tm | |
| LALUnixDate; | | LALUnixDate; | |
| | | | |
| skipping to change at line 217 | | skipping to change at line 388 | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsubsection{Structure \texttt{LALTimeInterval}} | | \subsubsection{Structure \texttt{LALTimeInterval}} | |
| \idx[Type]{LALTimeInterval} | | \idx[Type]{LALTimeInterval} | |
| | | | |
| This structure is used for storing intervals of \texttt{LIGOTimeGPS} | | This structure is used for storing intervals of \texttt{LIGOTimeGPS} | |
| and \texttt{LIGOTimeUnix} times. The fields are: | | and \texttt{LIGOTimeUnix} times. The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item{\texttt{INT4 seconds}} Integral part of the time interval | | \item{\texttt{INT4 seconds}} Integral part of the time interval | |
|
| \item{\texttt{INT8 nanoSeconds}} Residual nanoseconds (\textit{i.e.} | | \item{\texttt{INT4 nanoSeconds}} Residual nanoseconds (\textit{i.e.} | |
| fractional part, in nanoseconds) | | fractional part, in nanoseconds) | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| * This time object is for time intervals, i.e. no reference epoch implied | | * This time object is for time intervals, i.e. no reference epoch implied | |
| */ | | */ | |
| typedef struct | | typedef struct | |
| tagLALTimeInterval | | tagLALTimeInterval | |
| { | | { | |
| INT4 seconds; | | INT4 seconds; | |
|
| INT8 nanoSeconds; | | INT4 nanoSeconds; | |
| } | | } | |
| LALTimeInterval; | | LALTimeInterval; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsubsection{Structure \texttt{LALDate}} | | \subsubsection{Structure \texttt{LALDate}} | |
| \idx[Type]{LALDate} | | \idx[Type]{LALDate} | |
| | | | |
| This structure is an extension of \texttt{LALUnixDate} to include residual | | This structure is an extension of \texttt{LALUnixDate} to include residual | |
| nanosecond information. The fields are: | | nanosecond information. The fields are: | |
| | | | |
| skipping to change at line 337 | | skipping to change at line 508 | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| typedef struct | | typedef struct | |
| tagLALLeapSecFormatAndAcc | | tagLALLeapSecFormatAndAcc | |
| { | | { | |
| LALLeapSecFormat format; | | LALLeapSecFormat format; | |
| LALLeapSecAccuracy accuracy; | | LALLeapSecAccuracy accuracy; | |
| } | | } | |
| LALLeapSecFormatAndAcc; | | LALLeapSecFormatAndAcc; | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \subsubsection{Structure \texttt{LALMSTUnitsAndAcc}} | |
| | | \index[Type]{LALMSTUnitsAndAcc} | |
| | | | |
| | | This structure aggregates the \texttt{LALMSTUnits} and | |
| | | \texttt{LALLeapSecAccuracy} parameters for passing to | |
| | | \texttt{LALGPStoGMST1()} and \texttt{LALGPStoLMST1()}. | |
| | | </lalLaTeX> */ | |
| | | typedef struct | |
| | | tagLALMSTUnitsAndAcc | |
| | | { | |
| | | LALMSTUnits units; | |
| | | LALLeapSecAccuracy accuracy; | |
| | | } | |
| | | LALMSTUnitsAndAcc; | |
| | | | |
| /* | | /* | |
| * Function prototypes | | * Function prototypes | |
| */ | | */ | |
| | | | |
|
| | | int XLALStrToGPS(LIGOTimeGPS *epoch, const char *nptr, char **endptr); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{JulianC} | | \newpage\input{JulianC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALJulianDay(LALStatus *status, | | void LALJulianDay(LALStatus *status, | |
| INT4 *jDay, | | INT4 *jDay, | |
| const LALDate *date); | | const LALDate *date); | |
| | | | |
| void LALJulianDate (LALStatus *status, | | void LALJulianDate (LALStatus *status, | |
| REAL8 *jDateOut, | | REAL8 *jDateOut, | |
| | | | |
| skipping to change at line 377 | | skipping to change at line 566 | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALGMST1 (LALStatus *status, | | void LALGMST1 (LALStatus *status, | |
| REAL8 *gmst, /* output - GMST1 */ | | REAL8 *gmst, /* output - GMST1 */ | |
| const LALDate *date, /* input - date and time */ | | const LALDate *date, /* input - date and time */ | |
| LALMSTUnits outunits); /* GMST1 units */ | | LALMSTUnits outunits); /* GMST1 units */ | |
| | | | |
| void LALGPStoGMST1( LALStatus *status, | | void LALGPStoGMST1( LALStatus *status, | |
| REAL8 *gmst, /* output - GMST1 */ | | REAL8 *gmst, /* output - GMST1 */ | |
| const LIGOTimeGPS *gps, /* input - GPS time */ | | const LIGOTimeGPS *gps, /* input - GPS time */ | |
|
| LALMSTUnits outunits); /* GMST1 units */ | | const LALMSTUnitsAndAcc *pUnitsAndAcc); /* GMST1 units | |
| | | and | |
| | | leapsec accuracy */ | |
| | | | |
| void LALLMST1 (LALStatus *status, | | void LALLMST1 (LALStatus *status, | |
| REAL8 *lmst, /* output - LMST1 */ | | REAL8 *lmst, /* output - LMST1 */ | |
| const LALPlaceAndDate *placeAndDate, /* input - location | | const LALPlaceAndDate *placeAndDate, /* input - location | |
| and date */ | | and date */ | |
| LALMSTUnits outunits); /* LMST1 units */ | | LALMSTUnits outunits); /* LMST1 units */ | |
| | | | |
| void LALGPStoLMST1( LALStatus *status, | | void LALGPStoLMST1( LALStatus *status, | |
| REAL8 *lmst, /* output - LMST1 *
/ | | REAL8 *lmst, /* output - LMST1 *
/ | |
| const LALPlaceAndGPS *placeAndGps, /* input - location
and | | const LALPlaceAndGPS *placeAndGps, /* input - location
and | |
| GPS */ | | GPS */ | |
|
| LALMSTUnits outunits); /* LMST1 units */ | | const LALMSTUnitsAndAcc *pUnitsAndAcc); /* LMST1 | |
| | | units | |
| | | and leapsec | |
| | | accuracy */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{SecsToLALDateC} | | \newpage\input{SecsToLALDateC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALSecsToLALDate(LALStatus *status, | | void LALSecsToLALDate(LALStatus *status, | |
| LALDate *date, | | LALDate *date, | |
| REAL8 ); | | REAL8 ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| skipping to change at line 428 | | skipping to change at line 620 | |
| const LALLeapSecFormatAndAcc *p_formatAndAcc); | | const LALLeapSecFormatAndAcc *p_formatAndAcc); | |
| | | | |
| /* The following 2 functions are from S.J. Berukoff, included at his reques
t */ | | /* The following 2 functions are from S.J. Berukoff, included at his reques
t */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{GPStoFloatC} | | \newpage\input{GPStoFloatC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void LALGPStoFloat (LALStatus *status, | | void LALGPStoFloat (LALStatus *status, | |
| REAL8 *output, | | REAL8 *output, | |
| const LIGOTimeGPS *input); | | const LIGOTimeGPS *input); | |
| | | | |
|
| | | void XLALFloatToGPS(LIGOTimeGPS *output, | |
| | | const REAL8 input); | |
| | | | |
| void LALFloatToGPS(LALStatus *status, | | void LALFloatToGPS(LALStatus *status, | |
| LIGOTimeGPS *output, | | LIGOTimeGPS *output, | |
| const REAL8 *input); | | const REAL8 *input); | |
| | | | |
|
| | | void LALFloatToInterval(LALStatus *status, | |
| | | LALTimeInterval *pInterval, | |
| | | const REAL8 *pDeltaT); | |
| | | | |
| | | void LALIntervalToFloat(LALStatus *status, | |
| | | REAL8 *pDeltaT, | |
| | | const LALTimeInterval *pInterval); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{GPStoINT8C} | | \newpage\input{GPStoINT8C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | LIGOTimeGPS * | |
| | | XLALINT8toGPS ( | |
| | | LIGOTimeGPS *output, | |
| | | INT8 input | |
| | | ); | |
| | | | |
| void | | void | |
| LALINT8toGPS ( | | LALINT8toGPS ( | |
| LALStatus *status, | | LALStatus *status, | |
| LIGOTimeGPS *output, | | LIGOTimeGPS *output, | |
| const INT8 *input | | const INT8 *input | |
| ); | | ); | |
| | | | |
|
| | | INT8 | |
| | | XLALGPStoINT8 ( | |
| | | const LIGOTimeGPS *input | |
| | | ); | |
| | | | |
| void | | void | |
| LALGPStoINT8 ( | | LALGPStoINT8 ( | |
| LALStatus *status, | | LALStatus *status, | |
| INT8 *output, | | INT8 *output, | |
| const LIGOTimeGPS *input | | const LIGOTimeGPS *input | |
| ); | | ); | |
| | | | |
|
| | | /* This next function is to facilitate writing loops that increment time | |
| | | * by a time interval */ | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{IncrementGPSC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALIncrementGPS (LALStatus *status, | |
| | | LIGOTimeGPS *pIncrementedGPS, | |
| | | const LIGOTimeGPS *pInitialGPS, | |
| | | const LALTimeInterval *pDeltaT); | |
| | | | |
| | | void | |
| | | LALDecrementGPS (LALStatus *status, | |
| | | LIGOTimeGPS *pDecrementedGPS, | |
| | | const LIGOTimeGPS *pInitialGPS, | |
| | | const LALTimeInterval *pDeltaT); | |
| | | | |
| | | /* This function takes the difference between two GPS times, GPS1 - GPS2 */ | |
| | | void | |
| | | LALDeltaGPS (LALStatus *status, | |
| | | LALTimeInterval *pDeltaGPS, /* output: GPS1 - GPS2*/ | |
| | | const LIGOTimeGPS *pGPS1, /* input: GPS1 */ | |
| | | const LIGOTimeGPS *pGPS2); /* input: GPS2 */ | |
| | | | |
| | | /* This function compares GPS1 to GPS2; returns 0 if GPS1 == GPS2, | |
| | | returns -1 if GPS1 < GPS2, +1 if GPS1 > GPS2 */ | |
| | | void | |
| | | LALCompareGPS (LALStatus *status, | |
| | | LALGPSCompareResult *pResult, /* output: -1 => GPS1 < GPS2 | |
| | | 0 => GPS1 = GPS2 | |
| | | 1 => GPS1 > GPS2 * | |
| | | / | |
| | | const LIGOTimeGPS *pGPS1, /* input: GPS1 */ | |
| | | const LIGOTimeGPS *pGPS2); /* input: GPS2 */ | |
| | | | |
| | | LIGOTimeGPS * | |
| | | XLALAddFloatToGPS( | |
| | | LIGOTimeGPS *gps, | |
| | | REAL8 deltaT | |
| | | ); | |
| | | | |
| | | void | |
| | | LALAddFloatToGPS (LALStatus *status, | |
| | | LIGOTimeGPS *outputGPS, /* outputGPS = start | |
| | | GPS + deltaT */ | |
| | | const LIGOTimeGPS *startGPS, /* input: GPS time * | |
| | | / | |
| | | REAL8 deltaT); /* input: interval t | |
| | | o increment by in seconds*/ | |
| | | | |
| | | REAL8 | |
| | | XLALDeltaFloatGPS( | |
| | | const LIGOTimeGPS *GPS1, | |
| | | const LIGOTimeGPS *GPS2 | |
| | | ); | |
| | | | |
| | | void | |
| | | LALDeltaFloatGPS (LALStatus *status, | |
| | | REAL8 *deltaT, /* tGPS1 - tGPS2 */ | |
| | | const LIGOTimeGPS *tGPS1, /* input: tGPS1 */ | |
| | | const LIGOTimeGPS *tGPS2); | |
| | | | |
| | | /* This function returns the current GPS time according to the system clock | |
| | | */ | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{GPSTimeNowC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALGPSTimeNow ( | |
| | | LALStatus *status, | |
| | | LIGOTimeGPS *gpstime, | |
| | | const LALLeapSecAccuracy *accuracy | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{PlaygroundC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALINT8NanoSecIsPlayground ( | |
| | | LALStatus *status, | |
| | | INT4 *playground, | |
| | | INT8 *ns | |
| | | ); | |
| | | | |
| | | void | |
| | | LALGPSIsPlayground ( | |
| | | LALStatus *status, | |
| | | INT4 *playground, | |
| | | LIGOTimeGPS *gpstime | |
| | | ); | |
| | | | |
| | | void | |
| | | LALSegmentIsPlayground ( | |
| | | LALStatus *status, | |
| | | INT4 *playground, | |
| | | LIGOTimeGPS *gpsStart, | |
| | | LIGOTimeGPS *gpsEnd | |
| | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _DATE_H */ | | #endif /* _DATE_H */ | |
| | | | |
End of changes. 22 change blocks. |
| 13 lines changed or deleted | | 343 lines changed or added | |
|
| FindChirp.h | | FindChirp.h | |
| /*----------------------------------------------------------------------- | | /*----------------------------------------------------------------------- | |
| * | | * | |
| * File Name: FindChirp.h | | * File Name: FindChirp.h | |
| * | | * | |
| * Author: Allen, B., Brown, D. A. and Creighton, J. D. E. | | * Author: Allen, B., Brown, D. A. and Creighton, J. D. E. | |
| * | | * | |
|
| * Revision: $Id: FindChirp.h,v 1.21 2002/05/23 20:12:40 duncan Exp $ | | * Revision: $Id: FindChirp.h,v 1.80 2005/09/06 03:40:29 duncan Exp $ | |
| * | | * | |
| *----------------------------------------------------------------------- | | *----------------------------------------------------------------------- | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalVerbatim file="FindChirpHV"> | | <lalVerbatim file="FindChirpHV"> | |
| Author: Allen, B., Brown, D. A. and Creighton, J. D. E. | | Author: Allen, B., Brown, D. A. and Creighton, J. D. E. | |
|
| $Id: FindChirp.h,v 1.21 2002/05/23 20:12:40 duncan Exp $ | | $Id: FindChirp.h,v 1.80 2005/09/06 03:40:29 duncan Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| <lalLaTeX> | | <lalLaTeX> | |
| \section{Header \texttt{FindChirp.h}} | | \section{Header \texttt{FindChirp.h}} | |
| \label{s:FindChirp.h} | | \label{s:FindChirp.h} | |
| | | | |
|
| Provides core protypes, structures and functions to filter interferometer d | | \noindent This header provides core prototypes, structures and functions to | |
| ata | | filter interferometer data for binary inspiral chirps. | |
| for binary inspiral chirps. | | | |
| | | | |
|
| \subsection*{Synopsis} | | \subsubsection*{Synopsis} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/FindChirp.h> | | #include <lal/FindChirp.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
|
| \input{FindChirpHDoc} | | \noindent Each function in findchirp falls into one of four classes: | |
| | | \begin{enumerate} | |
| | | \item Generate management functions which are independent of the type of | |
| | | filtering implemented. The prototypes for these functions are provided by | |
| | | this header file. | |
| | | | |
| | | \item Functions for filtering data for time domain and frequency domain | |
| | | templates with an unknown amplitude and phase. These are the functions | |
| | | that implement matched filtering for time domain templates (TaylorT1, | |
| | | TaylorT2, TaylorT2, PadeT1, EOB and GeneratePPN) and matched filtering | |
| | | for post-Newtonian frequency domain templates (FindChirpSP). The main | |
| | | filter function \texttt{FindChirpFilterSegment()} is prototyped in | |
| | | this header file. The template generation and data conditioning functions | |
| | | are prototyped in \texttt{FindChirpSP.h} and \texttt{FindChirpTD.h}. | |
| | | Full documentation of the filtering algorithm used can be found in the | |
| | | documentation of the module \texttt{FindChirpFilter.c}. | |
| | | | |
| | | \item Functions to filter interferometer data for using the frequency | |
| | | domain non-spinning black hole detection template family known as BCV. | |
| | | These functions are protoyped by the header \texttt{FindChirpBCV.h} | |
| | | which contains documentation of the algorithms used. | |
| | | | |
| | | \item Functions to filter interferometer data for using the frequency domai | |
| | | n | |
| | | spinning black hole detection template family known as BCVSpin. These | |
| | | functions are protoyped by the header \texttt{FindChirpBCVSpin.h} which | |
| | | contains documentation of the algorithms used. | |
| | | \end{enumerate} | |
| | | | |
| | | \noindent The goal of all the filtering functions is to determine if the | |
| | | (calibrated) output of the interferometer $s(t)$ contains a gravitational w | |
| | | ave | |
| | | $h(t)$ in the presence of the detector noise $n(t)$. When the interferomete | |
| | | r | |
| | | is operating properly | |
| | | \begin{equation} | |
| | | s(t) = \left\{ \begin{array}{ll} | |
| | | n(t) + h(t) & \textrm{signal present},\\ | |
| | | n(t) & \textrm{signal absent}. | |
| | | \end{array}\right. | |
| | | \end{equation} | |
| | | The detection of signals of known form in noise is a classic problem of sig | |
| | | nal | |
| | | processing\cite{wainstein:1962} and can be answered by the construction of | |
| | | a | |
| | | \emph{detection statistic} and a test to see if the statistic is above some | |
| | | pre-assigned threshold. The construction of the various detection | |
| | | statistics used for each the three types of search are described in the mod | |
| | | ules | |
| | | that implement the search. | |
| | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #ifndef _FINDCHIRPH_H | | #ifndef _FINDCHIRPH_H | |
| #define _FINDCHIRPH_H | | #define _FINDCHIRPH_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| #include <lal/ComplexFFT.h> | | #include <lal/ComplexFFT.h> | |
| #include <lal/DataBuffer.h> | | #include <lal/DataBuffer.h> | |
|
| #ifdef LAL_ENABLE_MPI | | #include <lal/LIGOMetadataTables.h> | |
| #include <lal/Comm.h> | | | |
| #endif | | | |
| #include <lal/LALInspiral.h> | | #include <lal/LALInspiral.h> | |
|
| | | #include <lal/LALInspiralBank.h> | |
| | | #include <lal/GeneratePPNInspiral.h> | |
| | | #include <lal/FindChirpDatatypes.h> | |
| #include <lal/FindChirpChisq.h> | | #include <lal/FindChirpChisq.h> | |
|
| | | #include <lal/FindChirpFilterOutputVeto.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (FINDCHIRPH, "$Id: FindChirp.h,v 1.21 2002/05/23 20:12:40 duncan Exp
$"); | | NRCSID (FINDCHIRPH, "$Id: FindChirp.h,v 1.80 2005/09/06 03:40:29 duncan Exp
$"); | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| #define FINDCHIRPH_ENULL 1 | | #define FINDCHIRPH_ENULL 1 | |
| #define FINDCHIRPH_ENNUL 2 | | #define FINDCHIRPH_ENNUL 2 | |
| #define FINDCHIRPH_EALOC 3 | | #define FINDCHIRPH_EALOC 3 | |
| #define FINDCHIRPH_ENUMZ 5 | | #define FINDCHIRPH_ENUMZ 5 | |
| #define FINDCHIRPH_ESEGZ 6 | | #define FINDCHIRPH_ESEGZ 6 | |
| #define FINDCHIRPH_ECHIZ 7 | | #define FINDCHIRPH_ECHIZ 7 | |
| #define FINDCHIRPH_EDTZO 8 | | #define FINDCHIRPH_EDTZO 8 | |
| #define FINDCHIRPH_ETRNC 10 | | #define FINDCHIRPH_ETRNC 10 | |
| #define FINDCHIRPH_EFLOW 11 | | #define FINDCHIRPH_EFLOW 11 | |
| #define FINDCHIRPH_EFREE 12 | | #define FINDCHIRPH_EFREE 12 | |
| #define FINDCHIRPH_ERHOT 15 | | #define FINDCHIRPH_ERHOT 15 | |
| #define FINDCHIRPH_ECHIT 16 | | #define FINDCHIRPH_ECHIT 16 | |
| #define FINDCHIRPH_ECRUP 17 | | #define FINDCHIRPH_ECRUP 17 | |
|
| | | #define FINDCHIRPH_ESMSM 18 | |
| | | #define FINDCHIRPH_EHETR 19 | |
| | | #define FINDCHIRPH_EDFDT 20 | |
| | | #define FINDCHIRPH_EAPRX 21 | |
| | | #define FINDCHIRPH_EUAPX 22 | |
| | | #define FINDCHIRPH_ECHTZ 23 | |
| | | #define FINDCHIRPH_EMASS 24 | |
| | | #define FINDCHIRPH_EWVFM 25 | |
| | | #define FINDCHIRPH_EBCVC 25 | |
| | | | |
| #define FINDCHIRPH_MSGENULL "Null pointer" | | #define FINDCHIRPH_MSGENULL "Null pointer" | |
| #define FINDCHIRPH_MSGENNUL "Non-null pointer" | | #define FINDCHIRPH_MSGENNUL "Non-null pointer" | |
| #define FINDCHIRPH_MSGEALOC "Memory allocation error" | | #define FINDCHIRPH_MSGEALOC "Memory allocation error" | |
| #define FINDCHIRPH_MSGENUMZ "Invalid number of points in segment" | | #define FINDCHIRPH_MSGENUMZ "Invalid number of points in segment" | |
| #define FINDCHIRPH_MSGESEGZ "Invalid number of segments" | | #define FINDCHIRPH_MSGESEGZ "Invalid number of segments" | |
| #define FINDCHIRPH_MSGECHIZ "Invalid number of chi squared bins" | | #define FINDCHIRPH_MSGECHIZ "Invalid number of chi squared bins" | |
| #define FINDCHIRPH_MSGEDTZO "deltaT is zero or negative" | | #define FINDCHIRPH_MSGEDTZO "deltaT is zero or negative" | |
| #define FINDCHIRPH_MSGETRNC "Duration of inverse spectrum in time domain is
negative" | | #define FINDCHIRPH_MSGETRNC "Duration of inverse spectrum in time domain is
negative" | |
| #define FINDCHIRPH_MSGEFLOW "Inverse spectrum low frequency cutoff is negat
ive" | | #define FINDCHIRPH_MSGEFLOW "Inverse spectrum low frequency cutoff is negat
ive" | |
| #define FINDCHIRPH_MSGEFREE "Error freeing memory" | | #define FINDCHIRPH_MSGEFREE "Error freeing memory" | |
|
| #define FINDCHIRPH_MSGERHOT "Rhosq threshold is zero or negative" | | #define FINDCHIRPH_MSGERHOT "Rhosq threshold is negative" | |
| #define FINDCHIRPH_MSGECHIT "Chisq threshold is zero or negative" | | #define FINDCHIRPH_MSGECHIT "Chisq threshold is negative" | |
| #define FINDCHIRPH_MSGECRUP "Chirp length or invSpecTrunc too long for leng
th of data segment" | | #define FINDCHIRPH_MSGECRUP "Chirp length or invSpecTrunc too long for leng
th of data segment" | |
|
| | | #define FINDCHIRPH_MSGESMSM "Size mismatch between vectors" | |
| | | #define FINDCHIRPH_MSGEHETR "Attempting to simulate heterodyned GW" | |
| | | #define FINDCHIRPH_MSGEDFDT "Waveform sampling interval is too large" | |
| | | #define FINDCHIRPH_MSGEAPRX "Incorrect waveform approximant" | |
| | | #define FINDCHIRPH_MSGEUAPX "Unknown waveform approximant" | |
| | | #define FINDCHIRPH_MSGECHTZ "Length of chirp is zero or negative" | |
| | | #define FINDCHIRPH_MSGEMASS "Invalid mass parameters for template generatio | |
| | | n" | |
| | | #define FINDCHIRPH_MSGEWVFM "Unknown injection waveform" | |
| | | #define FINDCHIRPH_MSGEBCVC "BCVC code: thetav not in [-pi, pi]." | |
| | | | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Types} | | \subsection*{Types} | |
|
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
| /* --- enumeraion type for simulations ----------------------------------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHWaveformGenerator"> | | | |
| typedef enum | | | |
| { | | | |
| findchirpSP, | | | |
| injectGenPPN | | | |
| } | | | |
| WaveformGenerator; | | | |
| #pragma </lalVerbatim> | | | |
| #if 0 | | | |
| <lalLaTeX> | | | |
| \subsubsection*{Enumeration Type \texttt{WaveformGenerator}} | | | |
| \idx[Type]{WaveformGenerator} | | | |
| | | | |
| \input{FindChirpHWaveformGenerator} | | | |
| | | | |
| \noindent This enumaration type lists the possible methods of generating | | | |
| inspiral waveforms. The types in the enum should be of the form | | | |
| \texttt{packagenameGenType}, where \texttt{packagename} is the name of the | | | |
| LAL package that the particular waveform generator resides and \texttt{GenT | | | |
| ype} | | | |
| is a unique identifier for that waveform generator. The choices are: | | | |
| | | | |
| \begin{description} | | | |
| \item[\texttt{findchirpSP}] The \texttt{findchirp} built in stationary phas | | | |
| e | | | |
| waveform generator. | | | |
| | | | |
| \item[\texttt{injectGenPPN}] The \texttt{LALGeneratePPNInspiral()} function | | | |
| from the \texttt{inject} package. | | | |
| | | | |
|
| \item[\texttt{fctFCT}] The \texttt{fct} algorithm was used to find the chir | | \subsubsection*{Structure \texttt{FindChirpInitParams}} | |
| p. | | \idx[Type]{FindChirpInitParams} | |
| \end{description} | | | |
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
|
| /* | | \noindent This structure provides the essential information for the | |
| * | | filter initialisation and memory allocation functions used by findchirp. | |
| * typedefs of structures used by the findchirp functions | | | |
| * | | | |
| */ | | | |
| | | | |
|
| #if 0 | | | |
| <lalLaTeX> | | | |
| \subsubsection*{Input and output data structures} | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| /* --- structure for describing a binary insipral event ------------------ | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHInspiralEvent"> | | | |
| typedef struct | | typedef struct | |
|
| tagInspiralEvent | | tagFindChirpInitParams | |
| { | | { | |
|
| UINT4 id; | | UINT4 numSegments; | |
| UINT4 segmentNumber; | | UINT4 numPoints; | |
| LIGOTimeGPS time; | | UINT4 ovrlap; | |
| LIGOTimeGPS impulseTime; | | | |
| UINT4 timeIndex; | | | |
| InspiralTemplate tmplt; | | | |
| REAL4 snrsq; | | | |
| REAL4 chisq; | | | |
| REAL4 sigma; | | | |
| REAL4 effDist; | | | |
| REAL4 coaPhase; | | | |
| UINT4 numChisqBins; | | UINT4 numChisqBins; | |
|
| CHAR ifoName[2]; | | BOOLEAN createRhosqVec; | |
| CHAR channel[LALNameLength]; | | BOOLEAN createCVec; | |
| WaveformGenerator wavGen; | | Approximant approximant; | |
| struct tagInspiralEvent *next; | | | |
| } | | } | |
|
| InspiralEvent; | | FindChirpInitParams; | |
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{InspiralEvent}} | | | |
| \idx[Type]{InspiralEvent} | | | |
| | | | |
| \input{FindChirpHInspiralEvent} | | | |
| | | | |
| \noindent This structure describes inspiral events found by \texttt{findchi | | | |
| rp}. | | | |
| The fields are: | | | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{UINT4 id}] A unique number assigned by the filter routine to | | \item[\texttt{UINT4 numSegments}] The number of data segments in the input | |
| each event it finds. | | \texttt{DataSegmentVector} and a the \texttt{FindChirpSegmentVector}. | |
| | | | |
| \item[\texttt{UINT4 segmentNumber}] The id number of the | | | |
| \texttt{FindChirpDataSegment} in which the event was found. | | | |
| | | | |
| \item[\texttt{LIGOTimeGPS time}] The GPS time at which the event occoured. | | | |
| | | | |
|
| \item[\texttt{UINT4 timeIndex}] The index at which the event occoured in | | \item[\texttt{UINT4 numPoints}] The number of discrete data points $N$ in e | |
| the array containing the filter output. | | ach | |
| | | data segment. | |
| \item[\texttt{InspiralTemplate tmplt}] The parameters of the inspiral templ | | | |
| ate | | | |
| for the event. | | | |
| | | | |
| \item[\texttt{REAL4 snrsq}] The value of $\rho^2$ for the event. | | | |
| | | | |
| \item[\texttt{REAL4 chisq}] The value of the $\chi^2$ veto for the event, i | | | |
| f | | | |
| it has been computed. | | | |
| | | | |
| \item[\texttt{REAL4 sigma}] The value of the normalisation constant $\sigma | | | |
| $ | | | |
| for the event. | | | |
| | | | |
| \item[\texttt{REAL4 effDist}] The effective distance in megaparsecs to the | | | |
| event. | | | |
| | | | |
|
| \item[\texttt{REAL4 coaPhase}] The coalescence phase of the chirp. | | \item[\texttt{UINT4 ovrlap}] The number of sample points by which each | |
| | | data segment overlaps. | |
| | | | |
|
| \item[\texttt{WaveformGenerator wavGen}] The particular waveform generator | | \item[\texttt{UINT4 numChisqBins}] The number of bins $p$ used to contruct | |
| that was used in the matched filter for this chirp. | | the | |
| | | $\chi^2$ veto. | |
| | | | |
|
| \item[\texttt{CHAR ifoName[2]}] Array for storing the two character | | \item[\texttt{BOOLEAN createRhosqVec}] Flag that controls whether or not th | |
| interferometer name (e.g. L1, H2, etc.) | | e | |
| | | filter function should store the output of the matched filter, $\rho^2(t)$, | |
| | | as | |
| | | well as the events. Memory is allocated for this vector if the flag is set | |
| | | to | |
| | | 1. | |
| | | | |
| | | \item[\texttt{BOOLEAN createCVec}] Flag that controls whether or not the | |
| | | filter function should store the complex filter output $x(t) + i y(t)$ need | |
| | | ed | |
| | | by the coherent inspiral code. Memory is allocated for this vector if the | |
| | | flag is set to 1. | |
| | | | |
| | | \item[\texttt{Approximant approximant}] Initialize the findchirp routines | |
| | | to fiter with templates of type \texttt{approximant}. Valid approximants ar | |
| | | e | |
| | | TaylorT1, TaylorT2, TaylorT3, PadeT1, EOB, FindChirpSP, BCV and BCVSpin. | |
| | | | |
|
| \item[\texttt{struct tagInspiralEvent *next}] A pointer to a structure of t | | | |
| ype | | | |
| \texttt{InspiralEvent} to allow the construction of a linked list of events | | | |
| . | | | |
| \end{description} | | \end{description} | |
|
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
| /* --- vector of DataSegment, as defined the framedata package ----------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHDataSegmentVector"> | | | |
| typedef struct | | | |
| tagDataSegmentVector | | | |
| { | | | |
| UINT4 length; | | | |
| DataSegment *data; | | | |
| } | | | |
| DataSegmentVector; | | | |
| #pragma </lalVerbatim> | | | |
| #if 0 | | | |
| <lalLaTeX> | | | |
| \subsubsection*{Structure \texttt{DataSegmentVector}} | | | |
| \idx[Type]{DataSegmentVector} | | | |
| | | | |
|
| \input{FindChirpHDataSegmentVector} | | \subsubsection*{Structure \texttt{FindChirpDataParams}} | |
| | | \idx[Type]{FindChirpDataParams} | |
| | | | |
|
| \noindent This structure provides a LAL like vector structure for the | | \noindent This structure contains the parameters needed to call the data | |
| \texttt{DataSegment} structure defined in the package \texttt{framedata} | | conditioning functions \texttt{FindChirpSPData()}, \texttt{FindChirpTDData( | |
| | | )}, | |
| | | \texttt{FindChirpBCVData()} or \texttt{FindChirpBCVSpinData()}. It should b | |
| | | e | |
| | | initialized by \texttt{FindChirpDataInit()} and destroyed by | |
| | | \texttt{FindChirpDataFinalize()}. | |
| | | | |
|
| \begin{description} | | | |
| \item[\texttt{UINT4 length}] Number of \texttt{DataSegment} structres in th | | | |
| e | | | |
| vector | | | |
| | | | |
| \item[\texttt{DataSegment *data}] Pointer to the data. | | | |
| \end{description} | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| /* --- processed data segment used by FindChirp filter routine ----------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHFindChirpSegment"> | | | |
| typedef struct | | typedef struct | |
|
| tagFindChirpSegment | | tagFindChirpDataParams | |
| { | | { | |
|
| COMPLEX8FrequencySeries *data; | | REAL4Vector *ampVec; | |
| UINT4Vector *chisqBinVec; | | REAL4Vector *ampVecBCV; | |
| REAL8 deltaT; | | REAL8Vector *ampVecBCVSpin1; | |
| REAL4 segNorm; | | REAL8Vector *ampVecBCVSpin2; | |
| | | RealFFTPlan *fwdPlan; | |
| | | RealFFTPlan *invPlan; | |
| | | REAL4Vector *wVec; | |
| | | COMPLEX8Vector *wtildeVec; | |
| | | REAL4Vector *tmpltPowerVec; | |
| | | REAL4Vector *tmpltPowerVecBCV; | |
| REAL4 fLow; | | REAL4 fLow; | |
|
| | | REAL4 dynRange; | |
| UINT4 invSpecTrunc; | | UINT4 invSpecTrunc; | |
|
| UINT4 number; | | Approximant approximant; | |
| } | | } | |
|
| FindChirpSegment; | | FindChirpDataParams; | |
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{FindChirpSegment}} | | | |
| \idx[Type]{FindChirpSegment} | | | |
| | | | |
|
| \input{FindChirpHFindChirpSegment} | | \begin{description} | |
| | | \item[\texttt{REAL4Vector *ampVec}] A vector containing the frequency domai | |
| | | n | |
| | | quantity $(k/N)^{-7/6}$, where $k$ is the frequency series index and $N$ is | |
| | | the | |
| | | number of points in a data segment. NB: for time domain templates, this is | |
| | | set | |
| | | to unity by the function \texttt{FindChirpTDData()}. | |
| | | | |
| | | \item[\texttt{REAL4Vector *ampVecBCV}] A vector containing the frequency do | |
| | | main | |
| | | quantity $(k/N)^{-1/2}$, where $k$ is the frequency series index and $N$ is | |
| | | the | |
| | | number of points in a data segment. | |
| | | | |
| | | \item[\texttt{REAL4Vector *ampVecBCVSpin1}] Undocumented spinning BCV | |
| | | amplitude vector. | |
| | | | |
| | | \item[\texttt{REAL4Vector *ampVecBCVSpin2}] Undocumented spinning BCV | |
| | | amplitude vector. | |
| | | | |
| | | \item[\texttt{REAL4Vector *fwdPlan}] An FFTW plan used to transform the | |
| | | time domain interferometer data $v(t_j)$ into its DFT $\tilde{v}_k$. | |
| | | | |
| | | \item[\texttt{REAL4Vector *invPlan}] An FFTW plan used to transform the | |
| | | dimensionless frequency domain interferometer strain $\tilde{w}_k$ into | |
| | | the quantity $N w(t_j)$ to allow time domain trunction of the inverse | |
| | | power spectrum. | |
| | | | |
| | | \item[\texttt{REAL4Vector *wVec}] A vector used as workspace when truncatin | |
| | | g | |
| | | the imverse power spectrum in the time domain. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *wtildeVec}] A vector which on exit from | |
| | | the data conditioning function contains the inverse of the strain one sided | |
| | | power spectral density, after trunction in the time domain, \emph{for the l | |
| | | ast | |
| | | data segment conditioned.} Typically all the data segments are conditioned | |
| | | using the same power spectrum, so this quantity is identical for all data | |
| | | segments. It contains: | |
| | | \begin{equation} | |
| | | \tilde{w}_k = {1}/{\ospsd}. | |
| | | \end{equation} | |
| | | | |
|
| \noindent This structure contains the conditioned input data and its | | \item[\texttt{REAL4Vector *tmpltPowerVec}] A vector which on exit from | |
| parameters for the \texttt{FindChirpFilter()} function. | | \texttt{FindChirpSPData()} or from \texttt{FindChirpBCVData()} | |
| | | contains the quantity | |
| | | \begin{equation} | |
| | | \mathtt{tmpltPower[k]} = \frac{f^{-7/3}}{\ospsd} | |
| | | \end{equation} | |
| | | | |
|
| \begin{description} | | \item[\texttt{REAL4Vector *tmpltPowerVecBCV}] A vector which on exit from | |
| \item[\texttt{COMPLEX8FrequencySeries *data}] The conditioned input data. | | \texttt{FindChirpBCVData()} | |
| The conditioneing performed is as described in the documentation for the | | contains the quantity | |
| module \texttt{FindChirpSPData.c} | | \begin{equation} | |
| | | \mathtt{tmpltPowerBCV[k]} = \frac{f^{-1}}{\ospsd} | |
| \item[\texttt{UINT4Vector *chisqBinVec}] A vector containing the indices of | | \end{equation} | |
| the boundaries of the bins of equal power for the $\chi^2$ veto created by | | | |
| \texttt{FindChirpSPData()} | | | |
| | | | |
| \item[\texttt{REAL8 deltaT}] The time step $\Delta$ of the time series | | | |
| input data. | | | |
| | | | |
| \item[\texttt{REAL4 segNorm}] The template independent part of the | | | |
| normalisation constant $\sigma$. | | | |
| | | | |
| \item[\texttt{UINT4 invSpecTrunc}] The number of points to which the invers | | | |
| e | | | |
| power spectrum \ospsd is truncated to in the time domain in order to smooth | | | |
| out high $Q$ features in the power spectrum. | | | |
| | | | |
| \item[\texttt{UINT4 number}] A unique identification number for the | | | |
| \texttt{FindChirpDataSegment}. This will generally correspond to the number | | | |
| in | | | |
| the \texttt{DataSegment} from which the conditioned data was computed. | | | |
| \end{description} | | | |
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
|
| /* --- vector of FindChirpSegment defined above -------------------------- | | \item[\texttt{REAL4 fLow}] The frequency domain low frequency cutoff | |
| */ | | $f_\mathrm{low}$. All frequency domain data is set to zero below this | |
| #pragma <lalVerbatim file="FindChirpHFindChirpSegmentVector"> | | frequency. | |
| typedef struct | | | |
| tagFindChirpSegmentVector | | \item[\texttt{REAL4 dynRange}] A dynamic range factor $d$ which cancels fro | |
| { | | m | |
| UINT4 length; | | the filter output. This allows quantities to be stored in the range of | |
| FindChirpSegment *data; | | \texttt{REAL4} rather than \texttt{REAL8}. This must be set to the same val | |
| } | | ue | |
| FindChirpSegmentVector; | | as \texttt{dynRange} in the \texttt{FindChirpTmpltParams}. For LIGO data a | |
| #pragma </lalVerbatim> | | value of $d = 2^{69}$ is appropriate. | |
| #if 0 | | | |
| <lalLaTeX> | | \item[\texttt{UINT4 invSpecTrunc}] The length to which to truncate the inve | |
| \subsubsection*{Structure \texttt{FindChirpSegmentVector}} | | rse | |
| \idx[Type]{FindChirpSegmentVector} | | power spectral density of the data in the time domain. If set to zero, no | |
| | | truncation is performed. | |
| | | | |
| | | \item[\texttt{Approximant approximant}] Condition the data for templates of | |
| | | type \texttt{approximant}. Valid approximants are TaylorT1, TaylorT2, | |
| | | TaylorT3, PadeT1, EOB, FindChirpSP, BCV and BCVSpin. | |
| | | | |
|
| \input{FindChirpHFindChirpSegmentVector} | | \end{description} | |
| | | | |
|
| \noindent This structure provides a LAL like vector structure for the | | \subsubsection*{Structure \texttt{FindChirpTmpltParams}} | |
| \texttt{FindChirpSegment} structure defined above. | | \idx[Type]{FindChirpTmpltParams} | |
| | | | |
|
| \begin{description} | | \noindent This structure contains the parameters for generation of template | |
| \item[\texttt{UINT4 length}] Number of \texttt{FindChirpSegment} structres | | s | |
| in | | by the various template generation functions provided in finchirp. | |
| the vector | | | |
| | | | |
|
| \item[\texttt{DataSegment *data}] Pointer to the data. | | | |
| \end{description} | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| /* --- structure to contain an inspiral template ------------------------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHFindChirpTemplate"> | | | |
| typedef struct | | typedef struct | |
|
| tagFindChirpTemplate | | tagFindChirpTmpltParams | |
| { | | { | |
|
| COMPLEX8Vector *data; | | REAL8 deltaT; | |
| REAL4 tmpltNorm; | | REAL4 fLow; | |
| | | REAL4 dynRange; | |
| | | REAL4Vector *xfacVec; | |
| | | RealFFTPlan *fwdPlan; | |
| | | Approximant approximant; | |
| } | | } | |
|
| FindChirpTemplate; | | FindChirpTmpltParams; | |
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{FindChirpTemplate}} | | | |
| \idx[Type]{FindChirpTemplate} | | | |
| | | | |
|
| \input{FindChirpHFindChirpTemplate} | | \begin{description} | |
| | | \item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$ of the input | |
| | | data channel. | |
| | | | |
|
| \noindent This structure provides contains the frequency domain representat | | \item[\texttt{REAL4 fLow}] The frequency domain low frequency cutoff | |
| ion | | $f_\mathrm{low}$. All frequency domain data is zero below this frequency. | |
| of the cosine phase inspiral template $\tilde{h_c}(f)$. | | | |
| | | | |
|
| \begin{description} | | \item[\texttt{REAL4 dynRange}] A dynamic range factor $d$ which cancels fro | |
| \item[\texttt{COMPLEX8Vector *data}] A vector containing $\tilde{h_c}(f)$. | | m | |
| Note | | the filter output. This allows quantities to be stored in the range of | |
| that in the future, this will be changed to a \texttt{COMPLEX8FrequencySeri | | \texttt{REAL4} rather than \texttt{REAL8}. This must be set to the same val | |
| es}. | | ue | |
| | | as \texttt{dynRange} in the \texttt{FindChirpDataParams}. For LIGO data a | |
| | | value of $d = 2^{69}$ is appropriate. | |
| | | | |
| | | \item[\texttt{REAL4Vector *xfacVec}] For frequency domain templates, this i | |
| | | s a | |
| | | vector of length $N/2+1$ which contains the quantity $k^{-7/6}$. For time | |
| | | domain templates, this is a workspace vector of length $N$ which contains t | |
| | | he | |
| | | time domain template generated by the inspiral package, shifted so that the | |
| | | end of the template is at the end of the vector. This vector is Fourier | |
| | | transformed to obtain the quantity findchirp template $\tilde{T}_k$. | |
| | | | |
| | | \item[\texttt{REAL4Vector *fwdPlan}] For time domain templates, an FFTW pla | |
| | | n | |
| | | used to transform the time domain data stored in \texttt{xfacVec} into its | |
| | | DFT | |
| | | which is stored in the findchirp template. | |
| | | | |
| | | \item[\texttt{Approximant approximant}] Generate templates of type | |
| | | \texttt{approximant}. Valid approximants are TaylorT1, TaylorT2, TaylorT3, | |
| | | PadeT1, EOB, FindChirpSP, BCV and BCVSpin. For time domain and stationary | |
| | | phase templates the post-Newtonian order is always two. | |
| | | | |
|
| \item[\texttt{REAL4 tmpltNorm}] The template dependent part of the | | | |
| normalisation constant $\sigma$. | | | |
| \end{description} | | \end{description} | |
|
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
|
| /* | | \subsubsection*{Structure \texttt{Clustering}} | |
| * | | \idx[Type]{Clustering} | |
| * typedefs of parameter structures used by functions in findchirp | | | |
| * | | | |
| */ | | | |
| | | | |
|
| #if 0 | | \noindent This structure contains the possible methods by which | |
| <lalLaTeX> | | to maximize over a chirp in a data segment. | |
| \subsubsection*{Initalisation and parameter structures} | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
|
| /* --- parameter structure for all init funtions ------------------------- | | /* <lalVerbatim> */ | |
| */ | | typedef enum { | |
| #pragma <lalVerbatim file="FindChirpHFindChirpInitParams"> | | noClustering, | |
| typedef struct | | tmplt, | |
| tagFindChirpInitParams | | window | |
| { | | } | |
| UINT4 numSegments; | | Clustering; | |
| UINT4 numPoints; | | /* </lalVerbatim> */ | |
| UINT4 numChisqBins; | | | |
| BOOLEAN createRhosqVec; | | | |
| } | | | |
| FindChirpInitParams; | | | |
| #pragma </lalVerbatim> | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{FindChirpInitParams}} | | | |
| \idx[Type]{FindChirpInitParams} | | | |
| | | | |
| \input{FindChirpHFindChirpInitParams} | | | |
| | | | |
| \noindent This structure provides the essential information for the | | | |
| filter initialisation and memory allocation functions used in the | | | |
| \texttt{FindChirp} package. | | | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{UINT4 numSegments}] The number of data segments to allocate | | \item[\texttt{noClustering}] The decision to do no clustering | |
| storage for. | | of events. | |
| | | | |
|
| \item[\texttt{UINT4 numPoints}] The number of discrete data points in each | | \item[\texttt{tmplt}] Cluster over the length of the data segment. | |
| data segment. | | | |
| | | | |
|
| \item[\texttt{UINT4 numChisqBins}] The number of bins used to contruct the | | \item[\texttt{window}] Cluster over a given number of seconds | |
| $\chi^2$ veto. | | given by the argument to the flag \texttt{--cluster-window} | |
| | | (required to be less than the length of the data segment). | |
| | | | |
|
| \item[\texttt{BOOLEAN createRhosqVec}] Debugging flag that controls whether | | | |
| or not the function \texttt{FindChirpFilterSegment()} should store the outp | | | |
| ut | | | |
| of the filter, $\rho^2(t)$, as well as the events. Memory is only allocated | | | |
| for this vector if the flag is set to 1. | | | |
| \end{description} | | \end{description} | |
|
| | | | |
| | | \subsubsection*{Structure \texttt{FindChirpFilterParams}} | |
| | | \idx[Type]{FindChirpFilterParams} | |
| | | | |
| | | \noindent This structure provides the parameters used by the | |
| | | \texttt{FindChirpFilterSegment()} function. | |
| | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| /* --- parameter structure for the filtering function -------------------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpHFindChirpFilterParams"> | | | |
| typedef struct | | typedef struct | |
| tagFindChirpFilterParams | | tagFindChirpFilterParams | |
| { | | { | |
|
| REAL4 deltaT; | | REAL8 deltaT; | |
| | | REAL4 clusterWindow; | |
| REAL4 rhosqThresh; | | REAL4 rhosqThresh; | |
| REAL4 chisqThresh; | | REAL4 chisqThresh; | |
| REAL4 norm; | | REAL4 norm; | |
| UINT4 maximiseOverChirp; | | UINT4 maximiseOverChirp; | |
|
| BOOLEAN computeNegFreq; | | Clustering clusterMethod; | |
| | | Approximant approximant; | |
| COMPLEX8Vector *qVec; | | COMPLEX8Vector *qVec; | |
|
| | | COMPLEX8Vector *qVecBCV; | |
| | | COMPLEX8Vector *qVecBCVSpin1; | |
| | | COMPLEX8Vector *qVecBCVSpin2; | |
| COMPLEX8Vector *qtildeVec; | | COMPLEX8Vector *qtildeVec; | |
|
| | | COMPLEX8Vector *qtildeVecBCV; | |
| | | COMPLEX8Vector *qtildeVecBCVSpin1; | |
| | | COMPLEX8Vector *qtildeVecBCVSpin2; | |
| ComplexFFTPlan *invPlan; | | ComplexFFTPlan *invPlan; | |
|
| REAL4Vector *rhosqVec; | | REAL4TimeSeries *rhosqVec; | |
| | | COMPLEX8TimeSeries *cVec; | |
| REAL4Vector *chisqVec; | | REAL4Vector *chisqVec; | |
| FindChirpChisqParams *chisqParams; | | FindChirpChisqParams *chisqParams; | |
| FindChirpChisqInput *chisqInput; | | FindChirpChisqInput *chisqInput; | |
|
| | | FindChirpChisqInput *chisqInputBCV; | |
| | | FindChirpFilterOutputVetoParams *filterOutputVetoParams; | |
| } | | } | |
| FindChirpFilterParams; | | FindChirpFilterParams; | |
|
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{FindChirpFilterParams}} | | | |
| \idx[Type]{FindChirpFilterParams} | | | |
| | | | |
| \input{FindChirpHFindChirpFilterParams} | | | |
| | | | |
| \noindent This structure provides the parameters used by the | | | |
| \texttt{FindChirpFilterSegment()} function. | | | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{REAL4 deltaT}] The timestep for the sampled data. Must be | | \item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$. | |
| set on entry. {FIXME: This should be a \texttt{REAL8}} | | | |
| | | | |
|
| \item[\texttt{REAL4 rhosqThresh}] The value to threshold signal to noise | | \item[\texttt{REAL4 rhosqThresh}] The signal-to-noise ratio squared thresho | |
| ratio square, $\rho^2$, on. If the signal to noise exceeds this value, then | | ld | |
| a | | $\rho^2_\ast$. If the matched filter output exceeds this value, that is | |
| candidate event is generated. A $\chi^2$ veto is performed, if requested, | | $\rho^2(t_j) > \rho^2_\ast$, the event processing algorithm is entered and | |
| otherwise an \texttt{InspiralEvent} is generated. Must be $\ge 0$ on entry. | | triggers may be generated (subject to addition vetoes such as the $\chi^2$ | |
| | | veto). The value of $\rho^2_\ast0$ must be greater than or equal to zero. | |
| \item[\texttt{REAL4 chisqThresh}] The value to threshold the $\chi^2$ veto | | | |
| on. | | \item[\texttt{REAL4 chisqThresh}] The $\chi^2$ veto threshold on. This | |
| If the $chi^2$ veto is below this threshold the candidate event an | | threshold is described in details in the documentation for the $\chi^2$ | |
| \texttt{InspiralEvent} is generated. Must be $\ge 0$ on entry. | | veto. | |
| | | | |
| \item[\texttt{REAL4 norm}] On exit this contains the normalisation constant | | \item[\texttt{REAL4 norm}] On exit this contains the normalisation constant | |
|
| that relates the quantity $q_j$ with the signal to noise squared, | | that relates the quantity $|q_j|^2$ with the signal to noise squared, | |
| $\rho^2(t_j)$ by | | $\rho^2(t_j)$ by | |
| \begin{equation} | | \begin{equation} | |
| \rho^2(t_j) = \textrm{norm} \times \left|q_j\right|^2. | | \rho^2(t_j) = \textrm{norm} \times \left|q_j\right|^2. | |
| \end{equation} | | \end{equation} | |
| | | | |
|
| \item[\texttt{UINT4 maximiseOverChirp}] If not zero, use algorithm that | | \item[\texttt{UINT4 maximiseOverChirp}] If not zero, use the | |
| maximised over chirp lengths. Otherwise record all points that pass | | maximise over chirp length algorithm to decide which time $t_j$ should | |
| the $\rho^2$ threshold as events. | | have an inspiral trigger generated. Otherwise record all points that pass t | |
| | | he | |
| \item[\texttt{BOOLEAN computeNegFreq}] Currently unused. Must be set to | | $\rho^2$ and $\chi^2$ threshold as triggers (this may generate may triggers | |
| $0$ on entry. | | ). | |
| | | | |
| \item[\texttt{COMPLEX8Vector *qVec}] Pointer to vector allocated by | | \item[\texttt{Approximant approximant}] Filter the data using templates of | |
| \texttt{FindChirpFilterInit()} to store the quantity $q_j$. Set to the | | type \texttt{approximant}. Valid approximants are TaylorT1, TaylorT2, | |
| value of $q_j$ on exit. Must not be NULL. | | TaylorT3, PadeT1, EOB, FindChirpSP, BCV and BCVSpin. The value of | |
| | | \texttt{approximant} here must match that in the findchirp data segment and | |
| \item[\texttt{COMPLEX8Vector *qtildeVec}] Pointer to vector allocated by | | findchirp template used as input. | |
| \texttt{FindChirpFilterInit()} to store the quantity $\tilde{q}_k$. Set to | | | |
| the | | \item[\texttt{COMPLEX8Vector *qVec}] Pointer to vector of length $N$ alloca | |
| value of $\tilde{q}_k$ on exit. Must not be NULL | | ted | |
| | | by \texttt{FindChirpFilterInit()} to store the quantity $q_j$. The pointer | |
| | | must not be NULL on entry, but the vetor may contain garbage which will be | |
| | | overwritten with the value of $q_j$ for the segment filtered on exit. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qVecBCV}] Pointer to the additional vector | |
| | | required for the BCV templates, allocated by \texttt{FindChirpFilterInit()} | |
| | | . | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qVecBCVSpin1}] Pointer to the additional vect | |
| | | or | |
| | | required for filtering spinning BCV templates, allocated by | |
| | | \texttt{FindChirpFilterInit()}. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qVecBCVSpin2}] Pointer to the additional vect | |
| | | or | |
| | | required for filtering spinning BCV templates, allocated by | |
| | | \texttt{FindChirpFilterInit()}. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qtildeVec}] Pointer to vector of length $N$ | |
| | | allocated by \texttt{FindChirpFilterInit()} to store the quantity | |
| | | $\tilde{q}_k$, given by | |
| | | \begin{equation} | |
| | | \tilde{q}_k = \left\{ | |
| | | \begin{array}{ll} | |
| | | \tilde{F}_k \tilde{T}_k^\ast & \quad 0 < k < \frac{N}{2} \\, | |
| | | 0 & \quad \textrm{otherwise}. | |
| | | \end{array} | |
| | | \right. | |
| | | \end{equation} | |
| | | The pointer must not be NULL on entry, but the vetor may contain garbage wh | |
| | | ich | |
| | | will be overwritten with the value of $\tilde{q}_k$ for the segment filtere | |
| | | d | |
| | | on exit. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qtildeVecBCV}] Pointer to the additional | |
| | | vector required for filtering BCV templates, allocated by | |
| | | \texttt{FindChirpFilterInit()}. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qtildeVecBCVSpin1}] Pointer to the additional | |
| | | vector required for filtering spinning BCV templates, allocated by | |
| | | \texttt{FindChirpFilterInit()}. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector *qtildeVecBCVSpin2}] Pointer to the additional | |
| | | vector required for filtering spinning BCV templates, allocated by | |
| | | \texttt{FindChirpFilterInit()}. | |
| | | | |
| \item[\texttt{ComplexFFTPlan *invPlan}] Pointer to FFTW plan created by | | \item[\texttt{ComplexFFTPlan *invPlan}] Pointer to FFTW plan created by | |
| \texttt{FindChirpFilterInit()} to transform the quantity $\tilde{q}_k$ to | | \texttt{FindChirpFilterInit()} to transform the quantity $\tilde{q}_k$ to | |
| ${q}_j$ usimg the inverse DFT. Must not be NULL. | | ${q}_j$ usimg the inverse DFT. Must not be NULL. | |
| | | | |
|
| \item[\texttt{REAL4Vector *rhosqVec}] Pointer to a vector that is set to | | \item[\texttt{REAL4TimeSeries *rhosqVec}] Pointer to a time series which | |
| $\rho^2(t_j)$ on exit. If NULL $\rho^2(t_j)$ is not stored. | | contains a vector of length $N$. If this is not NULL, the filter output $\r | |
| | | ho^2(t_j)$ | |
| \item[\texttt{REAL4Vector *chisqVec}] Workspace vector used to compute and | | is stored in the vector. | |
| store $\chi^2(t_j)$. Must not be NULL if \texttt{numChisqBins} is greater t | | | |
| han | | \item[\texttt{COMPLEX8Vector *rhosqVec}] Pointer to a time series which | |
| zero. Contains $\chi^2(t_j)$ on exit. | | contains a vector of length $N$. If this is not NULL, the complex filter | |
| | | output $\rho(t_j) = x(t_j) + iy(t_j)$ is stored in the vector. This | |
| | | quantity can be used by the coherent filtering code. | |
| | | | |
| | | \item[\texttt{REAL4Vector *chisqVec}] Workspace vector of length $N$ used t | |
| | | o | |
| | | compute and store $\chi^2(t_j)$. Must not be NULL if \texttt{numChisqBins} | |
| | | is | |
| | | greater than zero. Contains $\chi^2(t_j)$ on exit. | |
| | | | |
| \item[\texttt{FindChirpChisqParams *chisqParams}] Pointer to parameter | | \item[\texttt{FindChirpChisqParams *chisqParams}] Pointer to parameter | |
|
| structure for \texttt{FindChirpChisqVeto()} function. Must not be NULL if | | structure for the $\chi^2$ veto. Must not be NULL if \texttt{numChisqBins} | |
| \texttt{numChisqBins} is greater than zero. | | is | |
| | | greater than zero. | |
| | | | |
| \item[\texttt{FindChirpChisqInput *chisqInput}] Pointer to input data | | \item[\texttt{FindChirpChisqInput *chisqInput}] Pointer to input data | |
|
| structure for \texttt{FindChirpChisqVeto()} function. Must not be NULL if | | structure for the $\chi^2$ veto. Must not be NULL if \texttt{numChisqBins} | |
| \texttt{numChisqBins} is greater than zero. | | is | |
| | | greater than zero. | |
| | | | |
| | | \item[\texttt{FindChirpChisqInput *chisqInputBCV}] Pointer to input data | |
| | | structure for the BCV $\chi^2$ veto. Must not be NULL if the approximant is | |
| | | BCV and \texttt{numChisqBins} is greater than zero. | |
| | | | |
| | | \item[\texttt{FindChirpFilterOutputVetoParams *filterOutputVetoParams}] | |
| | | Pointer to the parameter structure for the additional signal based veto | |
| | | function. | |
| | | | |
| \end{description} | | \end{description} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * | | * | |
| * typedefs of input structures used by functions in findchirp | | * typedefs of input structures used by functions in findchirp | |
| * | | * | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Filter function input structures} | | \subsubsection*{Structure \texttt{FindChirpFilterInput}} | |
| | | \idx[Type]{FindChirpFilterInput} | |
| | | | |
| | | \noindent This structure groups the input data required for the | |
| | | \texttt{FindChirpFilterSegment()} function into a single structure. | |
| | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| /* --- input to the filtering functions --------------------------------- * | | | |
| / | | | |
| #pragma <lalVerbatim file="FindChirpHFindChirpFilterInput"> | | | |
| typedef struct | | typedef struct | |
| tagFindChirpFilterInput | | tagFindChirpFilterInput | |
| { | | { | |
|
| InspiralTemplate *tmplt; | | | |
| FindChirpTemplate *fcTmplt; | | FindChirpTemplate *fcTmplt; | |
| FindChirpSegment *segment; | | FindChirpSegment *segment; | |
| } | | } | |
| FindChirpFilterInput; | | FindChirpFilterInput; | |
|
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \subsubsection*{Structure \texttt{FindChirpFilterInput}} | | | |
| \idx[Type]{FindChirpSegmentVector} | | | |
| | | | |
| \input{FindChirpHFindChirpFilterInput} | | | |
| | | | |
| \noindent This structure groups the input data required for the | | | |
| \texttt{FindChirpFilterSegment()} function into a single structure. | | | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{InspiralTemplate *tmplt}] Pointer the structure that contains | | | |
| the parameters of the template chirp. | | | |
| | | | |
| \item[\texttt{FindChirpTemplate *fcTmplt}] Pointer to the input template | | \item[\texttt{FindChirpTemplate *fcTmplt}] Pointer to the input template | |
| in a form that can be used by \texttt{FindChirpFilterSegment()} | | in a form that can be used by \texttt{FindChirpFilterSegment()} | |
| | | | |
| \item[\texttt{FindChirpSegment *segment}] Pointer to the input data segment | | \item[\texttt{FindChirpSegment *segment}] Pointer to the input data segment | |
| in a form that can be used by \texttt{FindChirpFilterSegment()} | | in a form that can be used by \texttt{FindChirpFilterSegment()} | |
| \end{description} | | \end{description} | |
|
| | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
|
| | | /* <lalVerbatim> */ | |
| | | typedef struct | |
| | | tagFindChirpBankSimParams | |
| | | { | |
| | | Approximant approx; | |
| | | Order order; | |
| | | REAL4 minMass; | |
| | | REAL4 maxMass; | |
| | | RandomParams *randParams; | |
| | | INT4 maxMatch; | |
| | | CHAR *frameName; | |
| | | CHAR *frameChan; | |
| | | } | |
| | | FindChirpBankSimParams; | |
| | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| | | | |
| | | \begin{description} | |
| | | \item[\texttt{Approximant approx}] Waveform pproximant to use for injection | |
| | | . | |
| | | | |
| | | \item[\texttt{Approximant order}] Waveform order to use for injection. | |
| | | | |
| | | \item[\texttt{REAL4 minMass}] Minimum mass of injected signals. | |
| | | | |
| | | \item[\texttt{REAL4 maxMass}] Maximum mass of injected signals. | |
| | | \end{description} | |
| | | | |
| \vfill{\footnotesize\input{FindChirpHV}} | | \vfill{\footnotesize\input{FindChirpHV}} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * | | * | |
| * function prototypes for memory management functions | | * function prototypes for memory management functions | |
| * | | * | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| | | \newpage\input{FindChirpLinkedListC} | |
| | | </lalLaTeX> | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALFindChirpCreateTmpltNode ( | |
| | | LALStatus *status, | |
| | | InspiralTemplate *thistmplt, | |
| | | InspiralTemplateNode **tmpltNode | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindChirpDestroyTmpltNode ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateNode **tmpltNode | |
| | | ); | |
| | | | |
| | | #if 0 | |
| | | <lalLaTeX> | |
| \newpage\input{FindChirpMemoryC} | | \newpage\input{FindChirpMemoryC} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| void | | void | |
|
| | | LALInitializeDataSegmentVector ( | |
| | | LALStatus *status, | |
| | | DataSegmentVector **dataSegVec, | |
| | | REAL4TimeSeries *chan, | |
| | | REAL4FrequencySeries *spec, | |
| | | COMPLEX8FrequencySeries *resp, | |
| | | FindChirpInitParams *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFinalizeDataSegmentVector ( | |
| | | LALStatus *status, | |
| | | DataSegmentVector **vector | |
| | | ); | |
| | | | |
| | | void | |
| LALCreateDataSegmentVector ( | | LALCreateDataSegmentVector ( | |
| LALStatus *status, | | LALStatus *status, | |
| DataSegmentVector **vector, | | DataSegmentVector **vector, | |
| FindChirpInitParams *params | | FindChirpInitParams *params | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALDestroyDataSegmentVector ( | | LALDestroyDataSegmentVector ( | |
| LALStatus *status, | | LALStatus *status, | |
| DataSegmentVector **vector | | DataSegmentVector **vector | |
| | | | |
| skipping to change at line 585 | | skipping to change at line 703 | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALDestroyFindChirpSegmentVector ( | | LALDestroyFindChirpSegmentVector ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpSegmentVector **vector | | FindChirpSegmentVector **vector | |
| ); | | ); | |
| | | | |
| /* | | /* | |
| * | | * | |
|
| | | * function prototypes for initialization, finalization of data functions | |
| | | * | |
| | | */ | |
| | | | |
| | | #if 0 | |
| | | <lalLaTeX> | |
| | | \newpage\input{FindChirpDataC} | |
| | | </lalLaTeX> | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALFindChirpDataInit ( | |
| | | LALStatus *status, | |
| | | FindChirpDataParams **output, | |
| | | FindChirpInitParams *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindChirpDataFinalize ( | |
| | | LALStatus *status, | |
| | | FindChirpDataParams **output | |
| | | ); | |
| | | | |
| | | /* | |
| | | * | |
| | | * function prototypes for initialization, finalization of template functio | |
| | | ns | |
| | | * | |
| | | */ | |
| | | | |
| | | #if 0 | |
| | | <lalLaTeX> | |
| | | \newpage\input{FindChirpTemplateC} | |
| | | </lalLaTeX> | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALFindChirpTemplateInit ( | |
| | | LALStatus *status, | |
| | | FindChirpTmpltParams **output, | |
| | | FindChirpInitParams *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindChirpTemplateFinalize ( | |
| | | LALStatus *status, | |
| | | FindChirpTmpltParams **output | |
| | | ); | |
| | | | |
| | | /* | |
| | | * | |
| * function prototypes for initialization, finalization and filter function
s | | * function prototypes for initialization, finalization and filter function
s | |
| * | | * | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \newpage\input{FindChirpFilterC} | | \newpage\input{FindChirpFilterC} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 622 | | skipping to change at line 790 | |
| FindChirpInitParams *params | | FindChirpInitParams *params | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALDestroyFindChirpInput ( | | LALDestroyFindChirpInput ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpFilterInput **output | | FindChirpFilterInput **output | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFindChirpCreateCoherentInput( | |
| | | LALStatus *status, | |
| | | COMPLEX8TimeSeries **coherentInputData, | |
| | | COMPLEX8TimeSeries *input, | |
| | | SnglInspiralTable *templt, | |
| | | REAL4 coherentSegmentLength, | |
| | | INT4 corruptedDataLength | |
| | | ); | |
| | | | |
| | | void | |
| LALFindChirpFilterSegment ( | | LALFindChirpFilterSegment ( | |
| LALStatus *status, | | LALStatus *status, | |
|
| InspiralEvent **eventList, | | SnglInspiralTable **eventList, | |
| FindChirpFilterInput *input, | | FindChirpFilterInput *input, | |
| FindChirpFilterParams *params | | FindChirpFilterParams *params | |
| ); | | ); | |
| | | | |
|
| | | void | |
| | | LALFindChirpStoreEvent ( | |
| | | LALStatus *status, | |
| | | FindChirpFilterInput *input, | |
| | | FindChirpFilterParams *params, | |
| | | SnglInspiralTable *thisEvent, | |
| | | COMPLEX8 *q, | |
| | | UINT4 kmax, | |
| | | REAL4 norm, | |
| | | UINT4 eventStartIdx, | |
| | | UINT4 numChisqBins, | |
| | | CHAR searchName[LIGOMETA_SEARCH_MAX] | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindChirpClusterEvents ( | |
| | | LALStatus *status, | |
| | | SnglInspiralTable **eventList, | |
| | | FindChirpFilterInput *input, | |
| | | FindChirpFilterParams *params, | |
| | | COMPLEX8 *q, | |
| | | UINT4 kmax, | |
| | | UINT4 numPoints, | |
| | | UINT4 ignoreIndex, | |
| | | REAL4 norm, | |
| | | REAL4 modqsqThresh, | |
| | | REAL4 chisqThreshFac, | |
| | | UINT4 numChisqBins, | |
| | | CHAR searchName[LIGOMETA_SEARCH_MAX] | |
| | | ); | |
| | | | |
| | | #if 0 | |
| | | <lalLaTeX> | |
| | | \newpage\input{FindChirpSimulationC} | |
| | | </lalLaTeX> | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALFindChirpInjectSignals ( | |
| | | LALStatus *status, | |
| | | REAL4TimeSeries *chan, | |
| | | SimInspiralTable *events, | |
| | | COMPLEX8FrequencySeries *resp | |
| | | ); | |
| | | | |
| | | INT4 | |
| | | XLALFindChirpSetAnalyzeSegment ( | |
| | | DataSegmentVector *dataSegVec, | |
| | | SimInspiralTable *injections | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindChirpSetAnalyseTemplate ( | |
| | | LALStatus *status, | |
| | | UINT4 *analyseThisTmplt, | |
| | | REAL4 mmFast, | |
| | | REAL8 deltaF, | |
| | | INT4 sampleRate, | |
| | | FindChirpDataParams *fcDataParams, | |
| | | int numTmplts, | |
| | | InspiralTemplateNode *tmpltHead, | |
| | | int numInjections, | |
| | | SimInspiralTable *injections | |
| | | ); | |
| | | | |
| | | UINT4 | |
| | | XLALCmprSgmntTmpltFlags ( | |
| | | UINT4 numInjections, | |
| | | UINT4 TmpltFlag, | |
| | | UINT4 SgmntFlag | |
| | | ); | |
| | | | |
| | | UINT4 | |
| | | XLALFindChirpBankSimInitialize ( | |
| | | REAL4FrequencySeries *spec, | |
| | | COMPLEX8FrequencySeries *resp, | |
| | | REAL8 fLow | |
| | | ); | |
| | | | |
| | | SimInspiralTable * | |
| | | XLALFindChirpBankSimInjectSignal ( | |
| | | DataSegmentVector *dataSegVec, | |
| | | COMPLEX8FrequencySeries *resp, | |
| | | SimInspiralTable *injParams, | |
| | | FindChirpBankSimParams *simParams | |
| | | ); | |
| | | | |
| | | REAL4 | |
| | | XLALFindChirpBankSimSignalNorm( | |
| | | FindChirpDataParams *fcDataParams, | |
| | | FindChirpSegmentVector *fcSegVec, | |
| | | UINT4 cut | |
| | | ); | |
| | | | |
| | | SimInstParamsTable * | |
| | | XLALFindChirpBankSimMaxMatch ( | |
| | | SnglInspiralTable **bestTmplt, | |
| | | REAL4 matchNorm | |
| | | ); | |
| | | | |
| | | SimInstParamsTable * | |
| | | XLALFindChirpBankSimComputeMatch ( | |
| | | SnglInspiralTable *tmplt, | |
| | | REAL4 matchNorm | |
| | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { | | #pragma { | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _FINDCHIRPH_H */ | | #endif /* _FINDCHIRPH_H */ | |
| | | | |
End of changes. 97 change blocks. |
| 358 lines changed or deleted | | 659 lines changed or added | |
|
| FrameStream.h | | FrameStream.h | |
| /**** <lalVerbatim file="FrameStreamHV"> | | /**** <lalVerbatim file="FrameStreamHV"> | |
| * Author: Jolien D. E. Creighton | | * Author: Jolien D. E. Creighton | |
|
| * $Id: FrameStream.h,v 1.5 2002/06/10 22:49:29 jolien Exp $ | | * $Id: FrameStream.h,v 1.13 2005/04/12 22:30:21 kipp Exp $ | |
| **** </lalVerbatim> */ | | **** </lalVerbatim> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \section{Header \texttt{FrameStream.h}} | | * \section{Header \texttt{FrameStream.h}} | |
| * | | * | |
| * Low-level routines for manupulating frame data streams. | | * Low-level routines for manupulating frame data streams. | |
| * | | * | |
| * \subsection*{Synopsis} | | * \subsection*{Synopsis} | |
| * \begin{verbatim} | | * \begin{verbatim} | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| #include <lal/FrameCache.h> | | #include <lal/FrameCache.h> | |
| | | | |
| #ifndef _FRAMESTREAM_H | | #ifndef _FRAMESTREAM_H | |
| #define _FRAMESTREAM_H | | #define _FRAMESTREAM_H | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( FRAMESTREAMH, "$Id: FrameStream.h,v 1.5 2002/06/10 22:49:29 jolien
Exp $" ); | | NRCSID( FRAMESTREAMH, "$Id: FrameStream.h,v 1.13 2005/04/12 22:30:21 kipp E
xp $" ); | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Error conditions} | | * \subsection*{Error conditions} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalErrTable> */ | | /**** <lalErrTable> */ | |
| #define FRAMESTREAMH_ENULL 00001 | | #define FRAMESTREAMH_ENULL 00001 | |
| #define FRAMESTREAMH_ENNUL 00002 | | #define FRAMESTREAMH_ENNUL 00002 | |
| #define FRAMESTREAMH_EALOC 00004 | | #define FRAMESTREAMH_EALOC 00004 | |
| #define FRAMESTREAMH_EFILE 00010 | | #define FRAMESTREAMH_EFILE 00010 | |
| #define FRAMESTREAMH_EOPEN 00020 | | #define FRAMESTREAMH_EOPEN 00020 | |
| #define FRAMESTREAMH_EREAD 00040 | | #define FRAMESTREAMH_EREAD 00040 | |
| #define FRAMESTREAMH_ETIME 00100 | | #define FRAMESTREAMH_ETIME 00100 | |
| #define FRAMESTREAMH_ESIZE 00200 | | #define FRAMESTREAMH_ESIZE 00200 | |
| #define FRAMESTREAMH_ECHAN 00400 | | #define FRAMESTREAMH_ECHAN 00400 | |
| #define FRAMESTREAMH_ETYPE 01000 | | #define FRAMESTREAMH_ETYPE 01000 | |
| #define FRAMESTREAMH_ERROR 02000 | | #define FRAMESTREAMH_ERROR 02000 | |
| #define FRAMESTREAMH_EDONE 04000 | | #define FRAMESTREAMH_EDONE 04000 | |
|
| | | #define FRAMESTREAMH_ETREQ 010000 | |
| | | #define FRAMESTREAMH_EDGAP 020000 | |
| | | | |
| #define FRAMESTREAMH_MSGENULL "Null pointer" | | #define FRAMESTREAMH_MSGENULL "Null pointer" | |
| #define FRAMESTREAMH_MSGENNUL "Non-null pointer" | | #define FRAMESTREAMH_MSGENNUL "Non-null pointer" | |
| #define FRAMESTREAMH_MSGEALOC "Memory allocation error" | | #define FRAMESTREAMH_MSGEALOC "Memory allocation error" | |
| #define FRAMESTREAMH_MSGEFILE "Frame data files not found" | | #define FRAMESTREAMH_MSGEFILE "Frame data files not found" | |
| #define FRAMESTREAMH_MSGEOPEN "Frame file open error" | | #define FRAMESTREAMH_MSGEOPEN "Frame file open error" | |
| #define FRAMESTREAMH_MSGEREAD "Frame file read error" | | #define FRAMESTREAMH_MSGEREAD "Frame file read error" | |
| #define FRAMESTREAMH_MSGETIME "Invalid ADC offset time" | | #define FRAMESTREAMH_MSGETIME "Invalid ADC offset time" | |
| #define FRAMESTREAMH_MSGESIZE "Invalid vector length" | | #define FRAMESTREAMH_MSGESIZE "Invalid vector length" | |
| #define FRAMESTREAMH_MSGECHAN "Could not find ADC channel" | | #define FRAMESTREAMH_MSGECHAN "Could not find ADC channel" | |
| #define FRAMESTREAMH_MSGETYPE "Invalid ADC type" | | #define FRAMESTREAMH_MSGETYPE "Invalid ADC type" | |
| #define FRAMESTREAMH_MSGERROR "Frame stream error" | | #define FRAMESTREAMH_MSGERROR "Frame stream error" | |
| #define FRAMESTREAMH_MSGEDONE "End of frame data" | | #define FRAMESTREAMH_MSGEDONE "End of frame data" | |
|
| | | #define FRAMESTREAMH_MSGETREQ "No data at time requested" | |
| | | #define FRAMESTREAMH_MSGEDGAP "Gap in the data" | |
| /**** </lalErrTable> */ | | /**** </lalErrTable> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Structures} | | * \subsection*{Structures} | |
|
| | | * \idx[Type]{FrState} | |
| | | * \idx[Type]{FrFileInfo} | |
| * \idx[Type]{FrStream} | | * \idx[Type]{FrStream} | |
| * \idx[Type]{FrPos} | | * \idx[Type]{FrPos} | |
| * \idx[Type]{ChannelType} | | * \idx[Type]{ChannelType} | |
| * \idx[Type]{FrChanIn} | | * \idx[Type]{FrChanIn} | |
| * \idx[Type]{FrOutPar} | | * \idx[Type]{FrOutPar} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
|
| typedef struct tagFrStream FrStream; | | typedef enum | |
| | | { | |
| | | LAL_FR_OK = 0, /* nominal */ | |
| | | LAL_FR_ERR = 1, /* error in frame stream */ | |
| | | LAL_FR_END = 2, /* end of frame stream */ | |
| | | LAL_FR_GAP = 4, /* gap in frame stream */ | |
| | | LAL_FR_URL = 8, /* error opening frame URL */ | |
| | | LAL_FR_TOC = 16 /* error reading frame TOC */ | |
| | | } | |
| | | FrState; | |
| | | typedef enum | |
| | | { | |
| | | LAL_FR_SILENT_MODE = 0, | |
| | | LAL_FR_TIMEWARN_MODE = 1, /* display warning for invalid time requests | |
| | | */ | |
| | | LAL_FR_GAPINFO_MODE = 2, /* display info for gaps in data */ | |
| | | LAL_FR_VERBOSE_MODE = 3, /* display warnings and info */ | |
| | | LAL_FR_IGNOREGAP_MODE = 4, /* ignore gaps in data */ | |
| | | LAL_FR_IGNORETIME_MODE = 8, /* ignore invalid times requested */ | |
| | | LAL_FR_DEFAULT_MODE = 15 /* ignore time/gaps but report warnings & in | |
| | | fo */ | |
| | | } | |
| | | FrMode; | |
| | | struct FrFile; | |
| | | typedef struct tagFrFileInfo | |
| | | { | |
| | | INT4 ind; | |
| | | CHAR *url; | |
| | | INT4 t0; | |
| | | INT4 dt; | |
| | | } | |
| | | FrFileInfo; | |
| | | typedef struct tagFrStream | |
| | | { | |
| | | FrState state; | |
| | | INT4 mode; | |
| | | LIGOTimeGPS epoch; | |
| | | UINT4 nfile; | |
| | | FrFileInfo *flist; | |
| | | UINT4 fnum; | |
| | | struct FrFile *file; | |
| | | INT4 pos; | |
| | | } | |
| | | FrStream; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure details the state of the frame stream. The contents are | | * This structure details the state of the frame stream. The contents are | |
| * private; you should not tamper with them! | | * private; you should not tamper with them! | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef struct | | typedef struct | |
| tagFrPos | | tagFrPos | |
| { | | { | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; | |
|
| UINT4 filenum; | | UINT4 fnum; | |
| UINT4 frame; | | INT4 pos; | |
| UINT4 run; | | | |
| } | | } | |
| FrPos; | | FrPos; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure contains a record of the state of a frame stream; this | | * This structure contains a record of the state of a frame stream; this | |
| * record can be used to restore the stream to the state when the record | | * record can be used to restore the stream to the state when the record | |
| * was made (provided the stream has not been closed). The fields are: | | * was made (provided the stream has not been closed). The fields are: | |
| * \begin{description} | | * \begin{description} | |
| * \item[\texttt{epoch}] the GPS time of the open frame when the record | | * \item[\texttt{epoch}] the GPS time of the open frame when the record | |
| * was made. | | * was made. | |
|
| * \item[\texttt{filenum}] the file number of a list of frame files that wa
s | | * \item[\texttt{fnum}] the file number of a list of frame files that was | |
| * open when the record was made. | | * open when the record was made. | |
|
| * \item[\texttt{frame}] the frame number of the frames within the | | * \item[\texttt{pos}] the position within the | |
| * frame file that was open when the record was made. | | | |
| * \item[\texttt{run}] the run number of the frames within the | | | |
| * frame file that was open when the record was made. | | * frame file that was open when the record was made. | |
| * \end{description} | | * \end{description} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef enum | | typedef enum | |
|
| tagChannelType | | { LAL_ADC_CHAN, LAL_SIM_CHAN, LAL_PROC_CHAN } | |
| { ProcDataChannel, ADCDataChannel, SimDataChannel } | | FrChanType; | |
| ChannelType; | | /* for backwards compatability... */ | |
| | | #define ChannelType FrChanType | |
| | | #define ProcDataChannel LAL_PROC_CHAN | |
| | | #define ADCDataChannel LAL_ADC_CHAN | |
| | | #define SimDataChannel LAL_SIM_CHAN | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * These are the various types of channel that can be specified for read/wr
ite. | | * These are the various types of channel that can be specified for read/wr
ite. | |
| * They are ``post-processed data'' (\texttt{ProcDataChannel}), ``ADC data'
' | | * They are ``post-processed data'' (\texttt{ProcDataChannel}), ``ADC data'
' | |
| * (\texttt{ADCDataChannel}), and ``simulated data'' (\texttt{SimDataChanne
l}). | | * (\texttt{ADCDataChannel}), and ``simulated data'' (\texttt{SimDataChanne
l}). | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| | | | |
| skipping to change at line 191 | | skipping to change at line 239 | |
| * \verb+-+$\langle\mbox{GPS start time}\rangle$\verb+-+% | | * \verb+-+$\langle\mbox{GPS start time}\rangle$\verb+-+% | |
| * $\langle\mbox{duration}\rangle$\verb+.gwf+. | | * $\langle\mbox{duration}\rangle$\verb+.gwf+. | |
| * | | * | |
| * \vfill{\footnotesize\input{FrameStreamHV}} | | * \vfill{\footnotesize\input{FrameStreamHV}} | |
| * \newpage\input{FrameStreamC} | | * \newpage\input{FrameStreamC} | |
| * \newpage\input{FrameSeriesC} | | * \newpage\input{FrameSeriesC} | |
| * \newpage\input{FrameStreamTestC} | | * \newpage\input{FrameStreamTestC} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
|
| | | FrStream * XLALFrCacheOpen( FrCache *cache ); | |
| | | FrStream * XLALFrOpen( const char *dirname, const char *pattern ); | |
| | | int XLALFrClose( FrStream *stream ); | |
| | | int XLALFrSetMode( FrStream *stream, int mode ); | |
| | | int XLALFrState( FrStream *stream ); | |
| | | int XLALFrClearErr( FrStream *stream ); | |
| | | int XLALFrRewind( FrStream *stream ); | |
| | | int XLALFrNext( FrStream *stream ); | |
| | | int XLALFrSeek( FrStream *stream, const LIGOTimeGPS *epoch ); | |
| | | int XLALFrTell( LIGOTimeGPS *epoch, FrStream *stream ); | |
| | | int XLALFrGetpos( FrPos *position, FrStream *stream ); | |
| | | int XLALFrSetpos( FrStream *stream, FrPos *position ); | |
| | | int XLALFrGetTimeSeriesType( const char *channel, FrStream *stream ); | |
| | | int XLALFrGetINT2TimeSeries( INT2TimeSeries *series, FrStream *stream ); | |
| | | int XLALFrGetINT4TimeSeries( INT4TimeSeries *series, FrStream *stream ); | |
| | | int XLALFrGetINT8TimeSeries( INT8TimeSeries *series, FrStream *stream ); | |
| | | int XLALFrGetREAL4TimeSeries( REAL4TimeSeries *series, FrStream *stream ); | |
| | | int XLALFrGetREAL8TimeSeries( REAL8TimeSeries *series, FrStream *stream ); | |
| | | int XLALFrGetCOMPLEX8TimeSeries( COMPLEX8TimeSeries *series, FrStream *stre | |
| | | am ); | |
| | | int XLALFrGetCOMPLEX16TimeSeries( COMPLEX16TimeSeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetINT2TimeSeriesMetadata( INT2TimeSeries *series, FrStream *stre | |
| | | am ); | |
| | | int XLALFrGetINT4TimeSeriesMetadata( INT4TimeSeries *series, FrStream *stre | |
| | | am ); | |
| | | int XLALFrGetINT8TimeSeriesMetadata( INT8TimeSeries *series, FrStream *stre | |
| | | am ); | |
| | | int XLALFrGetREAL4TimeSeriesMetadata( REAL4TimeSeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetREAL8TimeSeriesMetadata( REAL8TimeSeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetCOMPLEX8TimeSeriesMetadata( COMPLEX8TimeSeries *series, FrStre | |
| | | am *stream ); | |
| | | int XLALFrGetCOMPLEX16TimeSeriesMetadata( COMPLEX16TimeSeries *series, FrSt | |
| | | ream *stream ); | |
| | | int XLALFrGetINT2FrequencySeries( INT2FrequencySeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetINT4FrequencySeries( INT4FrequencySeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetINT8FrequencySeries( INT8FrequencySeries *series, FrStream *st | |
| | | ream ); | |
| | | int XLALFrGetREAL4FrequencySeries( REAL4FrequencySeries *series, FrStream * | |
| | | stream ); | |
| | | int XLALFrGetREAL8FrequencySeries( REAL8FrequencySeries *series, FrStream * | |
| | | stream ); | |
| | | int XLALFrGetCOMPLEX8FrequencySeries( COMPLEX8FrequencySeries *series, FrSt | |
| | | ream *stream ); | |
| | | int XLALFrGetCOMPLEX16FrequencySeries( COMPLEX16FrequencySeries *series, Fr | |
| | | Stream *stream ); | |
| | | | |
| | | INT2TimeSeries *XLALFrReadINT2TimeSeries( FrStream *stream, const char *chn | |
| | | ame, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ); | |
| | | INT4TimeSeries *XLALFrReadINT4TimeSeries( FrStream *stream, const char *chn | |
| | | ame, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ); | |
| | | INT8TimeSeries *XLALFrReadINT8TimeSeries( FrStream *stream, const char *chn | |
| | | ame, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ); | |
| | | REAL4TimeSeries *XLALFrReadREAL4TimeSeries( FrStream *stream, const char *c | |
| | | hname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ); | |
| | | REAL8TimeSeries *XLALFrReadREAL8TimeSeries( FrStream *stream, const char *c | |
| | | hname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ); | |
| | | COMPLEX8TimeSeries *XLALFrReadCOMPLEX8TimeSeries( FrStream *stream, const c | |
| | | har *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit ) | |
| | | ; | |
| | | COMPLEX16TimeSeries *XLALFrReadCOMPLEX16TimeSeries( FrStream *stream, const | |
| | | char *chname, const LIGOTimeGPS *start, REAL8 duration, size_t lengthlimit | |
| | | ); | |
| | | | |
| | | /* | |
| | | * | |
| | | * LAL Routines. | |
| | | * | |
| | | */ | |
| | | | |
| void | | void | |
| LALFrCacheOpen( | | LALFrCacheOpen( | |
| LALStatus *status, | | LALStatus *status, | |
| FrStream **output, | | FrStream **output, | |
| FrCache *cache | | FrCache *cache | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrOpen( | | LALFrOpen( | |
| LALStatus *status, | | LALStatus *status, | |
| | | | |
| skipping to change at line 213 | | skipping to change at line 310 | |
| const CHAR *pattern | | const CHAR *pattern | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrClose( | | LALFrClose( | |
| LALStatus *status, | | LALStatus *status, | |
| FrStream **stream | | FrStream **stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrSetMode( | |
| | | LALStatus *status, | |
| | | INT4 mode, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| LALFrEnd( | | LALFrEnd( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4 *end, | | INT4 *end, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrNext( | | LALFrNext( | |
| LALStatus *status, | | LALStatus *status, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrRewind( | | LALFrRewind( | |
| LALStatus *status, | | LALStatus *status, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrSeek( | | LALFrSeek( | |
|
| LALStatus *status, | | LALStatus *status, | |
| LIGOTimeGPS *epoch, | | const LIGOTimeGPS *epoch, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrTell( | | LALFrTell( | |
| LALStatus *status, | | LALStatus *status, | |
| LIGOTimeGPS *epoch, | | LIGOTimeGPS *epoch, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
| | | | |
| skipping to change at line 276 | | skipping to change at line 380 | |
| | | | |
| void | | void | |
| LALFrGetINT2TimeSeries( | | LALFrGetINT2TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| INT2TimeSeries *series, | | INT2TimeSeries *series, | |
| FrChanIn *chanin, | | FrChanIn *chanin, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrGetINT2TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | INT2TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| LALFrGetINT4TimeSeries( | | LALFrGetINT4TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4TimeSeries *series, | | INT4TimeSeries *series, | |
| FrChanIn *chanin, | | FrChanIn *chanin, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrGetINT4TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | INT4TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| LALFrGetINT8TimeSeries( | | LALFrGetINT8TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| INT8TimeSeries *series, | | INT8TimeSeries *series, | |
| FrChanIn *chanin, | | FrChanIn *chanin, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrGetINT8TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | INT8TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| LALFrGetREAL4TimeSeries( | | LALFrGetREAL4TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4TimeSeries *series, | | REAL4TimeSeries *series, | |
| FrChanIn *chanin, | | FrChanIn *chanin, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrGetREAL4TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | REAL4TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| LALFrGetREAL8TimeSeries( | | LALFrGetREAL8TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8TimeSeries *series, | | REAL8TimeSeries *series, | |
| FrChanIn *chanin, | | FrChanIn *chanin, | |
| FrStream *stream | | FrStream *stream | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| | | LALFrGetREAL8TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | REAL8TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX8TimeSeries( | |
| | | LALStatus *status, | |
| | | COMPLEX8TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX8TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | COMPLEX8TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX16TimeSeries( | |
| | | LALStatus *status, | |
| | | COMPLEX16TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX16TimeSeriesMetadata( | |
| | | LALStatus *status, | |
| | | COMPLEX16TimeSeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetINT2FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT2FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetINT4FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT4FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetINT8FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT8FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetREAL4FrequencySeries( | |
| | | LALStatus *status, | |
| | | REAL4FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetREAL8FrequencySeries( | |
| | | LALStatus *status, | |
| | | REAL8FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX8FrequencySeries( | |
| | | LALStatus *status, | |
| | | COMPLEX8FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrGetCOMPLEX16FrequencySeries( | |
| | | LALStatus *status, | |
| | | COMPLEX16FrequencySeries *series, | |
| | | FrChanIn *chanin, | |
| | | FrStream *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteINT2TimeSeries( | |
| | | LALStatus *status, | |
| | | INT2TimeSeries *series, | |
| | | FrOutPar *params | |
| | | ); | |
| | | | |
| | | void | |
| LALFrWriteINT2TimeSeries( | | LALFrWriteINT2TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| INT2TimeSeries *series, | | INT2TimeSeries *series, | |
| FrOutPar *params | | FrOutPar *params | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrWriteINT4TimeSeries( | | LALFrWriteINT4TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4TimeSeries *series, | | INT4TimeSeries *series, | |
| | | | |
| skipping to change at line 342 | | skipping to change at line 581 | |
| FrOutPar *params | | FrOutPar *params | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFrWriteREAL8TimeSeries( | | LALFrWriteREAL8TimeSeries( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8TimeSeries *series, | | REAL8TimeSeries *series, | |
| FrOutPar *params | | FrOutPar *params | |
| ); | | ); | |
| | | | |
|
| | | void | |
| | | LALFrWriteCOMPLEX8TimeSeries( | |
| | | LALStatus *status, | |
| | | COMPLEX8TimeSeries *series, | |
| | | FrOutPar *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteCOMPLEX16TimeSeries( | |
| | | LALStatus *status, | |
| | | COMPLEX16TimeSeries *series, | |
| | | FrOutPar *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteINT2FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT2FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteINT2FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT2FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteINT4FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT4FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteINT8FrequencySeries( | |
| | | LALStatus *status, | |
| | | INT8FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteREAL4FrequencySeries( | |
| | | LALStatus *status, | |
| | | REAL4FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteREAL8FrequencySeries( | |
| | | LALStatus *status, | |
| | | REAL8FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteCOMPLEX8FrequencySeries( | |
| | | LALStatus *status, | |
| | | COMPLEX8FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFrWriteCOMPLEX16FrequencySeries( | |
| | | LALStatus *status, | |
| | | COMPLEX16FrequencySeries *series, | |
| | | FrOutPar *params, | |
| | | INT4 subtype | |
| | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { | | #pragma { | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _FRAMESTREAM_H */ | | #endif /* _FRAMESTREAM_H */ | |
| | | | |
End of changes. 19 change blocks. |
| 16 lines changed or deleted | | 360 lines changed or added | |
|
| LALBarycenter.h | | LALBarycenter.h | |
| /********************************** <lalVerbatim file="LALBarycenterHV"> | | /********************************** <lalVerbatim file="LALBarycenterHV"> | |
| Author: Cutler, C. | | Author: Cutler, C. | |
|
| $Id: LALBarycenter.h,v 1.7 2001/12/15 01:10:33 teviet Exp $ | | $Id: LALBarycenter.h,v 1.11 2005/07/08 13:39:20 reinhard Exp $ | |
| *********************************** </lalVerbatim> */ | | *********************************** </lalVerbatim> */ | |
| | | | |
|
| | | /** | |
| | | * \author Curt Cutler | |
| | | * \date 2001 | |
| | | * \file | |
| | | * \ingroup moduleBarycenter | |
| | | * \brief This header defines the API for LALBarycenter.c. | |
| | | * | |
| | | * $Id: LALBarycenter.h,v 1.11 2005/07/08 13:39:20 reinhard Exp $ | |
| | | */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALBarycenter.h}} | | \section{Header \texttt{LALBarycenter.h}} | |
| \label{s:LALBarycenter.h} | | \label{s:LALBarycenter.h} | |
| | | | |
| Provides routines for transforming from arrival time | | Provides routines for transforming from arrival time | |
| at detector (GPS) to pulse emission time (TDB); i.e., | | at detector (GPS) to pulse emission time (TDB); i.e., | |
| for ``barycentering'' the measured astronomical time series. | | for ``barycentering'' the measured astronomical time series. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
|
| #include "LALBarycenter.h" | | #include <lal/LALBarycenter.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent This header covers the routine | | \noindent This header covers the routine | |
| \verb@LALBarycenter.c@. | | \verb@LALBarycenter.c@. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _LALBARYCENTER_H /* Protect against double-inclusion */ | | #ifndef _LALBARYCENTER_H /* Protect against double-inclusion */ | |
| #define _LALBARYCENTER_H | | #define _LALBARYCENTER_H | |
| | | | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 50 | |
| #include <math.h> | | #include <math.h> | |
| #include <lal/LALStdio.h> | | #include <lal/LALStdio.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
| #include <lal/DetectorSite.h> | | #include <lal/DetectorSite.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALBARYCENTERH,"$Id: LALBarycenter.h,v 1.7 2001/12/15 01:10:33 tevi
et Exp $"); | | NRCSID (LALBARYCENTERH,"$Id: LALBarycenter.h,v 1.11 2005/07/08 13:39:20 rei
nhard Exp $"); | |
| | | | |
| /* <lalErrTable file="LALBarycenterHErrorTable"> */ | | /* <lalErrTable file="LALBarycenterHErrorTable"> */ | |
| #define LALBARYCENTERH_ENULL 2 | | #define LALBARYCENTERH_ENULL 2 | |
| #define LALBARYCENTERH_EOUTOFRANGEE 4 | | #define LALBARYCENTERH_EOUTOFRANGEE 4 | |
| #define LALBARYCENTERH_EOUTOFRANGES 8 | | #define LALBARYCENTERH_EOUTOFRANGES 8 | |
| #define LALBARYCENTERH_EBADSOURCEPOS 16 | | #define LALBARYCENTERH_EBADSOURCEPOS 16 | |
| | | | |
| #define LALBARYCENTERH_MSGENULL "Null input to Barycenter routine." | | #define LALBARYCENTERH_MSGENULL "Null input to Barycenter routine." | |
| #define LALBARYCENTERH_MSGEOUTOFRANGEE "tgps not in range of earth.dat fil
e" | | #define LALBARYCENTERH_MSGEOUTOFRANGEE "tgps not in range of earth.dat fil
e" | |
| #define LALBARYCENTERH_MSGEOUTOFRANGES "tgps not in range of sun.dat file" | | #define LALBARYCENTERH_MSGEOUTOFRANGES "tgps not in range of sun.dat file" | |
| | | | |
| skipping to change at line 143 | | skipping to change at line 153 | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL8 einstein}] the einstein delay equiv TDB - TDT | | \item[\texttt{REAL8 einstein}] the einstein delay equiv TDB - TDT | |
| \item[\texttt{REAL8 deinstein}] d(einstein)/d(tgps) | | \item[\texttt{REAL8 deinstein}] d(einstein)/d(tgps) | |
| | | | |
| \item[\texttt{REAL8 posNow[3]}] Cartesian coords of Earth's center at tgps,
extrapolated from JPL DE405 ephemeris; units= sec. | | \item[\texttt{REAL8 posNow[3]}] Cartesian coords of Earth's center at tgps,
extrapolated from JPL DE405 ephemeris; units= sec. | |
| | | | |
| \item[\texttt{REAL8 velNow[3]}] dimensionless velocity of Earth's center at | | \item[\texttt{REAL8 velNow[3]}] dimensionless velocity of Earth's center at | |
| tgps, extrapolated from JPL DE405 ephemeris | | tgps, extrapolated from JPL DE405 ephemeris | |
| | | | |
| \item[\texttt{REAL8 gastRad}] Greenwich Apparent Sidereal Time, | | \item[\texttt{REAL8 gastRad}] Greenwich Apparent Sidereal Time, | |
|
| in radians, at tgps. It's basically the angle thru which Earth has | | in radians, at tgps. Its basically the angle thru which Earth has | |
| spun at given time. gast is like gmst, but has additional correction | | spun at given time. gast is like gmst, but has additional correction | |
| for short-term nutation. | | for short-term nutation. | |
| | | | |
| \item[\texttt{REAL8 tzeA}] variable describing effect of lunisolar precessi
on, at tgps; see Explan. Supp. Astron. Almanac, pp.104-5. | | \item[\texttt{REAL8 tzeA}] variable describing effect of lunisolar precessi
on, at tgps; see Explan. Supp. Astron. Almanac, pp.104-5. | |
| \item[\texttt{REAL8 zA}] variable describing effect of lunisolar precession
, at tgps | | \item[\texttt{REAL8 zA}] variable describing effect of lunisolar precession
, at tgps | |
| \item[\texttt{REAL8 thetaA}] variable describing effect of lunisolar preces
sion, at tgps | | \item[\texttt{REAL8 thetaA}] variable describing effect of lunisolar preces
sion, at tgps | |
| \item[\texttt{REAL8 delpsi}] variable describing effect of Earth nutation,
at tgps; see Explan. Supp. Astron. Almanac, pp.120. | | \item[\texttt{REAL8 delpsi}] variable describing effect of Earth nutation,
at tgps; see Explan. Supp. Astron. Almanac, pp.120. | |
| \item[\texttt{REAL8 deleps}] variable describing effect of Earth nutation,
at tgps | | \item[\texttt{REAL8 deleps}] variable describing effect of Earth nutation,
at tgps | |
| \item[\texttt{REAL8 se[3]}] vector that points from Sun to Earth at instant
tgps, in DE405 coords; units = sec | | \item[\texttt{REAL8 se[3]}] vector that points from Sun to Earth at instant
tgps, in DE405 coords; units = sec | |
| \item[\texttt{REAL8 dse[3]}] d(se[3])/d(tgps). Dimensionless | | \item[\texttt{REAL8 dse[3]}] d(se[3])/d(tgps). Dimensionless | |
| | | | |
| skipping to change at line 187 | | skipping to change at line 197 | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct EmissionTime | | struct EmissionTime | |
| \end{verbatim} | | \end{verbatim} | |
| \idx[Type]{EmissionTime} | | \idx[Type]{EmissionTime} | |
| \noindent Basic output structure produced by LALBarycenter.c. | | \noindent Basic output structure produced by LALBarycenter.c. | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{ REAL8 deltaT}] $t_e$(TDB) - $t_a$(GPS) (+ constant = ``lig
ht-travel-time from source to SSB'') | | \item[\texttt{ REAL8 deltaT}] $t_e$(TDB) - $t_a$(GPS) (+ constant = ``lig
ht-travel-time from source to SSB'') | |
| | | | |
|
| \item[\texttt{ REAL8 te}] pulse emission time $t_e$ in TDB (plus constan
t = | | \item[\texttt{ LIGOTimeGPS te}] pulse emission time $t_e$ in TDB (plus c
onstant = | |
| ``light-travel-time from source to SSB''), in format of LIGOTImeGPS structu
re. | | ``light-travel-time from source to SSB''), in format of LIGOTImeGPS structu
re. | |
| | | | |
| \item[\texttt{ REAL8 tDot}] d(emission time in TDB)/d(arrival time in GP
S) | | \item[\texttt{ REAL8 tDot}] d(emission time in TDB)/d(arrival time in GP
S) | |
| | | | |
| \item[\texttt{ REAL8 rDetector[3]}] Cartesian coords (0=x,1=y,2=z) of | | \item[\texttt{ REAL8 rDetector[3]}] Cartesian coords (0=x,1=y,2=z) of | |
| detector position at $t_a$ (GPS), in ICRS J2000 coords. Units = sec. | | detector position at $t_a$ (GPS), in ICRS J2000 coords. Units = sec. | |
| | | | |
| \item[\texttt{ REAL8 vDetector[3]}] Cartesian coords (0=x,1=y,2=z) of | | \item[\texttt{ REAL8 vDetector[3]}] Cartesian coords (0=x,1=y,2=z) of | |
| detector velocity at $t_a$ (GPS), in ICRS J2000 coords. Dimensionless. | | detector velocity at $t_a$ (GPS), in ICRS J2000 coords. Dimensionless. | |
| \end{description} | | \end{description} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** This structure contains two pointers to data files containing arrays | |
| | | * of center-of-mass positions for the Earth and Sun, respectively. | |
| | | * The tables are derived from the JPL ephemeris. | |
| | | * | |
| | | * Files tabulate positions for one calendar year | |
| | | * (actually, a little more than one year, to deal | |
| | | * with overlaps). The first line of each table summarizes | |
| | | * what is in it. Subsequent lines give the time (GPS) and the | |
| | | * Earth's position \f$(x,y,z)\f$, | |
| | | * velocity \f$(v_x, v_y, v_z)\f$, and acceleration \f$(a_x, a_y, a_z)\f$ | |
| | | * at that instant. All in units of seconds; e.g. positions have | |
| | | * units of seconds, and accelerations have units 1/sec. | |
| | | */ | |
| typedef struct | | typedef struct | |
|
| tagEphemerisFilenames | | | |
| { | | { | |
|
| CHAR *earthEphemeris; | | CHAR *earthEphemeris; /**< File containing Earth's position. */ | |
| CHAR *sunEphemeris; | | CHAR *sunEphemeris; /**< File containing Sun's position. */ | |
| } | | } | |
| EphemerisFilenames; | | EphemerisFilenames; | |
| | | | |
|
| | | /** Structure holding a REAL8 time, and a position, velocity and | |
| | | * acceleration vector. */ | |
| typedef struct | | typedef struct | |
|
| tagPosVelAcc | | | |
| { | | { | |
|
| REAL8 gps; | | REAL8 gps; /**< REAL8 timestamp */ | |
| REAL8 pos[3]; | | REAL8 pos[3]; /**< position-vector */ | |
| REAL8 vel[3]; | | REAL8 vel[3]; /**< velocity-vector */ | |
| REAL8 acc[3]; | | REAL8 acc[3]; /**< acceleration-vector */ | |
| } | | } | |
| PosVelAcc; | | PosVelAcc; | |
| | | | |
|
| | | /** This structure contains all information about the | |
| | | * center-of-mass positions of the Earth and Sun, listed at regular | |
| | | * time intervals. | |
| | | */ | |
| typedef struct | | typedef struct | |
|
| tagEphemerisData | | | |
| { | | { | |
|
| EphemerisFilenames ephiles; | | EphemerisFilenames ephiles; /**< Names of the two files containing positi | |
| INT2 leap; | | ons of | |
| INT4 nentriesE; | | * Earth and Sun, respectively at evenly spac | |
| INT4 nentriesS; | | ed times. */ | |
| REAL8 dtEtable; | | INT2 leap; /**< The number of leap seconds that have | |
| REAL8 dtStable; | | * been inserted into UTC between Jan 6, 1980 (= st | |
| PosVelAcc *ephemE; | | art of GPS calendar) | |
| PosVelAcc *ephemS; | | * and the current time tgps. But its perfectly OK | |
| | | to approximate this by | |
| | | * number of leap sec inserted between Jan 6, 1980 | |
| | | and Jan 2 of year | |
| | | * covered by this ephemeris file; eg leap = 13 for | |
| | | year 2000. */ | |
| | | INT4 nentriesE; /**< The number of entries in Earth ephemeris table | |
| | | . */ | |
| | | INT4 nentriesS; /**< The number of entries in Sun ephemeris table. | |
| | | */ | |
| | | REAL8 dtEtable; /**< The spacing in sec between consecutive intants | |
| | | in Earth ephemeris table.*/ | |
| | | REAL8 dtStable; /**< The spacing in sec between consecutive intants | |
| | | in Sun ephemeris table.*/ | |
| | | PosVelAcc *ephemE; /**< Array containing pos,vel,acc of earth, as extr | |
| | | acted from earth | |
| | | * ephem file. Units are sec, 1, 1/sec respectively | |
| | | */ | |
| | | PosVelAcc *ephemS; /**< Array with pos, vel and acc for the sun (see e | |
| | | phemE) */ | |
| } | | } | |
| EphemerisData; | | EphemerisData; | |
| | | | |
|
| | | /** Basic output structure of LALBarycenterEarth.c. | |
| | | */ | |
| typedef struct | | typedef struct | |
|
| tagEarthState | | | |
| { | | { | |
|
| REAL8 einstein; /*the einstein delay equiv TDB - TDT */ | | REAL8 einstein; /**< the einstein delay equiv TDB - TDT */ | |
| REAL8 deinstein; /*d(einstein)/d(tgps) */ | | REAL8 deinstein; /**< d(einstein)/d(tgps) */ | |
| | | | |
|
| REAL8 posNow[3]; /* Cartesian coords of Earth's center at tgps, | | REAL8 posNow[3]; /**< Cartesian coords of Earth's center at tgps, | |
| extrapolated from JPL DE405 ephemeris; units= sec */ | | * extrapolated from JPL DE405 ephemeris; units= se | |
| REAL8 velNow[3]; /* dimensionless velocity of Earth's center at tgps, | | c */ | |
| extrapolated from JPL DE405 ephemeris */ | | REAL8 velNow[3]; /**< dimensionless velocity of Earth's center at tg | |
| | | ps, | |
| REAL8 gastRad; /*Greenwich Apparent Sidereal Time, in radians, at tgps | | * extrapolated from JPL DE405 ephemeris */ | |
| ; | | | |
| Is basically the angle thru which Earth has spun at | | REAL8 gmstRad; /**< Greenwich Mean Sidereal Time (GMST) in radians | |
| given time. gast is like gmst, but has | | , at tgps */ | |
| additional correction for short-term nutation */ | | REAL8 gastRad; /**< Greenwich Apparent Sidereal Time, in radians, | |
| | | at tgps; | |
| REAL8 tzeA; /*variable describing effect of lunisolar precession, at tgp | | * Is basically the angle thru which Earth has spun | |
| s*/ | | at | |
| REAL8 zA; /*variable describing effect of lunisolar precession, at tgps* | | * given time; gast is like gmst, but has | |
| / | | * additional correction for short-term nutation */ | |
| REAL8 thetaA; /*variable describing effect of lunisolar prec., at tgps*/ | | | |
| REAL8 delpsi; /*variable describing effect of Earth nutation, at tgps*/ | | REAL8 tzeA; /**< variable describing effect of lunisolar preces | |
| REAL8 deleps; /*variable describing effect of Earth nutation, at tgps*/ | | sion, at tgps */ | |
| | | REAL8 zA; /**< variable describing effect of lunisolar preces | |
| REAL8 se[3]; /*vector that points from Sun to Earth at instant tgps, | | sion, at tgps */ | |
| in DE405 coords; units = sec */ | | REAL8 thetaA; /**< variable describing effect of lunisolar preces | |
| REAL8 dse[3]; /*d(se[3])/d(tgps). Dimensionless*/ | | sion, at tgps */ | |
| REAL8 rse; /*length of vector se[3]; units = sec */ | | REAL8 delpsi; /**< variable describing effect of Earth nutation, | |
| REAL8 drse; /* d(rse)/d(tgps); dimensionless */ | | at tgps*/ | |
| | | REAL8 deleps; /**< variable describing effect of Earth nutation, | |
| | | at tgps*/ | |
| | | | |
| | | REAL8 se[3]; /**< vector that points from Sun to Earth at instan | |
| | | t tgps, | |
| | | * in DE405 coords; units = sec */ | |
| | | REAL8 dse[3]; /**< d(se[3])/d(tgps); Dimensionless */ | |
| | | REAL8 rse; /**< length of vector se[3]; units = sec */ | |
| | | REAL8 drse; /**< d(rse)/d(tgps); dimensionless */ | |
| } | | } | |
| EarthState; | | EarthState; | |
| | | | |
|
| | | /** Basic input structure to LALBarycenter.c. | |
| | | */ | |
| typedef struct | | typedef struct | |
|
| tagBarycenterInput | | | |
| { | | { | |
|
| LIGOTimeGPS tgps; /*input GPS arrival time. I use tgps (lower case) | | LIGOTimeGPS tgps; /**< input GPS arrival time. I use tgps (lower case | |
| to remind that here the LAL structure is a | | ) | |
| field in the larger structure BarycenterInput. | | * to remind that here the LAL structure is a | |
| I use tGPS as an input structure (by itself) to | | * field in the larger structure BarycenterInput. | |
| LALBarycenterEarth */ | | * I use tGPS as an input structure (by itself) to | |
| | | * LALBarycenterEarth */ | |
| LALDetector site; /*DetectorSite structure*/ | | | |
| | | LALDetector site; /**< detector site info. <b>NOTE:</b> | |
| REAL8 alpha; /* source right ascension in ICRS | | * the <tt>site.location</tt> field must be modifie | |
| J2000 coords (radians)*/ | | d | |
| REAL8 delta; /* source declination in ICRS J2000 coords (radians)*/ | | * to give the detector location in units of | |
| REAL8 dInv; /* 1/(distance to source), in 1/sec. | | * <em>seconds</em> (i.e. divide the values normall | |
| This needed to correct Roemer delay for very | | y | |
| nearby sources; correction is about 10 microsec for | | * stored in <tt>site.location</tt> by <tt>LAL_C_SI | |
| source at 100 pc */ | | </tt> */ | |
| | | | |
| | | REAL8 alpha; /**< Source right ascension in ICRS J2000 coords ( | |
| | | radians). */ | |
| | | REAL8 delta; /**< Source declination in ICRS J2000 coords (radia | |
| | | ns) */ | |
| | | REAL8 dInv; /**< 1/(distance to source), in 1/sec. | |
| | | * This is needed to correct Roemer delay for very | |
| | | * nearby sources; correction is about 10 microsec | |
| | | for | |
| | | * source at 100 pc */ | |
| } | | } | |
| BarycenterInput; | | BarycenterInput; | |
| | | | |
|
| | | /** Basic output structure produced by LALBarycenter.c. | |
| | | */ | |
| typedef struct | | typedef struct | |
|
| tagEmissionTime | | | |
| { | | { | |
|
| REAL8 deltaT; /* $t_e$(TDB) - $t_a$(GPS) | | REAL8 deltaT; /**< \f$t_e\f$(TDB) - \f$t_a\f$(GPS) | |
| +(light-travel-time from source to SSB) */ | | * + (light-travel-time from source to SSB) */ | |
| | | | |
|
| LIGOTimeGPS te;/* pulse emission time (TDB); also sometimes called | | LIGOTimeGPS te; /**< pulse emission time (TDB); also sometimes call | |
| ``arrival time (TDB) of same wavefront at SSB'' */ | | ed | |
| REAL8 tDot; /* d(emission time in TDB)/d(arrival time in GPS) */ | | * ``arrival time (TDB) of same wavefront at SSB'' | |
| | | */ | |
| | | REAL8 tDot; /**< d(emission time in TDB)/d(arrival time in GPS) | |
| | | */ | |
| | | | |
|
| REAL8 rDetector[3]; /* Cartesian coords (0=x,1=y,2=z) of detector positio | | REAL8 rDetector[3]; /**< Cartesian coords (0=x,1=y,2=z) of detector pos | |
| n | | ition | |
| at $t_a$ (GPS), in ICRS J2000 coords. Units = sec. | | * at $t_a$ (GPS), in ICRS J2000 coords. Units = se | |
| */ | | c. */ | |
| | | | |
|
| REAL8 vDetector[3]; /* Cartesian coords (0=x,1=y,2=z) of detector velocit | | REAL8 vDetector[3]; /* Cartesian coords (0=x,1=y,2=z) of detector veloc | |
| y | | ity | |
| at $t_a$ (GPS), in ICRS J2000 coords. Dimensionless | | * at \f$t_a\f$ (GPS), in ICRS J2000 coords. Dimens | |
| . */ | | ionless. */ | |
| } | | } | |
| EmissionTime; | | EmissionTime; | |
| | | | |
| /*Curt: probably best to take 1.0 OUT of tDot--ie., output tDot-1. | | /*Curt: probably best to take 1.0 OUT of tDot--ie., output tDot-1. | |
| But most users would immediately add back the one anyway. | | But most users would immediately add back the one anyway. | |
| */ | | */ | |
| | | | |
| /*Curt: rem te is ``time pulse would arrive at a GPS clock | | /*Curt: rem te is ``time pulse would arrive at a GPS clock | |
| way out in empty space, if you renormalized and zero-ed the latter | | way out in empty space, if you renormalized and zero-ed the latter | |
| to give, on average, the same arrival time as the GPS clock on Earth'' */ | | to give, on average, the same arrival time as the GPS clock on Earth'' */ | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| | | | |
|
| void LALBarycenterEarth(LALStatus *, EarthState *, LIGOTimeGPS *, Ephemeris
Data *); | | void LALBarycenterEarth(LALStatus *, EarthState *, const LIGOTimeGPS *, con
st EphemerisData *); | |
| | | | |
|
| void LALBarycenter(LALStatus *, EmissionTime *, BarycenterInput *, EarthSta
te *); | | void LALBarycenter(LALStatus *, EmissionTime *, const BarycenterInput *, co
nst EarthState *); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \vfill{\footnotesize\input{LALBarycenterHV}} | | \vfill{\footnotesize\input{LALBarycenterHV}} | |
| \newpage\input{LALBarycenterC} | | \newpage\input{LALBarycenterC} | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \section{Header \texttt{LALInitBarycenter.h}} | | \section{Header \texttt{LALInitBarycenter.h}} | |
| | | | |
| This header and its associated module have been moved into the | | This header and its associated module have been moved into the | |
| | | | |
End of changes. 30 change blocks. |
| 81 lines changed or deleted | | 151 lines changed or added | |
|
| LALConstants.h | | LALConstants.h | |
|
| | | /** \file | |
| | | * \ingroup std | |
| | | * \author Creighton, T. D. | |
| | | * \date $Id: LALConstants.h,v 1.11 2005/08/25 21:24:02 jolien Exp $ | |
| | | * \brief Provides standard numerical constants for LAL. | |
| | | * | |
| | | * This header defines a number of useful numerical constants | |
| | | * for use in LAL routines. These constants come in three basic | |
| | | * flavours: arithmetic and mathematical constants, fundamental (or | |
| | | * defined) physical constants, and measured astrophysical and | |
| | | * cosmological parameters. | |
| | | * | |
| | | * Note that this header is not included automatically by the header | |
| | | * <tt>LALStdlib.h</tt>. Include it explicitly if you need any of these | |
| | | * constants. | |
| | | */ | |
| | | | |
| /********************************* <lalVerbatim file="LALConstantsHV"> | | /********************************* <lalVerbatim file="LALConstantsHV"> | |
| Author: Creighton, T. D. | | Author: Creighton, T. D. | |
|
| $Id: LALConstants.h,v 1.9 2001/08/21 04:19:52 jolien Exp $ | | $Id: LALConstants.h,v 1.11 2005/08/25 21:24:02 jolien Exp $ | |
| ********************************** </lalVerbatim> */ | | ********************************** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALConstants.h}} | | \section{Header \texttt{LALConstants.h}} | |
| \label{s:LALConstants.h} | | \label{s:LALConstants.h} | |
| | | | |
| Provides standard numerical constants for LAL. | | Provides standard numerical constants for LAL. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 57 | |
| | | | |
| #ifndef _LALCONSTANTS_H | | #ifndef _LALCONSTANTS_H | |
| #define _LALCONSTANTS_H | | #define _LALCONSTANTS_H | |
| | | | |
| #include <lal/LALRCSID.h> | | #include <lal/LALRCSID.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALCONSTANTSH, "$Id: LALConstants.h,v 1.9 2001/08/21 04:19:52 jolie
n Exp $"); | | NRCSID (LALCONSTANTSH, "$Id: LALConstants.h,v 1.11 2005/08/25 21:24:02 joli
en Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Mathematical constants} | | \subsection*{Mathematical constants} | |
| \idx[Constant]{LAL\_REAL4\_MANT} | | \idx[Constant]{LAL\_REAL4\_MANT} | |
| \idx[Constant]{LAL\_REAL4\_MAX} | | \idx[Constant]{LAL\_REAL4\_MAX} | |
| \idx[Constant]{LAL\_REAL4\_MIN} | | \idx[Constant]{LAL\_REAL4\_MIN} | |
| \idx[Constant]{LAL\_REAL4\_EPS} | | \idx[Constant]{LAL\_REAL4\_EPS} | |
| \idx[Constant]{LAL\_REAL8\_MANT} | | \idx[Constant]{LAL\_REAL8\_MANT} | |
| \idx[Constant]{LAL\_REAL8\_MAX} | | \idx[Constant]{LAL\_REAL8\_MAX} | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 126 | |
| \end{center} | | \end{center} | |
| | | | |
| \noindent\verb@LAL_REAL4_EPS@ and \verb@LAL_REAL8_EPS@ can be thought | | \noindent\verb@LAL_REAL4_EPS@ and \verb@LAL_REAL8_EPS@ can be thought | |
| of as the difference between 1 and the next representable \verb@REAL4@ | | of as the difference between 1 and the next representable \verb@REAL4@ | |
| or \verb@REAL8@ number. | | or \verb@REAL8@ number. | |
| | | | |
| \vspace{3ex} | | \vspace{3ex} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_REAL4_MANT 24 /* Bits of precision in the mantissa of a REAL4 * | | /** \name Floating-point constants | |
| / | | * The following constants define the precision and range of | |
| #define LAL_REAL4_MAX 3.40282347e+38 /* Largest REAL4 */ | | * floating-point arithmetic in LAL. They are taken from the IEEE | |
| #define LAL_REAL4_MIN 1.17549435e-38 /* Smallest nonzero REAL4 */ | | * standard 754 for binary arithmetic. All numbers are dimensionless. */ | |
| #define LAL_REAL4_EPS 1.19209290e-07 /* 0.5^(LAL_REAL4_MANT-1) */ | | /*@{*/ | |
| /* I.e. the difference between 1 and the next resolveable REAL4 */ | | #define LAL_REAL4_MANT 24 /**< Bits of precision in the mantissa of a REAL4 | |
| #define LAL_REAL8_MANT 53 /* Bits of precision in the mantissa of a REAL8 * | | */ | |
| / | | #define LAL_REAL4_MAX 3.40282347e+38 /**< Largest REAL4 */ | |
| #define LAL_REAL8_MAX 1.7976931348623157e+308 /* Largest REAL8 */ | | #define LAL_REAL4_MIN 1.17549435e-38 /**< Smallest nonzero REAL4 */ | |
| #define LAL_REAL8_MIN 2.2250738585072014e-308 /* Smallest nonzero REAL8 */ | | #define LAL_REAL4_EPS 1.19209290e-07 /**< 0.5^(LAL_REAL4_MANT-1), i.e. the | |
| #define LAL_REAL8_EPS 2.2204460492503131e-16 /* 0.5^(LAL_REAL8_MANT-1) */ | | difference between 1 and the next resolveable REAL4 */ | |
| /* I.e. the difference between 1 and the next resolveable REAL8 */ | | #define LAL_REAL8_MANT 53 /**< Bits of precision in the mantissa of a REAL8 | |
| | | */ | |
| | | #define LAL_REAL8_MAX 1.7976931348623157e+308 /**< Largest REAL8 */ | |
| | | #define LAL_REAL8_MIN 2.2250738585072014e-308 /**< Smallest nonzero REAL8 * | |
| | | / | |
| | | #define LAL_REAL8_EPS 2.2204460492503131e-16 /**< 0.5^(LAL_REAL8_MANT-1), | |
| | | i.e. the difference between 1 and the next resolveable REAL8 */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| The following are fundamental mathematical constants. They are mostly | | The following are fundamental mathematical constants. They are mostly | |
| taken from the GNU C \verb@math.h@ header (with the exception of | | taken from the GNU C \verb@math.h@ header (with the exception of | |
| \verb@LAL_TWOPI@, which was computed using Maple). All numbers are | | \verb@LAL_TWOPI@, which was computed using Maple). All numbers are | |
| dimensionless. | | dimensionless. | |
| | | | |
| \begin{center} | | \begin{center} | |
| \begin{tabular}{|llc|} | | \begin{tabular}{|llc|} | |
| | | | |
| skipping to change at line 156 | | skipping to change at line 177 | |
| \tt LAL\_2\_SQRTPI & 1.1283791670955125738961589031215452 & $2/\sqrt{\pi}$
\\ | | \tt LAL\_2\_SQRTPI & 1.1283791670955125738961589031215452 & $2/\sqrt{\pi}$
\\ | |
| \tt LAL\_PI\_180 & 1.7453292519943295769236907684886127$\times10^{-2}$ & | | \tt LAL\_PI\_180 & 1.7453292519943295769236907684886127$\times10^{-2}$ & | |
| $\pi/180$ \\ | | $\pi/180$ \\ | |
| \tt LAL\_180\_PI & 57.295779513082320876798154814105170 & $180/\pi$ \\ | | \tt LAL\_180\_PI & 57.295779513082320876798154814105170 & $180/\pi$ \\ | |
| \hline | | \hline | |
| \end{tabular} | | \end{tabular} | |
| \end{center} | | \end{center} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_E 2.7182818284590452353602874713526625L /* e */ | | /** \name Mathematical constants | |
| #define LAL_LOG2E 1.4426950408889634073599246810018922L /* log_2 e */ | | * The following are fundamental mathematical constants. They are mostly | |
| #define LAL_LOG10E 0.4342944819032518276511289189166051L /* log_10 e */ | | * taken from the GNU C <tt>math.h</tt> header (with the exception of | |
| #define LAL_LN2 0.6931471805599453094172321214581766L /* log_e 2 */ | | * <tt>LAL_TWOPI</tt>, which was computed using Maple). All numbers are | |
| #define LAL_LN10 2.3025850929940456840179914546843642L /* log_e 10 */ | | * dimensionless. */ | |
| #define LAL_SQRT2 1.4142135623730950488016887242096981L /* sqrt(2) */ | | /*@{*/ | |
| #define LAL_SQRT1_2 0.7071067811865475244008443621048490L /* 1/sqrt(2) * | | #define LAL_E 2.7182818284590452353602874713526625 /**< e */ | |
| / | | #define LAL_LOG2E 1.4426950408889634073599246810018922 /**< log_2 e */ | |
| #define LAL_GAMMA 0.5772156649015328606065120900824024L /* gamma */ | | #define LAL_LOG10E 0.4342944819032518276511289189166051 /**< log_10 e * | |
| | | / | |
| | | #define LAL_LN2 0.6931471805599453094172321214581766 /**< log_e 2 */ | |
| | | #define LAL_LN10 2.3025850929940456840179914546843642 /**< log_e 10 * | |
| | | / | |
| | | #define LAL_SQRT2 1.4142135623730950488016887242096981 /**< sqrt(2) */ | |
| | | #define LAL_SQRT1_2 0.7071067811865475244008443621048490 /**< 1/sqrt(2) | |
| | | */ | |
| | | #define LAL_GAMMA 0.5772156649015328606065120900824024 /**< gamma */ | |
| /* Assuming we're not near a black hole or in Tennessee... */ | | /* Assuming we're not near a black hole or in Tennessee... */ | |
|
| #define LAL_PI 3.1415926535897932384626433832795029L /* pi */ | | #define LAL_PI 3.1415926535897932384626433832795029 /**< pi */ | |
| #define LAL_TWOPI 6.2831853071795864769252867665590058L /* 2*pi */ | | #define LAL_TWOPI 6.2831853071795864769252867665590058 /**< 2*pi */ | |
| #define LAL_PI_2 1.5707963267948966192313216916397514L /* pi/2 */ | | #define LAL_PI_2 1.5707963267948966192313216916397514 /**< pi/2 */ | |
| #define LAL_PI_4 0.7853981633974483096156608458198757L /* pi/4 */ | | #define LAL_PI_4 0.7853981633974483096156608458198757 /**< pi/4 */ | |
| #define LAL_1_PI 0.3183098861837906715377675267450287L /* 1/pi */ | | #define LAL_1_PI 0.3183098861837906715377675267450287 /**< 1/pi */ | |
| #define LAL_2_PI 0.6366197723675813430755350534900574L /* 2/pi */ | | #define LAL_2_PI 0.6366197723675813430755350534900574 /**< 2/pi */ | |
| #define LAL_2_SQRTPI 1.1283791670955125738961589031215452L /* 2/sqrt(pi) | | #define LAL_2_SQRTPI 1.1283791670955125738961589031215452 /**< 2/sqrt(pi) | |
| */ | | */ | |
| #define LAL_PI_180 1.7453292519943295769236907684886127e-2L /* pi/180 */ | | #define LAL_PI_180 1.7453292519943295769236907684886127e-2 /**< pi/180 * | |
| #define LAL_180_PI 57.295779513082320876798154814105170L /* 180/pi */ | | / | |
| | | #define LAL_180_PI 57.295779513082320876798154814105170 /**< 180/pi */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Physical constants} | | \subsection*{Physical constants} | |
| \idx[Constant]{LAL\_C\_SI} | | \idx[Constant]{LAL\_C\_SI} | |
| \idx[Constant]{LAL\_EPSILON0\_SI} | | \idx[Constant]{LAL\_EPSILON0\_SI} | |
| \idx[Constant]{LAL\_MU0\_SI} | | \idx[Constant]{LAL\_MU0\_SI} | |
| \idx[Constant]{LAL\_GEARTH\_SI} | | \idx[Constant]{LAL\_GEARTH\_SI} | |
| \idx[Constant]{LAL\_PATM\_SI} | | \idx[Constant]{LAL\_PATM\_SI} | |
| \idx[Constant]{LAL\_G\_SI} | | \idx[Constant]{LAL\_G\_SI} | |
| | | | |
| skipping to change at line 236 | | skipping to change at line 264 | |
| \tt LAL\_GEARTH\_SI & $9.80665\,\mathrm{m}\,\mathrm{s}^{-2}$ & | | \tt LAL\_GEARTH\_SI & $9.80665\,\mathrm{m}\,\mathrm{s}^{-2}$ & | |
| Standard gravity $g$ \\ | | Standard gravity $g$ \\ | |
| \tt LAL\_PATM\_SI & $101\,325\,\mathrm{Pa}$ & | | \tt LAL\_PATM\_SI & $101\,325\,\mathrm{Pa}$ & | |
| Standard atmospheric pressure $p_\mathrm{atm}$ \\ | | Standard atmospheric pressure $p_\mathrm{atm}$ \\ | |
| \hline | | \hline | |
| \end{tabular} | | \end{tabular} | |
| \end{center} | | \end{center} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_C_SI 299792458 /* Speed of light in vacuo, m s^-1 */ | | /** \name Exact physical constants | |
| #define LAL_EPSILON0_SI 8.8541878176203898505365630317107503e-12L | | * The following physical constants are defined to have exact values. | |
| /* Permittivity of free space, C^2 N^-1 m^-2 */ | | * The values of \f$c\f$ and \f$g\f$ are taken from Barnet (1996), | |
| #define LAL_MU0_SI 1.2566370614359172953850573533118012e-6L | | * \f$p_\mathrm{atm}\f$ is from Lang (1992), while \f$\epsilon_0\f$ and | |
| /* Permeability of free space, N A^-2 */ | | * \f$\mu_0\f$ are computed from \f$c\f$ using exact formulae. They are gi | |
| #define LAL_GEARTH_SI 9.80665 /* Standard gravity, m s^-2 */ | | ven in | |
| #define LAL_PATM_SI 101325 /* Standard atmosphere, Pa */ | | * the SI units shown. */ | |
| | | /*@{*/ | |
| | | #define LAL_C_SI 299792458 /**< Speed of light in vacuo, m s^-1 */ | |
| | | #define LAL_EPSILON0_SI 8.8541878176203898505365630317107503e-12 /**< Perm | |
| | | ittivity of free space, C^2 N^-1 m^-2 */ | |
| | | #define LAL_MU0_SI 1.2566370614359172953850573533118012e-6 /**< Permeabi | |
| | | lity of free space, N A^-2 */ | |
| | | #define LAL_GEARTH_SI 9.80665 /**< Standard gravity, m s^-2 */ | |
| | | #define LAL_PATM_SI 101325 /**< Standard atmosphere, Pa */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| The following are measured fundamental physical constants, with values | | The following are measured fundamental physical constants, with values | |
|
| given in~\cite{Barnet:1996}. When not dimensionless, they are given | | given in \cite{Barnet:1996}. When not dimensionless, they are given | |
| in the SI units shown. | | in the SI units shown. | |
| | | | |
| \begin{center} | | \begin{center} | |
| \begin{tabular}{|lll|} | | \begin{tabular}{|lll|} | |
| \hline | | \hline | |
| Name & Value & Description \\ | | Name & Value & Description \\ | |
| \hline | | \hline | |
| \tt LAL\_G\_SI & $6.67259\times10^{-11}\,\mathrm{N}\,\mathrm{m}^{2} | | \tt LAL\_G\_SI & $6.67259\times10^{-11}\,\mathrm{N}\,\mathrm{m}^{2} | |
| \mathrm{kg}^{-2}$ & Gravitational constant $G$ \\ | | \mathrm{kg}^{-2}$ & Gravitational constant $G$ \\ | |
| \tt LAL\_H\_SI & $6.6260755\times10^{-34}\,\mathrm{J}\,\mathrm{s}$ & | | \tt LAL\_H\_SI & $6.6260755\times10^{-34}\,\mathrm{J}\,\mathrm{s}$ & | |
| | | | |
| skipping to change at line 293 | | skipping to change at line 327 | |
| \tt LAL\_AB\_SI & $5.29177249\times10^{-11}\,\mathrm{m}$ & Bohr radius $
a$\\ | | \tt LAL\_AB\_SI & $5.29177249\times10^{-11}\,\mathrm{m}$ & Bohr radius $
a$\\ | |
| \tt LAL\_MUB\_SI & $9.27401543\times10^{-24}\,\mathrm{J}\,\mathrm{T}^{-1}
$ & | | \tt LAL\_MUB\_SI & $9.27401543\times10^{-24}\,\mathrm{J}\,\mathrm{T}^{-1}
$ & | |
| Bohr magneton $\mu_B$ \\ | | Bohr magneton $\mu_B$ \\ | |
| \tt LAL\_MUN\_SI & $5.05078658\times10^{-27}\,\mathrm{J}\,\mathrm{T}^{-1}
$ & | | \tt LAL\_MUN\_SI & $5.05078658\times10^{-27}\,\mathrm{J}\,\mathrm{T}^{-1}
$ & | |
| Nuclear magneton $\mu_N$ \\ | | Nuclear magneton $\mu_N$ \\ | |
| \hline | | \hline | |
| \end{tabular} | | \end{tabular} | |
| \end{center} | | \end{center} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_G_SI 6.67259e-11 /* Gravitational constant, N m^2 kg^-2 | | /** \name Physical constants | |
| */ | | * The following are measured fundamental physical constants, with values | |
| #define LAL_H_SI 6.6260755e-34 /* Planck constant, J s */ | | * given in Barnet (1996). When not dimensionless, they are given | |
| #define LAL_HBAR_SI 1.05457266e-34 /* Reduced Planck constant, J s */ | | * in the SI units shown. */ | |
| #define LAL_MPL_SI 2.17671e-8 /* Planck mass, kg */ | | /*@{*/ | |
| #define LAL_LPL_SI 1.61605e-35 /* Planck length, m */ | | #define LAL_G_SI 6.67259e-11 /**< Gravitational constant, N m^2 kg^ | |
| #define LAL_TPL_SI 5.39056e-44 /* Planck time, s */ | | -2 */ | |
| #define LAL_K_SI 1.380658e-23 /* Boltzmann constant, J K^-1 */ | | #define LAL_H_SI 6.6260755e-34 /**< Planck constant, J s */ | |
| #define LAL_R_SI 8.314511 /* Ideal gas constant, J K^-1 */ | | #define LAL_HBAR_SI 1.05457266e-34 /**< Reduced Planck constant, J s */ | |
| #define LAL_MOL 6.0221367e23 /* Avogadro constant, dimensionless */ | | #define LAL_MPL_SI 2.17671e-8 /**< Planck mass, kg */ | |
| #define LAL_BWIEN_SI 2.897756e-3 /* Wien displacement law constant, m K | | #define LAL_LPL_SI 1.61605e-35 /**< Planck length, m */ | |
| */ | | #define LAL_TPL_SI 5.39056e-44 /**< Planck time, s */ | |
| #define LAL_SIGMA_SI 5.67051e-8 /* Stefan-Boltzmann constant, W m^-2 K^-4 | | #define LAL_K_SI 1.380658e-23 /**< Boltzmann constant, J K^-1 */ | |
| */ | | #define LAL_R_SI 8.314511 /**< Ideal gas constant, J K^-1 */ | |
| #define LAL_AMU_SI 1.6605402e-27 /* Atomic mass unit, kg */ | | #define LAL_MOL 6.0221367e23 /**< Avogadro constant, dimensionless | |
| #define LAL_MP_SI 1.6726231e-27 /* Proton mass, kg */ | | */ | |
| #define LAL_ME_SI 9.1093897e-31 /* Electron mass, kg */ | | #define LAL_BWIEN_SI 2.897756e-3 /**< Wien displacement law constant, m | |
| #define LAL_QE_SI 1.60217733e-19 /* Electron charge, C */ | | K */ | |
| #define LAL_ALPHA 7.297354677e-3 /* Fine structure constant, dimensionless | | #define LAL_SIGMA_SI 5.67051e-8 /**< Stefan-Boltzmann constant, W m^-2 K^ | |
| */ | | -4 */ | |
| #define LAL_RE_SI 2.81794092e-15 /* Classical electron radius, m */ | | #define LAL_AMU_SI 1.6605402e-27 /**< Atomic mass unit, kg */ | |
| #define LAL_LAMBDAE_SI 3.86159323e-13 /* Electron Compton wavelength, m */ | | #define LAL_MP_SI 1.6726231e-27 /**< Proton mass, kg */ | |
| #define LAL_AB_SI 5.29177249e-11 /* Bohr radius, m */ | | #define LAL_ME_SI 9.1093897e-31 /**< Electron mass, kg */ | |
| #define LAL_MUB_SI 9.27401543e-24 /* Bohr magneton, J T^-1 */ | | #define LAL_QE_SI 1.60217733e-19 /**< Electron charge, C */ | |
| #define LAL_MUN_SI 5.05078658e-27 /* Nuclear magneton, J T^-1 */ | | #define LAL_ALPHA 7.297354677e-3 /**< Fine structure constant, dimensionle | |
| | | ss */ | |
| | | #define LAL_RE_SI 2.81794092e-15 /**< Classical electron radius, m */ | |
| | | #define LAL_LAMBDAE_SI 3.86159323e-13 /**< Electron Compton wavelength, m * | |
| | | / | |
| | | #define LAL_AB_SI 5.29177249e-11 /**< Bohr radius, m */ | |
| | | #define LAL_MUB_SI 9.27401543e-24 /**< Bohr magneton, J T^-1 */ | |
| | | #define LAL_MUN_SI 5.05078658e-27 /**< Nuclear magneton, J T^-1 */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Astrophysical parameters} | | \subsection*{Astrophysical parameters} | |
| \idx[Constant]{LAL\_REARTH\_SI} | | \idx[Constant]{LAL\_REARTH\_SI} | |
| \idx[Constant]{LAL\_AWGS84\_SI} | | \idx[Constant]{LAL\_AWGS84\_SI} | |
| \idx[Constant]{LAL\_BWGS84\_SI} | | \idx[Constant]{LAL\_BWGS84\_SI} | |
| \idx[Constant]{LAL\_MEARTH\_SI} | | \idx[Constant]{LAL\_MEARTH\_SI} | |
| \idx[Constant]{LAL\_IEARTH} | | \idx[Constant]{LAL\_IEARTH} | |
| \idx[Constant]{LAL\_EEARTH} | | \idx[Constant]{LAL\_EEARTH} | |
| | | | |
| skipping to change at line 387 | | skipping to change at line 427 | |
| \tt LAL\_YRSID\_SI & $31\,558\,149.8\,\mathrm{s}$ & Sidereal year (1994) \
\ | | \tt LAL\_YRSID\_SI & $31\,558\,149.8\,\mathrm{s}$ & Sidereal year (1994) \
\ | |
| \tt LAL\_DAYSID\_SI & $86\,164.09053\,\mathrm{s}$ & Mean sidereal day \\ | | \tt LAL\_DAYSID\_SI & $86\,164.09053\,\mathrm{s}$ & Mean sidereal day \\ | |
| \tt LAL\_LYR\_SI & $9.46052817\times10^{15}\,\mathrm{m}$ & | | \tt LAL\_LYR\_SI & $9.46052817\times10^{15}\,\mathrm{m}$ & | |
| $c\times$tropical year (1994) \\ | | $c\times$tropical year (1994) \\ | |
| \hline | | \hline | |
| \end{tabular} | | \end{tabular} | |
| \end{center} | | \end{center} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_REARTH_SI 6.378140e6 /* Earth equatorial radius, m */ | | /** \name Astrophysical parameters | |
| #define LAL_AWGS84_SI 6.378137e6 /* Semimajor axis of WGS-84 Reference | | * The following parameters are derived from measured properties of the | |
| Ellipsoid, m */ | | * Earth and Sun. The values are taken from Barnet (1996), except | |
| #define LAL_BWGS84_SI 6.356752314e6 /* Semiminor axis of WGS-84 Reference | | * for the obliquity of the ecliptic plane and the eccentricity of | |
| Ellipsoid, m */ | | * Earth's orbit, which are taken from Lang (1992). All values are | |
| #define LAL_MEARTH_SI 5.97370e24 /* Earth mass, kg */ | | * given in the SI units shown. */ | |
| #define LAL_IEARTH 0.409092804 /* Earth inclination (2000), radians | | /*@{*/ | |
| */ | | #define LAL_REARTH_SI 6.378140e6 /**< Earth equatorial radius, m */ | |
| #define LAL_EEARTH 0.0167 /* Earth orbital eccentricity */ | | #define LAL_AWGS84_SI 6.378137e6 /**< Semimajor axis of WGS-84 Referen | |
| #define LAL_RSUN_SI 6.960e8 /* Solar equatorial radius, m */ | | ce Ellipsoid, m */ | |
| #define LAL_MSUN_SI 1.98892e30 /* Solar mass, kg */ | | #define LAL_BWGS84_SI 6.356752314e6 /**< Semiminor axis of WGS-84 Referen | |
| #define LAL_MRSUN_SI 1.47662504e3 /* Geometrized solar mass, m */ | | ce Ellipsoid, m */ | |
| #define LAL_MTSUN_SI 4.92549095e-6 /* Geometrized solar mass, s */ | | #define LAL_MEARTH_SI 5.97370e24 /**< Earth mass, kg */ | |
| #define LAL_LSUN_SI 3.846e26 /* Solar luminosity, W */ | | #define LAL_IEARTH 0.409092804 /**< Earth inclination (2000), radian | |
| #define LAL_AU_SI 1.4959787066e11 /* Astronomical unit, m */ | | s */ | |
| #define LAL_PC_SI 3.0856775807e16 /* Parsec, m */ | | #define LAL_EEARTH 0.0167 /**< Earth orbital eccentricity */ | |
| #define LAL_YRTROP_SI 31556925.2 /* Tropical year (1994), s */ | | #define LAL_RSUN_SI 6.960e8 /**< Solar equatorial radius, m */ | |
| #define LAL_YRSID_SI 31558149.8 /* Sidereal year (1994), s */ | | #define LAL_MSUN_SI 1.98892e30 /**< Solar mass, kg */ | |
| #define LAL_DAYSID_SI 86164.09053 /* Mean sidereal day, s */ | | #define LAL_MRSUN_SI 1.47662504e3 /**< Geometrized solar mass, m */ | |
| #define LAL_LYR_SI 9.46052817e15 /* ``Tropical'' lightyear (1994), m * | | #define LAL_MTSUN_SI 4.92549095e-6 /**< Geometrized solar mass, s */ | |
| / | | #define LAL_LSUN_SI 3.846e26 /**< Solar luminosity, W */ | |
| | | #define LAL_AU_SI 1.4959787066e11 /**< Astronomical unit, m */ | |
| | | #define LAL_PC_SI 3.0856775807e16 /**< Parsec, m */ | |
| | | #define LAL_YRTROP_SI 31556925.2 /**< Tropical year (1994), s */ | |
| | | #define LAL_YRSID_SI 31558149.8 /**< Sidereal year (1994), s */ | |
| | | #define LAL_DAYSID_SI 86164.09053 /**< Mean sidereal day, s */ | |
| | | #define LAL_LYR_SI 9.46052817e15 /**< ``Tropical'' lightyear (1994), m | |
| | | */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| The following cosmological parameters are derived from measurements of | | The following cosmological parameters are derived from measurements of | |
| the Hubble expansion rate and of the cosmic background radiation | | the Hubble expansion rate and of the cosmic background radiation | |
| (CBR). Data are taken from~\cite{Barnet:1996}. In what follows, the | | (CBR). Data are taken from~\cite{Barnet:1996}. In what follows, the | |
| normalized Hubble constant $h_0$ is equal to the actual Hubble | | normalized Hubble constant $h_0$ is equal to the actual Hubble | |
| constant $H_0$ divided by $\langle H | | constant $H_0$ divided by $\langle H | |
| \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}$. Thus the | | \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}$. Thus the | |
| Hubble constant can be written as: | | Hubble constant can be written as: | |
| | | | |
| skipping to change at line 454 | | skipping to change at line 502 | |
| \tt LAL\_NCBR\_SI & $4.109\times10^8\,\mathrm{m}^{-3}$ & | | \tt LAL\_NCBR\_SI & $4.109\times10^8\,\mathrm{m}^{-3}$ & | |
| Number density of CBR photons \\ | | Number density of CBR photons \\ | |
| \tt LAL\_SCBR\_SI & $3.993\times10^{-14}\,\mathrm{J}\,\mathrm{K}^{-1} | | \tt LAL\_SCBR\_SI & $3.993\times10^{-14}\,\mathrm{J}\,\mathrm{K}^{-1} | |
| \mathrm{m}^{-3}$ & Entropy density of CBR \\ | | \mathrm{m}^{-3}$ & Entropy density of CBR \\ | |
| \hline | | \hline | |
| \end{tabular} | | \end{tabular} | |
| \end{center} | | \end{center} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| #define LAL_H0FAC_SI 3.2407792903e-18 /* Hubble constant prefactor, s^-1 * | | /** \name Cosmological parameters | |
| / | | * The following cosmological parameters are derived from measurements of | |
| #define LAL_H0_SI 2e-18 /* Approximate Hubble constant, s^-1 | | * the Hubble expansion rate and of the cosmic background radiation | |
| */ | | * (CBR). Data are taken from Barnet (1996). In what follows, the | |
| | | * normalized Hubble constant \f$h_0\f$ is equal to the actual Hubble | |
| | | * constant \f$H_0\f$ divided by \f$\langle H | |
| | | * \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}\f$. Thus the | |
| | | * Hubble constant can be written as: | |
| | | * \f$H_0 = \langle H \rangle h_0\f$. | |
| | | * Similarly, the critical energy density \f$\rho_c\f$ required for spatial | |
| | | * flatness is given by: \f$\rho_c = \langle\rho\rangle h_0^2\f$. | |
| | | * Current estimates give \f$h_0\f$ a value of around 0.65, which is what i | |
| | | s | |
| | | * assumed below. All values are in the SI units shown. */ | |
| | | /*@{*/ | |
| | | #define LAL_H0FAC_SI 3.2407792903e-18 /**< Hubble constant prefactor, s^-1 | |
| | | */ | |
| | | #define LAL_H0_SI 2e-18 /**< Approximate Hubble constant, s^ | |
| | | -1 */ | |
| /* Hubble constant H0 = h0*HOFAC, where h0 is around 0.65 */ | | /* Hubble constant H0 = h0*HOFAC, where h0 is around 0.65 */ | |
|
| #define LAL_RHOCFAC_SI 1.68860e-9 /* Critical density prefactor, J m^-3 * | | #define LAL_RHOCFAC_SI 1.68860e-9 /**< Critical density prefactor, J m^-3 | |
| / | | */ | |
| #define LAL_RHOC_SI 7e-10 /* Approximate critical density, J m^-3 | | #define LAL_RHOC_SI 7e-10 /**< Approximate critical density, J m^ | |
| */ | | -3 */ | |
| /* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */ | | /* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */ | |
|
| #define LAL_TCBR_SI 2.726 /* Cosmic background radiation temperature, K | | #define LAL_TCBR_SI 2.726 /**< Cosmic background radiation temperature, | |
| */ | | K */ | |
| #define LAL_VCBR_SI 3.695e5 /* Solar velocity with respect to CBR, m s^-1 | | #define LAL_VCBR_SI 3.695e5 /**< Solar velocity with respect to CBR, m s^ | |
| */ | | -1 */ | |
| #define LAL_RHOCBR_SI 4.177e-14 /* Energy density of CBR, J m^-3 */ | | #define LAL_RHOCBR_SI 4.177e-14 /**< Energy density of CBR, J m^-3 */ | |
| #define LAL_NCBR_SI 4.109e8 /* Number density of CBR photons, m^-3 */ | | #define LAL_NCBR_SI 4.109e8 /**< Number density of CBR photons, m^-3 */ | |
| #define LAL_SCBR_SI 3.993e-14 /* Entropy density of CBR, J K^-1 m^-3 */ | | #define LAL_SCBR_SI 3.993e-14 /**< Entropy density of CBR, J K^-1 m^-3 */ | |
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vfill{\footnotesize\input{LALConstantsHV}} | | \vfill{\footnotesize\input{LALConstantsHV}} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 102 lines changed or deleted | | 177 lines changed or added | |
|
| LALDatatypes.h | | LALDatatypes.h | |
|
| | | /** \file | |
| | | * \ingroup std | |
| | | * \author Creighton, J. D. E., and Creighton, T. D. | |
| | | * \date $Id: LALDatatypes.h,v 1.18 2005/08/25 21:24:02 jolien Exp $ | |
| | | * \brief Provides the basic LAL datatypes. | |
| | | * | |
| | | * \noindent This header defines the standard data types and data | |
| | | * structures that are used throughout LAL. They fall into three general | |
| | | * categories: primitive datatypes, aggregates of primitive | |
| | | * datatypes, and structured datatypes. The LAL status structure | |
| | | * is a special case of a structured datatype that is used in every | |
| | | * standard LAL function. | |
| | | * | |
| | | * This header file is automatically included by the header | |
| | | * <tt>LALStdlib.h</tt>. In turn, this header file starts by including the | |
| | | * header <tt>LALAtomicDatatypes.h</tt>. | |
| | | * | |
| | | */ | |
| /********************************* <lalVerbatim file="LALDatatypesHV"> | | /********************************* <lalVerbatim file="LALDatatypesHV"> | |
| Author: J. D. E. Creighton, T. D. Creighton | | Author: J. D. E. Creighton, T. D. Creighton | |
|
| $Id: LALDatatypes.h,v 1.12 2002/05/30 16:16:30 jolien Exp $ | | $Id: LALDatatypes.h,v 1.18 2005/08/25 21:24:02 jolien Exp $ | |
| ********************************** </lalVerbatim> */ | | ********************************** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALDatatypes.h}} | | \section{Header \texttt{LALDatatypes.h}} | |
| \label{s:LALDatatypes.h} | | \label{s:LALDatatypes.h} | |
| | | | |
| Provides the basic LAL datatypes. | | Provides the basic LAL datatypes. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| | | | |
| skipping to change at line 154 | | skipping to change at line 172 | |
| * \tt LAL\_D\_TYPE\_CODE & 013 & \tt REAL8 \\ | | * \tt LAL\_D\_TYPE\_CODE & 013 & \tt REAL8 \\ | |
| * \tt LAL\_C\_TYPE\_CODE & 033 & \tt COMPLEX8 \\ | | * \tt LAL\_C\_TYPE\_CODE & 033 & \tt COMPLEX8 \\ | |
| * \tt LAL\_Z\_TYPE\_CODE & 034 & \tt COMPLEX16 \\ | | * \tt LAL\_Z\_TYPE\_CODE & 034 & \tt COMPLEX16 \\ | |
| * \hline | | * \hline | |
| * \end{tabular} | | * \end{tabular} | |
| * \end{center} | | * \end{center} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| /* constants */ | | /* constants */ | |
|
| /* type size constants */ | | | |
| | | /** Type size constants. */ | |
| enum | | enum | |
| { | | { | |
|
| LAL_1_BYTE_TYPE_SIZE = 000, /* 0 = 0 */ | | LAL_1_BYTE_TYPE_SIZE = 000, /**< One byte size 00 = 0 */ | |
| LAL_2_BYTE_TYPE_SIZE = 001, /* 1 = 1 */ | | LAL_2_BYTE_TYPE_SIZE = 001, /**< Two byte size 01 = 1 */ | |
| LAL_4_BYTE_TYPE_SIZE = 002, /* 10 = 2 */ | | LAL_4_BYTE_TYPE_SIZE = 002, /**< Four byte size 010 = 2 */ | |
| LAL_8_BYTE_TYPE_SIZE = 003, /* 11 = 3 */ | | LAL_8_BYTE_TYPE_SIZE = 003, /**< Eight byte size 011 = 3 */ | |
| LAL_16_BYTE_TYPE_SIZE = 004, /* 100 = 4 */ | | LAL_16_BYTE_TYPE_SIZE = 004, /**< Sixteen byte size 0100 = 4 */ | |
| LAL_TYPE_SIZE_MASK = 007 /* 111 = 7 */ | | LAL_TYPE_SIZE_MASK = 007 /**< Type size mask 0111 = 7 */ | |
| }; | | }; | |
| | | | |
|
| /* type flag constants */ | | /** Type flag constants. */ | |
| enum | | enum | |
| { | | { | |
|
| LAL_FLTPT_TYPE_FLAG = 010, /* 1000 = 8 */ | | LAL_FLTPT_TYPE_FLAG = 010, /**< Floating-point (vs integer) type 0100 | |
| LAL_CMPLX_TYPE_FLAG = 020, /* 10000 = 16 */ | | 0 = 8 */ | |
| LAL_UNSGN_TYPE_FLAG = 040, /* 100000 = 32 */ | | LAL_CMPLX_TYPE_FLAG = 020, /**< Complex (vs real) type 010000 = 16 * | |
| | | / | |
| | | LAL_UNSGN_TYPE_FLAG = 040 /**< Unsigned (vs signed) type 0100000 = 3 | |
| | | 2 */ | |
| }; | | }; | |
| | | | |
|
| /* type codes */ | | /** Type codes: use these type codes to identify a LAL atomic data type. | |
| | | */ | |
| typedef enum | | typedef enum | |
| { | | { | |
|
| LAL_CHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE, /* 0 */ | | LAL_CHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE, /**< CHAR type code (0) */ | |
| LAL_I2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE, /* 1 */ | | LAL_I2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE, /**< INT2 type code (1) */ | |
| LAL_I4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE, /* 2 */ | | LAL_I4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE, /**< INT4 type code (2) */ | |
| LAL_I8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE, /* 3 */ | | LAL_I8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE, /**< INT8 type code (3) */ | |
| LAL_UCHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | | LAL_UCHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** | |
| 32 */ | | < UCHAR type code (32) */ | |
| LAL_U2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | | LAL_U2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** | |
| 33 */ | | < UINT2 type code (33) */ | |
| LAL_U4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | | LAL_U4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** | |
| 34 */ | | < UINT4 type code (34) */ | |
| LAL_U8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | | LAL_U8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** | |
| 35 */ | | < UINT8 type code (35) */ | |
| LAL_S_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /* | | LAL_S_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** | |
| 18 */ | | < REAL4 type code (18) */ | |
| LAL_D_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /* | | LAL_D_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** | |
| 19 */ | | < REAL8 type code (19) */ | |
| LAL_C_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_ | | LAL_C_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_ | |
| FLTPT_TYPE_FLAG, /* 27 */ | | FLTPT_TYPE_FLAG, /**< COMPLEX8 type code (27) */ | |
| LAL_Z_TYPE_CODE = LAL_16_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL | | LAL_Z_TYPE_CODE = LAL_16_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL | |
| _FLTPT_TYPE_FLAG, /* 28 */ | | _FLTPT_TYPE_FLAG /**< COMPLEX16 type code (28) */ | |
| } | | } | |
| LALTYPECODE; | | LALTYPECODE; | |
| | | | |
| #include <lal/LALRCSID.h> | | #include <lal/LALRCSID.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.12 2002/05/30 16:16:30 joli
en Exp $"); | | NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.18 2005/08/25 21:24:02 joli
en Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage | | \newpage | |
| \subsection{Aggregate datatypes} | | \subsection{Aggregate datatypes} | |
| \label{ss:aggregate-datatypes} | | \label{ss:aggregate-datatypes} | |
| | | | |
| These datatypes store arbitrarily large sets or collections of | | These datatypes store arbitrarily large sets or collections of | |
| primitive datatypes. At this level there is no physical | | primitive datatypes. At this level there is no physical | |
| interpretation assigned to the objects (such as names or units); the | | interpretation assigned to the objects (such as names or units); the | |
| aggregate datatypes simply collect and arrange the primitive | | aggregate datatypes simply collect and arrange the primitive | |
| | | | |
| skipping to change at line 227 | | skipping to change at line 247 | |
| to be interpreted as being a point in an $n$-dimensional vector space. | | to be interpreted as being a point in an $n$-dimensional vector space. | |
| The fields are: | | The fields are: | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{UINT4 length}] The number of data $n$. | | \item[\texttt{UINT4 length}] The number of data $n$. | |
| \item[\texttt{<datatype> *data}] Pointer to the data array. The data | | \item[\texttt{<datatype> *data}] Pointer to the data array. The data | |
| are stored sequentially as \verb@data[@$0,\ldots,n-1$\verb@]@. | | are stored sequentially as \verb@data[@$0,\ldots,n-1$\verb@]@. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** \name Aggregate datatypes. | |
| | | * | |
| | | * These datatypes store arbitrarily large sets or collections of | |
| | | * primitive datatypes. At this level there is no physical | |
| | | * interpretation assigned to the objects (such as names or units); the | |
| | | * aggregate datatypes simply collect and arrange the primitive | |
| | | * datatypes. The following types of aggregate datatypes are defines: | |
| | | * vectors, arrays, sequences, vector sequences, and array sequences. | |
| | | * | |
| | | * \b Vector structures store an ordered set of \a n elements of any | |
| | | * primative datatype. | |
| | | * | |
| | | * \b Sequence structures are synonyms for Vector structures. | |
| | | * | |
| | | * \b Array structures store a set of elements of any primative | |
| | | * datatype, arranged as an \a m dimensional | |
| | | * array. That is, each element can be thought of as having \a m | |
| | | * indecies, \f$A_{i_0\cdots i_{m-1}}\f$, where each index \f$i_k\f$ | |
| | | * runs over its own range \f$0,\ldots,n_k-1\f$. The total number of | |
| | | * elements is then \f$N=n_0\times\cdots\times n_{m-1}\f$. In memory the | |
| | | * array is flattened so that the elements are stored sequentially in | |
| | | * a contiguous block. That is, the array of memory is packed so that | |
| | | * element \f$A_{i_0\cdots i_{m-1}}\f$ is stored as | |
| | | * \f$\mathtt{data[}i_{m-1} + n_{m-2}\times(i_{m-2} + | |
| | | * n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))\mathtt{]}\f$. | |
| | | * | |
| | | * \b VectorSequence structures store an ordered set of \a l elements of ty | |
| | | pe | |
| | | * \c \<datatype\>Vector, where \c \<datatype\> can be any primitive | |
| | | * datatype. Mathematically the sequence can be written as | |
| | | * \f$\{\vec{v}^{(0)},\ldots,\vec{v}^{(l-1)}\}\f$, where each element | |
| | | * \f$\vec{v}^{(j)}=(v^{(j)}_0,\ldots,v^{(i)}_{n-1})\f$ is a vector of leng | |
| | | th | |
| | | * \f$n\f$. In memory the elements are flattened; that is, they are | |
| | | * stored sequentially in a contiguous block of memory such that | |
| | | * element \f$v^{(j)}_i\f$ is stored as | |
| | | * \f$\mathtt{data[}j\times n + i\mathtt{]}\f$. | |
| | | * | |
| | | * \b ArraySequence structures stores an ordered set of \a l elements of ty | |
| | | pe | |
| | | * \c \<datatype\>Array where \c \<datatype\> can be any primitive | |
| | | * datatype. The indexing of an array sequence can get quite | |
| | | * complicated; it helps to read first the documentation for data arrays, | |
| | | * above. Mathematically the data can be written as a set | |
| | | * \f$\{A^{(j)}_{i_0\cdots i_{m-1}}\f$, where the sequence number | |
| | | * \f$j\f$ runs from 0 to \f$l-1\f$, and each array index \f$i_k\f$ runs ov | |
| | | er its own | |
| | | * range \f$0,\ldots,n_k-1\f$. The total number of data in a given array | |
| | | * element is then \f$N=n_0\times\cdots\times n_{m-1}\f$, and the total | |
| | | * number of data in the sequence is \f$N\times l\f$. In memory the array | |
| | | is | |
| | | * flattened so that the elements are stored sequentially in a | |
| | | * contiguous block. | |
| | | * The element | |
| | | * \f$A^{(j)}_{i_0\cdots i_{m-1}}\f$ is stored as | |
| | | * \f$\mathtt{data[}j\times N + i_{m-1} + n_{m-2}\times(i_{m-2} + | |
| | | * n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))\mathtt{]}\f$; that is, | |
| | | * the index of \c data[] runs over the internal indecies of each | |
| | | * array element before incrementing to the next array element. | |
| | | * | |
| | | */ | |
| | | /*@{*/ | |
| | | /** Vector of type CHAR. */ | |
| typedef struct | | typedef struct | |
| tagCHARVector | | tagCHARVector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| CHAR *data; | | CHAR *data; /**< Pointer to the data array. */ | |
| } | | } | |
| CHARVector; | | CHARVector; | |
| | | | |
|
| | | /** Vector of type INT2. */ | |
| typedef struct | | typedef struct | |
| tagINT2Vector | | tagINT2Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| INT2 *data; | | INT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT2Vector; | | INT2Vector; | |
| | | | |
|
| | | /** Vector of type UINT2. */ | |
| typedef struct | | typedef struct | |
| tagUINT2Vector | | tagUINT2Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| UINT2 *data; | | UINT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT2Vector; | | UINT2Vector; | |
| | | | |
|
| | | /** Vector of type INT4. */ | |
| typedef struct | | typedef struct | |
| tagINT4Vector | | tagINT4Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| INT4 *data; | | INT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT4Vector; | | INT4Vector; | |
| | | | |
|
| | | /** Vector of type UINT4. */ | |
| typedef struct | | typedef struct | |
| tagUINT4Vector | | tagUINT4Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| UINT4 *data; | | UINT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT4Vector; | | UINT4Vector; | |
| | | | |
|
| | | /** Vector of type INT8. */ | |
| typedef struct | | typedef struct | |
| tagINT8Vector | | tagINT8Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| INT8 *data; | | INT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT8Vector; | | INT8Vector; | |
| | | | |
|
| | | /** Vector of type UINT8. */ | |
| typedef struct | | typedef struct | |
| tagUINT8Vector | | tagUINT8Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| UINT8 *data; | | UINT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT8Vector; | | UINT8Vector; | |
| | | | |
|
| | | /** Vector of type REAL4. */ | |
| typedef struct | | typedef struct | |
| tagREAL4Vector | | tagREAL4Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| REAL4 *data; | | REAL4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL4Vector; | | REAL4Vector; | |
| | | | |
|
| | | /** Vector of type REAL8. */ | |
| typedef struct tagREAL8Vector | | typedef struct tagREAL8Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| REAL8 *data; | | REAL8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL8Vector; | | REAL8Vector; | |
| | | | |
|
| | | /** Vector of type COMPLEX8. */ | |
| typedef struct tagCOMPLEX8Vector | | typedef struct tagCOMPLEX8Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| COMPLEX8 *data; | | COMPLEX8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX8Vector; | | COMPLEX8Vector; | |
| | | | |
|
| | | /** Vector of type COMPLEX16. */ | |
| typedef struct tagCOMPLEX16Vector | | typedef struct tagCOMPLEX16Vector | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< Number of elements in array. */ | |
| COMPLEX16 *data; | | COMPLEX16 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX16Vector; | | COMPLEX16Vector; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>Array | | <datatype>Array | |
| \end{verbatim} | | \end{verbatim} | |
| This structure stores a set of elements of type \verb@<datatype>@, | | This structure stores a set of elements of type \verb@<datatype>@, | |
| | | | |
| skipping to change at line 339 | | skipping to change at line 427 | |
| \item[\texttt{<datatype> *data}] Pointer to the data array. The data | | \item[\texttt{<datatype> *data}] Pointer to the data array. The data | |
| element $\mathsf{A}_{i_0\cdots i_{m-1}}$ is stored as | | element $\mathsf{A}_{i_0\cdots i_{m-1}}$ is stored as | |
| \verb@data[@$i_{m-1} + n_{m-2}\times(i_{m-2} + | | \verb@data[@$i_{m-1} + n_{m-2}\times(i_{m-2} + | |
| n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is, | | n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is, | |
| the index of \verb@data[]@ runs over the entire range of an index | | the index of \verb@data[]@ runs over the entire range of an index | |
| $i_{k+1}$ before incrementing $i_k$. | | $i_{k+1}$ before incrementing $i_k$. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Multidimentional array of INT2. */ | |
| typedef struct | | typedef struct | |
| tagINT2Array | | tagINT2Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| INT2 *data; | | INT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT2Array; | | INT2Array; | |
| | | | |
|
| | | /** Multidimentional array of UINT2. */ | |
| typedef struct | | typedef struct | |
| tagUINT2Array | | tagUINT2Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| UINT2 *data; | | UINT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT2Array; | | UINT2Array; | |
| | | | |
|
| | | /** Multidimentional array of INT4. */ | |
| typedef struct | | typedef struct | |
| tagINT4Array | | tagINT4Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| INT4 *data; | | INT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT4Array; | | INT4Array; | |
| | | | |
|
| | | /** Multidimentional array of UINT4. */ | |
| typedef struct | | typedef struct | |
| tagUINT4Array | | tagUINT4Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| UINT4 *data; | | UINT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT4Array; | | UINT4Array; | |
| | | | |
|
| | | /** Multidimentional array of INT8. */ | |
| typedef struct | | typedef struct | |
| tagINT8Array | | tagINT8Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| INT8 *data; | | INT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT8Array; | | INT8Array; | |
| | | | |
|
| | | /** Multidimentional array of UINT8. */ | |
| typedef struct | | typedef struct | |
| tagUINT8Array | | tagUINT8Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| UINT8 *data; | | UINT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT8Array; | | UINT8Array; | |
| | | | |
|
| | | /** Multidimentional array of REAL4. */ | |
| typedef struct | | typedef struct | |
| tagREAL4Array | | tagREAL4Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| REAL4 *data; | | REAL4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL4Array; | | REAL4Array; | |
| | | | |
|
| | | /** Multidimentional array of REAL8. */ | |
| typedef struct | | typedef struct | |
| tagREAL8Array | | tagREAL8Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| REAL8 *data; | | REAL8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL8Array; | | REAL8Array; | |
| | | | |
|
| | | /** Multidimentional array of COMPLEX8. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX8Array | | tagCOMPLEX8Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| COMPLEX8 *data; | | COMPLEX8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX8Array; | | COMPLEX8Array; | |
| | | | |
|
| | | /** Multidimentional array of COMPLEX16. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16Array | | tagCOMPLEX16Array | |
| { | | { | |
|
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; /**< Vector of array dimensions. */ | |
| COMPLEX16 *data; | | COMPLEX16 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX16Array; | | COMPLEX16Array; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>Sequence | | <datatype>Sequence | |
| \end{verbatim} | | \end{verbatim} | |
| This structure stores an ordered set of $l$ elements of type | | This structure stores an ordered set of $l$ elements of type | |
| | | | |
| skipping to change at line 474 | | skipping to change at line 572 | |
| \item[\texttt{UINT4 length}] The number of vectors $l$. | | \item[\texttt{UINT4 length}] The number of vectors $l$. | |
| \item[\texttt{UINT4 vectorLength}] The length $n$ of each vector. | | \item[\texttt{UINT4 vectorLength}] The length $n$ of each vector. | |
| \item[\texttt{<datatype> *data}] Pointer to the data array. The data | | \item[\texttt{<datatype> *data}] Pointer to the data array. The data | |
| element $v^{(j)}_i$ is stored as \verb@data[@$j\times n + i$\verb@]@; | | element $v^{(j)}_i$ is stored as \verb@data[@$j\times n + i$\verb@]@; | |
| that is, the index of \verb@data[]@ runs over the internal index of | | that is, the index of \verb@data[]@ runs over the internal index of | |
| each vector element before incrementing to the next vector element. | | each vector element before incrementing to the next vector element. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Sequence of CHAR Vectors. */ | |
| typedef struct | | typedef struct | |
| tagCHARVectorSequence | | tagCHARVectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| CHAR *data; | | CHAR *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| CHARVectorSequence; | | CHARVectorSequence; | |
| | | | |
|
| | | /** Sequence of INT2 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT2VectorSequence | | tagINT2VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| INT2 *data; | | INT2 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| INT2VectorSequence; | | INT2VectorSequence; | |
| | | | |
|
| | | /** Sequence of UINT2 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT2VectorSequence | | tagUINT2VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| UINT2 *data; | | UINT2 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| UINT2VectorSequence; | | UINT2VectorSequence; | |
| | | | |
|
| | | /** Sequence of INT4 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT4VectorSequence | | tagINT4VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| INT4 *data; | | INT4 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| INT4VectorSequence; | | INT4VectorSequence; | |
| | | | |
|
| | | /** Sequence of UINT4 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT4VectorSequence | | tagUINT4VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| UINT4 *data; | | UINT4 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| UINT4VectorSequence; | | UINT4VectorSequence; | |
| | | | |
|
| | | /** Sequence of INT8 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT8VectorSequence | | tagINT8VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| INT8 *data; | | INT8 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| INT8VectorSequence; | | INT8VectorSequence; | |
| | | | |
|
| | | /** Sequence of UINT8 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT8VectorSequence | | tagUINT8VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| UINT8 *data; | | UINT8 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| UINT8VectorSequence; | | UINT8VectorSequence; | |
| | | | |
|
| | | /** Sequence of REAL4 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagREAL4VectorSequence | | tagREAL4VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| REAL4 *data; | | REAL4 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| REAL4VectorSequence; | | REAL4VectorSequence; | |
| | | | |
|
| | | /** Sequence of REAL8 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagREAL8VectorSequence | | tagREAL8VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| REAL8 *data; | | REAL8 *data; /**< Pointer to the data array. Element \a i of vector \a j | |
| | | is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| REAL8VectorSequence; | | REAL8VectorSequence; | |
| | | | |
|
| | | /** Sequence of COMPLEX8 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX8VectorSequence | | tagCOMPLEX8VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| COMPLEX8 *data; | | COMPLEX8 *data; /**< Pointer to the data array. Element \a i of vector \ | |
| | | a j is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| COMPLEX8VectorSequence; | | COMPLEX8VectorSequence; | |
| | | | |
|
| | | /** Sequence of COMPLEX16 Vectors. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16VectorSequence | | tagCOMPLEX16VectorSequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 vectorLength; | | UINT4 vectorLength; /**< The length \a n of each vector. */ | |
| COMPLEX16 *data; | | COMPLEX16 *data; /**< Pointer to the data array. Element \a i of vector | |
| | | \a j is \c data[ \a jn + \a i \c]. */ | |
| } | | } | |
| COMPLEX16VectorSequence; | | COMPLEX16VectorSequence; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>ArraySequence | | <datatype>ArraySequence | |
| \end{verbatim} | | \end{verbatim} | |
| This structure stores an ordered set of $l$ elements of type | | This structure stores an ordered set of $l$ elements of type | |
| | | | |
| skipping to change at line 608 | | skipping to change at line 717 | |
| \item[\texttt{<datatype> *data}] Pointer to the data. The element | | \item[\texttt{<datatype> *data}] Pointer to the data. The element | |
| $\mathsf{A}^{(j)}_{i_0\cdots i_{m-1}}$ is stored as | | $\mathsf{A}^{(j)}_{i_0\cdots i_{m-1}}$ is stored as | |
| \verb@data[@$j\times N + i_{m-1} + n_{m-2}\times(i_{m-2} + | | \verb@data[@$j\times N + i_{m-1} + n_{m-2}\times(i_{m-2} + | |
| n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is, | | n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is, | |
| the index of \verb@data[]@ runs over the internal indecies of each | | the index of \verb@data[]@ runs over the internal indecies of each | |
| array element before incrementing to the next array element. | | array element before incrementing to the next array element. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Sequency of INT2 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagINT2ArraySequence | | tagINT2ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| INT2 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | INT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT2ArraySequence; | | INT2ArraySequence; | |
| | | | |
|
| | | /** Sequency of UINT2 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagUINT2ArraySequence | | tagUINT2ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| UINT2 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | UINT2 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT2ArraySequence; | | UINT2ArraySequence; | |
| | | | |
|
| | | /** Sequency of INT4 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagINT4ArraySequence | | tagINT4ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| INT4 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | INT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT4ArraySequence; | | INT4ArraySequence; | |
| | | | |
|
| | | /** Sequency of UINT4 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagUINT4ArraySequence | | tagUINT4ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| UINT4 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | UINT4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT4ArraySequence; | | UINT4ArraySequence; | |
| | | | |
|
| | | /** Sequency of INT8 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagINT8ArraySequence | | tagINT8ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| INT8 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | INT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| INT8ArraySequence; | | INT8ArraySequence; | |
| | | | |
|
| | | /** Sequency of UINT8 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagUINT8ArraySequence | | tagUINT8ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| UINT8 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | UINT8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| UINT8ArraySequence; | | UINT8ArraySequence; | |
| | | | |
|
| | | /** Sequency of REAL4 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagREAL4ArraySequence | | tagREAL4ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| REAL4 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | REAL4 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL4ArraySequence; | | REAL4ArraySequence; | |
| | | | |
|
| | | /** Sequency of REAL8 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagREAL8ArraySequence | | tagREAL8ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| REAL8 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | REAL8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| REAL8ArraySequence; | | REAL8ArraySequence; | |
| | | | |
|
| | | /** Sequency of COMPLEX8 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX8ArraySequence | | tagCOMPLEX8ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| COMPLEX8 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | COMPLEX8 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX8ArraySequence; | | COMPLEX8ArraySequence; | |
| | | | |
|
| | | /** Sequency of COMPLEX16 multidimensional arrays. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16ArraySequence | | tagCOMPLEX16ArraySequence | |
| { | | { | |
|
| UINT4 length; | | UINT4 length; /**< The number \a l of vectors. */ | |
| UINT4 arrayDim; | | UINT4 arrayDim; /**< The number of data \a N in each array element | |
| UINT4Vector *dimLength; | | (this is not the number \a m of indices). */ | |
| COMPLEX16 *data; | | UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t | |
| | | he array dimensions */ | |
| | | COMPLEX16 *data; /**< Pointer to the data array. */ | |
| } | | } | |
| COMPLEX16ArraySequence; | | COMPLEX16ArraySequence; | |
|
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage | | \newpage | |
| \subsection{Structured datatypes} | | \subsection{Structured datatypes} | |
| \label{ss:structured-datatypes} | | \label{ss:structured-datatypes} | |
| | | | |
| These datatypes embed primitive and aggregate datatypes inside | | These datatypes embed primitive and aggregate datatypes inside | |
| structures that define their physical meaning. Most of these | | structures that define their physical meaning. Most of these | |
| structures are wrappers for aggregate datatypes that store a physical | | structures are wrappers for aggregate datatypes that store a physical | |
| quantity as a function of time or frequency. Other structures store | | quantity as a function of time or frequency. Other structures store | |
| | | | |
| skipping to change at line 741 | | skipping to change at line 861 | |
| reference point. However, the \verb@REAL8@ representation does allow | | reference point. However, the \verb@REAL8@ representation does allow | |
| one to cover arbitrarily long timescales at correspondingly lower | | one to cover arbitrarily long timescales at correspondingly lower | |
| precision.) The fields are: | | precision.) The fields are: | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT4 gpsSeconds}] The number of seconds since the GPS | | \item[\texttt{INT4 gpsSeconds}] The number of seconds since the GPS | |
| reference time. | | reference time. | |
| \item[\texttt{INT4 gpsNanoSeconds}] The number of nanoseconds since | | \item[\texttt{INT4 gpsNanoSeconds}] The number of nanoseconds since | |
| the last GPS second. | | the last GPS second. | |
| \end{description} | | \end{description} | |
| | | | |
|
| | | The macro \verb@LIGOTIMEGPSZERO@ can be used to statically initialize a | |
| | | \verb@LIGOTimeGPS@ object, for example: | |
| | | \begin{quote} | |
| | | \verb@LIGOTimeGPS epoch = LIGOTIMEGPSZERO;@ | |
| | | \end{quote} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** \name Structured datatypes. | |
| | | * | |
| | | * These datatypes embed primitive and aggregate datatypes inside | |
| | | * structures that define their physical meaning. Most of these | |
| | | * structures are wrappers for aggregate datatypes that store a physical | |
| | | * quantity as a function of time or frequency. Other structures store | |
| | | * specific physical information, such as the GPS time, or the factored | |
| | | * response function of a filter. | |
| | | * | |
| | | */ | |
| | | /*@{*/ | |
| | | | |
| | | /** Epoch relative to GPS epoch */ | |
| typedef struct | | typedef struct | |
| tagLIGOTimeGPS | | tagLIGOTimeGPS | |
| { | | { | |
|
| INT4 gpsSeconds; | | INT4 gpsSeconds; /**< Seconds since 0h UTC 6 Jan 1980. */ | |
| INT4 gpsNanoSeconds; | | INT4 gpsNanoSeconds; /**< Residual nanoseconds. */ | |
| } | | } | |
| LIGOTimeGPS; | | LIGOTimeGPS; | |
| | | | |
|
| | | #define LIGOTIMEGPSZERO { 0, 0 } | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| LALUnit | | LALUnit | |
| \end{verbatim} | | \end{verbatim} | |
| This structure stores units in the mksA system (plus Kelvin, Strain, | | This structure stores units in the mksA system (plus Kelvin, Strain, | |
| and ADC Count). It also stores an overall power-of-ten scaling factor. | | and ADC Count). It also stores an overall power-of-ten scaling factor. | |
| The fields are: | | The fields are: | |
| \begin{description} | | \begin{description} | |
| | | | |
| skipping to change at line 786 | | skipping to change at line 927 | |
| \texttt{LALUnitIndexKiloGram}, | | \texttt{LALUnitIndexKiloGram}, | |
| \texttt{LALUnitIndexSecond}, | | \texttt{LALUnitIndexSecond}, | |
| \texttt{LALUnitIndexAmpere}, | | \texttt{LALUnitIndexAmpere}, | |
| \texttt{LALUnitIndexKelvin}, | | \texttt{LALUnitIndexKelvin}, | |
| \texttt{LALUnitIndexStrain}, | | \texttt{LALUnitIndexStrain}, | |
| \texttt{LALUnitIndexADCCount}, | | \texttt{LALUnitIndexADCCount}, | |
| while \texttt{LALNumUnits} is the total number of units. | | while \texttt{LALNumUnits} is the total number of units. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Indices of arrays corresponding to particular units. | |
| | | * | |
| | | * The LALUnit structure has arrays giving the numerators | |
| | | * and denominators-minus-one of the powers of various units. | |
| | | * These are the indices for the particular units. | |
| | | */ | |
| enum | | enum | |
| { | | { | |
|
| LALUnitIndexMeter, | | LALUnitIndexMeter, /**< The meter index. */ | |
| LALUnitIndexKiloGram, | | LALUnitIndexKiloGram, /**< The kilogram index. */ | |
| LALUnitIndexSecond, | | LALUnitIndexSecond, /**< The second index. */ | |
| LALUnitIndexAmpere, | | LALUnitIndexAmpere, /**< The ampere index. */ | |
| LALUnitIndexKelvin, | | LALUnitIndexKelvin, /**< The kelvin index. */ | |
| LALUnitIndexStrain, | | LALUnitIndexStrain, /**< The strain index. */ | |
| LALUnitIndexADCCount, | | LALUnitIndexADCCount, /**< The ADC counts index. */ | |
| LALNumUnits | | LALNumUnits /**< The number of units. */ | |
| }; | | }; | |
| | | | |
|
| | | /** Unit in the mksA system. | |
| | | * | |
| | | * This structure stores units in the mksA system (plus Kelvin, Strain, | |
| | | * and ADC Count). It also stores an overall power-of-ten \a p scaling fac | |
| | | tor. | |
| | | * The units are represented by an array of integer numerators \a N | |
| | | * and denominators-minus-one \a D representing the powers of the various | |
| | | * units. The units are given by | |
| | | * \f[ | |
| | | * 10^p\times\textrm{m}^{N_0/(1+D_0)}\times\textrm{kg}^{N_1/(1+D_1)} | |
| | | * \times\textrm{s}^{N_2/(1+D_2)}\times\textrm{A}^{N_3/(1+D_3)} | |
| | | * \times\textrm{K}^{N_4/(1+D_4)}\times\textrm{strain}^{N_5/(1+D_5)} | |
| | | * \times\textrm{count}^{N_6/(1+D_6)} | |
| | | * \f] | |
| | | * The indexes of the units can be specified using the constants | |
| | | * LALUnitIndexMeter, LALUnitIndexKiloGram, | |
| | | * LALUnitIndexSecond, LALUnitIndexAmpere, | |
| | | * LALUnitIndexKelvin, LALUnitIndexStrain, | |
| | | * LALUnitIndexADCCount, while LALNumUnits is the total number of units. | |
| | | * | |
| | | */ | |
| typedef struct | | typedef struct | |
| tagLALUnit | | tagLALUnit | |
| { | | { | |
|
| INT2 powerOfTen; | | INT2 powerOfTen; /**< Overall power-of-ten scaling is 10^\c powerOfTen. | |
| INT2 unitNumerator[LALNumUnits]; | | */ | |
| UINT2 unitDenominatorMinusOne[LALNumUnits]; | | INT2 unitNumerator[LALNumUnits]; /**< Array of unit power numerators. */ | |
| | | UINT2 unitDenominatorMinusOne[LALNumUnits]; /**< Array of unit power deno | |
| | | minators-minus-one. */ | |
| } | | } | |
| LALUnit; | | LALUnit; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>TimeSeries | | <datatype>TimeSeries | |
| \end{verbatim} | | \end{verbatim} | |
| This structure represents a sequence of data of type \verb@<datatype>@ | | This structure represents a sequence of data of type \verb@<datatype>@ | |
| | | | |
| skipping to change at line 837 | | skipping to change at line 1004 | |
| \item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$, in | | \item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$, in | |
| seconds. | | seconds. | |
| \item[\texttt{REAL8 f0}] The heterodyning frequency $f_0$, in hertz. | | \item[\texttt{REAL8 f0}] The heterodyning frequency $f_0$, in hertz. | |
| \item[\texttt{LALUnit sampleUnits}] The physical units of the | | \item[\texttt{LALUnit sampleUnits}] The physical units of the | |
| quantity being sampled. | | quantity being sampled. | |
| \item[\texttt{<datatype>Sequence *data}] The sequence of sampled data. | | \item[\texttt{<datatype>Sequence *data}] The sequence of sampled data. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Length of name fields of LAL structured data types. */ | |
| enum { LALNameLength = 64 }; | | enum { LALNameLength = 64 }; | |
| | | | |
|
| | | /** Time series of INT2 data. */ | |
| typedef struct | | typedef struct | |
| tagINT2TimeSeries | | tagINT2TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time seri | |
| REAL8 f0; | | es in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| INT2Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | INT2Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| INT2TimeSeries; | | INT2TimeSeries; | |
| | | | |
|
| | | /** Time series of UINT2 data. */ | |
| typedef struct | | typedef struct | |
| tagUINT2TimeSeries | | tagUINT2TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time ser | |
| REAL8 f0; | | ies in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| UINT2Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | UINT2Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| UINT2TimeSeries; | | UINT2TimeSeries; | |
| | | | |
|
| | | /** Time series of INT4 data. */ | |
| typedef struct | | typedef struct | |
| tagINT4TimeSeries | | tagINT4TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time seri | |
| REAL8 f0; | | es in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| INT4Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | INT4Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| INT4TimeSeries; | | INT4TimeSeries; | |
| | | | |
|
| | | /** Time series of UINT4 data. */ | |
| typedef struct | | typedef struct | |
| tagUINT4TimeSeries | | tagUINT4TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time ser | |
| REAL8 f0; | | ies in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| UINT4Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | UINT4Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| UINT4TimeSeries; | | UINT4TimeSeries; | |
| | | | |
|
| | | /** Time series of INT8 data. */ | |
| typedef struct | | typedef struct | |
| tagINT8TimeSeries | | tagINT8TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time seri | |
| REAL8 f0; | | es in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| INT8Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | INT8Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| INT8TimeSeries; | | INT8TimeSeries; | |
| | | | |
|
| | | /** Time series of UINT8 data. */ | |
| typedef struct | | typedef struct | |
| tagUINT8TimeSeries | | tagUINT8TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time ser | |
| REAL8 f0; | | ies in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| UINT8Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | UINT8Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| UINT8TimeSeries; | | UINT8TimeSeries; | |
| | | | |
|
| | | /** Time series of REAL4 data. */ | |
| typedef struct | | typedef struct | |
| tagREAL4TimeSeries | | tagREAL4TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time ser | |
| REAL8 f0; | | ies in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| REAL4Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | REAL4Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| REAL4TimeSeries; | | REAL4TimeSeries; | |
| | | | |
|
| | | /** Time series of REAL8 data. */ | |
| typedef struct | | typedef struct | |
| tagREAL8TimeSeries | | tagREAL8TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. */ | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 deltaT; | | REAL8 deltaT; /**< The time step between samples of the time ser | |
| REAL8 f0; | | ies in seconds. */ | |
| LALUnit sampleUnits; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not | |
| REAL8Sequence *data; | | heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity being | |
| | | sampled. */ | |
| | | REAL8Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| REAL8TimeSeries; | | REAL8TimeSeries; | |
| | | | |
|
| | | /** Time series of COMPLEX8 data. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX8TimeSeries | | tagCOMPLEX8TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. | |
| LIGOTimeGPS epoch; | | */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 f0; | | REAL8 deltaT; /**< The time step between samples of the time | |
| LALUnit sampleUnits; | | series in seconds. */ | |
| COMPLEX8Sequence *data; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if | |
| | | not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity be | |
| | | ing sampled. */ | |
| | | COMPLEX8Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| COMPLEX8TimeSeries; | | COMPLEX8TimeSeries; | |
| | | | |
|
| | | /** Time series of COMPLEX16 data. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16TimeSeries | | tagCOMPLEX16TimeSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time series. | |
| LIGOTimeGPS epoch; | | */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series. */ | |
| REAL8 f0; | | REAL8 deltaT; /**< The time step between samples of the time | |
| LALUnit sampleUnits; | | series in seconds. */ | |
| COMPLEX16Sequence *data; | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if | |
| | | not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity b | |
| | | eing sampled. */ | |
| | | COMPLEX16Sequence *data; /**< The sequence of sampled data. */ | |
| } | | } | |
| COMPLEX16TimeSeries; | | COMPLEX16TimeSeries; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>TimeVectorSeries | | <datatype>TimeVectorSeries | |
| \end{verbatim} | | \end{verbatim} | |
| Like \verb@<datatype>TimeSeries@, above, except that the sampled data | | Like \verb@<datatype>TimeSeries@, above, except that the sampled data | |
| | | | |
| skipping to change at line 982 | | skipping to change at line 1160 | |
| \item[\texttt{REAL8 deltaT}] The sampling interval, in seconds. | | \item[\texttt{REAL8 deltaT}] The sampling interval, in seconds. | |
| \item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz. | | \item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz. | |
| \item[\texttt{LALUnit sampleUnits}] The physical units of the | | \item[\texttt{LALUnit sampleUnits}] The physical units of the | |
| quantity being sampled. | | quantity being sampled. | |
| \item[\texttt{<datatype>VectorSequence *data}] The sequence of sampled | | \item[\texttt{<datatype>VectorSequence *data}] The sequence of sampled | |
| data. | | data. | |
| \end{description} | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /** Time series of INT2 vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT2TimeVectorSeries | | tagINT2TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| INT2VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | INT2VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| INT2TimeVectorSeries; | | INT2TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of UINT2 vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT2TimeVectorSeries | | tagUINT2TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| UINT2VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | UINT2VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| UINT2TimeVectorSeries; | | UINT2TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of INT4 vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT4TimeVectorSeries | | tagINT4TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| INT4VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | INT4VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| INT4TimeVectorSeries; | | INT4TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of UINT4 vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT4TimeVectorSeries | | tagUINT4TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| UINT4VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | UINT4VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| UINT4TimeVectorSeries; | | UINT4TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of INT8 vectors. */ | |
| typedef struct | | typedef struct | |
| tagINT8TimeVectorSeries | | tagINT8TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| INT8VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | INT8VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| INT8TimeVectorSeries; | | INT8TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of UINT8 vectors. */ | |
| typedef struct | | typedef struct | |
| tagUINT8TimeVectorSeries | | tagUINT8TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| UINT8VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | UINT8VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| UINT8TimeVectorSeries; | | UINT8TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of REAL4 vectors. */ | |
| typedef struct | | typedef struct | |
| tagREAL4TimeVectorSeries | | tagREAL4TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| REAL4VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | REAL4VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| REAL4TimeVectorSeries; | | REAL4TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of REAL8 vectors. */ | |
| typedef struct | | typedef struct | |
| tagREAL8TimeVectorSeries | | tagREAL8TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time serie | |
| LIGOTimeGPS epoch; | | s of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of vec | |
| REAL8 f0; | | tors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of the ti | |
| REAL8VectorSequence *data; | | me series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (zero | |
| | | if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quantity | |
| | | being sampled. */ | |
| | | REAL8VectorSequence *data; /**< The sequence of sampled data vectors. */ | |
| } | | } | |
| REAL8TimeVectorSeries; | | REAL8TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of COMPLEX8 vectors. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX8TimeVectorSeries | | tagCOMPLEX8TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time s | |
| LIGOTimeGPS epoch; | | eries of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series of | |
| REAL8 f0; | | vectors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of th | |
| COMPLEX8VectorSequence *data; | | e time series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz (z | |
| | | ero if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the quan | |
| | | tity being sampled. */ | |
| | | COMPLEX8VectorSequence *data; /**< The sequence of sampled data vectors. | |
| | | */ | |
| } | | } | |
| COMPLEX8TimeVectorSeries; | | COMPLEX8TimeVectorSeries; | |
| | | | |
|
| | | /** Time series of COMPLEX16 vectors. */ | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16TimeVectorSeries | | tagCOMPLEX16TimeVectorSeries | |
| { | | { | |
|
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; /**< The name of the time | |
| LIGOTimeGPS epoch; | | series of vectors. */ | |
| REAL8 deltaT; | | LIGOTimeGPS epoch; /**< The start time of the time series o | |
| REAL8 f0; | | f vectors. */ | |
| LALUnit sampleUnits; | | REAL8 deltaT; /**< The time step between samples of t | |
| COMPLEX16VectorSequence *data; | | he time series of vectors in seconds. */ | |
| | | REAL8 f0; /**< The heterodyning frequency, in Hertz ( | |
| | | zero if not heterodyned). */ | |
| | | LALUnit sampleUnits; /**< The physical units of the qua | |
| | | ntity being sampled. */ | |
| | | COMPLEX16VectorSequence *data; /**< The sequence of sampled data vectors | |
| | | . */ | |
| } | | } | |
| COMPLEX16TimeVectorSeries; | | COMPLEX16TimeVectorSeries; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \vspace{2ex} | | \vspace{2ex} | |
| \begin{verbatim} | | \begin{verbatim} | |
| <datatype>TimeArraySeries | | <datatype>TimeArraySeries | |
| \end{verbatim} | | \end{verbatim} | |
| Like \verb@<datatype>TimeSeries@, above, except that the sampled data | | Like \verb@<datatype>TimeSeries@, above, except that the sampled data | |
| | | | |
| skipping to change at line 1454 | | skipping to change at line 1642 | |
| typedef struct | | typedef struct | |
| tagCOMPLEX16ZPGFilter | | tagCOMPLEX16ZPGFilter | |
| { | | { | |
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; | |
| REAL8 deltaT; | | REAL8 deltaT; | |
| COMPLEX16Vector *zeros; | | COMPLEX16Vector *zeros; | |
| COMPLEX16Vector *poles; | | COMPLEX16Vector *poles; | |
| COMPLEX16 gain; | | COMPLEX16 gain; | |
| } | | } | |
| COMPLEX16ZPGFilter; | | COMPLEX16ZPGFilter; | |
|
| | | /*@}*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage | | \newpage | |
| \subsection{The LAL universal status structure \texttt{LALStatus}} | | \subsection{The LAL universal status structure \texttt{LALStatus}} | |
| \label{ss:status-structure} | | \label{ss:status-structure} | |
| | | | |
| This structure is the means by which LAL functions report their | | This structure is the means by which LAL functions report their | |
| success or failure; it provides a useful mechanism for tracking | | success or failure; it provides a useful mechanism for tracking | |
| progress and errors through nested function calls. The error | | progress and errors through nested function calls. The error | |
| reporting structure is a linked list of \verb@LALStatus@ structures, with | | reporting structure is a linked list of \verb@LALStatus@ structures, with | |
| | | | |
End of changes. 144 change blocks. |
| 282 lines changed or deleted | | 597 lines changed or added | |
|
| LALDemod.h | | LALDemod.h | |
| /*** <lalVerbatim file="LALDemodHV"> | | /*** <lalVerbatim file="LALDemodHV"> | |
| Author: Berukoff, S.J., Papa, M.A. | | Author: Berukoff, S.J., Papa, M.A. | |
|
| $Id: LALDemod.h,v 1.8 2002/07/26 15:34:49 sberukoff Exp $ | | $Id: LALDemod.h,v 1.19 2005/06/17 18:39:54 jolien Exp $ | |
| *** </lalVerbatim> */ | | *** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \section{Header \texttt{LALDemod.h}} | | \section{Header \texttt{LALDemod.h}} | |
| \label{s:LALDemod.h} | | \label{s:LALDemod.h} | |
| Computes a demodulated transform. | | Computes a demodulated transform. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/LALDemod.h> | | #include <lal/LALDemod.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent The following is a brief synopsis of the demodulation, or 'Cohere
nt Transform', procedure. | | \noindent The following is a brief synopsis of the demodulation, or 'Cohere
nt Transform', procedure. | |
| | | | |
| In order to remove frequency and amplitude modulation of a time series $x_a
$, we need two basic components: | | In order to remove frequency and amplitude modulation of a time series $x_a
$, we need two basic components: | |
| \begin{description} | | \begin{description} | |
| \item[\bf{Frequency modulation information}] This is given through a phase
model $\Phi$. | | \item[\bf{Frequency modulation information}] This is given through a phase
model $\Phi$. | |
| \item[\bf{Amplitude modulation information}] This is given through two fun
ctions $\hat{a}$ and $\hat{b}$, which are derived from the beam-pattern fun
ctions $F_{+}$ and $F_{\times}$. | | \item[\bf{Amplitude modulation information}] This is given through two fun
ctions $\hat{a}$ and $\hat{b}$, which are derived from the beam-pattern fun
ctions $F_{+}$ and $F_{\times}$. | |
| \end{description} | | \end{description} | |
|
| Given these, the long time baseline demodulated Fourier Transform (DeFT) in
the $b^{th}$ frequency bin is | | Given these, the F statistic in the $b^{th}$ frequency bin is | |
| \begin{equation} | | \begin{equation} | |
| \mathcal{F}_{b} = \frac{4}{S_{h}(f_{0})T_{0}} \frac{B|\hat{F_{a}}|^{2}+A|F_
{b}|^{2} - 2C \Re(F_{a}F_{b}^{*})}{D} | | \mathcal{F}_{b} = \frac{4}{S_{h}(f_{0})T_{0}} \frac{B|\hat{F_{a}}|^{2}+A|F_
{b}|^{2} - 2C \Re(F_{a}F_{b}^{*})}{D} | |
| \end{equation} | | \end{equation} | |
| | | | |
| where | | where | |
| | | | |
| \begin{eqnarray} | | \begin{eqnarray} | |
| \label{e1} | | \label{e1} | |
| \hat{F_{\hat{a}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{a} e^{-2{\pi}i{\Phi}_{a
b}(\vec{\lambda})} \\ | | \hat{F_{\hat{a}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{a} e^{-2{\pi}i{\Phi}_{a
b}(\vec{\lambda})} \\ | |
| \hat{F_{\hat{b}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{b} e^{-2{\pi}i{\Phi}_{a
b}(\vec{\lambda})} | | \hat{F_{\hat{b}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{b} e^{-2{\pi}i{\Phi}_{a
b}(\vec{\lambda})} | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| \end{equation} | | \end{equation} | |
| If $NTERMS$ is 8 the power loss due to this approximation is less than $\si
m 5\%$. | | If $NTERMS$ is 8 the power loss due to this approximation is less than $\si
m 5\%$. | |
| | | | |
| Now, computing $\hat{F_{\hat{a}}}$ and $\hat{F_{\hat{b}}}$ can be done in p
arallel; given the approximations we have made, for each iteration of the $
\alpha$ loop, one computes first $P_{\alpha k}$ (through the k-loop), multi
plies by $\tilde{x}_{\alpha k}$, and then forms the statistics of \ref{e1}
at the same time. After all the iterations of the $\alpha$ loop are comple
te, that is, when all SFTs have been exhausted, the final statistic is comp
uted. | | Now, computing $\hat{F_{\hat{a}}}$ and $\hat{F_{\hat{b}}}$ can be done in p
arallel; given the approximations we have made, for each iteration of the $
\alpha$ loop, one computes first $P_{\alpha k}$ (through the k-loop), multi
plies by $\tilde{x}_{\alpha k}$, and then forms the statistics of \ref{e1}
at the same time. After all the iterations of the $\alpha$ loop are comple
te, that is, when all SFTs have been exhausted, the final statistic is comp
uted. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _LALDEMOD_H | | #ifndef _LALDEMOD_H | |
| #define _LALDEMOD_H | | #define _LALDEMOD_H | |
| | | | |
|
| #include <math.h> | | #include <lal/LALDatatypes.h> | |
| #include <stdlib.h> | | #include <lal/LALComputeAM.h> | |
| #include <stdio.h> | | | |
| #include <string.h> | | | |
| #include <lal/LALStdlib.h> | | | |
| #include <lal/AVFactories.h> | | | |
| #include <lal/Random.h> | | | |
| #include <lal/RealFFT.h> | | | |
| #include <lal/LALConstants.h> | | | |
| #include <lal/DetResponse.h> | | | |
| #include <lal/DetectorSite.h> | | | |
| #include <lal/SimulateCoherentGW.h> | | | |
| #include <lal/GenerateTaylorCW.h> | | | |
| #include "LALComputeAM.h" | | | |
| #include <lal/ComputeSky.h> | | | |
| #include <lal/LALBarycenter.h> | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
|
| #extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALDEMODH, "$Id: LALDemod.h,v 1.8 2002/07/26 15:34:49 sberukoff Exp
$"); | | NRCSID (LALDEMODH, "$Id: LALDemod.h,v 1.19 2005/06/17 18:39:54 jolien Exp $
"); | |
| | | | |
|
| /* <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error codes} | |
| \vspace{0.1in} | | </lalLaTeX> | |
| \input{LALDemodHErrorTable} | | ***************************************************** <lalErrTable> */ | |
| </lalLaTeX> */ | | #define LALDEMODH_ENULL 1 | |
| /* *****<lalErrTable file="LALDemodHErrorTable">*/ | | | |
| #define LALDEMODH_ENULL 1 | | #define LALDEMODH_MSGENULL "Arguments contained an unexpected null poin | |
| #define LALDEMODH_ENNEG 2 | | ter" | |
| #define LALDEMODH_EORDR 4 | | | |
| #define LALDEMODH_ENOFILE 8 | | /*************************************************** </lalErrTable> */ | |
| #define LALDEMODH_EBADARG 16 | | | |
| #define LALDEMODH_MSGENULL "Null Pointer" | | | |
| #define LALDEMODH_MSGENNEG "Erroneous Negative Value" | | | |
| #define LALDEMODH_MSGEORDR "Min Value Larger than Max" | | | |
| #define LALDEMODH_MSGENOFILE "Non-existent filename" | | | |
| #define LALDEMODH_MSGEBADARG "Bad Command Line argument" | | | |
| /********************************************** </lalErrTable> */ | | | |
| | | | |
|
| #define NTERM_COH_DIV_TWO 4 | | | |
| #define SMALL 0.000000001 | | #define SMALL 0.000000001 | |
|
| #define SFTOVERLAP 0.05 | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
|
| \subsection*{Structures} | | \subsection*{Types} | |
| | | | |
|
| \begin{verbatim} | | \subsubsection*{Structure \texttt{DemodPar}} | |
| struct DemodPar | | \idx[Type]{DemodPar} | |
| \end{verbatim} | | | |
| \index{\texttt{DemodPar}} | | | |
| | | | |
| \noindent This structure contains the parameters for the demodulation routi
ne. The parameters are: | | \noindent This structure contains the parameters for the demodulation routi
ne. The parameters are: | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{INT4 if0Max}] The maximum search frequency index in coarse-gr | | | |
| ained frequency resolution. | | \item[\texttt{INT4 spinDwnOrder}] Maximum order of spdwn parameter | |
| \item[\texttt{INT4 if0Min}] The minimum search frequency index in coarse-gr | | | |
| ained frequency resolution. | | | |
| \item[\texttt{INT4 mCohSFT}] The number of SFTs in coherent timescale. In | | | |
| other words, the number of SFTs which make up one DeFT. | | | |
| \item[\texttt{INT4 mObsCoh}] The number of coherent timescale in observatio | | | |
| n time. In other words, this quantifies how many DeFTs will be produced. | | | |
| \item[\texttt{INT4 ifMin}] The index of the minimum frequency of the SFT fr | | | |
| equency band. | | | |
| \item[\texttt{INT4 iCoh}] The index of the DeFT being computed (0 $\leq$ iC | | | |
| oh \verb@<@ mObsCoh). | | | |
| \item[\texttt{REAL8 *skyConst}] The array of sky constants. | | \item[\texttt{REAL8 *skyConst}] The array of sky constants. | |
| \item[\texttt{REAL8 *spinDwn}] The set of template spindown parameters. | | \item[\texttt{REAL8 *spinDwn}] The set of template spindown parameters. | |
| \item[\texttt{AMCoeffs *amcoe}] The values of the function $a$ and $b$, plu
s their scalar products. | | \item[\texttt{AMCoeffs *amcoe}] The values of the function $a$ and $b$, plu
s their scalar products. | |
|
| | | \item[\texttt{REAL8 f0}] The minimum search frequency | |
| | | \item[\texttt{REAL8 df}] The search frequency spacing | |
| | | \item[\texttt{INT4 SFTno}] The number of SFTs in coherent timescale | |
| | | \item[\texttt{INT4 Dterms}] Terms used in the computation of the dirichlet | |
| | | kernel | |
| | | \item[\texttt{INT4 ifMin}] The index of the minimum frequency of the SFT fr | |
| | | equency band. | |
| | | \item[\texttt{INT4 imax}] How many frequencies are serached. | |
| | | \item[\texttt{BOOLEAN returnFaFb}] Wether or not to include the values Fa/F | |
| | | b in the return-structure Fstat. | |
| \end{description} | | \end{description} | |
| | | | |
|
| \begin{verbatim} | | \subsubsection*{Structure \texttt{LALFstat}} | |
| struct SkyPos | | \idx[Type]{LALFstat} | |
| \end{verbatim} | | | |
| \index{\texttt{SkyPos}} | | | |
| \noindent This structure contains the basic parameters of a sky position. | | | |
| These are: | | | |
| \begin{description} | | | |
| \item[\texttt{REAL8 alpha}] The inclination, in radians. | | | |
| \item[\texttt{REAL8 delta}] The declination, in radians. | | | |
| \item[\texttt{CHAR type}] Coordinate system used. | | | |
| \end{description} | | | |
| | | | |
|
| \begin{verbatim} | | \noindent This structure contains the results from LALDemod: either | |
| struct Spindown | | only the value of the $\mathcal{F}$-statistic $F$, or also the values | |
| \end{verbatim} | | of the individual "filters" $F_a$ and $F_b$, depending on the | |
| \index{\texttt{Spindown}} | | \texttt{DemodPar->returnFaFb}. \\ | |
| \noindent This structure contains the values of the spindown parameters. I | | \emph{NOTE:} the memory has to be allocated before calling \texttt{LALDemod | |
| ncluded are | | ()}. | |
| \begin{description} | | | |
| \item[\texttt{INT4 m}] The maximum order of spindown parameter employed, o | | | |
| r the number of spindown parameters per spindown parameter set. | | | |
| \item[\texttt{REAL8 *spParams}] An array containing the values. | | | |
| \end{description} | | | |
| | | | |
|
| \begin{verbatim} | | | |
| struct ParameterSet | | | |
| \end{verbatim} | | | |
| \index{\texttt{ParameterSet}} | | | |
| \noindent This is a structure which contains all the parameters that descri | | | |
| be a source. Included are | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{SkyPos *skyP}] | | \item[\texttt{REAL8 *F}] Array of values of the $\mathcal{F}$ statistic. | |
| \item[\texttt{Spindown *spind}] | | \item[\texttt{COMPLEX16 *Fa}] Results of match filter with $a(t)$. | |
| | | \item[\texttt{COMPLEX16 *Fb}] Results of match filter with $b(t)$. | |
| \end{description} | | \end{description} | |
| | | | |
|
| \begin{verbatim} | | </lalLaTeX> */ | |
| struct FFT | | | |
| \end{verbatim} | | | |
| \index{\texttt{FFT}} | | | |
| \noindent This structure is used to hold all Fourier domain data. Note tha | | | |
| t it is different from the LAL definition of a \verb@SequenceOfFrequencySer | | | |
| ies@ variable in that the \verb@FFT@ structure allows one to record informa | | | |
| tion specific to each individual FFT; the LAL structure does not allow this | | | |
| functionality at present. The fields contained within are | | | |
| \begin{description} | | | |
| \item[\texttt{COMPLEX8FrequencySeries *fft}] Holds the data (within \verb@ | | | |
| fft->data->data@) and other parameters relevant to each transform. | | | |
| \item[\texttt{ParameterSet par}] Holds source parameters that might be rel | | | |
| evant to the data in the previous field. For example, if the \verb@*fft@ s | | | |
| tructure above contains DeFTs, this field will contain the demodulation par | | | |
| ameters. | | | |
| \end{description} | | | |
| | | | |
| \begin{verbatim} | | | |
| struct DeFTPeriodogram | | | |
| \end{verbatim} | | | |
| \index{\texttt{DeFTPeriodogram}} | | | |
| \noindent This structure contains the statistic we wanted to compute: \ref | | | |
| {e1}, and information regarding its parameters. | | | |
| \begin{description} | | | |
| \item[\texttt{REAL8FrequencySeries *fft}] The periodogram. | | | |
| \item[\texttt{ParameterSer par}] The parameter set used in the demodulatio | | | |
| n. | | | |
| \end{description} | | | |
| | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* PARAMETERS */ | | /* PARAMETERS */ | |
| typedef struct DemodParTag{ | | typedef struct DemodParTag{ | |
|
| INT4 if0Max; /* Index of maximum freq. of search on this | | | |
| proc. */ | | | |
| INT4 if0Min; /* Index of minimum freq. of search on this | | | |
| proc. */ | | | |
| INT4 mCohSFT; /* This is G_Mcoh_sft */ | | | |
| INT4 mObsCoh; /* This is G_Mobs_sft */ | | | |
| INT4 ifMin; /* Index of minimum freq. of search | | | |
| */ | | | |
| INT4 iCoh; /* Index of coherent timescale */ | | | |
| INT4 spinDwnOrder; /* Maximum order of spdwn parameter */ | | INT4 spinDwnOrder; /* Maximum order of spdwn parameter */ | |
| REAL8 *skyConst; /* Constants computed in ComputeSky.
c */ | | REAL8 *skyConst; /* Constants computed in ComputeSky.
c */ | |
| REAL8 *spinDwn; /* Spindown parameter set */ | | REAL8 *spinDwn; /* Spindown parameter set */ | |
|
| AMCoeffs *amcoe; | | AMCoeffs *amcoe; /*Amplitude Modulation coefficients */ | |
| INT4 *sftPerCoh; | | REAL8 f0; /*Starting Frequency to be demodulated*/ | |
| | | REAL8 df; /*Frequency index resolution*/ | |
| | | INT4 SFTno; /* No. of SFTs*/ | |
| | | INT4 Dterms; /*Terms used in the computation of the diri | |
| | | chlet kernel*/ | |
| | | INT4 ifmin; /*smallest frequency index in SFTs */ | |
| | | INT4 imax; /*maximum # of values of F to calculate */ | |
| | | BOOLEAN returnFaFb; /* wether or not to include the values Fa/Fb | |
| | | in the return LALFstat */ | |
| }DemodPar; | | }DemodPar; | |
| | | | |
|
| typedef struct SkyPosTag | | typedef struct { | |
| { | | REAL8 *F; /* Array of value of the F statistic */ | |
| REAL8 alpha; | | COMPLEX16 *Fa; /* Results of match filter with a(t) */ | |
| REAL8 delta; | | COMPLEX16 *Fb; /* Results of match filter with b(t) */ | |
| CHAR type; | | } LALFstat; | |
| }SkyPos; | | | |
| | | | |
| typedef struct SpindownTag | | | |
| { | | | |
| INT4 m; | | | |
| REAL8 *spParams; | | | |
| }Spindown; | | | |
| | | | |
| typedef struct ParameterSetTag | | | |
| { | | | |
| SkyPos *skyP; | | | |
| Spindown *spind; | | | |
| }ParameterSet; | | | |
| | | | |
| /*This structure will hold a single FFT*/ | | /*This structure will hold a single FFT*/ | |
| typedef struct FFTTag | | typedef struct FFTTag | |
| { | | { | |
| COMPLEX8FrequencySeries *fft; | | COMPLEX8FrequencySeries *fft; | |
|
| ParameterSet par; | | | |
| } FFT; | | } FFT; | |
| | | | |
|
| typedef struct DeFTPeriodogramTag | | /********************************************************** <lalLaTeX> | |
| { | | \vfill{\footnotesize\input{LALDemodHV}} | |
| REAL8FrequencySeries *fft; | | | |
| COMPLEX16FrequencySeries *fA; | | | |
| COMPLEX16FrequencySeries *fB; | | | |
| ParameterSet par; | | | |
| } DeFTPeriodogram; | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \input{LALDemodHV} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALDemodC} | | \newpage\input{LALDemodC} | |
|
| </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
|
| void LALDemod (LALStatus *stat, | | /* Function prototypes */ | |
| DeFTPeriodogram *xHatCoh, | | | |
| FFT **input, | | | |
| DemodPar *params); | | | |
| | | | |
| void times(REAL8 , | | | |
| INT4, | | | |
| LIGOTimeGPS *, | | | |
| INT4 ); | | | |
| | | | |
|
| void times2(REAL8 tSFT, INT4 howMany, LIGOTimeGPS **ts, INT4 **sftPerCoh, I
NT4 sw, INT4 mCohSFT); | | void LALDemod (LALStatus *status, LALFstat *Fstat, FFT **input, DemodPar *p
arams); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALDemodTestC} | | \newpage\input{LALDemodTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| #endif /* _LALDEMOD_H */ | | #endif /* _LALDEMOD_H */ | |
| | | | |
End of changes. 25 change blocks. |
| 171 lines changed or deleted | | 63 lines changed or added | |
|
| LALHough.h | | LALHough.h | |
|
| /*----------------------------------------------------------------------- | | /* | |
| * | | * Copyright (C) 2005 Badri Krishnan, Alicia Sintes | |
| * File Name: LALHough.h | | | |
| * | | * | |
|
| * Authors: Sintes, A.M., | | * This program is free software; you can redistribute it and/or modify | |
| | | * it under the terms of the GNU General Public License as published by | |
| | | * the Free Software Foundation; either version 2 of the License, or | |
| | | * (at your option) any later version. | |
| * | | * | |
|
| * Revision: $Id: LALHough.h,v 1.1 2001/11/27 22:28:41 jolien Exp $ | | * This program is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| | | * GNU General Public License for more details. | |
| * | | * | |
|
| * History: Created by Sintes August 3, 2001 | | * You should have received a copy of the GNU General Public License | |
| * Modified... | | * along with with program; see the file COPYING. If not, write to the | |
| | | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
| | | * MA 02111-1307 USA | |
| | | */ | |
| | | | |
| | | /** | |
| * | | * | |
|
| *----------------------------------------------------------------------- | | * \file LALHough.h | |
| | | \author Alicia Sintes, Badri Krishnan | |
| | | \brief Routines for building and updating the space of partial | |
| | | Hough map derivatives and related functions needed for the construction | |
| | | of total Hough maps at different frequencies and | |
| | | possible residual spin down parameters. | |
| | | | |
| | | \par Description | |
| | | | |
| | | As we mention before, | |
| | | the issue is to build histograms, the Hough map (HM), in the | |
| | | parameter space: for each intrinsic frequency \f$ f_0 \f$, each residua | |
| | | l | |
| | | spin-down parameter, and each refined sky location inside the patch. | |
| | | Notice, from the master equation, that the effect of the residual | |
| | | spin-down parameter is just a change in \f$ F_0\f$ , and, at any given | |
| | | time, \f$ F_0 \f$ can be considered constant. | |
| | | Also, the Hough map is a histogram, thus additive. It can be seen as | |
| | | the sum of several partial Hough maps constructed using just one periodo | |
| | | gram. | |
| | | | |
| | | Therefore, we can construct the HM for any \f$ f_0\f$ and spin-down | |
| | | value by adding together, at different times, partial Hough maps (PHM) | |
| | | corresponding to different \f$ F_0\f$ values (or equivalently, adding t | |
| | | heir | |
| | | derivatives and then integrating the result). | |
| | | | |
| | | In practice this means that in order to obtain the HM for a given | |
| | | frequency and all possible residual spin-down parameters, we have to co | |
| | | nstruct | |
| | | a CYLINDER of around the frequency \f$ f_0\f$ . All of the \e phmd com | |
| | | ing | |
| | | from data demodulated with the same parameters. | |
| | | The coordinates of the \e phmd locate the position of the source in | |
| | | the sky, and by summing along different directions inside the cylinder w | |
| | | e refine | |
| | | the spin-down value. | |
| | | To analyze another frequency, for all possible spin-down parameters, | |
| | | we just need to add a new line to the cylinder (and remove another one, | |
| | | in a | |
| | | circular buffer) | |
| | | and then proceed making all the possible sums again. | |
| | | | |
| | | For the case of only 1 spin-down parameter we have to sum | |
| | | following straight lines whose slope is related to the grid in the | |
| | | residual spin-down parameter. We can distinguish (at most) as | |
| | | many lines as the number of the different periodograms used. | |
| | | | |
| */ | | */ | |
| | | | |
| /************************************ <lalVerbatim file="LALHoughHV"> | | /************************************ <lalVerbatim file="LALHoughHV"> | |
|
| Author: Sintes, A.M., | | Author: Sintes, A.M., Krishnan, B. | |
| $Id: LALHough.h,v 1.1 2001/11/27 22:28:41 jolien Exp $ | | $Id: LALHough.h,v 1.7 2005/10/31 15:10:21 badri Exp $ | |
| ************************************* </lalVerbatim> */ | | ************************************* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \section{Header \texttt{LALHough.h}} | | \section{Header \texttt{LALHough.h}} | |
| \label{s:LALHough.h} | | \label{s:LALHough.h} | |
| | | | |
| Routines for building and updating the space of partial Hough map derivativ
es | | Routines for building and updating the space of partial Hough map derivativ
es | |
| ({\sc phmd}), | | ({\sc phmd}), | |
| and related functions needed for the construction of total Hough maps at | | and related functions needed for the construction of total Hough maps at | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 105 | |
| the sum of several partial Hough maps constructed using just one periodogr
am | | the sum of several partial Hough maps constructed using just one periodogr
am | |
| (or {\it peak-gram}). | | (or {\it peak-gram}). | |
| | | | |
| Therefore, we can construct the HM for any $f_0$ and spin-down | | Therefore, we can construct the HM for any $f_0$ and spin-down | |
| value by adding together, at different times, partial Hough maps (PHM) | | value by adding together, at different times, partial Hough maps (PHM) | |
| corresponding to different $F_0$ values (or equivalently, adding their | | corresponding to different $F_0$ values (or equivalently, adding their | |
| derivatives {\sc phmd} and then integrating the result). | | derivatives {\sc phmd} and then integrating the result). | |
| | | | |
| In practice this means that in order to obtain the HM for a given | | In practice this means that in order to obtain the HM for a given | |
| frequency and all possible residual spin-down parameters, we have to cons
truct | | frequency and all possible residual spin-down parameters, we have to cons
truct | |
|
| a \lq\lq CYLINDER" of {\sc phmd} around the frequency $f_0$. All of the
{\sc | | a CYLINDER of {\sc phmd} around the frequency $f_0$. All of the {\sc | |
| phmd} coming | | phmd} coming | |
| from data demodulated with the same parameters. | | from data demodulated with the same parameters. | |
| The coordinates of the {\sc phmd} locate the position of the source in | | The coordinates of the {\sc phmd} locate the position of the source in | |
| the sky, and by summing along different directions inside the cylinder we
refine | | the sky, and by summing along different directions inside the cylinder we
refine | |
| the spin-down value. | | the spin-down value. | |
| To analyze another frequency, for all possible spin-down parameters, | | To analyze another frequency, for all possible spin-down parameters, | |
| we just need to add a new line to the cylinder (and remove another one, in
a | | we just need to add a new line to the cylinder (and remove another one, in
a | |
| circular buffer) | | circular buffer) | |
| and then proceed making all the possible sums again. | | and then proceed making all the possible sums again. | |
| | | | |
| | | | |
| skipping to change at line 95 | | skipping to change at line 145 | |
| derivatives at different time stamps that have to be combined to form a Hou
gh map | | derivatives at different time stamps that have to be combined to form a Hou
gh map | |
| for a given (null or) residual spin-down parameters. The fields are: | | for a given (null or) residual spin-down parameters. The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{UINT4 length}] Number of elements. | | \item[\texttt{UINT4 length}] Number of elements. | |
| \item[\texttt{REAL8 deltaF}] Frequency resolution. | | \item[\texttt{REAL8 deltaF}] Frequency resolution. | |
| \item[\texttt{UINT8 *data}] The frequency indexes. | | \item[\texttt{UINT8 *data}] The frequency indexes. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
|
| | | struct UINT8FrequencyIndexVectorSequence | |
| | | \end{verbatim} | |
| | | \index{\texttt{UINT8FrequencyIndexVectorSequence}} | |
| | | | |
| | | \noindent This structure stores a set of frequency-index vectors. Every set | |
| | | corresponds to a different spin-down residual value. There will thus be as | |
| | | many | |
| | | sets as many spin-down residuals one wants to search over with the hough st | |
| | | age. | |
| | | The fields are: | |
| | | | |
| | | \begin{description} | |
| | | \item[\texttt{UINT4 length}] Number of element | |
| | | s. | |
| | | \item[\texttt{UINT4 vectorLength}] Frequency resolut | |
| | | ion. | |
| | | \item[\texttt{UINT8FrequencyIndexVector *freqIndV}] The frequency ind | |
| | | exes. | |
| | | \end{description} | |
| | | | |
| | | \begin{verbatim} | |
| struct HOUGHPeakGramVector | | struct HOUGHPeakGramVector | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{HOUGHPeakGramVector}} | | \index{\texttt{HOUGHPeakGramVector}} | |
| | | | |
| \noindent This structure contains a vector of peak-grams (for the different
time | | \noindent This structure contains a vector of peak-grams (for the different
time | |
| stamps). The fields are: | | stamps). The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{UINT4 length }] Number of elements. | | \item[\texttt{UINT4 length }] Number of elements. | |
| \item[\texttt{HOUGHPeakGram *pg }] The peak-grams. | | \item[\texttt{HOUGHPeakGram *pg }] The peak-grams. | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 211 | |
| \index{\texttt{PHMDVectorSequence}} | | \index{\texttt{PHMDVectorSequence}} | |
| | | | |
| \noindent This structure contains a vector sequence of partial-Hough maps | | \noindent This structure contains a vector sequence of partial-Hough maps | |
| derivatives (for different time stamps and different frequencies) represent
ing | | derivatives (for different time stamps and different frequencies) represent
ing | |
| a circular buffer for the frequency | | a circular buffer for the frequency | |
| indexes. The fields are: | | indexes. The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{UINT4 nfSize }] Number of different frequencies. | | \item[\texttt{UINT4 nfSize }] Number of different frequencies. | |
| \item[\texttt{UINT4 length }] Number of elements for each frequency. | | \item[\texttt{UINT4 length }] Number of elements for each frequency. | |
|
| \item[\texttt{UINT8 fBinMin }] Present minimum frequency bin. | | \item[\texttt{UINT8 fBinMin }] Frequency index of the smallest intr
isic freq.in buffer | |
| \item[\texttt{REAL8 deltaF }] Frequency resolution. | | \item[\texttt{REAL8 deltaF }] Frequency resolution. | |
| \item[\texttt{UINT4 breakLine }] Mark $\in$[0, \texttt{nfSize}) \,
(of the circular | | \item[\texttt{UINT4 breakLine }] Mark $\in$[0, \texttt{nfSize}) \,
(of the circular | |
| buffer) pointing to the starting of the \texttt{fBinMin} line. | | buffer) pointing to the starting of the \texttt{fBinMin} line. | |
| \item[\texttt{HOUGHphmd *phmd }] The partial Hough map derivatives. | | \item[\texttt{HOUGHphmd *phmd }] The partial Hough map derivatives. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct HOUGHResidualSpinPar | | struct HOUGHResidualSpinPar | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{HOUGHResidualSpinPar}} | | \index{\texttt{HOUGHResidualSpinPar}} | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 243 | |
| \end{description} | | \end{description} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \vfill{\footnotesize\input{LALHoughHV}} | | \vfill{\footnotesize\input{LALHoughHV}} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \newpage\input{DriveHoughC} | | \newpage\input{DriveHoughC} | |
| | | | |
| %%%%%%%%%%Test program. %% | | %%%%%%%%%%Test program. %% | |
| \newpage\input{TestDriveHoughC} | | \newpage\input{TestDriveHoughC} | |
|
| | | \newpage\input{TestDriveNDHoughC} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| * 4. Protection against double inclusion (include-loop protection) | | * 4. Protection against double inclusion (include-loop protection) | |
| * Note the naming convention! | | * Note the naming convention! | |
| */ | | */ | |
| | | | |
| | | | |
| skipping to change at line 202 | | skipping to change at line 269 | |
| * after include-loop protection. Includes should appear in the followin
g | | * after include-loop protection. Includes should appear in the followin
g | |
| * order: | | * order: | |
| * a. Standard library includes | | * a. Standard library includes | |
| * b. LDAS includes | | * b. LDAS includes | |
| * c. LAL includes | | * c. LAL includes | |
| */ | | */ | |
| | | | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <math.h> | | #include <math.h> | |
| #include <stdio.h> | | #include <stdio.h> | |
|
| # include <stdlib.h> | | #include <stdlib.h> | |
| # include <string.h> | | #include <string.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
| #include <lal/AVFactories.h> | | #include <lal/AVFactories.h> | |
| #include <lal/SeqFactories.h> | | #include <lal/SeqFactories.h> | |
|
| | | #include <lal/LALComputeAM.h> | |
| | | #include <lal/ComputeSky.h> | |
| | | | |
|
| # include <lal/LUT.h> | | #include <lal/LUT.h> | |
| # include <lal/PHMD.h> | | #include <lal/PHMD.h> | |
| # include <lal/HoughMap.h> | | #include <lal/HoughMap.h> | |
| | | #include <lal/PulsarDataTypes.h> | |
| | | #include <lal/NormalizeSFTRngMed.h> | |
| | | | |
| /* | | /* | |
| * #include "LALRCSID.h" | | * #include "LALRCSID.h" | |
| * not needed, it is included in "LALConstants.h" | | * not needed, it is included in "LALConstants.h" | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * Protection against C++ name mangling | | * Protection against C++ name mangling | |
| */ | | */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * 6. Assignment of Id string using NRCSID() | | * 6. Assignment of Id string using NRCSID() | |
| */ | | */ | |
| | | | |
|
| NRCSID (LALHOUGHH, "$Id: LALHough.h,v 1.1 2001/11/27 22:28:41 jolien Exp $"
); | | NRCSID (LALHOUGHH, "$Id: LALHough.h,v 1.7 2005/10/31 15:10:21 badri Exp $")
; | |
| | | | |
| /* | | /* | |
| * 7. Error codes and messages. This must be auto-extracted for | | * 7. Error codes and messages. This must be auto-extracted for | |
| * inclusion in the documentation. | | * inclusion in the documentation. | |
| */ | | */ | |
| | | | |
| /* <lalErrTable file="LALHoughHErrorTable"> */ | | /* <lalErrTable file="LALHoughHErrorTable"> */ | |
| | | | |
| #define LALHOUGHH_ENULL 1 | | #define LALHOUGHH_ENULL 1 | |
| #define LALHOUGHH_ESIZE 2 | | #define LALHOUGHH_ESIZE 2 | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 341 | |
| */ | | */ | |
| | | | |
| /* ******************************************************* | | /* ******************************************************* | |
| * 9. Constant Declarations. (discouraged) | | * 9. Constant Declarations. (discouraged) | |
| */ | | */ | |
| | | | |
| /* ************************************************************** | | /* ************************************************************** | |
| * 10. Structure, enum, union, etc., typdefs. | | * 10. Structure, enum, union, etc., typdefs. | |
| */ | | */ | |
| | | | |
|
| | | /** Vector of frequency bin indexes */ | |
| typedef struct tagUINT8FrequencyIndexVector{ | | typedef struct tagUINT8FrequencyIndexVector{ | |
|
| UINT4 length; /* number of elements */ | | UINT4 length; /**< number of elements */ | |
| REAL8 deltaF; /* frequency resolution */ | | REAL8 deltaF; /**< frequency resolution */ | |
| UINT8 *data; /* the frequency indexes */ | | UINT8 *data; /**< the frequency indexes */ | |
| } UINT8FrequencyIndexVector; | | } UINT8FrequencyIndexVector; | |
| | | | |
|
| | | /** Sequency of frequency bin index vectors */ | |
| | | typedef struct tagUINT8FrequencyIndexVectorSequence{ | |
| | | UINT4 length; /**< number of elements */ | |
| | | UINT4 vectorLength; /**< frequency resolution * | |
| | | / | |
| | | UINT8FrequencyIndexVector *freqIndV; /**< the frequency indexes | |
| | | */ | |
| | | } UINT8FrequencyIndexVectorSequence; | |
| | | | |
| | | /** Vector of Hough peak grams */ | |
| typedef struct tagHOUGHPeakGramVector{ | | typedef struct tagHOUGHPeakGramVector{ | |
|
| UINT4 length; /* number of elements */ | | UINT4 length; /**< number of elements */ | |
| HOUGHPeakGram *pg; /* the Peakgrams */ | | HOUGHPeakGram *pg; /**< the Peakgrams */ | |
| } HOUGHPeakGramVector; | | } HOUGHPeakGramVector; | |
| | | | |
|
| | | /** Vector of Hough look up tables for a particular patch, time and frequen
cy */ | |
| typedef struct tagHOUGHptfLUTVector{ | | typedef struct tagHOUGHptfLUTVector{ | |
|
| UINT4 length; /* number of elements */ | | UINT4 length; /**< number of elements */ | |
| HOUGHptfLUT *lut; /* the partial Look Up Tables */ | | HOUGHptfLUT *lut; /**< the partial Look Up Tables */ | |
| } HOUGHptfLUTVector; | | } HOUGHptfLUTVector; | |
| | | | |
|
| | | /** Vector of total Hough maps */ | |
| typedef struct tagHOUGHMapTotalVector{ | | typedef struct tagHOUGHMapTotalVector{ | |
|
| UINT4 length; /* number of elements */ | | UINT4 length; /**< number of elements */ | |
| HOUGHMapTotal *ht; /* the Hough maps */ | | HOUGHMapTotal *ht; /**< the Hough maps */ | |
| } HOUGHMapTotalVector; | | } HOUGHMapTotalVector; | |
| | | | |
|
| | | /** Cylindrical buffer of partial Hough map derivatives -- to be added and | |
| | | integrated | |
| | | along x-axis to obtain total hough map */ | |
| typedef struct tagPHMDVectorSequence{ | | typedef struct tagPHMDVectorSequence{ | |
|
| UINT4 nfSize; /* number of different frequencies */ | | UINT4 nfSize; /**< number of different frequencies */ | |
| UINT4 length; /* number of elements for each frequency */ | | UINT4 length; /**< number of elements for each frequency */ | |
| UINT8 fBinMin; /* present minimum frequency bin */ | | UINT8 fBinMin; /**< frequency index of smallest intrinsic | |
| REAL8 deltaF; /* frequency resolution */ | | frequency in circular buffer */ | |
| UINT4 breakLine; /* mark [0,nfSize) (of the circular buffer) | | REAL8 deltaF; /**< frequency resolution */ | |
| | | UINT4 breakLine; /**< mark [0,nfSize) (of the circular buffer) | |
| pointing to the starting of the fBinMin line */ | | pointing to the starting of the fBinMin line */ | |
|
| HOUGHphmd *phmd; /* the partial Hough map derivatives */ | | HOUGHphmd *phmd; /**< the partial Hough map derivatives */ | |
| } PHMDVectorSequence; | | } PHMDVectorSequence; | |
| | | | |
|
| | | /** Residual values of spindown parameters -- difference from value used | |
| | | for demodulation */ | |
| typedef struct tagHOUGHResidualSpinPar{ | | typedef struct tagHOUGHResidualSpinPar{ | |
|
| REAL8 deltaF; /* frequency resolution; df=1/TCOH */ | | REAL8 deltaF; /**< frequency resolution; df=1/TCOH */ | |
| REAL8 timeDiff; /* T(t)-T(t0) */ | | REAL8 timeDiff; /**< T(t)-T(t0) */ | |
| REAL8Vector spinRes; /* length: Maximum order of spdwn parameter */ | | REAL8Vector spinRes; /**< length: Maximum order of spdwn parameter */ | |
| /* *data: pointer to residual Spin parameter set f | | /**< *data: pointer to residual Spin parameter set | |
| k */ | | fk */ | |
| } HOUGHResidualSpinPar; | | } HOUGHResidualSpinPar; | |
| | | | |
| /* | | /* | |
| * 11. Extern Global variables. (discouraged) | | * 11. Extern Global variables. (discouraged) | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * 12. Functions Declarations (i.e., prototypes). | | * 12. Functions Declarations (i.e., prototypes). | |
| */ | | */ | |
| void LALHOUGHConstructSpacePHMD (LALStatus *status, | | void LALHOUGHConstructSpacePHMD (LALStatus *status, | |
| | | | |
| skipping to change at line 345 | | skipping to change at line 432 | |
| UINT8FrequencyIndexVector *freqInd, | | UINT8FrequencyIndexVector *freqInd, | |
| PHMDVectorSequence *phmdVS | | PHMDVectorSequence *phmdVS | |
| ); | | ); | |
| | | | |
| void LALHOUGHComputeFBinMap (LALStatus *status, | | void LALHOUGHComputeFBinMap (LALStatus *status, | |
| UINT8 *fBinMap, | | UINT8 *fBinMap, | |
| UINT8 *f0Bin, | | UINT8 *f0Bin, | |
| HOUGHResidualSpinPar *rs | | HOUGHResidualSpinPar *rs | |
| ); | | ); | |
| | | | |
|
| | | void LALHOUGHConstructHMT_W (LALStatus *status, | |
| | | HOUGHMapTotal *ht, | |
| | | UINT8FrequencyIndexVector *freqInd, | |
| | | PHMDVectorSequence *phmdVS | |
| | | ); | |
| | | | |
| | | void LALHOUGHWeighSpacePHMD (LALStatus *status, | |
| | | PHMDVectorSequence *phmdVS, | |
| | | REAL8Vector *weightV | |
| | | ); | |
| | | | |
| | | void LALHOUGHInitializeWeights (LALStatus *status, | |
| | | REAL8Vector *weightV | |
| | | ); | |
| | | | |
| | | void LALHOUGHNormalizeWeights (LALStatus *status, | |
| | | REAL8Vector *weightV | |
| | | ); | |
| | | | |
| | | void LALHOUGHComputeAMWeights (LALStatus *status, | |
| | | REAL8Vector *weightV, | |
| | | LIGOTimeGPSVector *timeV, | |
| | | LALDetector *detector, | |
| | | EphemerisData *edat, | |
| | | REAL8 alpha, | |
| | | REAL8 delta | |
| | | ); | |
| | | | |
| | | void LALHOUGHComputeNoiseWeights (LALStatus *status, | |
| | | REAL8Vector *weightV, | |
| | | SFTVector *sftVect, | |
| | | INT4 blkSize | |
| | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } /* Close C++ protection */ | | } /* Close C++ protection */ | |
| #endif | | #endif | |
| | | | |
| #endif /* Close double-include protection _LALHOUGH_H */ | | #endif /* Close double-include protection _LALHOUGH_H */ | |
| | | | |
End of changes. 28 change blocks. |
| 38 lines changed or deleted | | 174 lines changed or added | |
|
| LALInspiral.h | | LALInspiral.h | |
| /* <lalVerbatim file="LALInspiralHV"> | | /* <lalVerbatim file="LALInspiralHV"> | |
| | | | |
|
| Author: Churches, D. K and B. S. Sathyaprakash. | | Author: Churches, D. K , B. S. Sathyaprakash, T. Cokelaer. | |
| $Id: LALInspiral.h,v 1.17 2002/06/07 15:11:01 dchurches Exp $ | | $Id: LALInspiral.h,v 1.70 2005/08/30 14:48:57 thomas Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALInspiral.h}} | | \section{Header \texttt{LALInspiral.h}} | |
| \label{s:LALInspiral.h} | | \label{s:LALInspiral.h} | |
| | | | |
| Header file for the template generation codes. | | Header file for the template generation codes. | |
| | | | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _LALINSPIRAL_H | | #ifndef _LALINSPIRAL_H | |
| #define _LALINSPIRAL_H | | #define _LALINSPIRAL_H | |
| | | | |
| # include <math.h> | | # include <math.h> | |
| # include <stdio.h> | | # include <stdio.h> | |
| # include <stdlib.h> | | # include <stdlib.h> | |
| # include <lal/LALStdlib.h> | | # include <lal/LALStdlib.h> | |
| # include <lal/LALConstants.h> | | # include <lal/LALConstants.h> | |
|
| | | # include <lal/SimulateCoherentGW.h> | |
| | | # include <lal/GeneratePPNInspiral.h> | |
| | | # include <lal/LIGOMetadataTables.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( LALINSPIRALH, "$Id: LALInspiral.h,v 1.17 2002/06/07 15:11:01 dchurc
hes Exp $" ); | | NRCSID( LALINSPIRALH, "$Id: LALInspiral.h,v 1.70 2005/08/30 14:48:57 thomas
Exp $" ); | |
| | | | |
| # define oneby3 0.333333333333333333333333333 | | # define oneby3 0.333333333333333333333333333 | |
| # define twoby3 0.666666666666666666666666667 | | # define twoby3 0.666666666666666666666666667 | |
| # define fourby3 1.333333333333333333333333333 | | # define fourby3 1.333333333333333333333333333 | |
| # define fiveby3 1.666666666666666666666666667 | | # define fiveby3 1.666666666666666666666666667 | |
| # define sevenby3 2.333333333333333333333333333 | | # define sevenby3 2.333333333333333333333333333 | |
| # define eightby3 2.666666666666666666666666667 | | # define eightby3 2.666666666666666666666666667 | |
| # define tenby3 3.333333333333333333333333333 | | # define tenby3 3.333333333333333333333333333 | |
| # define elevenby3 3.666666666666666666666666666 | | # define elevenby3 3.666666666666666666666666666 | |
| # define threeby8 0.375 | | # define threeby8 0.375 | |
| # define fiveby8 0.625 | | # define fiveby8 0.625 | |
| # define threeby4 0.75 | | # define threeby4 0.75 | |
| # define sevenby8 0.875 | | # define sevenby8 0.875 | |
|
| | | #define ninty4by3etc 18.687902694437592603 /* (94/3 -41/31*pi*pi) */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| | | | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
|
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
|
| | | #define LALINSPIRALH_ENULL 1 | |
| | | #define LALINSPIRALH_EMEM 2 | |
| | | #define LALINSPIRALH_EDIV0 3 | |
| | | #define LALINSPIRALH_ESIZE 4 | |
| | | #define LALINSPIRALH_ECHOICE 5 | |
| | | #define LALINSPIRALH_EORDER 6 | |
| | | #define LALINSPIRALH_EAPPROXIMANT 7 | |
| | | #define LALINSPIRALH_EPSI0 8 | |
| | | #define LALINSPIRALH_EPSI3 9 | |
| | | #define LALINSPIRALH_EALPHA 10 | |
| | | #define LALINSPIRALH_EFCUTOFF 11 | |
| | | #define LALINSPIRALH_ENOWAVEFORM 12 | |
| | | #define LALINSPIRALH_ESTOPPED 13 | |
| | | #define LALINSPIRALH_EROOTINIT 14 | |
| | | #define LALINSPIRALH_EFLOWER 15 | |
| | | #define LALINSPIRALH_EVECTOR 16 | |
| | | | |
| | | #define LALINSPIRALH_MSGENULL "Arguments contained an unexpected nu | |
| | | ll pointer" | |
| | | #define LALINSPIRALH_MSGEMEM "Memory allocation error" | |
| | | #define LALINSPIRALH_MSGEDIV0 "Division by zero" | |
| | | #define LALINSPIRALH_MSGESIZE "Invalid input range" | |
| | | #define LALINSPIRALH_MSGECHOICE "Invalid choice for an input paramete | |
| | | r" | |
| | | #define LALINSPIRALH_MSGEORDER "unknown order specified" | |
| | | #define LALINSPIRALH_MSGEAPPROXIMANT "Invalid model" | |
| | | #define LALINSPIRALH_MSGEPSI0 "psi0 must be > 0" | |
| | | #define LALINSPIRALH_MSGEPSI3 "psi3 must be < 0" | |
| | | #define LALINSPIRALH_MSGEALPHA "alpha must be defined positive" | |
| | | #define LALINSPIRALH_MSGEFCUTOFF "fcutoff must be defined and > 0" | |
| | | #define LALINSPIRALH_MSGENOWAVEFORM "No Waveform generated" | |
| | | #define LALINSPIRALH_MSGESTOPPED "Waveform generation stopped" | |
| | | #define LALINSPIRALH_MSGEROOTINIT "Can't find good bracket for Bisectio | |
| | | nFindRoot" | |
| | | #define LALINSPIRALH_MSGEFLOWER "fLower too low in comparison to flso | |
| | | " | |
| | | #define LALINSPIRALH_MSGEVECTOR "Attempting to write beyond the end o | |
| | | f vector" | |
| | | | |
|
| #define LALINSPIRALH_ENULL 1 | | /** --------------------------------------------------------------------- | |
| #define LALINSPIRALH_EMEM 2 | | </lalErrTable> */ | |
| #define LALINSPIRALH_EDIV0 4 | | | |
| #define LALINSPIRALH_ESIZE 8 | | | |
| #define LALINSPIRALH_ECHOICE 16 | | | |
| #define LALINSPIRALH_MSGENULL "Arguments contained an unexpected null point | | | |
| er" | | | |
| #define LALINSPIRALH_MSGEMEM "Memory allocation error" | | | |
| #define LALINSPIRALH_MSGEDIV0 "Division by zero" | | | |
| #define LALINSPIRALH_MSGESIZE "Invalid input range" | | | |
| #define LALINSPIRALH_MSGECHOICE "Invalid choice for an input parameter" | | | |
| | | | |
| /* </lalErrTable> */ | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section*{Structures} | | \section*{Structures} | |
| | | | |
| \begin{enumerate} | | \begin{enumerate} | |
| | | | |
|
| \item \texttt{EtaTau02In, EtaTau04In:} | | \item \texttt{Order:} | |
| These are the input structures needed in solving for the mass | | | |
| ratio $\eta$ given the chirptimes $\tau_0$ and $\tau_2,$ or | | | |
| to solve for $\eta$ given the chirptimes $\tau_2$ and $\tau_4.$ | | | |
| | | | |
| \input{LALEtaTau0Tau2InH} | | | |
| | | | |
| Here, \texttt{t2}~$ = \tau_2,$ \texttt{A2}~$ = A_2 ({\tau_0}/{A_0})^{3/5},$ | | | |
| and | | | |
| \texttt{B2}~$=B_2$, | | | |
| where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ $A_2 = 3715 / [64512 (\pi f_s)^2] | | | |
| ,$ | | | |
| $B_2 = 4620/3715.$ | | | |
| | | | |
| Similarly, \texttt{t4}~$ = \tau_4,$ \texttt{A4}~$ = A_4 ({\tau_0}/{A_0})^{1 | | | |
| /5},$ | | | |
| \texttt{B4}~$=B_4$ and \texttt{C4}~$=C_4,$ where | | | |
| where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ | | | |
| $A_4 = 5 \times 3058673/ [128 \times 1016064 (\pi f_s)^{4/3}],$ | | | |
| $B_4 = 5429 \times 1016064 /(1008 \times 3058673),$ and $C_4 = 617 \times | | | |
| 1016064/(144 \times 3058673).$ | | | |
| | | | |
| \item \texttt{InputMasses:} | | | |
| This structure is one of the members of the \texttt{InspiralTemplate} | | | |
| structure. | | | |
| | | | |
| \input{LALInputMassesH} | | | |
| | | | |
| A user can specify the parameters of a binary using any two of the | | | |
| following combination of masses | | | |
| \begin{itemize} | | | |
| \item \texttt{m1Andm2:} component masses | | | |
| \item \texttt{totalMassAndEta:} total mass and symmetric mass ratio | | | |
| \item \texttt{totalMassAndMu:} total mass and reduced mass | | | |
| \item \texttt{t01:} unused; shouldn't be used. | | | |
| \item \texttt{t02:} chirp times $\tau_0$ and $\tau_2$ | | | |
| \item \texttt{t03:} chirp times $\tau_0$ and $\tau_3$, and | | | |
| \item \texttt{t04:} chirp times $\tau_0$ and $\tau_4$ | | | |
| \end{itemize} | | | |
| | | | |
| \item \texttt{InputMasses:} | | | |
| Enum that tells which post-Newtonian order is being used. | | Enum that tells which post-Newtonian order is being used. | |
| \input{LALInspiralOrderH} | | \input{LALInspiralOrderH} | |
| \begin{itemize} | | \begin{itemize} | |
| \item \texttt{newtonian:} Newtonain order, flux and enrgy both to the lowes
t order. | | \item \texttt{newtonian:} Newtonain order, flux and enrgy both to the lowes
t order. | |
| \item \texttt{oneHalfPN:} same as before | | \item \texttt{oneHalfPN:} same as before | |
| \item \texttt{onePN:} Both energy and flux to order $O(v^2)$ beyond the New
tonian order. | | \item \texttt{onePN:} Both energy and flux to order $O(v^2)$ beyond the New
tonian order. | |
| \item \texttt{onePointFivePN:} Energy to order $O(v^2)$ and flux to order $
O(v^3)$ | | \item \texttt{onePointFivePN:} Energy to order $O(v^2)$ and flux to order $
O(v^3)$ | |
| \item \texttt{twoPN:} Both energy and flux to order $O(v^4)$ | | \item \texttt{twoPN:} Both energy and flux to order $O(v^4)$ | |
| \item \texttt{twoPointFivePN:} Energy to order $O(v^4)$ and flux to order $
O(v^5)$ | | \item \texttt{twoPointFivePN:} Energy to order $O(v^4)$ and flux to order $
O(v^5)$ | |
| \item \texttt{threePN:} Both energy and flux to order $O(v^6)$ | | \item \texttt{threePN:} Both energy and flux to order $O(v^6)$ | |
| \item \texttt{threePointFivePN:} Energy to order $O(v^6)$ and flux to order
$O(v^7)$ | | \item \texttt{threePointFivePN:} Energy to order $O(v^6)$ and flux to order
$O(v^7)$ | |
| \end{itemize} | | \end{itemize} | |
| In all cases, the gravitational wave phase (also frequency and time) | | In all cases, the gravitational wave phase (also frequency and time) | |
| as an expansion of the gauge invariant parameter $v$ is given up to | | as an expansion of the gauge invariant parameter $v$ is given up to | |
| the order specified by flux. Note that there are certain undetermined | | the order specified by flux. Note that there are certain undetermined | |
| parameters at \texttt{threePN} and \texttt{threePointFivePN.} The waveform | | parameters at \texttt{threePN} and \texttt{threePointFivePN.} The waveform | |
| generation codes use a specific | | generation codes use a specific | |
| value of those parameters while generating the wave. | | value of those parameters while generating the wave. | |
| | | | |
|
| \item \texttt{Approximant:} | | \item \texttt{Approximant:} Enum that specifies the PN approximant to | |
| | | be used in computing the waveform. | |
| \input{LALInspiralApproximantH} | | \input{LALInspiralApproximantH} | |
| \begin{itemize} | | \begin{itemize} | |
| \item \texttt{TaylorT1:} Time domain Taylor approximant in which | | \item \texttt{TaylorT1:} Time domain Taylor approximant in which | |
| the energy and flux are both kept as Taylor expansions | | the energy and flux are both kept as Taylor expansions | |
| and a first order ordinary differential equation is solved | | and a first order ordinary differential equation is solved | |
|
| for the GW phase as a function of $t.$ | | for the GW phase as a function of $t.$ Outputs a time-domain wave. | |
| \item \texttt{TaylorT2:} Time domain Taylor approximant in which | | \item \texttt{TaylorT2:} Time domain Taylor approximant in which | |
| the phase evolution $\varphi(t)$ is obtained by iteratively | | the phase evolution $\varphi(t)$ is obtained by iteratively | |
|
| solving post-Newtonian expansions $\varphi(v)$ and $t(v).$ | | solving post-Newtonian expansions $\varphi(v)$ and $t(v).$ Outputs a
time-domain wave. | |
| \item \texttt{TaylorT3:} Time domain Taylor approximant in which | | \item \texttt{TaylorT3:} Time domain Taylor approximant in which | |
|
| phase is explicitly given as a function of time. | | phase is explicitly given as a function of time. Outputs a time-domain wave | |
| \item \texttt{TaylorF1:} The standard stationary phase approximation. | | . | |
| \item \texttt{TaylorF2:} The stationary phase approximation that | | \item \texttt{TaylorF1:} The stationary phase approximation that | |
| correctly represents, in the Fourier domain, the waveform given | | correctly represents, in the Fourier domain, the waveform given | |
|
| by \texttt{TaylorT1} approximant (see Damour, Iyer, Sathyaprakash, | | by \texttt{TaylorT1} approximant (see Ref. \cite{dis2} for details). Output | |
| Phys. Rev. D . 63, 44023 (2001) for details). | | s a frequency-domain wave. | |
| \item \texttt{PadeT1:} Time-domain P-approximant. | | \item \texttt{TaylorF2:} The standard stationary phase approximation. Outpu | |
| | | ts a frequency-domain wave. | |
| | | \item \texttt{PadeT1:} Time-domain P-approximant. Outputs a time-domain wav | |
| | | e. | |
| \item \texttt{PadeF1:} Frequency-domain P-approximant (not yet implemented)
. | | \item \texttt{PadeF1:} Frequency-domain P-approximant (not yet implemented)
. | |
|
| \item \texttt{EOB:} Effective one-body waveform | | \item \texttt{EOB:} Effective one-body waveform Outputs a time-domain wave | |
| \item \texttt{DJS:} Effective one-body waveform to 3.5 PN order | | . | |
| \item \texttt{INSPA:} Improved stationary phase approximation (not implemen | | \item \texttt{BCV:} Detection template family of Buonanno, Chen and | |
| ted yet) | | Vallisneri \cite{BCV03}. Outputs a frequency-domain wav | |
| \item \texttt{IRSPA:} Improved relativistic stationary phase approximation | | e. | |
| (not implemented yet) | | \item \texttt{BCVSpin:} Detection template family of Buonanno, Chen and | |
| | | Vallisneri including spin effects\cite{BCV03b}. Output | |
| | | s a frequency-domain wave. | |
| | | \item \texttt{SpinTaylorT3} Spinning case T3 models | |
| | | \item \texttt{SpinTaylor} Spinning case PN models (should replace SpinTaylo | |
| | | rT3 in the future) | |
| | | \item \texttt{FindChirpSP} The stationary phase templates implemented by Fi | |
| | | ndChirpSPTemplate in the findchirp package (equivalent to TaylorF2 at twoPN | |
| | | order). | |
| | | \item \texttt{GeneratePPN} The time domain templates generated by LALGenera | |
| | | tePPNInspiral() in the inject package (equivalent to TaylorT3 at twoPN orde | |
| | | r). | |
| | | \item \texttt{FrameFile} The waveform contains arbitrary data read from a f | |
| | | rame file. | |
| | | | |
| | | \end{itemize} | |
| | | \input{LALInputMassesH} | |
| | | \texttt{InputMasses:} | |
| | | This structure is one of the members of the \texttt{InspiralTemplate} | |
| | | structure. | |
| | | | |
| | | A user can specify the parameters of a binary using any of the | |
| | | following combination of {\it masses:} | |
| | | \begin{itemize} | |
| | | \item \texttt{m1Andm2:} component masses | |
| | | \item \texttt{totalMassAndEta:} total mass and symmetric mass ratio | |
| | | \item \texttt{totalMassUAndEta:} total mass and eta but uniform distributio | |
| | | n in totalMass | |
| | | \item \texttt{totalMassAndMu:} total mass and reduced mass | |
| | | \item \texttt{t01:} unused; shouldn't be used. | |
| | | \item \texttt{t02:} chirptimes $\tau_0$ and $\tau_2$ | |
| | | \item \texttt{t03:} chirptimes $\tau_0$ and $\tau_3$, and | |
| | | \item \texttt{t04:} chirptimes $\tau_0$ and $\tau_4$ | |
| | | \item \texttt{psi0Andpsi3:} BCV parameters $\psi_0$ and $\psi_3$ | |
| | | \end{itemize} | |
| | | The LALRandomInspiralSignal uses that structure as an input. Since the inje | |
| | | cted | |
| | | waveform are not necessarely wanted to be random, we also provide the follo | |
| | | wing | |
| | | options | |
| | | \begin{itemize} | |
| | | \item \texttt{bhns:} One of the mass is a Neutron star and the other a blac | |
| | | k | |
| | | hole. (m1 $\in$ [minMass-3] and m2 $\in$ [3-maxMass]). | |
| | | \item \texttt{fixedMasses:} The two masses are given by the input parameter | |
| | | structure. | |
| | | \item \texttt{fixedPsi:} The two psi values are given by the input paramete | |
| | | r structure. | |
| | | \item \texttt{fixedTau:} The two tau values are given by the input paramete | |
| | | r structure. | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item \texttt{InspiralTemplate:} | | \item \texttt{InspiralTemplate:} | |
| The inspiral waveform parameter structure containing information about the | | The inspiral waveform parameter structure containing information about the | |
| waveform to be generated. | | waveform to be generated. | |
| \input{LALInspiralTemplateH} | | \input{LALInspiralTemplateH} | |
| | | | |
| \begin{itemize} | | \begin{itemize} | |
| \item \texttt { ieta:} parameter that tells whether the symmetric mass ra
tio $\eta$ | | \item \texttt { ieta:} parameter that tells whether the symmetric mass ra
tio $\eta$ | |
| should be set to zero in the PN expansions of GW flux and binding
energy. | | should be set to zero in the PN expansions of GW flux and binding
energy. | |
| If \texttt{ieta=0} $\eta$ will be set to zero, otherwise the appro
priate | | If \texttt{ieta=0} $\eta$ will be set to zero, otherwise the appro
priate | |
| value of $\eta$ from the given parameters will be used. | | value of $\eta$ from the given parameters will be used. | |
| | | | |
|
| \item \texttt { level:} (introduced by Duncan Brown?) | | \item \texttt { level:} Flag used in heirarical serached to indicate if t | |
| \item \texttt { *segmentIdVec:} (introduced by Duncan Brown?) | | his is a coarse or a fine template | |
| \item \texttt { number:} (introduced by Duncan Brown?) | | \item \texttt { *segmentIdVec:} Vector of segment that have been filtered | |
| \item \texttt { nStartPad:} Number of leading elements to be set to zero. | | against this template needed for the LDAS implementation of the inspiral s | |
| | | earch. | |
| | | \item \texttt { number:} Unique ID number for this template needed for th | |
| | | e LDAS implementation of the inspiral search. | |
| | | \item \texttt { minMatch:} The minimal match specified by the user when t | |
| | | he bank that contains this template was created. | |
| | | \item \texttt { nStartPad:} Number of leading elements in the signal gene | |
| | | ration to be set to zero (input). If template is requested, that value must | |
| | | be set to zero. In the injection routines related to inject package, that | |
| | | nStartPad is set to zero. However, for injection performed using the inspir | |
| | | al package, that value can be set to non zero. | |
| \item \texttt { nEndPad:} Number of trailing bins to be set to zero, the | | \item \texttt { nEndPad:} Number of trailing bins to be set to zero, the | |
| resulting waveform will have at least this many bins zero at the end, pro
bably | | resulting waveform will have at least this many bins zero at the end, pro
bably | |
|
| more since we always deal with an integer power of 2 array. | | more since we always deal with an integer power of 2 array (input). | |
| \item \texttt { mass1:} Mass of the primary in solar mass. | | \item \texttt { mass1:} Mass of the primary in solar mass (input/output) | |
| | | . | |
| \item \texttt { mass2:} Mass of the secondary in solar mass | | \item \texttt { mass2:} Mass of the secondary in solar mass | |
|
| (\texttt{mass1} need not be larger than \texttt{mass2}. | | (\texttt{mass1} need not be larger than \texttt{mass2} (input/output). | |
| \item \texttt { spin1[3]:} Spin vector of the primary (currently not in u
se) | | \item \texttt { spin1[3]:} Spin vector of the primary (currently not in u
se) | |
| \item \texttt { spin2[3]:} Spin vector of the secondary (currently not in
use) | | \item \texttt { spin2[3]:} Spin vector of the secondary (currently not in
use) | |
|
| | | \item \texttt { sourceTheta:} Co-latitute in the direction to the source. | |
| | | \item \texttt { sourcePhi:} Azimuth angle in the direction to the source. | |
| | | \item \texttt { orbitTheta0:} Initial co-latitute of the orbit. | |
| | | \item \texttt { orbitPhi0:} Initial azimuth angle of the orbit. | |
| \item \texttt { inclination:} Inclination of the orbit (currently not in
use) | | \item \texttt { inclination:} Inclination of the orbit (currently not in
use) | |
|
| | | \item \texttt { distance:} Distance to the binary in seconds | |
| | | \item \texttt { psi0:} BCV parameter $\psi_0.$ | |
| | | \item \texttt { psi3:} BCV parameter $\psi_3.$ | |
| | | \item \texttt { alpha:} BCV amplitude correction factor $\alpha f_{\rm cu | |
| | | t}^{2/3}$ | |
| \item \texttt { eccentricity:} initial eccentricity of the orbit (curren
tly not in use) | | \item \texttt { eccentricity:} initial eccentricity of the orbit (curren
tly not in use) | |
|
| \item \texttt { totalMass:} total mass of the binary $m=m_1+m_2$ in solar | | \item \texttt { totalMass:} total mass of the binary $m=m_1+m_2$ in solar | |
| mass. | | mass (input/output). | |
| \item \texttt { eta:} symmetric mass ratio $\eta=m_1m_2/m^2.$ | | \item \texttt { eta:} symmetric mass ratio $\eta=m_1m_2/m^2.$ (input/outp | |
| \item \texttt { chirpMass:} chirp mass of the binary $=\eta^{3/5} m$ in s | | ut). | |
| olar mass | | \item \texttt { chirpMass:} chirp mass of the binary $=\eta^{3/5} m$ in s | |
| \item \texttt { t0:} Newtonain chirp time in seconds. | | olar mass (output). | |
| \item \texttt { t2:} first post-Newtonian chirp time in seconds. | | \item \texttt { t0:} Newtonain chirp time in seconds (input/output). | |
| \item \texttt { t3:} 1.5 post-Newtonian chirp time in seconds. | | \item \texttt { t2:} first post-Newtonian chirp time in seconds (input/ou | |
| \item \texttt { t4:} second post-Newtonian chirp time in seconds. | | tput). | |
| \item \texttt { t5:} 2.5 post-Newtonian chirp time in seconds. | | \item \texttt { t3:} 1.5 post-Newtonian chirp time in seconds (input/outp | |
| \item \texttt { tC:} total chirp time seconds. | | ut). | |
| \item \texttt { mu:} reduced mass (in solar mass) | | \item \texttt { t4:} second post-Newtonian chirp time in seconds (output) | |
| \item \texttt { fLower:} lower frequency cutoff of the detector in Hz | | . | |
| | | \item \texttt { t5:} 2.5 post-Newtonian chirp time in seconds (output). | |
| | | \item \texttt { tC:} total chirp time seconds (output). | |
| | | \item \texttt { mu:} reduced mass (in solar mass) (input/output) | |
| | | \item \texttt { fLower:} lower frequency cutoff of the detector in Hz (in | |
| | | put) | |
| \item \texttt { fCutoff:} upper frequency cutoff in Hz to be used in gene
rating the waveform. | | \item \texttt { fCutoff:} upper frequency cutoff in Hz to be used in gene
rating the waveform. | |
| If the last stable orbit frequency is smaller than the upper cutoff it wi
ll be used | | If the last stable orbit frequency is smaller than the upper cutoff it wi
ll be used | |
|
| in terminating the waveform instead of fCutoff. | | in terminating the waveform instead of fCutoff (input). | |
| \item \texttt { tSampling:} Sampling rate in Hz | | \item \texttt { tSampling:} Sampling rate in Hz (input) | |
| \item \texttt { startPhase:} starting phase of the waveform in radians | | \item \texttt { startPhase:} starting phase of the waveform in radians (i | |
| | | nput) | |
| \item \texttt { startTime:} starting time of the waveform (in sec); if di
fferent from zero, the | | \item \texttt { startTime:} starting time of the waveform (in sec); if di
fferent from zero, the | |
| waveform will start with an instantaneous frequency different from fLower
and reach | | waveform will start with an instantaneous frequency different from fLower
and reach | |
|
| fLower at time (approximately) zero | | fLower at time (approximately) zero (input, not used in Stationary phase | |
| \item \texttt { signalAmplitude:} dimensionless amplitude of the signal ( | | approximation) | |
| currently unused.) | | \item \texttt { signalAmplitude:} dimensionless amplitude of the signal ( | |
| | | input, currently unused.) | |
| \item \texttt { rInitial:} initial radial separation of the two, in units
of total mass | | \item \texttt { rInitial:} initial radial separation of the two, in units
of total mass | |
|
| bodies (used only in EOB waveforms) | | bodies (used only in EOB waveforms) (output) | |
| \item \texttt { vInitial:} initial velocity parameter, in units of the sp | | \item \texttt { vInitial:} initial velocity parameter, in units of the sp | |
| eed of light | | eed of light (output) | |
| \item \texttt { rFinal:} final 'separation' between the bodies, in units | | \item \texttt { rFinal:} final 'separation' between the bodies, in units | |
| of total mass | | of total mass (output) | |
| \item \texttt { vFinal:} final velocity parameter, in units of the speed | | \item \texttt { vFinal:} final velocity parameter, in units of the speed | |
| of light | | of light (output) | |
| \item \texttt { rLightRing:} radial coordinate at the light ring, in unit | | \item \texttt { fFinal:} final frequency reached, in units of Hz (output) | |
| s of total mass | | \item \texttt { rLightRing:} radial coordinate at the light ring, in unit | |
| | | s of total mass (output) | |
| \item \texttt { OmegaS:} The 3PN (unknown) parameter; calculated to be eq
ual to zero | | \item \texttt { OmegaS:} The 3PN (unknown) parameter; calculated to be eq
ual to zero | |
|
| by Damour, Jaranowski and Schaffer. | | by Damour, Jaranowski and Schaffer (input). | |
| \item \texttt { Theta:} The 3PN unknown flux parameter; likely to be arou
nd unity; | | \item \texttt { Theta:} The 3PN unknown flux parameter; likely to be arou
nd unity; | |
| most waveform generation routines take theta to be zero. Robustness of th
e EOB waveform | | most waveform generation routines take theta to be zero. Robustness of th
e EOB waveform | |
|
| has been demonstrated for $-2 < $ \texttt{Theta} $< 2.$ | | has been demonstrated for $-2 < $ \texttt{Theta} $< 2.$ (input) | |
| \item \texttt { massChoice:} The pair of (mass) parameters given (see str
ucture | | \item \texttt { massChoice:} The pair of (mass) parameters given (see str
ucture | |
|
| defining this member for more details). | | defining this member for more details) (input). | |
| \item \texttt { order:} Post-Newtonain order to be used in generating the | | \item \texttt { order:} Post-Newtonain order to be used in generating the | |
| wave. | | wave (input). | |
| \item \texttt { approximant:} Post-Newtonain approximant to be used in ge | | \item \texttt { approximant:} Post-Newtonain approximant to be used in ge | |
| nerating the wave. | | nerating the wave (input). | |
| \item \texttt { tagInspiralTemplate *next:} Linked list to the next coars
e bank template | | \item \texttt { tagInspiralTemplate *next:} Linked list to the next coars
e bank template | |
| (currently not filled by inspiral or bank codes) | | (currently not filled by inspiral or bank codes) | |
| \item \texttt { tagInspiralTemplate *fine:} Linked list to the next fine
bank template | | \item \texttt { tagInspiralTemplate *fine:} Linked list to the next fine
bank template | |
| (currently not filled by inspiral or bank codes) | | (currently not filled by inspiral or bank codes) | |
| \end{itemize} | | \end{itemize} | |
| | | | |
|
| | | \item \texttt{InspiralACSTParams:} | |
| | | This structure is needed to solve the differential equation | |
| | | giving the evolution of the orbital angular momentum and the | |
| | | spin angular momenta in the case of spinning black hole binaries. | |
| | | \input{LALInspiralACSTParamsH} | |
| | | \begin{itemize} | |
| | | \item \texttt {v:} parameter of 'integration': v=sqrt(M/r) | |
| | | \item {\tt magS1:} The constant spin magnitude of the primary. | |
| | | \item {\tt magS2:} The constant spin magnitude of the secondary. | |
| | | \item {\tt NCap[3]:} Source direction (unit vector) in detector coordinat | |
| | | e system. | |
| | | \item {\tt spin1[3]:} Spin of the larger body. | |
| | | \item {\tt M:} Total mass of the binary (in seconds). | |
| | | \item {\tt fourM1Plus:} = $(4 m_1+3 m_2)/(2 m_1 M^3)$ (all masses express | |
| | | ed in seconds). | |
| | | \item {\tt fourM2Plus:} = $(4 m_2+3 m_1)/(2 m_2 M^3)$ (all masses express | |
| | | ed in seconds). | |
| | | \item {\tt oneBy2Mcube:} = $1/(2 M^3)$ | |
| | | \item {\tt threeBy2Mcube:} = $3/(2 M^3)$ | |
| | | \item {\tt thirtytwoBy5etc:}= $(32/5) \eta^2 M$ | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{EtaTau02In, EtaTau04In:} | |
| | | These are the input structures needed to solve for the mass | |
| | | ratio $\eta$ given the chirptimes $(\tau_0,\, \tau_2)$ or | |
| | | $(\tau_0, \, \tau_4).$ | |
| | | | |
| | | \input{LALEtaTau0Tau2InH} | |
| | | | |
| | | Here, \texttt{t2}~$ = \tau_2,$ \texttt{A2}~$ = A_2 ({\tau_0}/{A_0})^{3/5},$ | |
| | | and | |
| | | \texttt{B2}~$=B_2$, | |
| | | where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ $A_2 = 3715 / [64512 (\pi f_s)^2] | |
| | | ,$ | |
| | | $B_2 = 4620/3715.$ | |
| | | | |
| | | Similarly, \texttt{t4}~$ = \tau_4,$ \texttt{A4}~$ = A_4 ({\tau_0}/{A_0})^{1 | |
| | | /5},$ | |
| | | \texttt{B4}~$=B_4$ and \texttt{C4}~$=C_4,$ where | |
| | | where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ | |
| | | $A_4 = 5 \times 3058673/ [128 \times 1016064 (\pi f_s)^{4/3}],$ | |
| | | $B_4 = 5429 \times 1016064 /(1008 \times 3058673),$ and $C_4 = 617 \times | |
| | | 1016064/(144 \times 3058673).$ | |
| | | | |
| \item \texttt{InspiralToffInput:} | | \item \texttt{InspiralToffInput:} | |
|
| \input{LALInspiralToffInputH} | | | |
| This is a structure needed by the inner workings of the inspiral wave gener
ation code. | | This is a structure needed by the inner workings of the inspiral wave gener
ation code. | |
|
| | | \input{LALInspiralToffInputH} | |
| | | | |
| \item \texttt{expnCoeffs:} | | \item \texttt{expnCoeffs:} | |
| This structure contains various post-Newtonian and P-approximant expansion | | This structure contains various post-Newtonian and P-approximant expansion | |
| coefficients; the meanings of the coefficients is indicated as comme
nts | | coefficients; the meanings of the coefficients is indicated as comme
nts | |
| before each list. | | before each list. | |
| \input{LALExpnCoeffsH} | | \input{LALExpnCoeffsH} | |
| | | | |
| \item {Energy, flux, phase, time and frequency functions:} The following | | \item {Energy, flux, phase, time and frequency functions:} The following | |
| functions are generic function definitions that will be used in | | functions are generic function definitions that will be used in | |
| template generation. The function \texttt{LALInspiralChooseModel,} | | template generation. The function \texttt{LALInspiralChooseModel,} | |
| which is called by wave generation interface code, points these | | which is called by wave generation interface code, points these | |
| functions to the appropriate specific functions depending on the | | functions to the appropriate specific functions depending on the | |
| choices made by the user. | | choices made by the user. | |
| \input{LALEnergyAndFluxFunctionsH} | | \input{LALEnergyAndFluxFunctionsH} | |
| | | | |
|
| \item \texttt{expnFunc:} Structure to hold all the pointer to generic | | \item \texttt{expnFunc:} Structure to hold the pointers to the generic | |
| functions defined above. | | functions defined above. | |
| \input{LALexpnFuncH} | | \input{LALexpnFuncH} | |
| | | | |
|
| \item {Misc structures:} | | \item \texttt{TofVIn {\rm and} TofVIntegrandIn:} Structures needed to | |
| The rest of the structures below define other structures needed by wave | | compute the time elapsed | |
| generation codes. (Will produce a documentation some day so that future cod | | from/to the starting epoch of the waveform when the velocity | |
| e | | parameter was $v_0,$ to/from the current epoch when velocity | |
| maintainers can understand what precisely has been done.) | | parameter is $v.$ | |
| | | \input{LALInspiralTofVH} | |
| | | | |
| | | \item {\tt InspiralPhaseIn {\rm and} PhiofVIntegrandIn:} Structures used | |
| | | to compute the phase of the signal from the `beginning', when the | |
| | | veolcity parameter is $v_0,$ to a time when the velocity parameter | |
| | | has evolved to a user input value $v.$ | |
| | | \input{LALInspiralPhaseH} | |
| | | | |
| | | \item {\tt InspiralDerivativesIn:} Structure used as an input to compute | |
| | | the derivatives needed in solving the phasing formula when the | |
| | | {\tt approximant} is {\tt TaylorT1, TaylorP1} or {\tt EOB.} | |
| | | \input{LALInspiralDerivativesH} | |
| | | | |
| | | \item {\tt rk4In:} Structure used as an input to Runge-Kutta solver. | |
| | | \input{LALInspiralRungeKuttaH} | |
| | | | |
| \end{enumerate} | | \end{enumerate} | |
|
| </lalLaTeX> */ | | --------------------------------------------------------------------- </lal
LaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALEtaTau0Tau2InH"> */ | | /* <lalVerbatim file="LALEtaTau0Tau2InH"> */ | |
| typedef struct | | typedef struct | |
| tagEtaTau02In | | tagEtaTau02In | |
| { | | { | |
| REAL8 t2; | | REAL8 t2; | |
| REAL8 A2; | | REAL8 A2; | |
| REAL8 B2; | | REAL8 B2; | |
| } EtaTau02In; | | } EtaTau02In; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| skipping to change at line 286 | | skipping to change at line 372 | |
| REAL8 A4; | | REAL8 A4; | |
| REAL8 B4; | | REAL8 B4; | |
| REAL8 C4; | | REAL8 C4; | |
| } EtaTau04In; | | } EtaTau04In; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{EtaTau04In} | | \idx[Type]{EtaTau04In} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInputMassesH"> */ | | | |
| typedef enum { | | | |
| m1Andm2, | | | |
| totalMassAndEta, | | | |
| totalMassAndMu, | | | |
| t01, | | | |
| t02, | | | |
| t03, | | | |
| t04 | | | |
| } InputMasses; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{InputMasses} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALInspiralOrderH"> */ | | /* <lalVerbatim file="LALInspiralOrderH"> */ | |
| typedef enum { | | typedef enum { | |
|
| newtonian, | | newtonian, | |
| oneHalfPN, | | oneHalfPN, | |
| onePN, | | onePN, | |
| onePointFivePN, | | onePointFivePN, | |
| twoPN, | | twoPN, | |
| twoPointFivePN, | | twoPointFivePN, | |
| threePN, | | threePN, | |
| threePointFivePN | | threePointFivePN | |
| } Order; | | } Order; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{Order} | | \idx[Type]{Order} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALInspiralApproximantH"> */ | | /* <lalVerbatim file="LALInspiralApproximantH"> */ | |
| typedef enum { | | typedef enum { | |
|
| TaylorT1, | | TaylorT1, | |
| TaylorT2, | | TaylorT2, | |
| TaylorT3, | | TaylorT3, | |
| TaylorF1, | | TaylorF1, | |
| TaylorF2, | | TaylorF2, | |
| PadeT1, | | PadeT1, | |
| PadeF1, | | PadeF1, | |
| EOB, | | EOB, | |
| DJS, | | BCV, | |
| INSPA, | | BCVSpin, | |
| IRSPA | | SpinTaylorT3, | |
| | | SpinTaylor, | |
| | | FindChirpSP, | |
| | | GeneratePPN, | |
| | | BCVC, | |
| | | FrameFile | |
| } Approximant; | | } Approximant; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
|
| | | /* <lalVerbatim file="LALInputMassesH"> */ | |
| | | typedef enum { | |
| | | m1Andm2, | |
| | | totalMassAndEta, | |
| | | totalMassUAndEta, | |
| | | totalMassAndMu, | |
| | | t01, | |
| | | t02, | |
| | | t03, | |
| | | t04, | |
| | | psi0Andpsi3, | |
| | | bhns, | |
| | | fixedMasses, | |
| | | fixedPsi, | |
| | | fixedTau | |
| | | } InputMasses; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InputMasses} | |
| | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALInspiralTemplateH"> */ | | /* <lalVerbatim file="LALInspiralTemplateH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralTemplate | | tagInspiralTemplate | |
| { | | { | |
|
| INT4 ieta; | | /* Parameters needed to generate Taylor/Pade waveforms */ | |
| INT4 level; | | Approximant approximant; | |
| INT4Vector *segmentIdVec; | | Order order; | |
| INT4 number; | | | |
| INT4 nStartPad; | | | |
| INT4 nEndPad; | | | |
| REAL8 mass1; | | REAL8 mass1; | |
| REAL8 mass2; | | REAL8 mass2; | |
|
| | | REAL8 fCutoff; | |
| | | REAL8 fLower; | |
| | | REAL8 tSampling; | |
| | | REAL8 distance; | |
| | | REAL8 signalAmplitude; | |
| | | REAL8 startPhase; | |
| | | REAL8 startTime; | |
| | | INT4 ieta; | |
| | | | |
| | | /* Additional parameters for EOB waveforms */ | |
| | | | |
| | | REAL8 Theta; | |
| | | REAL8 Zeta2; | |
| | | | |
| | | /* Parameters for BCV1 template */ | |
| | | | |
| | | REAL8 alpha; | |
| | | REAL8 psi0; | |
| | | REAL8 psi3; | |
| | | | |
| | | /* Additional parameters for BCV2 template */ | |
| | | | |
| | | REAL8 beta; | |
| | | REAL8 alpha1; | |
| | | REAL8 alpha2; | |
| | | | |
| | | /* Parameters for spinning BH waveform */ | |
| | | | |
| | | REAL8 inclination; | |
| | | REAL8 orbitTheta0; | |
| | | REAL8 orbitPhi0; | |
| REAL8 spin1[3]; | | REAL8 spin1[3]; | |
| REAL8 spin2[3]; | | REAL8 spin2[3]; | |
|
| REAL8 inclination; | | REAL8 sourceTheta; | |
| | | REAL8 sourcePhi; | |
| | | | |
| | | /* Parameters which are currently might be used */ | |
| | | | |
| REAL8 eccentricity; | | REAL8 eccentricity; | |
|
| REAL8 totalMass; | | | |
| | | /* Paramters which are computed using LALInspiralParameterCalc */ | |
| | | | |
| REAL8 chirpMass; | | REAL8 chirpMass; | |
|
| | | REAL8 eta; | |
| | | REAL8 totalMass; | |
| | | REAL8 fFinal; | |
| REAL8 t0; | | REAL8 t0; | |
| REAL8 t2; | | REAL8 t2; | |
| REAL8 t3; | | REAL8 t3; | |
| REAL8 t4; | | REAL8 t4; | |
| REAL8 t5; | | REAL8 t5; | |
| REAL8 tC; | | REAL8 tC; | |
|
| | | | |
| | | /* Note that tc and fFinal are computed during waveform generation!!! */ | |
| | | | |
| | | /* useless parameters */ | |
| | | REAL4 minMatch; | |
| REAL8 mu; | | REAL8 mu; | |
|
| REAL8 eta; | | INT4 level; | |
| REAL8 fLower; | | INT4 number; | |
| REAL8 fCutoff; | | INT4 nStartPad; | |
| REAL8 tSampling; | | INT4 nEndPad; | |
| REAL8 startPhase; | | | |
| REAL8 startTime; | | | |
| REAL8 signalAmplitude; | | | |
| REAL8 rInitial; | | | |
| REAL8 vInitial; | | | |
| REAL8 rFinal; | | | |
| REAL8 vFinal; | | | |
| REAL8 rLightRing; | | | |
| REAL8 OmegaS; | | REAL8 OmegaS; | |
|
| REAL8 Theta; | | REAL8 vFinal; | |
| | | /* REAL8 vInitial; | |
| | | REAL8 rFinal; | |
| | | REAL8 rInitial; | |
| | | REAL8 rLightRing;*/ | |
| InputMasses massChoice; | | InputMasses massChoice; | |
|
| Order order; | | INT4Vector *segmentIdVec; | |
| Approximant approximant; | | LIGOTimeGPS end_time; | |
| | | EventIDColumn *event_id; | |
| | | CHAR ifo[LIGOMETA_IFO_MAX]; | |
| struct tagInspiralTemplate *next; | | struct tagInspiralTemplate *next; | |
| struct tagInspiralTemplate *fine; | | struct tagInspiralTemplate *fine; | |
|
| } | | } InspiralTemplate; | |
| InspiralTemplate; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{InspiralTemplate}} | | \index{\texttt{InspiralTemplate}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALInspiralToffInputH"> */ | | /* <lalVerbatim file="LALInspiralToffInputH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralToffInput | | tagInspiralToffInput | |
| { | | { | |
|
| REAL8 tN; | | REAL8 tN; | |
| REAL8 t2; | | REAL8 t2; | |
| REAL8 t3; | | REAL8 t3; | |
| REAL8 t4; | | REAL8 t4; | |
| REAL8 t5; | | REAL8 t5; | |
| REAL8 t6; | | REAL8 t6; | |
| REAL8 t7; | | REAL8 t7; | |
| REAL8 tl6; | | REAL8 tl6; | |
| REAL8 piM; | | REAL8 piM; | |
| REAL8 tc; | | REAL8 tc; | |
| REAL8 t; | | REAL8 t; | |
| } | | } InspiralToffInput; | |
| InspiralToffInput; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralToffInput} | | \idx[Type]{InspiralToffInput} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /* <lalVerbatim file="LALInspiralACSTParamsH"> */ | |
| | | typedef struct | |
| | | tagInspiralACSTParams | |
| | | { | |
| | | REAL8 v; | |
| | | REAL8 magS1; | |
| | | REAL8 magS2; | |
| | | REAL8 NCap[3]; | |
| | | REAL8 spin1[3]; | |
| | | REAL8 M; | |
| | | REAL8 fourM1Plus; | |
| | | REAL8 fourM2Plus; | |
| | | REAL8 oneBy2Mcube; | |
| | | REAL8 threeBy2Mcube; | |
| | | REAL8 thirtytwoBy5etc; | |
| | | } InspiralACSTParams; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InspiralACSTParamsH} | |
| | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALExpnCoeffsH"> */ | | /* <lalVerbatim file="LALExpnCoeffsH"> */ | |
|
| typedef struct { | | typedef struct | |
| | | tagexpnCoeffs { | |
| int ieta; | | int ieta; | |
| /* coefficients in the Taylor expansion of new energy function*/ | | /* coefficients in the Taylor expansion of new energy function*/ | |
|
| double eTaN, eTa1, eTa2, eTa3; | | REAL8 eTaN, eTa1, eTa2, eTa3; | |
| /* coefficients in the Pade expression of new energy function*/ | | /* coefficients in the Pade expression of new energy function*/ | |
|
| double ePaN, ePa1, ePa2, ePa3; | | REAL8 ePaN, ePa1, ePa2, ePa3; | |
| /* coefficients in the Taylor expansion of usual energy function*/ | | /* coefficients in the Taylor expansion of usual energy function*/ | |
|
| double ETaN, ETa1, ETa2, ETa3; | | REAL8 ETaN, ETa1, ETa2, ETa3; | |
| /* coefficients in the Taylor expansion of the derivative of the | | /* coefficients in the Taylor expansion of the derivative of the | |
| usual energy function*/ | | usual energy function*/ | |
|
| double dETaN, dETa1, dETa2, dETa3; | | REAL8 dETaN, dETa1, dETa2, dETa3; | |
| | | | |
| /* Taylor expansion coefficients of energy flux*/ | | /* Taylor expansion coefficients of energy flux*/ | |
|
| double FTaN, FTa1, FTa2, FTa3, FTa4, FTa5, FTa6, FTa7, FTl6; | | REAL8 FTaN, FTa1, FTa2, FTa3, FTa4, FTa5, FTa6, FTa7, FTl6; | |
| /* Taylor expansion coefficients of factored flux*/ | | /* Taylor expansion coefficients of factored flux*/ | |
|
| double fTaN, fTa1, fTa2, fTa3, fTa4, fTa5, fTa6, fTa7; | | REAL8 fTaN, fTa1, fTa2, fTa3, fTa4, fTa5, fTa6, fTa7; | |
| /* Coefficients of the corresponding P-approximant*/ | | /* Coefficients of the corresponding P-approximant*/ | |
|
| double fPaN, fPa1, fPa2, fPa3, fPa4, fPa5, fPa6, fPa7; | | REAL8 fPaN, fPa1, fPa2, fPa3, fPa4, fPa5, fPa6, fPa7; | |
| | | | |
| /* Taylor expansion coefficents in t(v)*/ | | /* Taylor expansion coefficents in t(v)*/ | |
|
| double tvaN, tva2, tva3, tva4, tva5, tva6, tva7, tvl6; | | REAL8 tvaN, tva2, tva3, tva4, tva5, tva6, tva7, tvl6; | |
| /* Taylor expansion coefficents in phi(v)*/ | | /* Taylor expansion coefficents in phi(v)*/ | |
|
| double pvaN, pva2, pva3, pva4, pva5, pva6, pva7, pvl6; | | REAL8 pvaN, pva2, pva3, pva4, pva5, pva6, pva7, pvl6; | |
| /* Taylor expansion coefficents in phi(t)*/ | | /* Taylor expansion coefficents in phi(t)*/ | |
|
| double ptaN, pta2, pta3, pta4, pta5, pta6, pta7, ptl6; | | REAL8 ptaN, pta2, pta3, pta4, pta5, pta6, pta7, ptl6; | |
| /* Taylor expansion coefficents in f(t)*/ | | /* Taylor expansion coefficents in f(t)*/ | |
|
| double ftaN, fta2, fta3, fta4, fta5, fta6, fta7, ftl6; | | REAL8 ftaN, fta2, fta3, fta4, fta5, fta6, fta7, ftl6; | |
| | | /* Taylor expansion coefficents in psi(f) in the Fourier phase*/ | |
| | | REAL8 pfaN, pfa2, pfa3, pfa4, pfa5, pfa6, pfa7, pfl5; | |
| | | /* Taylor expansion for the spinning case */ | |
| | | REAL8 ST[9], thetahat ; | |
| | | | |
|
| /* Taylor expansion coefficents in f(t)*/ | | /* sampling rate and interval*/ | |
| double samplingrate, samplinginterval; | | REAL8 samplingrate, samplinginterval; | |
| /* symmetric mass ratio, total mass, component masses*/ | | /* symmetric mass ratio, total mass, component masses*/ | |
|
| double eta, totalmass, m1, m2; | | REAL8 eta, totalmass, m1, m2; | |
| /* unknown 3PN parameters, euler constant*/ | | /* unknown 3PN parameters, euler constant*/ | |
|
| double lambda, theta, EulerC, omegaS; | | REAL8 lambda, theta, EulerC, omegaS, zeta2; | |
| | | | |
| /* initial and final values of frequency, time, velocity; lso | | /* initial and final values of frequency, time, velocity; lso | |
| values of velocity and frequency; final phase.*/ | | values of velocity and frequency; final phase.*/ | |
|
| double f0, fn, t0, tn, v0, vn, vf, vlso, flso, phiC; | | REAL8 f0, fn, t0, tn, v0, vn, vf, vlso, flso, phiC; | |
| | | | |
| /* last stable orbit and pole defined by various Taylor and P-approximan
ts*/ | | /* last stable orbit and pole defined by various Taylor and P-approximan
ts*/ | |
|
| double vlsoT0, vlsoT2, vlsoT4, vlsoT6; | | REAL8 vlsoT0, vlsoT2, vlsoT4, vlsoT6; | |
| double vlsoP0, vlsoP2, vlsoP4, vlsoP6; | | REAL8 vlsoP0, vlsoP2, vlsoP4, vlsoP6; | |
| double vpoleP4, vpoleP6; | | REAL8 vpoleP4, vpoleP6; | |
| } expnCoeffs; | | } expnCoeffs; | |
| | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{expnCoeffs} | | \idx[Type]{expnCoeffs} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALEnergyAndFluxFunctionsH"> */ | | /* <lalVerbatim file="LALEnergyAndFluxFunctionsH"> */ | |
| | | | |
|
| typedef double EnergyFunction( | | typedef REAL8 EnergyFunction( | |
| double v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
|
| typedef double FluxFunction( | | typedef REAL8 FluxFunction( | |
| double v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| typedef void (TestFunction)( | | typedef void (TestFunction)( | |
| REAL8Vector *vector1, | | REAL8Vector *vector1, | |
| REAL8Vector *vector2, | | REAL8Vector *vector2, | |
| void *params); | | void *params); | |
| | | | |
| typedef void (InspiralPhasing2)( | | typedef void (InspiralPhasing2)( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| | | | |
| skipping to change at line 507 | | skipping to change at line 669 | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalVerbatim file="LALexpnFuncH"> */ | | /* <lalVerbatim file="LALexpnFuncH"> */ | |
| typedef struct | | typedef struct | |
| tagexpnFunc | | tagexpnFunc | |
| { | | { | |
|
| EnergyFunction *dEnergy; | | EnergyFunction *dEnergy; | |
| FluxFunction *flux; | | FluxFunction *flux; | |
| InspiralTiming2 *timing2; | | InspiralTiming2 *timing2; | |
| InspiralPhasing2 *phasing2; | | InspiralPhasing2 *phasing2; | |
| InspiralPhasing3 *phasing3; | | InspiralPhasing3 *phasing3; | |
| InspiralFrequency3 *frequency3; | | InspiralFrequency3 *frequency3; | |
| } | | } expnFunc; | |
| expnFunc; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{expnFunc} | | \idx[Type]{expnFunc} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralTofVH"> */ | |
| | | typedef struct | |
| | | tagTofVIn | |
| | | { | |
| | | REAL8 t; | |
| | | REAL8 v0; | |
| | | REAL8 t0; | |
| | | REAL8 vlso; | |
| | | REAL8 totalmass; | |
| | | EnergyFunction *dEnergy; | |
| | | FluxFunction *flux; | |
| | | expnCoeffs *coeffs; | |
| | | } TofVIn; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{TofVIn} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralTofVH"> */ | |
| typedef struct | | typedef struct | |
| tagTofVIntegrandIn | | tagTofVIntegrandIn | |
| { | | { | |
|
| EnergyFunction *dEnergy; | | EnergyFunction *dEnergy; | |
| FluxFunction *flux; | | FluxFunction *flux; | |
| expnCoeffs *coeffs; | | expnCoeffs *coeffs; | |
| } | | } TofVIntegrandIn; | |
| TofVIntegrandIn; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{TofVIntegrandIn} | | \idx[Type]{TofVIntegrandIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralDerivativesH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralDerivativesIn | | tagInspiralDerivativesIn | |
| { | | { | |
|
| REAL8 totalmass; | | REAL8 totalmass; | |
| EnergyFunction *dEnergy; | | EnergyFunction *dEnergy; | |
| FluxFunction *flux; | | FluxFunction *flux; | |
| expnCoeffs *coeffs; | | expnCoeffs *coeffs; | |
| } | | } InspiralDerivativesIn; | |
| InspiralDerivativesIn; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralDerivativesIn} | | \idx[Type]{InspiralDerivativesIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralRungeKuttaH"> */ | |
| typedef struct | | typedef struct | |
| tagrk4In | | tagrk4In | |
| { | | { | |
|
| TestFunction *function; | | TestFunction *function; | |
| REAL8 x; | | REAL8 x; | |
| REAL8Vector *y; | | REAL8Vector *y; | |
| REAL8Vector *dydx; | | REAL8Vector *dydx; | |
| REAL8Vector *yt; | | REAL8Vector *yt; | |
| REAL8Vector *dym; | | REAL8Vector *dym; | |
| REAL8Vector *dyt; | | REAL8Vector *dyt; | |
| REAL8 h; | | REAL8 h; | |
| INT4 n; | | INT4 n; | |
| } | | } rk4In; | |
| rk4In; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{rk4In}} | | \index{\texttt{rk4In}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralPhaseH"> */ | |
| typedef struct | | typedef struct | |
|
| tagTofVIn | | tagInspiralPhaseIn | |
| { | | { | |
|
| REAL8 t; | | REAL8 v0; | |
| REAL8 v0; | | REAL8 phi0; | |
| REAL8 t0; | | EnergyFunction *dEnergy; | |
| REAL8 vlso; | | FluxFunction *flux; | |
| REAL8 totalmass; | | expnCoeffs *coeffs; | |
| EnergyFunction *dEnergy; | | } InspiralPhaseIn; | |
| FluxFunction *flux; | | | |
| expnCoeffs *coeffs; | | | |
| } | | | |
| TofVIn; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \idx[Type]{TofVIn} | | \idx[Type]{InspiralPhaseIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralPhaseH"> */ | |
| typedef struct | | typedef struct | |
|
| tagInspiralPhaseIn | | tagPhiofVIntegrandIn | |
| { | | { | |
|
| REAL8 v0; | | EnergyFunction *dEnergy; | |
| REAL8 phi0; | | FluxFunction *flux; | |
| EnergyFunction *dEnergy; | | expnCoeffs *coeffs; | |
| FluxFunction *flux; | | } PhiofVIntegrandIn; | |
| expnCoeffs *coeffs; | | | |
| } | | | |
| InspiralPhaseIn; | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \idx[Type]{InspiralPhaseIn} | | \idx[Type]{PhiofVIntegrandIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralInitH"> */ | |
| typedef struct | | typedef struct | |
|
| tagPhiofVIntegrandIn | | tagInspiralInit | |
| { | | { | |
|
| EnergyFunction *dEnergy; | | UINT4 nbins; | |
| FluxFunction *flux; | | expnCoeffs ak; | |
| expnCoeffs *coeffs; | | expnFunc func; | |
| } | | | |
| PhiofVIntegrandIn; | | } InspiralInit; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{PhiofVIntegrandIn} | | \idx[Type]{PhiofVIntegrandIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{LALInspiralHV}} | | \vfill{\footnotesize\input{LALInspiralHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes */ | | /* Function prototypes */ | |
| | | | |
|
| | | /* --- HERE ARE SOME USEFUL PROTOTYPE FOR LENGTH, PARAMETER CALCULATION...
--- */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralChooseModelC} | | \newpage\input{LALInspiralParameterCalcC} | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralChooseModel( | | | |
| LALStatus *status, | | | |
| expnFunc *func, | | | |
| expnCoeffs *ak, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALEtaTau02C} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALEtaTau02( | | | |
| LALStatus *status, | | | |
| REAL8 *x, | | | |
| REAL8 eta, | | | |
| void *in); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALEtaTau04C} | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALEtaTau04( | | void LALInspiralParameterCalc ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *x, | | InspiralTemplate *params); | |
| REAL8 eta, | | | |
| void *in); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralDerivativesC} | | \newpage\input{LALInspiralAmplitudeC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralDerivatives ( | | void LALInspiralRestrictedAmplitude( | |
| REAL8Vector *vec1, | | LALStatus *status, | |
| REAL8Vector *vec2, | | InspiralTemplate *params); | |
| void *params); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralParameterCalcC} | | \newpage\input{LALInspiralWaveLengthC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralParameterCalc ( | | void LALInspiralWaveLength ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplate *params); | | UINT4 *n, | |
| | | InspiralTemplate params); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralPhasing1C} | | \newpage\input{LALInspiralChooseModelC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralPhasing1 ( | | void LALInspiralChooseModel( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | expnFunc *func, | |
| REAL8 v, | | expnCoeffs *ak, | |
| void *params); | | InspiralTemplate *params); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralSetupC} | | \newpage\input{LALInspiralSetupC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralSetup ( | | void LALInspiralSetup ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| expnCoeffs *ak, | | expnCoeffs *ak, | |
| InspiralTemplate *params); | | InspiralTemplate *params); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralVelocityC} | | \newpage\input{LALInspiralInitC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | void | |
| | | LALInspiralInit( | |
| | | LALStatus *status, | |
| | | InspiralTemplate *params, | |
| | | InspiralInit *paramsInit); | |
| | | | |
|
| void LALInspiralVelocity ( | | /* --- HERE ARE THE WAVEFORMS/MODELS PROTOTYPES --- */ | |
| LALStatus *status, | | | |
| REAL8 *v, | | | |
| TofVIn *params); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralWaveC} | | \newpage\input{LALInspiralWaveC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralWave( | | void LALInspiralWave( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *signal, | | REAL4Vector *signalvec, | |
| InspiralTemplate *params); | | InspiralTemplate *params); | |
| | | | |
| | | void LALInspiralWaveTemplates( | |
| | | LALStatus *status, | |
| | | REAL4Vector *filter1, | |
| | | REAL4Vector *filter2, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | void | |
| | | LALInspiralWaveForInjection( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWaveLengthC} | | \newpage\input{LALInspiralWave1C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWaveLength ( | | void LALInspiralWave1( | |
| LALStatus *status, | | LALStatus *status, | |
| UINT4 *n, | | REAL4Vector *signalvec, | |
| InspiralTemplate params); | | InspiralTemplate *params); | |
| | | | |
| | | void LALInspiralWave1Templates( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec1, | |
| | | REAL4Vector *signalvec2, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | void LALInspiralWave1ForInjection( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWaveTemplatesC} | | \newpage\input{LALInspiralWave2C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWaveTemplates( | | void LALInspiralWave2( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *filter1, | | REAL4Vector *signalvec, | |
| REAL4Vector *filter2, | | InspiralTemplate *params); | |
| InspiralTemplate *params); | | | |
| | | void LALInspiralWave2Templates ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec1, | |
| | | REAL4Vector *signalvec2, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | void LALInspiralWave2ForInjection( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralPhiofVIntegrandC} | | \newpage\input{LALInspiralWave3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralPhiofVIntegrand ( | | void LALInspiralWave3 ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *, | | REAL4Vector *signalvec, | |
| REAL8, | | InspiralTemplate *params); | |
| void *); | | | |
| | | | |
|
| /* <lalLaTeX> | | void LALInspiralWave3Templates ( | |
| \newpage\input{LALInspiralWave1C} | | LALStatus *status, | |
| </lalLaTeX> */ | | REAL4Vector *signalvec1, | |
| | | REAL4Vector *signalvec2, | |
| | | InspiralTemplate *params); | |
| | | | |
|
| void LALInspiralWave1( | | void LALInspiralWave3ForInjection( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *signal, | | CoherentGW *waveform, | |
| InspiralTemplate *params); | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWave1TemplatesC} | | \newpage\input{LALInspiralStationaryPhaseApprox1C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | void LALInspiralStationaryPhaseApprox1 ( | |
| void LALInspiralWave1Templates( | | LALStatus *status, | |
| LALStatus *status, | | REAL4Vector *signalvec, | |
| REAL4Vector *signal1, | | InspiralTemplate *params); | |
| REAL4Vector *signal2, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralTofVC} | | \newpage\input{LALInspiralStationaryPhaseApprox2C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | void LALInspiralStationaryPhaseApprox2 ( | |
| void LALInspiralTofV ( | | LALStatus *status, | |
| LALStatus *, | | REAL4Vector *signalvec, | |
| REAL8 *, | | InspiralTemplate *params); | |
| REAL8, | | | |
| void *); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralTofVIntegrandC} | | \newpage\input{LALEOBWaveformC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralTofVIntegrand ( | | void LALEOBWaveform( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *, | | REAL4Vector *signalvec, | |
| REAL8, | | InspiralTemplate *params); | |
| void *); | | | |
| | | | |
| void LALPrintTimeseries( | | | |
| int n, | | | |
| double *signal, | | | |
| double dt, | | | |
| double t0); | | | |
| | | | |
|
| /* <lalLaTeX> | | void LALEOBWaveformTemplates( | |
| \newpage\input{LALRungeKutta4C} | | LALStatus *status, | |
| </lalLaTeX> */ | | REAL4Vector *signalvec1, | |
| | | REAL4Vector *signalvec2, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | void LALEOBWaveformForInjection( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALBCVWaveformC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void LALBCVWaveform( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | void LALBCVSpinWaveform( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec, | |
| | | InspiralTemplate *params); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralSpinningBHBinaryC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void LALInspiralSpinModulatedWave( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec, | |
| | | InspiralTemplate *in); | |
| | | | |
| | | void LALInspiralSpinModulatedWaveForInjection( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALSTPNWaveformC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALSTPNWaveformForInjection ( | |
| | | LALStatus *status, | |
| | | CoherentGW *waveform, | |
| | | InspiralTemplate *params, | |
| | | PPNParamStruc *ppnParams); | |
| | | void | |
| | | LALSTPNWaveformEngine ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signal1, | |
| | | REAL4Vector *signal2, | |
| | | REAL4Vector *a, | |
| | | REAL4Vector *ff, | |
| | | REAL8Vector *phi, | |
| | | REAL4Vector *shift, | |
| | | UINT4 *countback, | |
| | | InspiralTemplate *params, | |
| | | InspiralInit *paramsInit | |
| | | ); | |
| | | void | |
| | | LALSTPNWaveformTemplates ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signal1, | |
| | | REAL4Vector *signal2, | |
| | | InspiralTemplate *params | |
| | | ) ; | |
| | | | |
| | | void LALSTPNWaveform( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec, | |
| | | InspiralTemplate *params); | |
| | | | |
|
| void LALRungeKutta4( | | /* --- OTHER PROTOTYPES --- */ | |
| LALStatus *, | | | |
| REAL8Vector *, | | | |
| rk4In *, | | | |
| void *); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWave2C} | | \newpage\input{LALEtaTau02C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWave2( | | void LALEtaTau02( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *signal, | | REAL8 *x, | |
| InspiralTemplate *params); | | REAL8 eta, | |
| | | void *in); | |
| | | | |
|
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralWave2TemplatesC} | | \newpage\input{LALEtaTau04C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWave2Templates ( | | void LALEtaTau04( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *signal1, | | REAL8 *x, | |
| REAL4Vector *signal2, | | REAL8 eta, | |
| InspiralTemplate *params); | | void *in); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralTiming2C} | | \newpage\input{LALInspiralDerivativesC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralTiming2_0PN ( | | void LALInspiralDerivatives ( | |
| LALStatus *, | | REAL8Vector *vec1, | |
| REAL8 *toff, | | REAL8Vector *vec2, | |
| REAL8 f, | | void *params); | |
| void *params); | | | |
| | | | |
| void LALInspiralTiming2_1PN ( | | | |
| LALStatus *, | | | |
| REAL8 *toff, | | | |
| REAL8 f, | | | |
| void *params); | | | |
| | | | |
|
| void LALInspiralTiming2_2PN ( | | /* <lalLaTeX> | |
| LALStatus *, | | \newpage\input{LALInspiralVelocityC} | |
| REAL8 *toff, | | </lalLaTeX> */ | |
| REAL8 f, | | | |
| void *params); | | | |
| | | | |
|
| void LALInspiralTiming2_3PN ( | | void LALInspiralVelocity ( | |
| LALStatus *, | | LALStatus *status, | |
| REAL8 *toff, | | REAL8 *v, | |
| REAL8 f, | | TofVIn *params); | |
| void *params); | | | |
| | | | |
|
| void LALInspiralTiming2_4PN ( | | /* <lalLaTeX> | |
| LALStatus *, | | \newpage\input{LALInspiralPhasing1C} | |
| REAL8 *toff, | | </lalLaTeX> */ | |
| REAL8 f, | | | |
| void *params); | | | |
| | | | |
|
| void LALInspiralTiming2_5PN ( | | void LALInspiralPhasing1 ( | |
| LALStatus *, | | LALStatus *status, | |
| REAL8 *toff, | | REAL8 *phase, | |
| REAL8 f, | | REAL8 v, | |
| void *params); | | void *params); | |
| | | | |
|
| void LALInspiralTiming2_6PN ( | | /* <lalLaTeX> | |
| LALStatus *, | | \newpage\input{LALInspiralPhiofVIntegrandC} | |
| REAL8 *toff, | | </lalLaTeX> */ | |
| REAL8 f, | | | |
| void *params); | | | |
| | | | |
|
| void LALInspiralTiming2_7PN ( | | void LALInspiralPhiofVIntegrand ( | |
| LALStatus *, | | LALStatus *status, | |
| REAL8 *toff, | | REAL8 *, | |
| REAL8 f, | | REAL8, | |
| void *params); | | void *); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralPhasing3C} | | \newpage\input{LALInspiralPhasing2C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralPhasing2_0PN ( | | void LALInspiralPhasing2_0PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_1PN ( | | void LALInspiralPhasing2_1PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_2PN ( | | void LALInspiralPhasing2_2PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_3PN ( | | void LALInspiralPhasing2_3PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_4PN ( | | void LALInspiralPhasing2_4PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_5PN ( | | void LALInspiralPhasing2_5PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_6PN ( | | void LALInspiralPhasing2_6PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing2_7PN ( | | void LALInspiralPhasing2_7PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 v, | | REAL8 v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWave3C} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralWave3 ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWave3TemplatesC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralWave3Templates ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal1, | | | |
| REAL4Vector *signal2, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralFrequency3C} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralFrequency3_0PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_1PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_2PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_3PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_4PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_5PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_6PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralFrequency3_7PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *frequency, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralPhasing3C} | | \newpage\input{LALInspiralPhasing3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralPhasing3_0PN ( | | void LALInspiralPhasing3_0PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_1PN ( | | void LALInspiralPhasing3_1PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_2PN ( | | void LALInspiralPhasing3_2PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_3PN ( | | void LALInspiralPhasing3_3PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_4PN ( | | void LALInspiralPhasing3_4PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_5PN ( | | void LALInspiralPhasing3_5PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_6PN ( | | void LALInspiralPhasing3_6PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralPhasing3_7PN ( | | void LALInspiralPhasing3_7PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *phase, | | REAL8 *phase, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALRungeKutta4( | | | |
| LALStatus *, | | | |
| REAL8Vector *, | | | |
| rk4In *, | | | |
| void *); | | | |
| | | | |
| void LALUSPA ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| void LALEOBWaveform( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| void LALEOBWaveformTemplates( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal1, | | | |
| REAL4Vector *signal2, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| void LALHCapDerivatives( | | | |
| REAL8Vector *values, | | | |
| REAL8Vector *dvalues, | | | |
| void *funcParams); | | | |
| | | | |
| void LALprInit( | | | |
| REAL8 *pr, | | | |
| REAL8 r, | | | |
| InspiralDerivativesIn *ak); | | | |
| | | | |
| void LALpphiInit( | | | |
| REAL8 *phase, | | | |
| REAL8 r, | | | |
| REAL8 eta); | | | |
| | | | |
| void LALlightRingRadius( | | | |
| LALStatus *status, | | | |
| REAL8 *x, | | | |
| REAL8 r, | | | |
| void *params); | | | |
| | | | |
| void LALrOfOmega( | | | |
| LALStatus *status, | | | |
| REAL8 *x, | | | |
| REAL8 r, | | | |
| void *params); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWave2C} | | \newpage\input{LALInspiralTofVC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWave2( | | void LALInspiralTofV ( | |
| LALStatus *status, | | LALStatus *, | |
| REAL4Vector *signal, | | REAL8 *, | |
| InspiralTemplate *params); | | REAL8, | |
| | | void *); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralWave2TemplatesC} | | \newpage\input{LALInspiralTofVIntegrandC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralWave2Templates ( | | void LALInspiralTofVIntegrand ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *signal1, | | REAL8 *, | |
| REAL4Vector *signal2, | | REAL8, | |
| InspiralTemplate *params); | | void *); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralTiming2C} | | \newpage\input{LALInspiralTiming2C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralTiming2_0PN ( | | void LALInspiralTiming2_0PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_1PN ( | | void LALInspiralTiming2_1PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_2PN ( | | void LALInspiralTiming2_2PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_3PN ( | | void LALInspiralTiming2_3PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_4PN ( | | void LALInspiralTiming2_4PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_5PN ( | | void LALInspiralTiming2_5PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_6PN ( | | void LALInspiralTiming2_6PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| void LALInspiralTiming2_7PN ( | | void LALInspiralTiming2_7PN ( | |
|
| LALStatus *, | | LALStatus *, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralPhasing3C} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralPhasing2_0PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_1PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_2PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_3PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_4PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_5PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_6PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| void LALInspiralPhasing2_7PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 v, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWave3C} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralWave3 ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWave3TemplatesC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void LALInspiralWave3Templates ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *signal1, | | | |
| REAL4Vector *signal2, | | | |
| InspiralTemplate *params); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralFrequency3C} | | \newpage\input{LALInspiralFrequency3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALInspiralFrequency3_0PN ( | | void LALInspiralFrequency3_0PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_1PN ( | | void LALInspiralFrequency3_1PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_2PN ( | | void LALInspiralFrequency3_2PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_3PN ( | | void LALInspiralFrequency3_3PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_4PN ( | | void LALInspiralFrequency3_4PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_5PN ( | | void LALInspiralFrequency3_5PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_6PN ( | | void LALInspiralFrequency3_6PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| void LALInspiralFrequency3_7PN ( | | void LALInspiralFrequency3_7PN ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *frequency, | | REAL8 *frequency, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralPhasing3C} | | \newpage\input{LALRungeKutta4C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALInspiralPhasing3_0PN ( | | void LALRungeKutta4( | |
| LALStatus *status, | | LALStatus *, | |
| REAL8 *phase, | | REAL8Vector *, | |
| REAL8 td, | | rk4In *, | |
| expnCoeffs *ak); | | void *); | |
| | | | |
| void LALInspiralPhasing3_1PN ( | | | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
|
| void LALInspiralPhasing3_2PN ( | | /* --- PARSING PROTOTYPE FOR INSPIRALTEMPLATE STRCUTURE --- */ | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
|
| void LALInspiralPhasing3_3PN ( | | /* <lalLaTeX> | |
| LALStatus *status, | | \newpage\input{LALInspiralParseParametersC} | |
| REAL8 *phase, | | </lalLaTeX> */ | |
| REAL8 td, | | void | |
| expnCoeffs *ak); | | LALInspiralITStructureParseParameters( | |
| | | LALStatus *status, | |
| | | UINT4 argc, | |
| | | CHAR **argv, | |
| | | InspiralTemplate *params); | |
| | | | |
|
| void LALInspiralPhasing3_4PN ( | | void | |
| LALStatus *status, | | LALInspiralITStructureSetDefault( | |
| REAL8 *phase, | | LALStatus *status, | |
| REAL8 td, | | InspiralTemplate *params); | |
| expnCoeffs *ak); | | | |
| | | | |
|
| void LALInspiralPhasing3_5PN ( | | void | |
| LALStatus *status, | | LALInspiralITStructurePrint( | |
| REAL8 *phase, | | LALStatus *status, | |
| REAL8 td, | | InspiralTemplate params); | |
| expnCoeffs *ak); | | | |
| | | | |
|
| void LALInspiralPhasing3_6PN ( | | void | |
| LALStatus *, | | LALInspiralITStructureHelp(void); | |
| REAL8 *phase, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
|
| void LALInspiralPhasing3_7PN ( | | /* --- TEST PROTOTYPES --- */ | |
| LALStatus *status, | | | |
| REAL8 *phase, | | | |
| REAL8 td, | | | |
| expnCoeffs *ak); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralTestC} | | \newpage\input{LALInspiralTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{GenerateInspiralWaveformC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALSTPNWaveformTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralSpinningBHBinariesTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _LALINSPIRAL_H */ | | #endif /* _LALINSPIRAL_H */ | |
| | | | |
End of changes. 174 change blocks. |
| 822 lines changed or deleted | | 908 lines changed or added | |
|
| LALInspiralBank.h | | LALInspiralBank.h | |
| /* <lalVerbatim file="LALInspiralBankHV"> | | /* <lalVerbatim file="LALInspiralBankHV"> | |
| | | | |
| Author: Churches, D.K. and Sathyaprakash, B.S. | | Author: Churches, D.K. and Sathyaprakash, B.S. | |
|
| $Id: LALInspiralBank.h,v 1.13 2002/06/05 11:11:27 dchurches Exp $ | | $Id: LALInspiralBank.h,v 1.42 2005/10/26 08:44:37 thomas Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALInspiralBank.h}} | | \section{Header \texttt{LALInspiralBank.h}} | |
| \label{s:LALInspiralBank.h} | | \label{s:LALInspiralBank.h} | |
| | | | |
| Header file for the template placement codes. | | Header file for the template placement codes. | |
| | | | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| #define _LALINSPIRALBANK_H | | #define _LALINSPIRALBANK_H | |
| | | | |
| #include <math.h> | | #include <math.h> | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
| #include <lal/LALInspiral.h> | | #include <lal/LALInspiral.h> | |
| #include <lal/RealFFT.h> | | #include <lal/RealFFT.h> | |
| #include <lal/LALNoiseModels.h> | | #include <lal/LALNoiseModels.h> | |
|
| | | #include <lal/LIGOMetadataTables.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( LALINSPIRALBANKH, "$Id: LALInspiralBank.h,v 1.13 2002/06/05 11:11:2
7 dchurches Exp $" ); | | NRCSID(LALINSPIRALBANKH, "$Id: LALInspiralBank.h,v 1.42 2005/10/26 08:44:37
thomas Exp $" ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
|
| | | #define LALINSPIRALBANKH_ENULL 1 | |
| #define LALINSPIRALBANKH_ENULL 1 | | #define LALINSPIRALBANKH_EMEM 2 | |
| #define LALINSPIRALBANKH_EMEM 2 | | #define LALINSPIRALBANKH_ECHOICE 3 | |
| #define LALINSPIRALBANKH_ECHOICE 3 | | #define LALINSPIRALBANKH_EDIV0 4 | |
| #define LALINSPIRALBANKH_EDIV0 4 | | #define LALINSPIRALBANKH_ESIZE 8 | |
| #define LALINSPIRALBANKH_ESIZE 8 | | #define LALINSPIRALBANKH_EFRANGE 16 | |
| #define LALINSPIRALBANKH_MSGENULL "Arguments contained an unexpected null p | | #define LALINSPIRALBANKH_EORDER 32 | |
| ointer" | | #define LALINSPIRALBANKH_EGRIDSPACING 64 | |
| #define LALINSPIRALBANKH_MSGEMEM "Memory allocation failure" | | #define LALINSPIRALBANKH_MSGENULL "Null pointer" | |
| | | #define LALINSPIRALBANKH_MSGEMEM "Memory allocation failure" | |
| #define LALINSPIRALBANKH_MSGECHOICE "Invalid choice for an input parameter" | | #define LALINSPIRALBANKH_MSGECHOICE "Invalid choice for an input parameter" | |
|
| #define LALINSPIRALBANKH_MSGEDIV0 "Division by zero" | | #define LALINSPIRALBANKH_MSGEDIV0 "Division by zero" | |
| #define LALINSPIRALBANKH_MSGESIZE "Invalid input range" | | #define LALINSPIRALBANKH_MSGESIZE "Invalid input range" | |
| | | #define LALINSPIRALBANKH_MSGEFRANGE "Limits outside range of frequency seri | |
| | | es" | |
| | | #define LALINSPIRALBANKH_MSGEORDER "Inappropriate PN order" | |
| | | #define LALINSPIRALBANKH_MSGEGRIDSPACING "if SPA template requested, grid s | |
| | | pacing parameter is either SquareNotOriented or Hexagonal. If BCV, it shoul | |
| | | d be Hexagonal or SquareNotOriented although Square and HexagonalNotOriente | |
| | | d can be used." | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Enums} | | \subsection*{Enums} | |
| | | | |
| \begin{enumerate} | | \begin{enumerate} | |
| \item \texttt{CoordinateSpace:} | | \item \texttt{CoordinateSpace:} | |
| \input{LALCoordinateSpaceH} | | \input{LALCoordinateSpaceH} | |
|
| | | Choose templates either in the $(\tau_0,\tau_2)$ or $(\tau_0,\tau_3)$ | |
| | | space. This is one of the members of the InspiralCoarseBankIn structure. | |
| | | | |
| This enum allows users to choose template bank either in the $(\tau_0, \tau
_2)$ | | This enum allows users to choose template bank either in the $(\tau_0, \tau
_2)$ | |
| space of chirptimes (the choice made by \texttt{Tau0Tau2}) or in the | | space of chirptimes (the choice made by \texttt{Tau0Tau2}) or in the | |
| $(\tau_0, \tau_3)$ space of chirptimes (the choice made by \texttt{Tau0Tau3
}). | | $(\tau_0, \tau_3)$ space of chirptimes (the choice made by \texttt{Tau0Tau3
}). | |
|
| This was implemented in releases before May 25. On May 25 we migrated to a | | This was implemented in releases before May 25, 2002. On May 25 we migrated
to a | |
| new, slightly faster, computation of the metric in which, at present, only
the | | new, slightly faster, computation of the metric in which, at present, only
the | |
|
| choice \texttt{Tau0Tau3} can be made. | | choice \texttt{Tau0Tau3} can be made. Since October 2003 a new choice {\tt | |
| | | Psi0Psi3} | |
| Choose templates either in the $(\tau_0,\tau_2)$ or $(\tau_0,\tau_3)$ | | was added to handle BCV templates. | |
| space. This is one of the members of the InspiralCoarseBankIn structure. | | | |
| | | | |
| \item\texttt{InspiralBankMassRange:} | | \item\texttt{InspiralBankMassRange:} | |
| | | | |
| \input{LALInspiralBankMassRangeH} | | \input{LALInspiralBankMassRangeH} | |
| | | | |
| An enum that appears in the \texttt{InspiralCoarseBankIn} structure | | An enum that appears in the \texttt{InspiralCoarseBankIn} structure | |
| which fixes the way templates are chosen: The choice | | which fixes the way templates are chosen: The choice | |
| \texttt{MinComponentMassMaxTotalMass} means the minimum of the | | \texttt{MinComponentMassMaxTotalMass} means the minimum of the | |
| component masses will be given by \texttt{mMin} and maximum total | | component masses will be given by \texttt{mMin} and maximum total | |
| mass is given by \texttt{MMax} of the \texttt{InspiralBankCoarseIn} structu
re. | | mass is given by \texttt{MMax} of the \texttt{InspiralBankCoarseIn} structu
re. | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 110 | |
| | | | |
| \subsection*{Structures} | | \subsection*{Structures} | |
| \begin {enumerate} | | \begin {enumerate} | |
| \item \texttt{InspiralMetric} | | \item \texttt{InspiralMetric} | |
| Structure to store metric at various points the signal manifold. | | Structure to store metric at various points the signal manifold. | |
| \input{LALInspiralMetricH} | | \input{LALInspiralMetricH} | |
| We store the diagonalized metric together with the angle theta | | We store the diagonalized metric together with the angle theta | |
| between the $\tau_0$-axis and the semi-major axis of the ambiguity ellipse. | | between the $\tau_0$-axis and the semi-major axis of the ambiguity ellipse. | |
| The members of this structure are: | | The members of this structure are: | |
| \begin{itemize} | | \begin{itemize} | |
|
| | | \item \texttt{G00}: 00-component of the metric in $(\tau_0,\tau_{2(3)})$ co | |
| | | ordinates. | |
| | | \item \texttt{G11}: 11-component of the metric in $(\tau_0,\tau_{2(3)})$ co | |
| | | ordinates. | |
| | | \item \texttt{G01}: 01-component of the metric in $(\tau_0,\tau_{2(3)})$ co | |
| | | ordinates. | |
| \item \texttt{g00}: 00-component of the diagonalised metric. | | \item \texttt{g00}: 00-component of the diagonalised metric. | |
| \item \texttt{g11}: 11-component of the diagonalised metric. | | \item \texttt{g11}: 11-component of the diagonalised metric. | |
| \item \texttt{theta}: Angle from tau0 to semi-major axis of the ellipse. | | \item \texttt{theta}: Angle from tau0 to semi-major axis of the ellipse. | |
| \item \texttt{space}: The enum describing the coordinate space in which | | \item \texttt{space}: The enum describing the coordinate space in which | |
| the metric is computed. | | the metric is computed. | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item \texttt{InspiralCoarseBankIn:} | | \item \texttt{InspiralCoarseBankIn:} | |
| Input for choosing a template bank. This is the structure that must | | Input for choosing a template bank. This is the structure that must | |
|
| be filled by a routine calling the code \texttt{InspiralCreateCoarse | | be filled by a routine calling the code \texttt{InspiralCreateCoarse | |
| Bank} | | Bank} or \texttt{InspiralCreateBCVBank}. | |
| | | Unless BCV template bank is needed (that is, \texttt{InspiralCreateBCVBank} | |
| | | ) then one can ignore the | |
| | | parameters \texttt{psi0Min, psi0Max, psi3Min, psi3Max, alpha, numFcutTempla | |
| | | tes.} | |
| | | | |
| \input{LALInspiralCoarseBankH} | | \input{LALInspiralCoarseBankH} | |
| | | | |
| \begin{itemize} | | \begin{itemize} | |
| \item \texttt{massRange}: enum that determines whether templates should b
e | | \item \texttt{massRange}: enum that determines whether templates should b
e | |
| chosen using fixed ranges for component masses or | | chosen using fixed ranges for component masses or | |
| to use minimum component mass and maximum totalmass. | | to use minimum component mass and maximum totalmass. | |
| \item \texttt{space}: enum that decides whether to use $(\tau_0,\tau_2)$ | | \item \texttt{space}: enum that decides whether to use $(\tau_0,\tau_2)$ | |
| or $(\tau_0,\tau_3)$ in constructing the template bank | | or $(\tau_0,\tau_3)$ in constructing the template bank | |
|
| | | \item \texttt{alpha}: the BCV amplitude correction parameter | |
| | | \item \texttt{psi0Min}: minimum value of the parameter $\psi_0$ | |
| | | \item \texttt{psi0Max}: maximum value of the parameter $\psi_0$ | |
| | | \item \texttt{psi3Min}: minimum value of the parameter $\psi_3$ | |
| | | \item \texttt{psi3Max}: maximum value of the parameter $\psi_3$ | |
| \item \texttt{mMin}: minimum mass of components to search for | | \item \texttt{mMin}: minimum mass of components to search for | |
| \item \texttt{mMax}: maximum mass of components to search for | | \item \texttt{mMax}: maximum mass of components to search for | |
| \item \texttt{MMax}: alternatively, maximum total mass of binary to searc
h for | | \item \texttt{MMax}: alternatively, maximum total mass of binary to searc
h for | |
| \item \texttt{mmCoarse}: Coarse grid minimal match | | \item \texttt{mmCoarse}: Coarse grid minimal match | |
| \item \texttt{mmFine}: Fine grid minimal match | | \item \texttt{mmFine}: Fine grid minimal match | |
| \item \texttt{fLower}: Lower frequency cutoff | | \item \texttt{fLower}: Lower frequency cutoff | |
| \item \texttt{fUpper}: Upper frequency cutoff | | \item \texttt{fUpper}: Upper frequency cutoff | |
| \item \texttt{tSampling}: Sampling rate | | \item \texttt{tSampling}: Sampling rate | |
| \item \texttt{etamin}: minimum value of eta in our search | | \item \texttt{etamin}: minimum value of eta in our search | |
| \item \texttt{shf}: Frequency series containing the PSD | | \item \texttt{shf}: Frequency series containing the PSD | |
| \item \texttt{iflso}: (currently not implemented) flso will be used as an | | \item \texttt{iflso}: (currently not implemented) flso will be used as an | |
|
| upper limit in moments integrals if iflso!=0; else fUpper will be used | | \item \texttt{numFcutTemplates}: number of templates in the {\tt fcut} dire
ction | |
| | | | |
| The next two members are used in setting up the InspiralTemplate | | The next two members are used in setting up the InspiralTemplate | |
| parameter structure but not in creating the template bank. | | parameter structure but not in creating the template bank. | |
| | | | |
| \item \texttt{order}: Post-Newtonian order of the waveform | | \item \texttt{order}: Post-Newtonian order of the waveform | |
| \item \texttt{approximant}: Approximant of the waveform | | \item \texttt{approximant}: Approximant of the waveform | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item \texttt{InspiralFineBankIn} | | \item \texttt{InspiralFineBankIn} | |
| Structre needed by the function \texttt{LALInspiralCreateFineBank}. | | Structre needed by the function \texttt{LALInspiralCreateFineBank}. | |
| | | | |
| skipping to change at line 198 | | skipping to change at line 215 | |
| \item \texttt{x1Min}: minimum value of the second coordinate as | | \item \texttt{x1Min}: minimum value of the second coordinate as | |
| defined by the search region | | defined by the search region | |
| \item \texttt{x1Max}: maximum value of the second coordinate as | | \item \texttt{x1Max}: maximum value of the second coordinate as | |
| defined by the search region | | defined by the search region | |
| \item \texttt{*metric}: pointer to the metric at the current location. | | \item \texttt{*metric}: pointer to the metric at the current location. | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item \texttt{InspiralMomentsIn} | | \item \texttt{InspiralMomentsIn} | |
| Inputs to the function that computes the moments of the PSD. | | Inputs to the function that computes the moments of the PSD. | |
| The moment is defined as: | | The moment is defined as: | |
|
| $$\int_{x_{\rm min}}^{x_{\rm max}} | | $$I(p) \equiv \int_{x_{\rm min}}^{x_{\rm max}} | |
| \frac{x^{-{p}/3}}{S_h(x)} dx,$$ | | \frac{x^{-p}}{S_h(x)} dx,$$ | |
| where $x=f/f_0$ is a scaled frequency, $f_0$ | | where $x=f/f_0$ is a scaled frequency, $f_0$ | |
| being a fiducial frequency, taken in these routines | | being a fiducial frequency, taken in these routines | |
| as the user supplied lower cutoff of the detector | | as the user supplied lower cutoff of the detector | |
| response. | | response. | |
| \input{LALInspiralMomentsInH} | | \input{LALInspiralMomentsInH} | |
| \begin{itemize} | | \begin{itemize} | |
| \item \texttt{xmin}: lower limit of the integral $x_{\rm min}$ | | \item \texttt{xmin}: lower limit of the integral $x_{\rm min}$ | |
| \item \texttt{xmax}: upper limit of the integral $x_{\rm max}$ | | \item \texttt{xmax}: upper limit of the integral $x_{\rm max}$ | |
|
| \item \texttt{ndx}: index $p/3$ (without the negative sign) in the moment i | | \item \texttt{ndx}: index $p$ (without the negative sign) in the moment int | |
| ntegral as above | | egral as above | |
| (please note that \texttt{ndx} is $\mathbf p/3$ and {\it not} just $p.$) | | \item \texttt{norm}: norm to be used in computing the moment, the returned | |
| \item \texttt{norm}: norm to be used in computing, the returned value is | | value is | |
| the above integral divided by the norm. | | the above integral divided by the norm. | |
| \item \texttt{*shf}: the frequency series containing the noise psd. | | \item \texttt{*shf}: the frequency series containing the noise psd. | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item \texttt{InspiralMomentsEtc} | | \item \texttt{InspiralMomentsEtc} | |
| Parameter structure that holds the moments of the PSD and other useful | | Parameter structure that holds the moments of the PSD and other useful | |
| constants required in the computation of the metric. | | constants required in the computation of the metric. | |
| \input{LALInspiralMomentsEtcH} | | \input{LALInspiralMomentsEtcH} | |
| \begin{itemize} | | \begin{itemize} | |
| \item {a01, a21, \ldots:} Coefficients in the expansion of the phase | | \item {a01, a21, \ldots:} Coefficients in the expansion of the phase | |
| | | | |
| skipping to change at line 240 | | skipping to change at line 256 | |
| 18 to use an array that has an index 18. To ease the notation we have | | 18 to use an array that has an index 18. To ease the notation we have | |
| therefore defined an oversized (by one element) array. | | therefore defined an oversized (by one element) array. | |
| \end{itemize} | | \end{itemize} | |
| | | | |
| \item {\texttt{RectangleIn} and \texttt{RectangleOut}:} | | \item {\texttt{RectangleIn} and \texttt{RectangleOut}:} | |
| Input and ouput structures to function LALRectangleVertices. | | Input and ouput structures to function LALRectangleVertices. | |
| \input{LALRectangleInH} | | \input{LALRectangleInH} | |
| \input{LALRectangleOutH} | | \input{LALRectangleOutH} | |
| | | | |
| \end{enumerate} | | \end{enumerate} | |
|
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALCoordinateSpaceH"> */ | | /* <lalVerbatim file="LALCoordinateSpaceH"> */ | |
| typedef enum | | typedef enum | |
| { | | { | |
|
| Tau0Tau2, Tau0Tau3 | | Tau0Tau2, | |
| | | Tau0Tau3, | |
| | | Psi0Psi3 | |
| } | | } | |
| CoordinateSpace; | | CoordinateSpace; | |
|
| | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{CoordinateSpace} | | \idx[Type]{CoordinateSpace} | |
|
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankMassRangeH"> */ | | /* <lalVerbatim file="LALGridSpacingH"> */ | |
| typedef enum | | typedef enum | |
| { | | { | |
|
| MinComponentMassMaxTotalMass, | | SquareNotOriented, | |
| MinMaxComponentMass | | Square, | |
| | | HexagonalNotOriented, | |
| | | Hexagonal | |
| } | | } | |
|
| InspiralBankMassRange; | | GridSpacing; | |
| | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | /* <lalLaTeX> | |
| | | \idx[Type]{GridSpacing} | |
| | | </lalLaTeX> */ | |
| | | | |
|
| | | typedef enum | |
| | | { | |
| | | In, Above, Below, Out | |
| | | } | |
| | | Position; | |
| | | | |
| | | typedef enum | |
| | | { | |
| | | Sterile, Fertile | |
| | | } | |
| | | Generation; | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralBankMassRangeH"> */ | |
| | | typedef enum | |
| | | { | |
| | | MinComponentMassMaxTotalMass, | |
| | | MinMaxComponentMass | |
| | | } | |
| | | InspiralBankMassRange; | |
| | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralBankMassRange} | | \idx[Type]{InspiralBankMassRange} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralMetricH"> */ | | /* <lalVerbatim file="LALInspiralMetricH"> */ | |
| | | | |
| typedef struct | | typedef struct | |
| tagInspiralMetric | | tagInspiralMetric | |
| { | | { | |
|
| REAL8 g00; | | REAL8 G00; | |
| REAL8 g11; | | REAL8 G11; | |
| REAL8 theta; | | REAL8 G01; | |
| CoordinateSpace space; | | | |
| | | REAL8 g00; | |
| | | REAL8 g11; | |
| | | REAL8 theta; | |
| | | | |
| | | CoordinateSpace space; | |
| } | | } | |
| InspiralMetric; | | InspiralMetric; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralMetric} | | \idx[Type]{InspiralMetric} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralTemplateListH"> */ | | /* <lalVerbatim file="LALInspiralTemplateListH"> */ | |
| | | | |
| typedef struct | | typedef struct | |
| tagInspiralTemplateList | | tagInspiralTemplateList | |
| { | | { | |
|
| INT4 ID; | | INT4 ID; | |
| InspiralTemplate params; | | InspiralTemplate params; | |
| InspiralMetric metric; | | InspiralMetric metric; | |
| struct tagInspiralTemplateList *next; | | UINT4 nLayer; | |
| | | struct tagInspiralTemplateList *next; | |
| } | | } | |
| InspiralTemplateList; | | InspiralTemplateList; | |
|
| /* </lalVerbatim> */ | | | |
| | | | |
|
| | | typedef struct | |
| | | tagHexaGridParam | |
| | | { | |
| | | REAL4 x0Min; | |
| | | REAL4 x1Min; | |
| | | REAL4 x0Max; | |
| | | REAL4 x1Max; | |
| | | REAL4 mm; | |
| | | REAL4 mMin; | |
| | | REAL4 mMax; | |
| | | REAL4 etaMin; | |
| | | REAL4 space; | |
| | | } | |
| | | HexaGridParam; | |
| | | | |
| | | typedef struct | |
| | | tagCellEvolution | |
| | | { | |
| | | INT4 nTemplateMax; | |
| | | INT4 nTemplate; | |
| | | INT4 fertile; | |
| | | } | |
| | | CellEvolution; | |
| | | | |
| | | typedef struct | |
| | | tagCellList | |
| | | { | |
| | | INT4 id; | |
| | | struct tagCellList *next; | |
| | | } | |
| | | CellList; | |
| | | | |
| | | typedef struct | |
| | | tagInspiralCell | |
| | | { | |
| | | | |
| | | INT4 ID; | |
| | | INT4 in; | |
| | | INT4 child[6]; | |
| | | REAL4 t0; | |
| | | REAL4 t3; | |
| | | REAL4 dx0; | |
| | | REAL4 dx1; | |
| | | Generation status; | |
| | | Position position; | |
| | | Position RectPosition[5]; | |
| | | InspiralMetric metric; | |
| | | | |
| | | } | |
| | | InspiralCell; | |
| | | | |
| | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralTemplateList} | | \idx[Type]{InspiralTemplateList} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALInspiralParamsH"> */ | | /* <lalVerbatim file="LALInspiralParamsH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralBankParams | | tagInspiralBankParams | |
| { | | { | |
|
| INT4 nparams; | | INT4 nparams; | |
| REAL8 x0; | | REAL8 minimalMatch; | |
| REAL8 x1; | | REAL8 x0; | |
| REAL8 dx0; | | REAL8 x1; | |
| REAL8 dx1; | | REAL8 dx0; | |
| REAL8 x0Min; | | REAL8 dx1; | |
| REAL8 x0Max; | | REAL8 x0Min; | |
| REAL8 x1Min; | | REAL8 x0Max; | |
| REAL8 x1Max; | | REAL8 x1Min; | |
| InspiralMetric *metric; | | REAL8 x1Max; | |
| | | InspiralMetric *metric; | |
| } | | } | |
| InspiralBankParams; | | InspiralBankParams; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralBankParams} | | \idx[Type]{InspiralBankParams} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralCoarseBankH"> */ | | /* <lalVerbatim file="LALInspiralCoarseBankH"> */ | |
| | | | |
| typedef struct | | typedef struct | |
| tagInspiralCoarseBankIn | | tagInspiralCoarseBankIn | |
| { | | { | |
|
| InspiralBankMassRange massRange; | | InspiralBankMassRange massRange; | |
| CoordinateSpace space; | | CoordinateSpace space; | |
| | | | |
| REAL8 mMin; | | | |
| REAL8 mMax; | | | |
| REAL8 MMax; | | | |
| REAL8 mmCoarse; | | | |
| REAL8 mmFine; | | | |
| REAL8 fLower; | | | |
| REAL8 fUpper; | | | |
| REAL8 tSampling; | | | |
| REAL8 etamin; | | | |
| | | | |
| REAL8FrequencySeries shf; | | | |
| | | | |
|
| INT4 iflso; | | REAL8 mMin; | |
| | | REAL8 mMax; | |
| Order order; | | REAL8 MMax; | |
| Approximant approximant; | | REAL8 alpha; | |
| | | REAL8 psi0Min; | |
| | | REAL8 psi0Max; | |
| | | REAL8 psi3Min; | |
| | | REAL8 psi3Max; | |
| | | REAL8 mmCoarse; | |
| | | REAL8 mmFine; | |
| | | REAL8 fLower; | |
| | | REAL8 fUpper; | |
| | | REAL8 tSampling; | |
| | | REAL8 etamin; | |
| | | REAL8 betaMin; | |
| | | REAL8 betaMax; | |
| | | | |
| | | REAL8FrequencySeries shf; | |
| | | | |
| | | INT4 iflso; | |
| | | UINT4 numFcutTemplates; | |
| | | REAL4 HighGM; | |
| | | REAL4 LowGM; | |
| | | | |
| | | GridSpacing gridSpacing; | |
| | | Order order; | |
| | | Approximant approximant; | |
| } | | } | |
| InspiralCoarseBankIn; | | InspiralCoarseBankIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralCoarseBankIn} | | \idx[Type]{InspiralCoarseBankIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralMomentsInH"> */ | | /* <lalVerbatim file="LALInspiralMomentsInH"> */ | |
| typedef struct | | typedef struct | |
| { | | { | |
|
| REAL8 xmin; | | REAL8 xmin; | |
| REAL8 xmax; | | REAL8 xmax; | |
| REAL8 ndx; | | REAL8 ndx; | |
| REAL8 norm; | | REAL8 norm; | |
| REAL8FrequencySeries *shf; | | REAL8FrequencySeries *shf; | |
| } | | } | |
| InspiralMomentsIn; | | InspiralMomentsIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralMomentsIn} | | \idx[Type]{InspiralMomentsIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralFineBankInH"> */ | | /* <lalVerbatim file="LALInspiralFineBankInH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralFineBankIn | | tagInspiralFineBankIn | |
| { | | { | |
|
| InspiralTemplateList templateList; | | InspiralTemplateList templateList; | |
| InspiralCoarseBankIn coarseIn; | | InspiralCoarseBankIn coarseIn; | |
| } | | } | |
| InspiralFineBankIn; | | InspiralFineBankIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralFineBankIn} | | \idx[Type]{InspiralFineBankIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralMomentsEtcH"> */ | | /* <lalVerbatim file="LALInspiralMomentsEtcH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralMomentsEtc | | tagInspiralMomentsEtc | |
| { | | { | |
|
| REAL8 a01, a21, a22, a31, a41, a42, a43; | | REAL8 a01, a21, a22, a31, a41, a42, a43; | |
| REAL8 j[18]; | | REAL8 j[18]; | |
| } | | } | |
| InspiralMomentsEtc; | | InspiralMomentsEtc; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \idx[Type]{InspiralFineBankIn} | | \idx[Type]{InspiralMomentsEtc} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralMomentsEtcBCVH"> */ | |
| | | typedef struct | |
| | | tagInspiralMomentsEtcBCV | |
| | | { | |
| | | REAL8 n0, n15; | |
| | | REAL8 j[9]; | |
| | | REAL8 i[23]; | |
| | | REAL8 alpha; | |
| | | REAL8 fcut; | |
| | | | |
| | | REAL8 M1[2][2]; | |
| | | REAL8 M2[2][2]; | |
| | | REAL8 M3[2][2]; | |
| | | } | |
| | | InspiralMomentsEtcBCV; | |
| | | /* </lalVerbatim> */ | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InspiralMomentsEtcBCV} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALRectangleInH"> */ | | /* <lalVerbatim file="LALRectangleInH"> */ | |
| typedef struct | | typedef struct | |
| tagRectangleIn | | tagRectangleIn | |
| { | | { | |
|
| REAL8 x0, y0, dx, dy, theta; | | REAL8 x0, y0, dx, dy, theta; | |
| } | | } | |
| RectangleIn; | | RectangleIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{RectangleIn}} | | \index{\texttt{RectangleIn}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalVerbatim file="LALRectangleOutH"> */ | | /* <lalVerbatim file="LALRectangleOutH"> */ | |
| typedef struct | | typedef struct | |
| tagRectangleOut | | tagRectangleOut | |
| { | | { | |
|
| REAL8 x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; | | REAL8 x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; | |
| } | | } | |
| RectangleOut; | | RectangleOut; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{RectangleOut}} | | \index{\texttt{RectangleOut}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{LALInspiralBankHV}} | | \vfill{\footnotesize\input{LALInspiralBankHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes */ | | /* Function prototypes */ | |
|
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralCreateCoarseBankC} | | \newpage\input{LALInspiralCreateCoarseBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralCreateCoarseBank( | | LALInspiralCreateCoarseBank ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplateList **list, | | InspiralTemplateList **list, | |
| INT4 *nlist, | | INT4 *nlist, | |
| InspiralCoarseBankIn bankIn | | InspiralCoarseBankIn bankIn | |
| ); | | ); | |
| | | | |
| | | void | |
| | | LALInspiralCreatePNCoarseBank ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *nlist, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralCreateBCVBank ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *nlist, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralCreateFlatBankS3S4 ( | |
| | | LALStatus *status, | |
| | | REAL4VectorSequence *list, | |
| | | InspiralBankParams *bankParams, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| | | void | |
| | | LALExcludeTemplate( | |
| | | LALStatus *status, | |
| | | INT4 *valid, | |
| | | InspiralBankParams *bankParams, | |
| | | REAL4 x, | |
| | | REAL4 y | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralBCVBankFcutS3S4 ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *NList, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralBCVFcutBank ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *NList, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralBCVRegularFcutBank ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *NList, | |
| | | InspiralCoarseBankIn coarseIn); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralCreateFineBankC} | | \newpage\input{InspiralSpinBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralCreateFineBank( | | LALInspiralSpinBank( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplateList **outlist, | | SnglInspiralTable **tiles, | |
| INT4 *nlist, | | INT4 *ntiles, | |
| InspiralFineBankIn fineIn | | InspiralCoarseBankIn *coarseIn | |
| ); | | ); | |
| | | | |
| | | #if 0 | |
| | | void | |
| | | LALInspiralSpinBankBoundary( | |
| | | LALStatus *status, | |
| | | NDTemplateBankInput *input, | |
| | | NDTemplateBankOutput *output, | |
| | | INT2 *flag | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralSpinBankMetric( | |
| | | LALStatus *status, | |
| | | NDTemplateBankInput *input, | |
| | | REAL4Array *metric | |
| | | ); | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALInspiralBankGeneration( | |
| | | LALStatus *status, | |
| | | InspiralCoarseBankIn *in, | |
| | | SnglInspiralTable **out, | |
| | | INT4 *count | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralCreateFlatBank ( | |
| | | LALStatus *status, | |
| | | REAL4VectorSequence *list, | |
| | | InspiralBankParams *bankParams | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralComputeMetricC} | | \newpage\input{LALInspiralCreateFineBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralCreateFineBank ( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **outlist, | |
| | | INT4 *nlist, | |
| | | InspiralFineBankIn fineIn | |
| | | ); | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralComputeMetricC} | |
| | | </lalLaTeX> */ | |
| void | | void | |
|
| LALInspiralComputeMetric( | | LALInspiralComputeMetric ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralMetric *metric, | | InspiralMetric *metric, | |
| InspiralTemplate *params, | | InspiralTemplate *params, | |
| InspiralMomentsEtc *moments | | InspiralMomentsEtc *moments | |
| | | | |
| | | ); | |
| | | void | |
| | | LALInspiralComputeMetricBCV | |
| | | ( | |
| | | LALStatus *status, | |
| | | InspiralMetric *metric, | |
| | | REAL8FrequencySeries *psd, | |
| | | InspiralTemplate *params | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralMomentsC} | | \newpage\input{LALInspiralLongestTemplateInBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | void | |
| | | LALInspiralLongestTemplateInBank ( | |
| | | LALStatus *status, | |
| | | UINT4 *templateLength, | |
| | | InspiralCoarseBankIn *coarseIn | |
| | | ); | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralMomentsC} | |
| | | </lalLaTeX> */ | |
| void | | void | |
|
| LALInspiralMoments( | | LALGetInspiralMoments ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *moment, | | InspiralMomentsEtc *moments, | |
| InspiralMomentsIn pars); | | REAL8FrequencySeries *psd, | |
| | | InspiralTemplate *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALGetInspiralMomentsBCV ( | |
| | | LALStatus *status, | |
| | | InspiralMomentsEtcBCV *moments, | |
| | | REAL8FrequencySeries *psd, | |
| | | InspiralTemplate *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralMoments ( | |
| | | LALStatus *status, | |
| | | REAL8 *moment, | |
| | | InspiralMomentsIn pars | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralMomentsIntegrandC} | | \newpage\input{LALInspiralMomentsIntegrandC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralMomentsIntegrand( | | LALInspiralMomentsIntegrand | |
| | | ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *integrand, | | REAL8 *integrand, | |
| REAL8 f, | | REAL8 f, | |
|
| void *pars); | | void *pars | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralSetSearchLimitsC} | | \newpage\input{LALInspiralSetSearchLimitsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralSetSearchLimits( | | LALInspiralSetSearchLimits ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralBankParams *bankParams, | | InspiralBankParams *bankParams, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralNextTemplateC} | | \newpage\input{LALInspiralNextTemplateC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralNextTemplate( | | LALInspiralNextTemplate ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralBankParams *bankPars, | | InspiralBankParams *bankPars, | |
|
| InspiralMetric metric); | | InspiralMetric metric | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralComputeParamsC} | | \newpage\input{LALInspiralComputeParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralComputeParams( | | LALInspiralComputeParams ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplate *pars, | | InspiralTemplate *pars, | |
| InspiralBankParams bankParams, | | InspiralBankParams bankParams, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralValidParamsC} | | \newpage\input{LALInspiralValidParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralValidParams( | | LALInspiralValidParams ( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4 *valid, | | INT4 *valid, | |
| InspiralBankParams bankParams, | | InspiralBankParams bankParams, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralValidTemplateC} | | \newpage\input{LALInspiralValidTemplateC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
| LALInspiralValidTemplate( | | LALInspiralValidTemplate( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4 *valid, | | INT4 *valid, | |
| InspiralBankParams bankParams, | | InspiralBankParams bankParams, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralUpdateParamsC} | | \newpage\input{LALInspiralUpdateParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralUpdateParams( | | LALInspiralUpdateParams ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralBankParams *bankParams, | | InspiralBankParams *bankParams, | |
| InspiralMetric metric, | | InspiralMetric metric, | |
| REAL8 minimalMatch | | REAL8 minimalMatch | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALMatrixTransformC} | | \newpage\input{LALMatrixTransformC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
| LALMatrixTransform ( | | LALMatrixTransform ( | |
|
| LALStatus *status, | | LALStatus *status, | |
| INT4 Dim, | | INT4 Dim, | |
| REAL8 **trans, | | REAL8 **trans, | |
| REAL8 **buff1, | | REAL8 **buff1, | |
| REAL8 **mm3 | | REAL8 **mm3 | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralMomentsC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALDeterminant3C} | | \newpage\input{LALDeterminant3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALDeterminant3(LALStatus *status, | | LALDeterminant3 ( | |
| REAL8 *determinant, | | LALStatus *status, | |
| REAL8 **matrix) ; | | REAL8 *determinant, | |
| | | REAL8 **matrix | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInverse3C} | | \newpage\input{LALInverse3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInverse3( | | LALInverse3 | |
| LALStatus *status, | | ( | |
| REAL8 **inverse, | | LALStatus *status, | |
| REAL8 **matrix) ; | | REAL8 **inverse, | |
| | | REAL8 **matrix | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralSetParamsC} | | \newpage\input{LALInspiralSetParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
|
| | | | |
| void | | void | |
|
| LALInspiralSetParams( | | LALInspiralSetParams ( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplate *tempPars, | | InspiralTemplate *tempPars, | |
| InspiralCoarseBankIn coarseIn); | | InspiralCoarseBankIn coarseIn | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALRectangleVerticesC} | | \newpage\input{LALRectangleVerticesC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALRectangleVertices( | | LALRectangleVertices | |
| | | ( | |
| LALStatus *status, | | LALStatus *status, | |
| RectangleOut *out, | | RectangleOut *out, | |
| RectangleIn *in | | RectangleIn *in | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| | | \newpage\input{LALInsidePolygonC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALInsidePolygon( | |
| | | LALStatus *status, | |
| | | REAL4 *inputx, | |
| | | REAL4 *inputy, | |
| | | INT4 n, | |
| | | REAL4 x, | |
| | | REAL4 y, | |
| | | INT4 *valid | |
| | | ); | |
| | | | |
| | | void | |
| | | LALEmpiricalPSI2MassesConversion( | |
| | | InspiralTemplate *params, | |
| | | UINT4 *valid, | |
| | | REAL4 lightring | |
| | | ); | |
| | | | |
| | | void | |
| | | LALInspiralCreatePNCoarseBankHexa( | |
| | | LALStatus *status, | |
| | | InspiralTemplateList **list, | |
| | | INT4 *nlist, | |
| | | InspiralCoarseBankIn coarseIn | |
| | | ) ; | |
| | | | |
| | | void | |
| | | LALCellInit( | |
| | | LALStatus *status, | |
| | | InspiralCell **cell, | |
| | | INT4 id, | |
| | | InspiralMomentsEtc *moments, | |
| | | InspiralTemplate *paramsIn, | |
| | | HexaGridParam *gridParam, | |
| | | CellEvolution *cellEvolution, | |
| | | CellList **cellList | |
| | | ); | |
| | | | |
| | | void | |
| | | LALPopulateCell( | |
| | | LALStatus *status, | |
| | | InspiralMomentsEtc *moments, | |
| | | InspiralCell **cell, | |
| | | INT4 l, | |
| | | InspiralTemplate *paramsIn, | |
| | | HexaGridParam *gridParam, | |
| | | CellEvolution *cellEvolution, | |
| | | CellList **cellList | |
| | | ); | |
| | | | |
| | | void | |
| | | LALFindPosition(LALStatus *status, | |
| | | REAL4 dx0, | |
| | | REAL4 dx1, | |
| | | Position *position, | |
| | | InspiralTemplate *paramsIn, | |
| | | HexaGridParam *gridParam | |
| | | ); | |
| | | | |
| | | void | |
| | | LALSPAValidPosition( | |
| | | LALStatus *status, | |
| | | InspiralCell **cell, | |
| | | INT4 id1, | |
| | | InspiralMomentsEtc *moments, | |
| | | CellEvolution *cellEvolution, | |
| | | CellList **list | |
| | | ); | |
| | | | |
| | | void | |
| | | GetPositionRectangle(LALStatus *status, | |
| | | InspiralCell **cell, | |
| | | INT4 id, | |
| | | InspiralTemplate *params, | |
| | | HexaGridParam *gridParam, | |
| | | CellEvolution *cellEvolution, | |
| | | CellList **cellList, INT4 *valid | |
| | | ); | |
| | | | |
| | | void append(CellList ** headRef, INT4 id); | |
| | | void DeleteList(CellList **headRef); | |
| | | int GetIdFromIndex(CellList *head, INT4 index); | |
| | | void Delete(CellList ** headRef, INT4 id); | |
| | | | |
| | | void | |
| | | print_list(CellList *head); | |
| | | | |
| | | int | |
| | | Length(CellList *head); | |
| | | | |
| | | /* <lalLaTeX> | |
| \newpage\input{CoarseTestC} | | \newpage\input{CoarseTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{CoarseTest2C} | | \newpage\input{CoarseTest2C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{ChirpSpaceC} | | \newpage\input{ChirpSpaceC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /*<lalLaTeX> | |
| | | \newpage\input{InspiralSpinBankTestC} | |
| | | </lalLaTeX>*/ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _LALINSPIRALBANK_H */ | | #endif /* _LALINSPIRALBANK_H */ | |
| | | | |
End of changes. 86 change blocks. |
| 188 lines changed or deleted | | 543 lines changed or added | |
|
| LALNoiseModels.h | | LALNoiseModels.h | |
| /* <lalVerbatim file="LALNoiseModelsHV"> | | /* <lalVerbatim file="LALNoiseModelsHV"> | |
| | | | |
| Author: Sathyaprakash, B.S. | | Author: Sathyaprakash, B.S. | |
|
| $Id: LALNoiseModels.h,v 1.9 2002/06/05 11:13:19 dchurches Exp $ | | $Id: LALNoiseModels.h,v 1.25 2005/06/14 20:09:37 jolien Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
|
| \section{Header \texttt{LALNoiseModels.h}} | | \section{Header \texttt{LALNoiseModels.h}} | |
| \label{s:LALNoiseModels.h} | | \label{s:LALNoiseModels.h} | |
| | | | |
|
| Header file for model noise generation codes. | | Header file for model noise generation codes. | |
| | | | |
|
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/LALNoiseModels.h> | | #include <lal/LALNoiseModels.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent This header file covers routines that are used in | | \noindent This header file covers routines that are used in | |
| synthetic background noise expected in various | | synthetic background noise expected in various | |
| detectors and signals with random parameters in background noise. | | detectors and signals with random parameters in background noise. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _LALNOISEMODELS_H | | #ifndef _LALNOISEMODELS_H | |
| | | | |
| skipping to change at line 41 | | skipping to change at line 41 | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
| #include <lal/LALInspiral.h> | | #include <lal/LALInspiral.h> | |
| #include <lal/RealFFT.h> | | #include <lal/RealFFT.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( LALNOISEMODELSH, "$Id: LALNoiseModels.h,v 1.9 2002/06/05 11:13:19 d
churches Exp $" ); | | NRCSID( LALNOISEMODELSH, "$Id: LALNoiseModels.h,v 1.25 2005/06/14 20:09
:37 jolien Exp $" ); | |
| | | | |
|
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
|
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| | | | |
|
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| | | | |
| #define LALNOISEMODELSH_ENULL 1 | | #define LALNOISEMODELSH_ENULL 1 | |
| #define LALNOISEMODELSH_EMEM 2 | | #define LALNOISEMODELSH_EMEM 2 | |
| #define LALNOISEMODELSH_ECHOICE 4 | | #define LALNOISEMODELSH_ECHOICE 4 | |
| #define LALNOISEMODELSH_EDIV0 8 | | #define LALNOISEMODELSH_EDIV0 8 | |
| #define LALNOISEMODELSH_ESIZE 16 | | #define LALNOISEMODELSH_ESIZE 16 | |
| #define LALNOISEMODELSH_MSGENULL "Arguments contained an unexpected null po
inter" | | #define LALNOISEMODELSH_MSGENULL "Arguments contained an unexpected null po
inter" | |
| #define LALNOISEMODELSH_MSGEMEM "Memory allocation error" | | #define LALNOISEMODELSH_MSGEMEM "Memory allocation error" | |
| #define LALNOISEMODELSH_MSGECHOICE "Invalid choice for an input parameter" | | #define LALNOISEMODELSH_MSGECHOICE "Invalid choice for an input parameter" | |
| #define LALNOISEMODELSH_MSGEDIV0 "Division by zero" | | #define LALNOISEMODELSH_MSGEDIV0 "Division by zero" | |
| #define LALNOISEMODELSH_MSGESIZE "Invalid input size" | | #define LALNOISEMODELSH_MSGESIZE "Invalid input size" | |
| | | | |
|
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| /* <lalLaTeX> | | | |
| | | | |
| \section*{Structures} | | | |
| \input{LALNoiseModelsHS} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| | | | |
| typedef enum | | | |
| { | | | |
| geo, | | | |
| ligo, | | | |
| tama, | | | |
| virgo | | | |
| } | | | |
| Detector; | | | |
| | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{Detector} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagInspiralWaveCorrelateIn | | | |
| { | | | |
| REAL4Vector signal1; | | | |
| REAL4Vector signal2; | | | |
| REAL8Vector psd; | | | |
| RealFFTPlan *revp; | | | |
| } | | | |
| InspiralWaveCorrelateIn; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{InspiralWaveCorrelateIn} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagAddVectorsIn | | | |
| { | | | |
| REAL4Vector *v1; | | | |
| REAL4Vector *v2; | | | |
| REAL8 a1; | | | |
| REAL8 a2; | | | |
| } | | | |
| AddVectorsIn; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{AddVectorsIn} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagRandomInspiralSignalIn | | | |
| { | | | |
| INT4 useed; /* Seed for the random number generator */ | | | |
| INT4 type; /* Type of signal required to be generated */ | | | |
| | | | |
| REAL8 mMin; /* smallest component mass allowed */ | | | |
| REAL8 MMax; /* largest total mass allowed */ | | | |
| REAL8 SignalAmp; /* amplitude of the signal (relevant only when type=2) | | | |
| */ | | | |
| REAL8 NoiseAmp; /* amplitude of noise (relevant only when type=2) */ | | | |
| REAL8 etaMin; /* smallest value of the symmetric mass ratio */ | | | |
| InspiralTemplate | | | |
| param; /* parameter stuct; user to specify certain params. */ | | | |
| | | | |
| REAL8Vector psd; /* power spectral density used for coloring the noise | | | |
| */ | | | |
| RealFFTPlan *fwdp;/* pre-computed fftw plan for forward fftw */ | | | |
| | | | |
| /* Chirp times are needed only if param.massChoice is t02 or t03 */ | | | |
| REAL8 t0Min; /* smallest Newtonian chirp time */ | | | |
| REAL8 t0Max; /* largest Newtonian chirp time */ | | | |
| REAL8 tnMin; /* smallest 1, 1.5 PN chirp time */ | | | |
| REAL8 tnMax; /* largest 1, 1.5 PN chirp time */ | | | |
| | | | |
| } | | | |
| RandomInspiralSignalIn; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{RandomInspiralSignalIn} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagInspiralWaveOverlapIn | | | |
| { | | | |
| INT4 nBegin; | | | |
| INT4 nEnd; | | | |
| REAL4Vector signal; | | | |
| REAL8Vector psd; | | | |
| InspiralTemplate param; | | | |
| RealFFTPlan *fwdp; | | | |
| RealFFTPlan *revp; | | | |
| } | | | |
| InspiralWaveOverlapIn; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{InspiralwaveOverlapIn} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagInspiralWaveOverlapOut | | | |
| { | | | |
| REAL8 max, phase; | | | |
| INT4 bin; | | | |
| } | | | |
| InspiralWaveOverlapOut; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \idx[Type]{InspiralWaveOverlapOut} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagInspiralFindEventsIn | | | |
| { | | | |
| INT4 nBegin; | | | |
| INT4 nEnd; | | | |
| REAL8 Threshold; | | | |
| REAL4Vector signal; | | | |
| REAL8Vector psd; | | | |
| InspiralTemplate param; | | | |
| RealFFTPlan *fwdp; | | | |
| RealFFTPlan *revp; | | | |
| UINT2 displayData; | | | |
| UINT2 displayPSD; | | | |
| UINT2 displayTemplates; | | | |
| UINT2 displayCorrelation; | | | |
| UINT2 displayCorrelationStats; | | | |
| } | | | |
| InspiralFindEventsIn; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
|
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{InspiralFindEventsIn}} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagInspiralEventsList | | | |
| { | | | |
| REAL8 max; | | | |
| REAL8 phase; | | | |
| REAL8 eventTime; | | | |
| REAL8 eventTime_ns; | | | |
| | | | |
| UINT4 bin; | | | |
| | | | |
| InspiralTemplate param; | | | |
| } | | | |
| InspiralEventsList; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \index{\texttt{InspiralEventsList}} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalVerbatim file="LALNoiseModelsHS"> */ | | | |
| typedef struct | | | |
| tagStatsREAL4VectorOut | | | |
| { | | | |
| REAL8 mean; | | | |
| REAL8 var; | | | |
| REAL8 stddev; | | | |
| REAL8 min; | | | |
| REAL8 max; | | | |
| } | | | |
| StatsREAL4VectorOut; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \index{\texttt{StatsREAL4VectorOut}} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \vfill{\footnotesize\input{LALNoiseModelsHV}} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* Function prototypes */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALNoiseSpectralDensityC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void | | | |
| LALNoiseSpectralDensity | | | |
| ( | | | |
| LALStatus *status, | | | |
| REAL8Vector *psd, | | | |
| void (*NoisePsd)(LALStatus *status, REAL8 *shf, REAL8 f), | | | |
| REAL8 f | | | |
| ); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWaveCorrelateC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void | | | |
| LALInspiralWaveCorrelate | | | |
| ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *output, | | | |
| InspiralWaveCorrelateIn in | | | |
| ); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralWaveNormaliseC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void | | | |
| LALInspiralWaveNormalise | | | |
| ( | | | |
| LALStatus *status, | | | |
| REAL4Vector *dh, | | | |
| REAL8 *norm, | | | |
| REAL8Vector psd | | | |
| ); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALGEOPsdC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
|
| void | | \section*{Structures} | |
| LALGEOPsd | | \input{LALNoiseModelsHS} | |
| ( | | </lalLaTeX> */ | |
| LALStatus *status, | | | |
| REAL8 *shf, | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| REAL8 x | | | |
| ); | | typedef enum | |
| | | { | |
| /* <lalLaTeX> | | geo, | |
| \newpage\input{LALLIGOIPsdC} | | ligo, | |
| </lalLaTeX> */ | | tama, | |
| | | virgo | |
| void | | } | |
| LALLIGOIPsd | | Detector; | |
| ( | | | |
| LALStatus *status, | | /* </lalVerbatim> */ | |
| REAL8 *shf, | | | |
| REAL8 x | | /* <lalLaTeX> | |
| ); | | \idx[Type]{Detector} | |
| | | </lalLaTeX> */ | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALTAMAPsdC} | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| </lalLaTeX> */ | | typedef struct | |
| | | tagInspiralWaveCorrelateIn | |
| void | | { | |
| LALTAMAPsd | | REAL8 df; | |
| ( | | REAL8 fCutoff; | |
| LALStatus *status, | | REAL8 samplingRate; | |
| REAL8 *shf, | | REAL4Vector signal1; | |
| REAL8 x | | REAL4Vector signal2; | |
| ); | | REAL8Vector psd; | |
| | | RealFFTPlan *revp; | |
| /* <lalLaTeX> | | } | |
| \newpage\input{LALVIRGOPsdC} | | InspiralWaveCorrelateIn; | |
| </lalLaTeX> */ | | /* </lalVerbatim> */ | |
| | | | |
| void | | /* <lalLaTeX> | |
| LALVIRGOPsd | | \idx[Type]{InspiralWaveCorrelateIn} | |
| ( | | </lalLaTeX> */ | |
| LALStatus *status, | | | |
| REAL8 *shf, | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| REAL8 x | | typedef struct | |
| ); | | tagAddVectorsIn | |
| | | { | |
| /* <lalLaTeX> | | REAL4Vector *v1; | |
| \newpage\input{LALRandomInspiralSignalC} | | REAL4Vector *v2; | |
| </lalLaTeX> */ | | REAL8 a1; | |
| | | REAL8 a2; | |
| void | | } | |
| LALRandomInspiralSignal | | AddVectorsIn; | |
| ( | | /* </lalVerbatim> */ | |
| LALStatus *status, | | | |
| REAL4Vector *signal, | | /* <lalLaTeX> | |
| RandomInspiralSignalIn *randIn | | \idx[Type]{AddVectorsIn} | |
| ); | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /*=================================================*/ | |
| \newpage\input{LALColoredNoiseC} | | typedef struct tagDiscoverInspiralEventsIn | |
| </lalLaTeX> */ | | { | |
| | | UINT4 currentGPSTime; | |
| void | | INT4 nBegin, nEnd; | |
| LALColoredNoise | | INT4 chisqBins; | |
| ( | | REAL8 Threshold, ClusterThreshold; | |
| LALStatus *status, | | REAL8 dynRangeScalingFac; | |
| REAL4Vector *noisy, | | REAL4Vector signal; | |
| REAL8Vector psd | | REAL8Vector psd; | |
| ); | | InspiralTemplate param; | |
| | | RealFFTPlan *fwdp; | |
| /* <lalLaTeX> | | RealFFTPlan *revp; | |
| \newpage\input{LALAddVectorsC} | | UINT2 displayCorrelationStats; | |
| </lalLaTeX> */ | | UINT2 displayCorrelation; | |
| | | } | |
| void | | DiscoverInspiralEventsIn; | |
| LALAddVectors | | | |
| ( | | typedef struct tagDiscoverInspiralEventsList | |
| LALStatus *status, | | { | |
| REAL4Vector *vector, | | UINT4 bin; | |
| AddVectorsIn in); | | INT4 endTime, endTimeNS, impulseTime, impulseTimeNS, | |
| | | chisqDOF; | |
| /* <lalLaTeX> | | REAL8 amplitude, effDistance, effD8, phase, snr; | |
| \newpage\input{LALInspiralWaveOverlapC} | | REAL8 cmax1, cmax2, sigmasq; | |
| </lalLaTeX> */ | | REAL8 chisq, chisq1, chisq2; | |
| | | REAL8 t0, t3, m1, m2; | |
| void | | } | |
| LALInspiralWaveOverlap | | DiscoverInspiralEventsList; | |
| ( | | | |
| LALStatus *status, | | typedef struct tagInspiralChisqInput | |
| REAL4Vector *output, | | { | |
| InspiralWaveOverlapOut *overlapout, | | | |
| InspiralWaveOverlapIn *overlapin | | INT4 chisqBins; | |
| ); | | REAL4Vector filter1, filter2; | |
| | | REAL4Vector rho1, rho2; | |
| /* <lalLaTeX> | | REAL8 flso; | |
| \newpage\input{LALInspiralFindEventsC} | | DiscoverInspiralEventsIn *findEventsIn; | |
| </lalLaTeX> */ | | } | |
| | | InspiralChisqInput; | |
| void | | | |
| LALInspiralFindEvents | | typedef struct tagInspiralChisqOutput | |
| ( | | { | |
| LALStatus *status, | | REAL8 *chisqZERO; | |
| INT4 *nEvents, | | REAL8 *chisqPIbyTWO; | |
| InspiralEventsList **findeventsout, | | REAL8 *chisq; | |
| InspiralFindEventsIn *findeventsin | | } | |
| ); | | InspiralChisqOutput; | |
| | | | |
| /* <lalLaTeX> | | typedef struct tagInvSpecTruncationParams | |
| \newpage\input{LALStatsREAL4VectorC} | | { | |
| </lalLaTeX> */ | | INT4 n; | |
| | | REAL8 df; | |
| void | | RealFFTPlan *fwdp; | |
| LALStatsREAL4Vector | | RealFFTPlan *revp; | |
| ( | | REAL8 psdTruncTime; | |
| LALStatus *status, | | UINT2 ifDebug; | |
| StatsREAL4VectorOut *out, | | } | |
| REAL4Vector *vector | | InvSpecTruncationParams; | |
| ); | | | |
| | | /*===============================================================*/ | |
| /* <lalLaTeX> | | | |
| \newpage\input{FilterTestC} | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| </lalLaTeX> */ | | typedef struct | |
| | | tagRandomInspiralSignalIn | |
| /* <lalLaTeX> | | { | |
| \newpage\input{RandomInspiralSignalTestC} | | INT4 useed; /* Seed for the random number generator * | |
| </lalLaTeX> */ | | / | |
| | | INT4 type; /* Type of signal required to be generate | |
| /* <lalLaTeX> | | d */ | |
| \newpage\input{NoisePSDTestC} | | | |
| </lalLaTeX> */ | | REAL8 mMin; /* smallest component mass allowed */ | |
| | | REAL8 mMax; /* largest component mass allowed */ | |
| | | /* OR */ | |
| | | REAL8 MMax; /* largest total mass allowed */ | |
| | | REAL8 SignalAmp; /* amplitude of the signal (relevant only | |
| | | when type=2) */ | |
| | | REAL8 NoiseAmp; /* amplitude of noise (relevant only when | |
| | | type=2) */ | |
| | | REAL8 etaMin; /* smallest value of the symmetric mass r | |
| | | atio */ | |
| | | InspiralTemplate | |
| | | param; /* parameter stuct; user to specify cer | |
| | | tain params. */ | |
| | | REAL8Vector psd; /* power spectral density used for colori | |
| | | ng the noise */ | |
| | | RealFFTPlan *fwdp;/* pre-computed fftw plan for forward fft | |
| | | w */ | |
| | | | |
| | | /* Chirp times are needed only if param.massChoice is t02 o | |
| | | r t03 */ | |
| | | REAL8 t0Min; /* smallest Newtonian chirp time */ | |
| | | REAL8 t0Max; /* largest Newtonian chirp time */ | |
| | | REAL8 tnMin; /* smallest 1, 1.5 PN chirp time */ | |
| | | REAL8 tnMax; /* largest 1, 1.5 PN chirp time */ | |
| | | /* min/max values of BCV parameters*/ | |
| | | REAL8 psi0Min; /* smallest Newtonian psi-parameter */ | |
| | | REAL8 psi0Max; /* largest Newtonian psi-parameter */ | |
| | | REAL8 psi3Min; /* smallest 1.5 PN psi-parameter */ | |
| | | REAL8 psi3Max; /* largest 1.5 PN psi-parameter */ | |
| | | | |
| | | INT4 coalescenceTime ;/* bin in which is maximum of the ch | |
| | | irp (coalescence time)*/ | |
| | | | |
| | | } | |
| | | RandomInspiralSignalIn; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{RandomInspiralSignalIn} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralWaveOverlapIn | |
| | | { | |
| | | INT4 nBegin; | |
| | | INT4 nEnd; | |
| | | REAL4Vector signal; | |
| | | REAL8Vector psd; | |
| | | InspiralTemplate param; | |
| | | RealFFTPlan *fwdp; | |
| | | RealFFTPlan *revp; | |
| | | UINT2 ifExtOutput; /* A flag which takes v | |
| | | alues 0 or 1 to denote | |
| | | if an extended outpu | |
| | | t consisting of filter | |
| | | and xcorr vectors ne | |
| | | ed to be filled out in | |
| | | the call to LALInspi | |
| | | ralWaveOverlap ( ) | |
| | | */ | |
| | | } | |
| | | InspiralWaveOverlapIn; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InspiralwaveOverlapIn} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralWaveOverlapOut | |
| | | { | |
| | | REAL8 max, phase, alpha; | |
| | | INT4 bin; /* bin at which max occurs | |
| | | */ | |
| | | REAL4Vector *filter1, *filter2; /* zero and pi/2 phase tem | |
| | | plates */ | |
| | | REAL4Vector *xcorr1, *xcorr2; /* cross correlation again | |
| | | st filter 1/2 */ | |
| | | } | |
| | | InspiralWaveOverlapOut; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InspiralWaveOverlapOut} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralFindEventsIn | |
| | | { | |
| | | UINT4 currentGPSTime; | |
| | | INT4 nBegin; | |
| | | INT4 nEnd; | |
| | | REAL8 Threshold; | |
| | | REAL8 ClusterThreshold; | |
| | | REAL4Vector signal; | |
| | | REAL8Vector psd; | |
| | | InspiralTemplate param; | |
| | | RealFFTPlan *fwdp; | |
| | | RealFFTPlan *revp; | |
| | | UINT2 displayData; | |
| | | UINT2 displayPSD; | |
| | | UINT2 displayTemplates; | |
| | | UINT2 displayCorrelation; | |
| | | UINT2 displayCorrelationStats; | |
| | | } | |
| | | InspiralFindEventsIn; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \index{\texttt{InspiralFindEventsIn}} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralEventsList | |
| | | { | |
| | | UINT4 bin; | |
| | | | |
| | | INT4 endTime; | |
| | | INT4 endTimeNS; | |
| | | INT4 impulseTime; | |
| | | INT4 impulseTimeNS; | |
| | | INT4 chisqDOF; | |
| | | | |
| | | REAL8 amplitude; | |
| | | REAL8 effDistance; | |
| | | REAL8 phase; | |
| | | REAL8 snr; | |
| | | REAL8 sigmasq; | |
| | | REAL8 chisq; | |
| | | | |
| | | InspiralTemplate param; | |
| | | } | |
| | | InspiralEventsList; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \index{\texttt{InspiralEventsList}} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralWaveNormaliseLSOHS"> */ | |
| | | typedef struct | |
| | | tagInspiralWaveNormaliseIn | |
| | | { | |
| | | REAL8 df; | |
| | | REAL8 fCutoff; | |
| | | REAL8 samplingRate; | |
| | | REAL8Vector *psd; | |
| | | } | |
| | | InspiralWaveNormaliseIn; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagStatsREAL4VectorOut | |
| | | { | |
| | | REAL8 mean; | |
| | | REAL8 var; | |
| | | REAL8 stddev; | |
| | | REAL8 min; | |
| | | REAL8 max; | |
| | | } | |
| | | StatsREAL4VectorOut; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralChisqDataVec | |
| | | { | |
| | | REAL4Vector *SNRIntegrand; | |
| | | REAL8Vector *psd; | |
| | | } | |
| | | InspiralChisqDataVec; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralChisqParams | |
| | | { | |
| | | INT4 nBins; /* number of chi-squared bins to use */ | |
| | | | |
| | | REAL8 totalMass; | |
| | | REAL8 fLower; | |
| | | REAL8 deltaT; /* sampling interval */ | |
| | | } | |
| | | InspiralChisqParams; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalVerbatim file="LALNoiseModelsHS"> */ | |
| | | typedef struct | |
| | | tagInspiralSNRIntegrandParams | |
| | | { | |
| | | INT4 lag; /* the value of the lag which produced the la | |
| | | rgest correlation */ | |
| | | | |
| | | REAL8 phase; /* phase of the correlation where the max occ | |
| | | urs */ | |
| | | REAL8 deltaT; /* sampling interval */ | |
| | | } | |
| | | InspiralSNRIntegrandParams; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \index{\texttt{StatsREAL4VectorOut}} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \vfill{\footnotesize\input{LALNoiseModelsHV}} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* Function prototypes */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALNoiseSpectralDensityC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALNoiseSpectralDensity | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8Vector *psd, | |
| | | void (*NoisePsd)(LALStatus *status, REAL8 *shf, REAL8 f | |
| | | ), | |
| | | REAL8 f | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralWaveCorrelateC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralWaveCorrelate | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *output, | |
| | | InspiralWaveCorrelateIn in | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralWaveNormaliseC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralWaveNormalise | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *dh, | |
| | | REAL8 *norm, | |
| | | REAL8Vector psd | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralWaveNormaliseLSOC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralWaveNormaliseLSO | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *filter, | |
| | | REAL8 *norm, | |
| | | InspiralWaveNormaliseIn *in | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALGEOPsdC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALGEOPsd | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8 *shf, | |
| | | REAL8 x | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALAdvLIGOPsdC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALAdvLIGOPsd | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8 *shf, | |
| | | REAL8 x | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALLIGOIPsdC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALLIGOIPsd | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8 *shf, | |
| | | REAL8 x | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALTAMAPsdC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALTAMAPsd | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8 *shf, | |
| | | REAL8 x | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALVIRGOPsdC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALVIRGOPsd | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8 *shf, | |
| | | REAL8 x | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALRandomInspiralSignalC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALRandomInspiralSignal | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *signalvec, | |
| | | RandomInspiralSignalIn *randIn | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALColoredNoiseC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALColoredNoise | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *noisy, | |
| | | REAL8Vector psd | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALAddVectorsC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALAddVectors | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *vector, | |
| | | AddVectorsIn in); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralWaveOverlapC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralWaveOverlap | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *output, | |
| | | InspiralWaveOverlapOut *overlapout, | |
| | | InspiralWaveOverlapIn *overlapin | |
| | | ); | |
| | | | |
| | | void LALInspiralGetOrthoNormalFilter(REAL4Vector *filter2, REAL4Vector | |
| | | *filter1); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralFindEventsC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralFindEvents | |
| | | ( | |
| | | LALStatus *status, | |
| | | INT4 *nEvents, | |
| | | InspiralEventsList **findeventsout, | |
| | | InspiralFindEventsIn *findeventsin | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | * \newpage\input{LALInspiralFindLoudestEventC} | |
| | | * </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralFindLoudestEvent | |
| | | ( | |
| | | LALStatus *status, | |
| | | INT4 *nEvents, | |
| | | InspiralEventsList *eventlist, | |
| | | InspiralFindEventsIn *findeventsin | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralFindEventsClusterC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralFindEventsCluster | |
| | | ( | |
| | | LALStatus *status, | |
| | | INT4 *nEvents, | |
| | | InspiralEventsList **findeventsout, | |
| | | InspiralFindEventsIn *findeventsin | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALStatsREAL4VectorC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALStatsREAL4Vector | |
| | | ( | |
| | | LALStatus *status, | |
| | | StatsREAL4VectorOut *out, | |
| | | REAL4Vector *vector | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralComputeChisqC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralComputeChisq | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4 *chisq, | |
| | | InspiralChisqDataVec *input, | |
| | | InspiralChisqParams *params | |
| | | ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralComputeSNRIntegrandC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralComputeSNRIntegrand | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL4Vector *output, | |
| | | InspiralWaveCorrelateIn corrin, | |
| | | InspiralSNRIntegrandParams *params | |
| | | ); | |
| | | | |
| | | /*=========================================*/ | |
| | | void LALDiscoverInspiralEvents | |
| | | ( | |
| | | LALStatus *status, | |
| | | INT4 *nEvents, | |
| | | DiscoverInspiralEventsList **eventlist, | |
| | | DiscoverInspiralEventsIn *findeventsin | |
| | | ); | |
| | | | |
| | | void LALEstimateEffectiveDistance | |
| | | ( | |
| | | LALStatus *status, | |
| | | InspiralTemplate param, | |
| | | REAL8 df, | |
| | | REAL8Vector *psd, | |
| | | REAL8 snr, | |
| | | REAL8 *effDistance | |
| | | ); | |
| | | | |
| | | void LALEvaluateInspiralChisqTest | |
| | | ( | |
| | | LALStatus *status, | |
| | | InspiralChisqOutput *chisqOut, | |
| | | InspiralChisqInput *chisqIn | |
| | | ); | |
| | | | |
| | | void LALTruncateInvSpectrum | |
| | | ( | |
| | | LALStatus *status, | |
| | | REAL8Vector *inputVec, | |
| | | InvSpecTruncationParams *params | |
| | | ); | |
| | | | |
| | | /*==============================================*/ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{FilterTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{RandomInspiralSignalTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{NoisePSDTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _LALNOISEMODELS_H */ | | #endif /* _LALNOISEMODELS_H */ | |
| | | | |
End of changes. 12 change blocks. |
| 371 lines changed or deleted | | 641 lines changed or added | |
|
| LUT.h | | LUT.h | |
|
| /*----------------------------------------------------------------------- | | /** \file LUT.h | |
| * | | * \ingroup Hough | |
| | | * \date $Date: 2005/10/07 14:51:59 $ | |
| | | * \brief Provides structures and function prototypes required for the cons | |
| | | truction of look up tables | |
| | | that are the core for building the Hough maps. | |
| | | * \author Sintes, A.M, Papa, M.A. and Krishnan, B. | |
| * File Name: LUT.h | | * File Name: LUT.h | |
| * | | * | |
|
| * Authors: Sintes, A.M., Papa, M.A., | | | |
| * | | * | |
|
| * Revision: $Id: LUT.h,v 1.1 2001/11/27 22:28:41 jolien Exp $ | | * | |
| | | * $Id: LUT.h,v 1.6 2005/10/07 14:51:59 badri Exp $ | |
| * | | * | |
| * History: Created by Sintes May 11, 2001 | | * History: Created by Sintes May 11, 2001 | |
|
| | | * Modified by Badri Krishnan Feb 2003 | |
| * | | * | |
|
| *----------------------------------------------------------------------- | | | |
| | | \par Description | |
| | | | |
| | | Our goal is the construction of Hough maps. In order to produce them | |
| | | efficiently, the present implemetation makes use of {\sc lut}s. | |
| | | Here we provide the necessary routines for their construction and use.\\ | |
| | | | |
| | | In principle, the subroutines provided are valid for | |
| | | {\sc any} Hough master equation of the form: | |
| | | \f$ \nu-F_0 =\vec\xi (t) \cdot (\hat n -\hat N )\, ,\f$ | |
| | | where \f$\nu\f$ is the measured frequency of the signal at time \f$t\f$, | |
| | | \f$F_0\f$ intrinsic frequency of the signal at that time, \f$\hat n\f$ lo | |
| | | cation of the | |
| | | souce in the sky, \f$\hat N\f$ the center of the sky patch used in the | |
| | | demodulation procedure, | |
| | | and | |
| | | \f$\vec\xi (t)\f$ any vector. | |
| | | | |
| | | The form of this vector \f$\vec\xi (t)\f$ | |
| | | depends on the demodulation procedure | |
| | | used in the previous step. In our case this corresponds to | |
| | | \f$\vec\xi (t) = \left( F_0+ | |
| | | \sum_k F_k \left[ \Delta T \right]^k\right) \frac{\vec v(t)}{c} | |
| | | + \left( \sum_k k F_k \left[ \Delta T \right]^{k-1}\right) | |
| | | \frac {\vec x(t)- \vec x(\hat t_0)}{c}\, ,\f$ | |
| | | and | |
| | | \f$F_0 \equiv f_0 + \sum_k \Delta f_k | |
| | | \left[ \Delta T \right]^k \, , \f$ | |
| | | where | |
| | | \f$\vec v(t)\f$ is the velocity of the detector, \f$\vec x(t)\f$ is the de | |
| | | tector | |
| | | position, | |
| | | \f$ T_{\hat N}(t)\f$ is the time at | |
| | | the solar system barycenter (for a given sky | |
| | | location \f$\hat N\f$), | |
| | | \f$\Delta T \equiv T_{\hat N}(t)-T_{\hat N}(\hat t_0)\f$, | |
| | | \f$\Delta f_k = f_k-F_k\f$ the residual spin-down parameter, | |
| | | \f$F_k\f$ the spin-down parameter used in the demodulation, and \f$f_0\f$, | |
| | | \f$f_k\f$ the | |
| | | intrinsic frequency and spin-down parameters of the source at time \f$\hat | |
| | | t_0\f$.\\ | |
| | | | |
| | | Looking at the generic Hough master equation, one realizes that | |
| | | for a fixed time, a given value of \f$F_0\f$, and a measured frequency \f | |
| | | $\nu\f$ | |
| | | (from a selected peak), the source could be located anywhere on a circle | |
| | | (whose | |
| | | center points in the same direction of \f$\vec\xi (t)\f$ and is characteri | |
| | | zed by | |
| | | \f$\phi\f$, the angle between \f$\hat n\f$ and \f$\vec\xi\f$). Since the | |
| | | Hough transform is performed on a | |
| | | set of spectra with discrete frequencies, a peak on the spectrum appearin | |
| | | g at | |
| | | \f$\nu\f$ could correspond to any source with a demodulated | |
| | | frequency in a certain interval. As a consequence, the location of the s | |
| | | ources | |
| | | compatible with \f$F_0\f$ and \f$\nu\f$ is not a circle but an annulus w | |
| | | ith a certain | |
| | | width.\\ | |
| | | | |
| | | Our purpose is to map these annuli on a discrete space. An estimation of | |
| | | the | |
| | | average thickness of the annuli tells us that the vast majority of | |
| | | annuli will be very thin, and therefore our algorithm should not be | |
| | | optimized for drawing | |
| | | thick annuli but for thin ones. Also, the mapping implementation should | |
| | | be one with a uniform | |
| | | probability distribution in order to avoid discretization errors. | |
| | | In order to remove border effects, we use a biunivocal mapping, which | |
| | | requires | |
| | | that a pixel in a partial Hough map can belong only to one annulus, | |
| | | just touched by one peak of the spectrum. The criteria for the biunivoc | |
| | | al mapping | |
| | | is that if and only if the center of the pixel is inside the annulus, t | |
| | | hen the pixel | |
| | | will be enhanced.\\ | |
| | | | |
| | | In order to simplify (reduce the computational cost of) this task we | |
| | | construct look up tables ({\sc lut}) where the borders of these annuli a | |
| | | re | |
| | | marked for any possible \f$\nu | |
| | | -F_0\f$ value. Since we work on a discrete space these {\sc lut} are | |
| | | valid for many \f$F_0\f$ values.\\ | |
| | | | |
| | | \par Uses | |
| | | \code | |
| | | LALHOUGHComputeSizePar () | |
| | | LALHOUGHComputeNDSizePar () | |
| | | LALHOUGHFillPatchGrid () | |
| | | LALHOUGHParamPLUT () | |
| | | LALNDHOUGHParamPLUT () | |
| | | LALRotatePolarU() | |
| | | LALInvRotatePolarU() | |
| | | LALStereoProjectPolar() | |
| | | LALStereoProjectCart() | |
| | | LALStereoInvProjectPolar() | |
| | | LALStereoInvProjectCart() | |
| | | LALHOUGHConstructPLUT() | |
| | | \endcode | |
| | | | |
| */ | | */ | |
| | | | |
| /************************************ <lalVerbatim file="LUTHV"> | | /************************************ <lalVerbatim file="LUTHV"> | |
|
| Author: Sintes, A.M., Papa, M.A., | | Author: Sintes, A.M., Papa, M.A., Krishnan, B. | |
| $Id: LUT.h,v 1.1 2001/11/27 22:28:41 jolien Exp $ | | $Id: LUT.h,v 1.6 2005/10/07 14:51:59 badri Exp $ | |
| ************************************* </lalVerbatim> */ | | ************************************* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \section{Header \texttt{LUT.h}} | | \section{Header \texttt{LUT.h}} | |
| \label{s:LUT.h} | | \label{s:LUT.h} | |
| | | | |
| Provides structures and functions required for the construction of look up
tables | | Provides structures and functions required for the construction of look up
tables | |
| {\sc (lut)} that are the core for building the Hough maps. | | {\sc (lut)} that are the core for building the Hough maps. | |
| | | | |
| | | | |
| skipping to change at line 247 | | skipping to change at line 335 | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT2 timeIndex }] Time index of the {\sc lut}. | | \item[\texttt{INT2 timeIndex }] Time index of the {\sc lut}. | |
| \item[\texttt{INT8 f0Bin }] Frequency bin for which it has been | | \item[\texttt{INT8 f0Bin }] Frequency bin for which it has been | |
| constructed. | | constructed. | |
| \item[\texttt{REAL8 deltaF }] Frequency resolution \texttt{df=1/TCOH}, w
here \texttt{1/TCOH} | | \item[\texttt{REAL8 deltaF }] Frequency resolution \texttt{df=1/TCOH}, w
here \texttt{1/TCOH} | |
| is the coherent integration time used in teh demodulation procedure. | | is the coherent integration time used in teh demodulation procedure. | |
| \item[\texttt{INT4 nFreqValid }] Number of frequencies where the {\sc lu
t} is | | \item[\texttt{INT4 nFreqValid }] Number of frequencies where the {\sc lu
t} is | |
| valid. | | valid. | |
|
| \item[\texttt{INT2 iniBin }] First bin affecting the patch with respect
to | | \item[\texttt{INT4 iniBin }] First bin affecting the patch with respect
to | |
| \verb@f0@. | | \verb@f0@. | |
|
| \item[\texttt{INT2 nBin }] Exact number of bins affecting the patch. | | \item[\texttt{INT4 nBin }] Exact number of bins affecting the patch. | |
| | | \item[\texttt{INT4 offset }] Frequency bin corresponding to center of p | |
| | | atch measured with respect to \texttt{f0Bin} (zero in modulated case) | |
| \item[\texttt{UINT2 maxNBins}] Maximum number of bins affecting the patch
(for | | \item[\texttt{UINT2 maxNBins}] Maximum number of bins affecting the patch
(for | |
| memory allocation purposes). | | memory allocation purposes). | |
| \item[\texttt{UINT2 maxNBorders}] Maximum number of borders affecting th
e | | \item[\texttt{UINT2 maxNBorders}] Maximum number of borders affecting th
e | |
| patch (for memory allocation purposes). | | patch (for memory allocation purposes). | |
| \item[\texttt{HOUGHBorder *border} ] The annulus borders. | | \item[\texttt{HOUGHBorder *border} ] The annulus borders. | |
| \item[\texttt{HOUGHBin2Border *bin} ] Bin to border | | \item[\texttt{HOUGHBin2Border *bin} ] Bin to border | |
| correspondence. | | correspondence. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct HOUGHPatchGrid | | struct HOUGHPatchGrid | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{HOUGHPatchGrid}} | | \index{\texttt{HOUGHPatchGrid}} | |
| | | | |
| \noindent This structure stores patch-frequency {\it grid} information. The
fields are: | | \noindent This structure stores patch-frequency {\it grid} information. The
fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{REAL8 f0 }] Frequency to construct grid | | \item[\texttt{REAL8 f0 }] Frequency to construct grid. | |
| \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1/TCOH} | | \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1/TCOH}. | |
| | | \item[\texttt{REAL8 patchSizeX }] Patch size in radians along x-axis. | |
| | | \item[\texttt{REAL8 patchSizeY }] Patch size in radians along y-axis. | |
| \item[\texttt{REAL8 minWidthRatio }] Ratio between the minimum annulus
width | | \item[\texttt{REAL8 minWidthRatio }] Ratio between the minimum annulus
width | |
| for this search, and the minimun annulus width for 1 year integration tim
e. | | for this search, and the minimun annulus width for 1 year integration tim
e. | |
| This value should be in the interval [1.0, 25.0]. | | This value should be in the interval [1.0, 25.0]. | |
| \item[\texttt{REAL8 deltaX }] Longitudinal space resolution, x-direction. | | \item[\texttt{REAL8 deltaX }] Longitudinal space resolution, x-direction. | |
| \item[\texttt{REAL8 xMin }] Patch limit, as the coordinate of the center
of the first pixel. | | \item[\texttt{REAL8 xMin }] Patch limit, as the coordinate of the center
of the first pixel. | |
| \item[\texttt{REAL8 xMax }] Patch limit, as the coordinate of the center
of the last pixel. | | \item[\texttt{REAL8 xMax }] Patch limit, as the coordinate of the center
of the last pixel. | |
| \item[\texttt{UINT2 xSide }] Real number of pixels in the x direction (in
the | | \item[\texttt{UINT2 xSide }] Real number of pixels in the x direction (in
the | |
| projected plane). It should be less than or equal to \texttt{xSideMax}. | | projected plane). It should be less than or equal to \texttt{xSideMax}. | |
| \item[\texttt{UINT2 xSideMax }] Maximun number of pixels in the x direct
ion | | \item[\texttt{UINT2 xSideMax }] Maximun number of pixels in the x direct
ion | |
| (for memory allocation), i.e. length of \verb@xCoor
@. | | (for memory allocation), i.e. length of \verb@xCoor
@. | |
| | | | |
| skipping to change at line 301 | | skipping to change at line 392 | |
| struct HOUGHResolutionPar | | struct HOUGHResolutionPar | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{HOUGHResolutionPar}} | | \index{\texttt{HOUGHResolutionPar}} | |
| | | | |
| \noindent This structure holds the parameters needed for gridding the patc
h | | \noindent This structure holds the parameters needed for gridding the patc
h | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL8 f0 }] Frequency at which construct the grid. | | \item[\texttt{REAL8 f0 }] Frequency at which construct the grid. | |
| \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1/TCOH}. | | \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1/TCOH}. | |
|
| | | \item[\texttt{REAL8 patchSizeX }] Patch size in radians along x-axis. | |
| | | \item[\texttt{REAL8 patchSizeY }] Patch size in radians along y-axis. | |
| \item[\texttt{REAL8 minWidthRatio }] Ratio between the minimum annulus w
idth | | \item[\texttt{REAL8 minWidthRatio }] Ratio between the minimum annulus w
idth | |
| for this search and the minimun annulus width for one year integration tim
e. | | for this search and the minimun annulus width for one year integration tim
e. | |
| This value should be in the interval [1.0, 25.0]. | | This value should be in the interval [1.0, 25.0]. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct REAL8Cart3Coor | | struct REAL8Cart3Coor | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{REAL8Cart3Coor }} | | \index{\texttt{REAL8Cart3Coor }} | |
| | | | |
| | | | |
| skipping to change at line 371 | | skipping to change at line 464 | |
| \end{verbatim} | | \end{verbatim} | |
| \index{\texttt{HOUGHDemodPar}} | | \index{\texttt{HOUGHDemodPar}} | |
| | | | |
| \noindent Demodulation parameters needed for the Hough transform. All | | \noindent Demodulation parameters needed for the Hough transform. All | |
| coordinates are assumed to be with respect to the same reference system. Th
e fields are: | | coordinates are assumed to be with respect to the same reference system. Th
e fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL8 deltaF }]: Frequency resolution: \texttt{
df=1/TCOH}. | | \item[\texttt{REAL8 deltaF }]: Frequency resolution: \texttt{
df=1/TCOH}. | |
| \item[\texttt{REAL8UnitPolarCoor skyPatch }]: $N_{center}$ (alpha, delta)
: | | \item[\texttt{REAL8UnitPolarCoor skyPatch }]: $N_{center}$ (alpha, delta)
: | |
| position of the center of the patch. | | position of the center of the patch. | |
|
| | | \item[\texttt{REAL8 patchSizeX }] Patch size in radians along x-axis. | |
| | | \item[\texttt{REAL8 patchSizeY }] Patch size in radians along y-axis. | |
| \item[\texttt{REAL8Cart3Coor veloC }]: $v(t)/c$ (x,y,z): Relative det
ector | | \item[\texttt{REAL8Cart3Coor veloC }]: $v(t)/c$ (x,y,z): Relative det
ector | |
| velocity | | velocity | |
| \item[\texttt{REAL8Cart3Coor positC }]: $(x(t)-x(t0))/c$ (x,y,z): Posi
tion | | \item[\texttt{REAL8Cart3Coor positC }]: $(x(t)-x(t0))/c$ (x,y,z): Posi
tion | |
| of the detector. | | of the detector. | |
| \item[\texttt{REAL8 timeDiff }]: $T_{\hat N} (t)-T_{\hat N}
(\hat t_0)$: | | \item[\texttt{REAL8 timeDiff }]: $T_{\hat N} (t)-T_{\hat N}
(\hat t_0)$: | |
| Time difference. | | Time difference. | |
| \item[\texttt{REAL8Vector spin }]: Spin down information. It includ
es | | \item[\texttt{REAL8Vector spin }]: Spin down information. It includ
es | |
| the fields: \texttt{length}: maximum order of | | the fields: \texttt{length}: maximum order of | |
| spin-down parameter, and | | spin-down parameter, and | |
| \texttt{*data}: pointer to spin-down parameter set $F_k$. | | \texttt{*data}: pointer to spin-down parameter set $F_k$. | |
| | | | |
| skipping to change at line 397 | | skipping to change at line 492 | |
| | | | |
| \noindent Parameters needed to construct the partial look up table. The fie
lds are: | | \noindent Parameters needed to construct the partial look up table. The fie
lds are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT8 f0Bin }] Frequency bin for which it has bee
n constructed | | \item[\texttt{INT8 f0Bin }] Frequency bin for which it has bee
n constructed | |
| \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1
/TCOH}. | | \item[\texttt{REAL8 deltaF }] Frequency resolution: \texttt{df=1
/TCOH}. | |
| \item[\texttt{REAL8UnitPolarCoor xi }] Center of the circle on the celest
ial | | \item[\texttt{REAL8UnitPolarCoor xi }] Center of the circle on the celest
ial | |
| sphere, $\xi$(alpha,delta) in the rotated coordinates. | | sphere, $\xi$(alpha,delta) in the rotated coordinates. | |
| \item[\texttt{REAL8 cosDelta }] $\Delta \cos(\phi)$ correspondin
g to | | \item[\texttt{REAL8 cosDelta }] $\Delta \cos(\phi)$ correspondin
g to | |
| one annulus. | | one annulus. | |
|
| | | \item[\texttt{INT4 offset }] Frequency bin corresponding to cen | |
| | | ter of patch; measured w.r.t. \texttt{f0Bin}. | |
| | | \item[\texttt{INT4 nFreqValid }] Number of frequency bins for w | |
| | | hich the LUT is valid. | |
| \item[\texttt{REAL8 cosPhiMax0 }] $\max(\cos(\phi))$ of the | | \item[\texttt{REAL8 cosPhiMax0 }] $\max(\cos(\phi))$ of the | |
|
| \texttt{f0Bin} | | \texttt{f0Bin}. | |
| \item[\texttt{REAL8 cosPhiMin0 }] $\min(\cos(\phi))$ of the | | \item[\texttt{REAL8 cosPhiMin0 }] $\min(\cos(\phi))$ of the | |
|
| \texttt{f0Bin} | | \texttt{f0Bin}. | |
| \item[\texttt{REAL8 epsilon }] maximum angle (distance in radian
s) from the pole | | \item[\texttt{REAL8 epsilon }] maximum angle (distance in radian
s) from the pole | |
| to consider a circle as a line in the projected plane. | | to consider a circle as a line in the projected plane. | |
| \end{description} | | \end{description} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \vfill{\footnotesize\input{LUTHV}} | | \vfill{\footnotesize\input{LUTHV}} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| \newpage\input{StereographicC} | | \newpage\input{StereographicC} | |
| \newpage\input{PatchGridC} | | \newpage\input{PatchGridC} | |
| \newpage\input{ParamPLUTC} | | \newpage\input{ParamPLUTC} | |
|
| | | \newpage\input{NDParamPLUTC} | |
| \newpage\input{ConstructPLUTC} | | \newpage\input{ConstructPLUTC} | |
| | | | |
| %%%%%%%%%%Test program. %% | | %%%%%%%%%%Test program. %% | |
| \newpage\input{TestConstructPLUTC} | | \newpage\input{TestConstructPLUTC} | |
|
| | | \newpage\input{TestNDConstructPLUTC} | |
| | | | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| * 4. Protection against double inclusion (include-loop protection) | | * 4. Protection against double inclusion (include-loop protection) | |
| * Note the naming convention! | | * Note the naming convention! | |
| */ | | */ | |
| | | | |
| | | | |
| skipping to change at line 465 | | skipping to change at line 564 | |
| */ | | */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| * 6. Assignment of Id string using NRCSID() | | * 6. Assignment of Id string using NRCSID() | |
| */ | | */ | |
| | | | |
|
| NRCSID (LUTH, "$Id: LUT.h,v 1.1 2001/11/27 22:28:41 jolien Exp $"); | | NRCSID (LUTH, "$Id: LUT.h,v 1.6 2005/10/07 14:51:59 badri Exp $"); | |
| | | | |
| /* | | /* | |
| * 7. Error codes and messages. This must be auto-extracted for | | * 7. Error codes and messages. This must be auto-extracted for | |
| * inclusion in the documentation. | | * inclusion in the documentation. | |
| */ | | */ | |
| | | | |
| /* <lalErrTable file="LUTHErrorTable"> */ | | /* <lalErrTable file="LUTHErrorTable"> */ | |
| | | | |
| #define LUTH_ENULL 1 | | #define LUTH_ENULL 1 | |
| #define LUTH_ESIZE 2 | | #define LUTH_ESIZE 2 | |
| | | | |
| skipping to change at line 505 | | skipping to change at line 604 | |
| */ | | */ | |
| | | | |
| #define MAX(A, B) (((A) < (B)) ? (B) : (A)) | | #define MAX(A, B) (((A) < (B)) ? (B) : (A)) | |
| #define MIN(A, B) (((A) < (B)) ? (A) : (B)) | | #define MIN(A, B) (((A) < (B)) ? (A) : (B)) | |
| #define cot(A) (1./tan(A)) | | #define cot(A) (1./tan(A)) | |
| | | | |
| /* ******************************************************* | | /* ******************************************************* | |
| * 9. Constant Declarations. (discouraged) | | * 9. Constant Declarations. (discouraged) | |
| */ | | */ | |
| | | | |
|
| /* Maximum ``error'' (as a fraction of the width of the thinnest annulus) * | | /** Maximum ``error'' (as a fraction of the width of the thinnest annulus) | |
| / | | which allows to represent a circle by a line. */ | |
| /* which allows to represent a circle by a line. */ | | | |
| #define LINERR 0.001 | | #define LINERR 0.001 | |
| | | | |
|
| /* Maximum ``error'' (as a fraction of the width of the thinnest annulus) * | | /** Maximum ``error'' (as a fraction of the width of the thinnest annulus) | |
| / | | which allows to consider two border equivalents! | |
| /* which allows to consider two border equivalents! */ | | It is relevant for determining the LUT frequency range validity */ | |
| /*It is relevant for determining the LUT frequency range validity */ | | #define PIXERR 0.5 | |
| #define PIXERR 0.1 | | | |
| | | | |
| /* Width of the thinnest annulus in terms of pixels */ | | | |
| #define PIXELFACTORX 2 | | | |
| #define PIXELFACTORY 2 | | | |
| | | | |
| /* Earth v_epicycle/c, & v_total/c TO BE CHANGED DEPENDING ON DETECTOR */ | | | |
| #define VEPI 1.0e-06 | | | |
| #define VTOT 1.0e-04 | | | |
| | | | |
| /* Maximun number of pixels in a given patch SIDEX x SIDEY */ | | | |
| /* These numbers should be integers !!! */ | | | |
| /* It comes from assuming that: */ | | | |
| /* - the 'longitudinal' patch size is dF*10^6/f0, where 10^6 = c/v_epicycle | | | |
| */ | | | |
| /* - the thinnest possible annulus is dF*10^4/f0, where 10^4 = c/v_tot */ | | | |
| /* the ratio (longitudinal patch size)/(width thinnest annuli) = 100. */ | | | |
| /* 100 => TO BE CHANGED DEPENDING ON DETECTOR */ | | | |
| | | | |
|
| #define SIDEX (100* PIXELFACTORX) | | /** Width of the thinnest annulus in terms of pixels */ | |
| #define SIDEY (100* PIXELFACTORY) | | #define PIXELFACTOR 2 | |
| | | | |
|
| /* Maximun number of bins that can affect a patch */ | | /** Earth v_epicycle/c TO BE CHANGED DEPENDING ON DETECTOR */ | |
| #define MAX_N_BINS 150 | | #define VEPI 1.0e-06 | |
| | | /** Total detector velocity/c TO BE CHANGED DEPENDING ON DETECTOR */ | |
| /* Maximun number of borders in a patch */ | | #define VTOT 1.06e-04 | |
| #define MAX_N_BORDERS 208 | | | |
| | | | |
| /* ************************************************************** | | /* ************************************************************** | |
| * 10. Structure, enum, union, etc., typdefs. | | * 10. Structure, enum, union, etc., typdefs. | |
| */ | | */ | |
| | | | |
|
| /* typedef INT2 COORType; */ | | typedef INT2 COORType; | |
| typedef UCHAR COORType; | | /* typedef INT4 COORType; */ | |
| | | /* typedef UCHAR COORType; */ | |
| | | | |
|
| | | /** This structure stores the border of a circle clipped on the projected
plane. */ | |
| typedef struct tagHOUGHBorder{ | | typedef struct tagHOUGHBorder{ | |
|
| INT4 yUpper; /* upper y pixel affected by this border */ | | INT4 yUpper; /**< upper y pixel affected by this border */ | |
| INT4 yLower; /* lower y pixel " */ | | INT4 yLower; /**< lower y pixel affected by this border and | |
| /* yUpper<yLower or yUpper<0 are possible */ | | yUpper<yLower or yUpper<0 are possible */ | |
| INT4 yCenter; /* y pixel value of the center of the circle */ | | INT4 yCenter; /**< y pixel value of the center of the circle */ | |
| UINT2 ySide; /* length of xPixel */ | | UINT2 ySide; /**< length of xPixel */ | |
| COORType *xPixel; /* x pixel index to be marked */ | | COORType *xPixel; /**< x pixel index to be marked */ | |
| } HOUGHBorder; | | } HOUGHBorder; | |
| | | | |
|
| | | /** This structure stores the border indexes corresponding to one frequen | |
| | | cy | |
| | | bin plus the corrections to be added to the first column of the patch | |
| | | . */ | |
| typedef struct tagHOUGHBin2Border{ | | typedef struct tagHOUGHBin2Border{ | |
|
| INT2 leftB1; /* index of the border[xxx] to be used */ | | INT2 leftB1; /**< index of the border[xxx] to be used */ | |
| INT2 rightB1; | | INT2 rightB1; | |
| INT2 leftB2; | | INT2 leftB2; | |
| INT2 rightB2; | | INT2 rightB2; | |
|
| INT2 piece1max; /* interval limits of the first column to be add */ | | INT2 piece1max; /**< interval limits of the first column to be add */ | |
| INT2 piece1min; | | INT2 piece1min; | |
| INT2 piece2max; | | INT2 piece2max; | |
| INT2 piece2min; | | INT2 piece2min; | |
| } HOUGHBin2Border; | | } HOUGHBin2Border; | |
| | | | |
|
| /* Patch-Time-Frequency Look Up table*/ | | /** Patch-Time-Frequency Look Up table*/ | |
| typedef struct tagHOUGHptfLUT{ | | typedef struct tagHOUGHptfLUT{ | |
|
| INT2 timeIndex; /* time index of the LUT */ | | INT2 timeIndex; /**< time index of the LUT */ | |
| INT8 f0Bin; /* freq. bin for which it has been constructed */ | | INT8 f0Bin; /**< freq. bin for which it has been constructed */ | |
| REAL8 deltaF; /* df=1/TCOH */ | | REAL8 deltaF; /**< df=1/TCOH */ | |
| INT4 nFreqValid; /* number of frequencies where the LUT is valid */ | | INT8 nFreqValid; /**< number of frequencies where the LUT is valid */ | |
| INT2 iniBin; /* first bin affecting the patch with respect to f0 * | | INT4 iniBin; /**< first bin affecting the patch with respect to f0 | |
| / | | */ | |
| INT2 nBin; /* number of bins affecting the patch */ | | INT4 nBin; /**< number of bins affecting the patch */ | |
| UINT2 maxNBins; /* maximum number of bins affecting the patch. For | | INT4 offset; /**< freq. bin (wrt f0Bin) containing center of patc | |
| | | h */ | |
| | | UINT2 maxNBins; /**< maximum number of bins affecting the patch. For | |
| memory allocation */ | | memory allocation */ | |
|
| UINT2 maxNBorders; /* maximum number of borders affecting the patch. Fo
r | | UINT2 maxNBorders; /**< maximum number of borders affecting the patch.
For | |
| memory allocation */ | | memory allocation */ | |
|
| HOUGHBorder *border; /* the annulus borders */ | | HOUGHBorder *border; /**< the annulus borders */ | |
| HOUGHBin2Border *bin; /* Bin to Border correspondence */ | | HOUGHBin2Border *bin; /**< Bin to Border correspondence */ | |
| } HOUGHptfLUT; | | } HOUGHptfLUT; | |
| | | | |
|
| /* Patch-Frequency Grid*/ | | /** Patch-Frequency Grid information */ | |
| typedef struct tagHOUGHPatchGrid{ | | typedef struct tagHOUGHPatchGrid{ | |
|
| REAL8 f0; /* frequency to construct grid */ | | REAL8 f0; /**< frequency to construct grid */ | |
| REAL8 deltaF; /* df=1/TCOH */ | | REAL8 deltaF; /**< df=1/TCOH */ | |
| REAL8 minWidthRatio; /* (min annuli width in this search)/(min annuli | | | |
| width in 1 year) [1.0, 25.0] */ | | | |
| REAL8 deltaX; | | REAL8 deltaX; | |
|
| REAL8 xMin; /* patch limits, as centers of the last pixels */ | | REAL8 xMin; /**< patch limits, as centers of the last pixels */ | |
| REAL8 xMax; | | REAL8 xMax; | |
|
| UINT2 xSide; /* number of pixels in the x direction (projected plane | | UINT2 xSide; /**< number of pixels in the x direction (projected pla | |
| )*/ | | ne)*/ | |
| UINT2 xSideMax; /* maximun number of pixels in the x direction | | REAL8 *xCoor; /**< coordinates of the pixel centers */ | |
| (for memory allocation). i.e., length of xCoor */ | | | |
| REAL8 *xCoor; /* coordinates of the pixel centers */ | | | |
| REAL8 deltaY; | | REAL8 deltaY; | |
|
| REAL8 yMin; /* patch limits,as centers of the last pixels */ | | REAL8 yMin; /**< patch limits,as centers of the last pixels */ | |
| REAL8 yMax; | | REAL8 yMax; | |
|
| UINT2 ySide; /* number of pixels in the y direction */ | | UINT2 ySide; /**< number of pixels in the y direction */ | |
| UINT2 ySideMax; /* maximun number of pixels in the y direction | | REAL8 *yCoor; /**< coordinates of the pixel centers */ | |
| (for memory allocation). i.e., length of yCoor */ | | | |
| REAL8 *yCoor; /* coordinates of the pixel centers */ | | | |
| } HOUGHPatchGrid; | | } HOUGHPatchGrid; | |
| | | | |
|
| | | /** parameters needed for gridding the patch */ | |
| typedef struct tagHOUGHResolutionPar{ | | typedef struct tagHOUGHResolutionPar{ | |
|
| REAL8 f0; /* frequency to construct grid */ | | INT8 f0Bin; /**< frequency bin */ | |
| REAL8 deltaF; /* df=1/TCOH */ | | REAL8 deltaF; /**< df=1/TCOH */ | |
| REAL8 minWidthRatio; /* (min annuli width in this search)/(min annuli | | REAL8 patchSkySizeX; /**< Size of sky patch in radians */ | |
| width in 1 year) [1.0, 25.0] */ | | REAL8 patchSkySizeY; | |
| | | UINT2 pixelFactor; /**< number of pixel that fit in the thinnest annulu | |
| | | s*/ | |
| | | REAL8 pixErr; /**< for validity of LUT as PIXERR */ | |
| | | REAL8 linErr; /**< as LINERR circle ->line */ | |
| | | REAL8 vTotC; /**< estimate value of v-total/C as VTOT */ | |
| } HOUGHResolutionPar; | | } HOUGHResolutionPar; | |
| | | | |
|
| | | /** required for constructing patch */ | |
| | | typedef struct tagHOUGHSizePar{ | |
| | | INT8 f0Bin; /**< corresponding freq. bin */ | |
| | | REAL8 deltaF; /**< df=1/TCOH */ | |
| | | REAL8 deltaX; /**< pixel size in the projected plane */ | |
| | | REAL8 deltaY; | |
| | | UINT2 xSide; /**< number of pixels in the x direction (projected pla | |
| | | ne)*/ | |
| | | UINT2 ySide; /**< number of pixels in the y direction */ | |
| | | UINT2 maxNBins; /**< maximum number of bins affecting the patch. For | |
| | | memory allocation */ | |
| | | UINT2 maxNBorders; /**< maximum number of borders affecting the patch. | |
| | | For | |
| | | memory allocation */ | |
| | | INT8 nFreqValid; /**< number of frequencies where the LUT is valid */ | |
| | | REAL8 epsilon; /**< max. angle (rad.) from the pole to consider | |
| | | a circle as a line in the projected plane */ | |
| | | } HOUGHSizePar; | |
| | | | |
| | | /** cartesian coordinates on a plane */ | |
| typedef struct tagREAL8Cart3Coor{ | | typedef struct tagREAL8Cart3Coor{ | |
| REAL8 x; | | REAL8 x; | |
| REAL8 y; | | REAL8 y; | |
| REAL8 z; | | REAL8 z; | |
| } REAL8Cart3Coor; | | } REAL8Cart3Coor; | |
| | | | |
|
| | | /** cartesian coordinates on a plane */ | |
| typedef struct tagREAL8Cart2Coor{ | | typedef struct tagREAL8Cart2Coor{ | |
| REAL8 x; | | REAL8 x; | |
| REAL8 y; | | REAL8 y; | |
| } REAL8Cart2Coor; | | } REAL8Cart2Coor; | |
| | | | |
|
| | | /** polar coordinates on a plane */ | |
| typedef struct tagREAL8Polar2Coor{ | | typedef struct tagREAL8Polar2Coor{ | |
| REAL8 alpha; | | REAL8 alpha; | |
| REAL8 radius; | | REAL8 radius; | |
| } REAL8Polar2Coor; | | } REAL8Polar2Coor; | |
| | | | |
|
| | | /** right ascension and declination */ | |
| typedef struct tagREAL8UnitPolarCoor{ | | typedef struct tagREAL8UnitPolarCoor{ | |
|
| REAL8 alpha; /* any value */ | | REAL8 alpha; /**< any value */ | |
| REAL8 delta; /* -pi/2, pi/2 */ | | REAL8 delta; /**< \f$ -\pi/2, \pi/2 \f$ */ | |
| } REAL8UnitPolarCoor; | | } REAL8UnitPolarCoor; | |
| | | | |
|
| | | /** Parameters required for constructing LUT */ | |
| typedef struct tagHOUGHParamPLUT{ | | typedef struct tagHOUGHParamPLUT{ | |
|
| INT8 f0Bin; /* freq. bin for which it has been constructed | | INT8 f0Bin; /**< freq. bin for which it has been constructe | |
| */ | | d */ | |
| REAL8 deltaF; /* df=1/TCOH */ | | REAL8 deltaF; /**< df=1/TCOH */ | |
| REAL8UnitPolarCoor xi; /* xi{alpha,delta} in rotated coordinates */ | | REAL8UnitPolarCoor xi; /**< \f$ \xi(\alpha,\delta)\f$ in rotated coord | |
| REAL8 cosDelta; /* Delta cos(phi) for one annulus */ | | inates */ | |
| | | REAL8 cosDelta; /**< \f$ \Delta \cos(\phi)\f$ for one annul | |
| | | us */ | |
| | | INT4 offset; | |
| | | INT8 nFreqValid; | |
| REAL8 cosPhiMax0; | | REAL8 cosPhiMax0; | |
| REAL8 cosPhiMin0; | | REAL8 cosPhiMin0; | |
|
| REAL8 epsilon; /* max. angle (rad.) from the pole to consider | | REAL8 epsilon; /**< max. angle (rad.) from the pole to conside
r | |
| a circle as a line in the projected plane */ | | a circle as a line in the projected plane */ | |
| } HOUGHParamPLUT; | | } HOUGHParamPLUT; | |
| | | | |
|
| | | /** Demodulation parameters needed for the Hough transform (all in same c
oordinate system */ | |
| typedef struct tagHOUGHDemodPar{ | | typedef struct tagHOUGHDemodPar{ | |
| /* all coordinates with respect the same reference system */ | | /* all coordinates with respect the same reference system */ | |
|
| REAL8 deltaF; /* df=1/TCOH */ | | REAL8 deltaF; /**< df=1/TCOH */ | |
| REAL8UnitPolarCoor skyPatch; /* N_center {alpha, delta} */ | | REAL8UnitPolarCoor skyPatch; /**< N_center \f$(alpha, delta)\f$ */ | |
| REAL8Cart3Coor veloC; /* v(t)/c {x,y,z} */ | | REAL8Cart3Coor veloC; /**< \f$ v(t)/c {x,y,z} \f$ */ | |
| REAL8Cart3Coor positC; /* (x(t)-x(t0))/c {x,y,z} */ | | REAL8Cart3Coor positC; /**< \f$ (x(t)-x(t_0))/c {x,y,z} \f$*/ | |
| REAL8 timeDiff; /* T(t)-T(t0) */ | | REAL8 timeDiff; /**< \f$ T(t)-T(t_0) \f$ */ | |
| REAL8Vector spin; /* length: Maximum order of spdwn parameter */ | | REAL8Vector spin; /**< spindown parameters */ | |
| /* *data: pointer to Spindown parameter set Fk */ | | | |
| } HOUGHDemodPar; | | } HOUGHDemodPar; | |
| | | | |
| /* | | /* | |
| * 11. Extern Global variables. (discouraged) | | * 11. Extern Global variables. (discouraged) | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| * 12. Functions Declarations (i.e., prototypes). | | * 12. Functions Declarations (i.e., prototypes). | |
| */ | | */ | |
|
| | | void LALHOUGHComputeSizePar (LALStatus *status, /* demod case */ | |
| | | HOUGHSizePar *out, | |
| | | HOUGHResolutionPar *in | |
| | | ); | |
| | | | |
|
| void LALHOUGHPatchGrid (LALStatus *status, | | void LALHOUGHComputeNDSizePar (LALStatus *status, /* non -demod case*/ | |
| HOUGHPatchGrid *out, /* Patch Grid info */ | | HOUGHSizePar *out, | |
| HOUGHResolutionPar *in1 /* */ | | HOUGHResolutionPar *in | |
| ); | | ); | |
| | | | |
|
| void LALHOUGHParamPLUT (LALStatus *status, | | void LALHOUGHFillPatchGrid (LALStatus *status, | |
| | | HOUGHPatchGrid *out, | |
| | | HOUGHSizePar *par | |
| | | ); | |
| | | | |
| | | void LALHOUGHParamPLUT (LALStatus *status, /* Demod. case */ | |
| | | HOUGHParamPLUT *out, /* parameters needed build LUT*/ | |
| | | HOUGHSizePar *sizePar, | |
| | | HOUGHDemodPar *par /* demodulation parameters */ | |
| | | ); | |
| | | | |
| | | void LALNDHOUGHParamPLUT (LALStatus *status, /* non-demod. case */ | |
| HOUGHParamPLUT *out, /* parameters needed build LUT*/ | | HOUGHParamPLUT *out, /* parameters needed build LUT*/ | |
|
| INT8 f0Bin, /* freq. bin to construct LUT */ | | HOUGHSizePar *sizePar, | |
| HOUGHDemodPar *par /* demodulation parameters */ | | HOUGHDemodPar *par /* demodulation parameters */ | |
| ); | | ); | |
| | | | |
| void LALRotatePolarU(LALStatus *status, | | void LALRotatePolarU(LALStatus *status, | |
| REAL8UnitPolarCoor *out, | | REAL8UnitPolarCoor *out, | |
| REAL8UnitPolarCoor *in, | | REAL8UnitPolarCoor *in, | |
| REAL8UnitPolarCoor *par | | REAL8UnitPolarCoor *par | |
| ); | | ); | |
| | | | |
| void LALInvRotatePolarU(LALStatus *status, | | void LALInvRotatePolarU(LALStatus *status, | |
| | | | |
End of changes. 53 change blocks. |
| 108 lines changed or deleted | | 258 lines changed or added | |
|
| RealFFT.h | | RealFFT.h | |
| /**** <lalVerbatim file="RealFFTHV"> | | /**** <lalVerbatim file="RealFFTHV"> | |
|
| * $Id: RealFFT.h,v 1.12 2002/05/01 16:39:03 jolien Exp $ | | * $Id: RealFFT.h,v 1.16 2005/06/13 22:22:34 kipp Exp $ | |
| **** </lalVerbatim> */ | | **** </lalVerbatim> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \section{Header \texttt{RealFFT.h}} | | * \section{Header \texttt{RealFFT.h}} | |
| * \label{s:RealFFT.h} | | * \label{s:RealFFT.h} | |
| * | | * | |
| * Performs real-to-complex and complex-to-real FFTs. | | * Performs real-to-complex and complex-to-real FFTs. | |
| * | | * | |
| * \subsection*{Synopsis} | | * \subsection*{Synopsis} | |
| | | | |
| skipping to change at line 33 | | skipping to change at line 33 | |
| #ifndef _REALFFT_H | | #ifndef _REALFFT_H | |
| #define _REALFFT_H | | #define _REALFFT_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( REALFFTH, "$Id: RealFFT.h,v 1.12 2002/05/01 16:39:03 jolien Exp $"
); | | NRCSID( REALFFTH, "$Id: RealFFT.h,v 1.16 2005/06/13 22:22:34 kipp Exp $" ); | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * \subsection*{Error conditions} | | * \subsection*{Error conditions} | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalErrTable> */ | | /**** <lalErrTable> */ | |
| | | | |
| #define REALFFTH_ENULL 1 | | #define REALFFTH_ENULL 1 | |
| #define REALFFTH_ENNUL 2 | | #define REALFFTH_ENNUL 2 | |
| #define REALFFTH_ESIZE 4 | | #define REALFFTH_ESIZE 4 | |
| #define REALFFTH_ESZMM 8 | | #define REALFFTH_ESZMM 8 | |
| #define REALFFTH_ESLEN 16 | | #define REALFFTH_ESLEN 16 | |
| #define REALFFTH_ESAME 32 | | #define REALFFTH_ESAME 32 | |
| #define REALFFTH_ESIGN 64 | | #define REALFFTH_ESIGN 64 | |
| #define REALFFTH_EDATA 128 | | #define REALFFTH_EDATA 128 | |
| #define REALFFTH_EALOC 256 | | #define REALFFTH_EALOC 256 | |
| #define REALFFTH_EFFTW 512 | | #define REALFFTH_EFFTW 512 | |
| #define REALFFTH_ESNGL 1024 | | #define REALFFTH_ESNGL 1024 | |
|
| | | #define REALFFTH_EINTL 2048 | |
| | | | |
| #define REALFFTH_MSGENULL "Null pointer" | | #define REALFFTH_MSGENULL "Null pointer" | |
| #define REALFFTH_MSGENNUL "Non-null pointer" | | #define REALFFTH_MSGENNUL "Non-null pointer" | |
| #define REALFFTH_MSGESIZE "Invalid input size" | | #define REALFFTH_MSGESIZE "Invalid input size" | |
| #define REALFFTH_MSGESZMM "Size mismatch" | | #define REALFFTH_MSGESZMM "Size mismatch" | |
| #define REALFFTH_MSGESLEN "Invalid/mismatched sequence lengths" | | #define REALFFTH_MSGESLEN "Invalid/mismatched sequence lengths" | |
| #define REALFFTH_MSGESAME "Input/Output data vectors are the same" | | #define REALFFTH_MSGESAME "Input/Output data vectors are the same" | |
| #define REALFFTH_MSGESIGN "Incorrect plan sign" | | #define REALFFTH_MSGESIGN "Incorrect plan sign" | |
| #define REALFFTH_MSGEDATA "Bad input data: DC/Nyquist should be real" | | #define REALFFTH_MSGEDATA "Bad input data: DC/Nyquist should be real" | |
| #define REALFFTH_MSGEALOC "Memory allocation failed" | | #define REALFFTH_MSGEALOC "Memory allocation failed" | |
| #define REALFFTH_MSGEFFTW "Error in FFTW" | | #define REALFFTH_MSGEFFTW "Error in FFTW" | |
| #define REALFFTH_MSGESNGL "FFTW library is not single-precision" | | #define REALFFTH_MSGESNGL "FFTW library is not single-precision" | |
|
| | | #define REALFFTH_MSGEINTL "Error in Intel FFT library" | |
| | | | |
| /**** </lalErrTable> */ | | /**** </lalErrTable> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Structures} | | * \subsection*{Structures} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
|
| typedef struct tagRealFFTPlan RealFFTPlan; | | typedef struct tagREAL4FFTPlan REAL4FFTPlan; | |
| | | typedef struct tagREAL8FFTPlan REAL8FFTPlan; | |
| | | #define tagRealFFTPlan tagREAL4FFTPlan | |
| | | #define RealFFTPlan REAL4FFTPlan | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure contains the parameters necessary for performing an FFT o
f a | | * This structure contains the parameters necessary for performing an FFT o
f a | |
| * given size and direction. The contents should not be manually adjusted. | | * given size and direction. The contents should not be manually adjusted. | |
| * | | * | |
| * \newpage\input{RealFFTC} | | * \newpage\input{RealFFTC} | |
|
| | | * | |
| | | * \newpage\subsection{XLAL Functions} | |
| | | * | |
| | | * \subsubsection*{Synopsis} | |
| | | * \begin{verbatim} | |
| | | * #include <lal/RealFFT.h> | |
| | | * | |
| | | * REAL4FFTPlan * XLALCreateREAL4FFTPlan( UINT4 size, int fwdflg, int measu | |
| | | relvl ); | |
| | | * REAL4FFTPlan * XLALCreateForwardREAL4FFTPlan( UINT4 size, int measurelvl | |
| | | ); | |
| | | * REAL4FFTPlan * XLALCreateReverseREAL4FFTPlan( UINT4 size, int measurelvl | |
| | | ); | |
| | | * void XLALDestroyREAL4FFTPlan( REAL4FFTPlan *plan ); | |
| | | * | |
| | | * int XLALREAL4ForwardFFT( COMPLEX8Vector *output, REAL4Vector *input, | |
| | | * REAL4FFTPlan *plan ); | |
| | | * int XLALREAL4ReverseFFT( REAL4Vector *output, COMPLEX8Vector *input, | |
| | | * REAL4FFTPlan *plan ); | |
| | | * int XLALREAL4VectorFFT( REAL4Vector *output, REAL4Vector *input, | |
| | | * REAL4FFTPlan *plan ); | |
| | | * int XLALREAL4PowerSpectrum( REAL4Vector *spec, REAL4Vector *data, | |
| | | * REAL4FFTPlan *plan ); | |
| | | * | |
| | | * REAL8FFTPlan * XLALCreateREAL8FFTPlan( UINT4 size, int fwdflg, int measu | |
| | | relvl ); | |
| | | * REAL8FFTPlan * XLALCreateForwardREAL8FFTPlan( UINT4 size, int measurelvl | |
| | | ); | |
| | | * REAL8FFTPlan * XLALCreateReverseREAL8FFTPlan( UINT4 size, int measurelvl | |
| | | ); | |
| | | * void XLALDestroyREAL8FFTPlan( REAL8FFTPlan *plan ); | |
| | | * | |
| | | * int XLALREAL8ForwardFFT( COMPLEX16Vector *output, REAL8Vector *input, | |
| | | * REAL8FFTPlan *plan ); | |
| | | * int XLALREAL8ReverseFFT( REAL8Vector *output, COMPLEX16Vector *input, | |
| | | * REAL8FFTPlan *plan ); | |
| | | * int XLALREAL8VectorFFT( REAL8Vector *output, REAL8Vector *input, | |
| | | * REAL8FFTPlan *plan ); | |
| | | * int XLALREAL8PowerSpectrum( REAL8Vector *spec, REAL8Vector *data, | |
| | | * REAL8FFTPlan *plan ); | |
| | | * \end{verbatim} | |
| | | * \idx{XLALCreateREAL4FFTPlan} | |
| | | * \idx{XLALCreateForwardREAL4FFTPlan} | |
| | | * \idx{XLALCreateReverseREAL4FFTPlan} | |
| | | * \idx{XLALDestroyREAL4FFTPlan} | |
| | | * \idx{XLALREAL4ForwardFFT} | |
| | | * \idx{XLALREAL4ReverseFFT} | |
| | | * \idx{XLALREAL4VectorFFT} | |
| | | * \idx{XLALREAL4PowerSpectrum} | |
| | | * \idx{XLALCreateREAL8FFTPlan} | |
| | | * \idx{XLALCreateForwardREAL8FFTPlan} | |
| | | * \idx{XLALCreateReverseREAL8FFTPlan} | |
| | | * \idx{XLALDestroyREAL8FFTPlan} | |
| | | * \idx{XLALREAL8ForwardFFT} | |
| | | * \idx{XLALREAL8ReverseFFT} | |
| | | * \idx{XLALREAL8VectorFFT} | |
| | | * \idx{XLALREAL8PowerSpectrum} | |
| | | * | |
| | | * \subsubsection*{Description} | |
| | | * | |
| | | * The \verb+REAL4+ routines are described below. These use single-precisi | |
| | | on | |
| | | * FFTs, i.e., they convert \verb+REAL4Vector+s into \verb+COMPLEX8Vector+s | |
| | | * and vice-versa. The \verb+REAL8+ versions of the routines are the same | |
| | | * but they are double-precision versions, i.e., they convert | |
| | | * \verb+REAL8Vector+s into \verb+COMPLEX16Vector+s. | |
| | | * | |
| | | * The routine \verb+XLALCreateREAL4FFTPlan+ creates a \verb+REAL4FFTPlan+ | |
| | | * structure to perform FFTs of vectors of length \verb+size+. If | |
| | | * \verb+fwdflg+ is non-zero then the plan is created to perform forward | |
| | | * (real-to-complex) FFTs with a negative exponential sign. Otherwise | |
| | | * the plan is created to perform reverse (complex-to-real) FFTs with a | |
| | | * positive exponential sign. The value of \verb+measurelvl+ determines | |
| | | * how much optimization of the plan FFTW will do with the most optimizatio | |
| | | n | |
| | | * taking the most amount of time. Reasonable values for \verb+measurelvl+ | |
| | | * would be 0 for the fasted plan creation (FFTW does not measure the speed | |
| | | * of any transform with this level but rather estimates which plan will | |
| | | * be the fastet) or 1 to measure a few likely plans to determine the faste | |
| | | st. | |
| | | * | |
| | | * \verb+XLALCreateForwardREAL4FFTPlan+ is equivalent to | |
| | | * \verb+XLALCreateREAL4FFTPlan+ with \verb+fwdflg+ set to 1. | |
| | | * \verb+XLALCreateReverseREAL4FFTPlan+ is equivalent to | |
| | | * \verb+XLALCreateREAL4FFTPlan+ with \verb+fwdflg+ set to 0. | |
| | | * | |
| | | * \verb+XLALDestroyREAL4FFTPlan+ is used to destroy the plan, freeing all | |
| | | * memory that was allocated in the structure as well as the structure | |
| | | * itself. It can be used on either forward or reverse plans. | |
| | | * | |
| | | * \verb+XLALREAL4ForwardFFT+ and | |
| | | * \verb+XLALREAL4ReverseFFT+ perform forward (real to complex) and | |
| | | * reverse (complex to real) transforms respectively. The plan supplied | |
| | | * to these routines must be correctly generated for the direction of the | |
| | | * transform. I.e., \verb+XLALREAL4ForwardFFT+ cannot be supplied with | |
| | | * a plan generated by \verb+XLALCreateReverseREAL4FFTPlan+. | |
| | | * | |
| | | * \verb+XLALREAL4VectorFFT+ is a low-level routine that transforms | |
| | | * a real vector to a half-complex real vector (with a forward plan) or | |
| | | * a half-complex real vector to a real vector (with a reverse plan). | |
| | | * If you're not sure what this means, don't use this routine. | |
| | | * The input and output vectors (and their data) must be distinct pointers. | |
| | | * | |
| | | * \verb+XLALREAL4PowerSpectrum+ computes a real power spectrum of the | |
| | | * input real vector and a forward FFT plan. | |
| | | * | |
| | | * \subsubsection*{Return Values} | |
| | | * | |
| | | * Upon success, | |
| | | * \verb+XLALCreateREAL4FFTPlan+, | |
| | | * \verb+XLALCreateForwardREAL4FFTPlan+, and | |
| | | * \verb+XLALCreateReverseREAL4FFTPlan+ return a pointer to a newly-allocat | |
| | | ed | |
| | | * FFT plan. Upon failure, they return a \verb+NULL+ pointer and set | |
| | | * \verb+xlalErrno+ to one of the following values: | |
| | | * \verb+XLAL_EBADLEN+ if \verb+size+ is not greater than zero, | |
| | | * \verb+XLAL_ENOMEM+ if a memory allocation failed, or | |
| | | * \verb+XLAL_EFAILED+ if the FFTW plan creation routine failed. | |
| | | * | |
| | | * \verb+XLALDestroyREAL4FFTPlan+ does not return any value but, upon | |
| | | * failure, it will set \verb+xlalErrno+ to one of the following values: | |
| | | * \verb+XLAL_EFAULT+ if the routine is provided a \verb+NULL+ pointer, or | |
| | | * \verb+XLAL_EINVAL+ if the contents of the plan are invalid (e.g., if the | |
| | | * routine is provided a plan that had been previously destroyed). | |
| | | * | |
| | | * \verb+XLALREAL4ForwardFFT+, | |
| | | * \verb+XLALREAL4ReverseFFT+, | |
| | | * \verb+XLALREAL4VectorFFT+, and | |
| | | * \verb+XLALREAL4PowerSpectrum+ return the value 0 upon succes; upon | |
| | | * failure they return \verb+XLAL_FAILURE+ and set \verb+xlalErrno+ to | |
| | | * one of the following values: | |
| | | * \verb+XLAL_EFAULT+ if one of the input pointers is \verb+NULL+, | |
| | | * \verb+XLAL_EINVAL+ if the input, output, or plan structures appears | |
| | | * invalid or if the routine is passed a plan for the wrong transform | |
| | | * directions or if the input and output data pointers are not distinct | |
| | | * for \verb+XLALREAL4VectorFFT+, | |
| | | * \verb+XLAL_EBADLEN+ if the input and output vectors and the plan have | |
| | | * incompatible lengths, | |
| | | * \verb+XLAL_ENOMEM+ if a memory allocation of temporary internal memory | |
| | | * fails. | |
| | | * | |
| | | * As before, the \verb+REAL8+ versions of these routines behave the | |
| | | * same way but for double-precision transforms. | |
| | | * | |
| * \newpage\input{RealFFTTestC} | | * \newpage\input{RealFFTTestC} | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
|
| /* #define KEEP_OLD_REAL_FFT */ | | /* | |
| | | * | |
| | | * XLAL REAL4 functions | |
| | | * | |
| | | */ | |
| | | | |
| | | REAL4FFTPlan * XLALCreateREAL4FFTPlan( UINT4 size, int fwdflg, int measurel | |
| | | vl ); | |
| | | REAL4FFTPlan * XLALCreateForwardREAL4FFTPlan( UINT4 size, int measurelvl ); | |
| | | REAL4FFTPlan * XLALCreateReverseREAL4FFTPlan( UINT4 size, int measurelvl ); | |
| | | void XLALDestroyREAL4FFTPlan( REAL4FFTPlan *plan ); | |
| | | | |
| | | int XLALREAL4ForwardFFT( COMPLEX8Vector *output, const REAL4Vector *input, | |
| | | const REAL4FFTPlan *plan ); | |
| | | int XLALREAL4ReverseFFT( REAL4Vector *output, const COMPLEX8Vector *input, | |
| | | const REAL4FFTPlan *plan ); | |
| | | int XLALREAL4VectorFFT( REAL4Vector *output, const REAL4Vector *input, | |
| | | const REAL4FFTPlan *plan ); | |
| | | int XLALREAL4PowerSpectrum( REAL4Vector *spec, const REAL4Vector *data, | |
| | | const REAL4FFTPlan *plan ); | |
| | | | |
| | | /* | |
| | | * | |
| | | * XLAL REAL8 functions | |
| | | * | |
| | | */ | |
| | | | |
| | | REAL8FFTPlan * XLALCreateREAL8FFTPlan( UINT4 size, int fwdflg, int measurel | |
| | | vl ); | |
| | | REAL8FFTPlan * XLALCreateForwardREAL8FFTPlan( UINT4 size, int measurelvl ); | |
| | | REAL8FFTPlan * XLALCreateReverseREAL8FFTPlan( UINT4 size, int measurelvl ); | |
| | | void XLALDestroyREAL8FFTPlan( REAL8FFTPlan *plan ); | |
| | | | |
| | | int XLALREAL8ForwardFFT( COMPLEX16Vector *output, REAL8Vector *input, | |
| | | REAL8FFTPlan *plan ); | |
| | | int XLALREAL8ReverseFFT( REAL8Vector *output, COMPLEX16Vector *input, | |
| | | REAL8FFTPlan *plan ); | |
| | | int XLALREAL8VectorFFT( REAL8Vector *output, REAL8Vector *input, | |
| | | REAL8FFTPlan *plan ); | |
| | | int XLALREAL8PowerSpectrum( REAL8Vector *spec, REAL8Vector *data, | |
| | | REAL8FFTPlan *plan ); | |
| | | | |
| | | /* | |
| | | * | |
| | | * LAL REAL4 functions | |
| | | * | |
| | | */ | |
| | | | |
| void | | void | |
|
| LALCreateForwardRealFFTPlan( | | LALCreateForwardREAL4FFTPlan( | |
| LALStatus *status, | | LALStatus *status, | |
|
| RealFFTPlan **plan, | | REAL4FFTPlan **plan, | |
| UINT4 size, | | UINT4 size, | |
| INT4 measure | | INT4 measure | |
| ); | | ); | |
|
| | | #define LALCreateForwardRealFFTPlan LALCreateForwardREAL4FFTPlan | |
| | | | |
| void | | void | |
|
| LALCreateReverseRealFFTPlan( | | LALCreateReverseREAL4FFTPlan( | |
| LALStatus *status, | | LALStatus *status, | |
|
| RealFFTPlan **plan, | | REAL4FFTPlan **plan, | |
| UINT4 size, | | UINT4 size, | |
| INT4 measure | | INT4 measure | |
| ); | | ); | |
|
| | | #define LALCreateReverseRealFFTPlan LALCreateReverseREAL4FFTPlan | |
| | | | |
| void | | void | |
|
| LALDestroyRealFFTPlan( | | LALDestroyREAL4FFTPlan( | |
| LALStatus *status, | | LALStatus *status, | |
|
| RealFFTPlan **plan | | REAL4FFTPlan **plan | |
| ); | | ); | |
|
| | | #define LALDestroyRealFFTPlan LALDestroyREAL4FFTPlan | |
| | | | |
| void | | void | |
|
| LALForwardRealFFT( | | LALForwardREAL4FFT( | |
| LALStatus *status, | | LALStatus *status, | |
| COMPLEX8Vector *output, | | COMPLEX8Vector *output, | |
| REAL4Vector *input, | | REAL4Vector *input, | |
|
| RealFFTPlan *plan | | REAL4FFTPlan *plan | |
| ); | | ); | |
|
| | | #define LALForwardRealFFT LALForwardREAL4FFT | |
| | | | |
| void | | void | |
|
| LALReverseRealFFT( | | LALReverseREAL4FFT( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *output, | | REAL4Vector *output, | |
| COMPLEX8Vector *input, | | COMPLEX8Vector *input, | |
|
| RealFFTPlan *plan | | REAL4FFTPlan *plan | |
| ); | | ); | |
|
| | | #define LALReverseRealFFT LALReverseREAL4FFT | |
| | | | |
| void | | void | |
|
| LALRealPowerSpectrum ( | | LALREAL4PowerSpectrum ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *spec, | | REAL4Vector *spec, | |
| REAL4Vector *data, | | REAL4Vector *data, | |
|
| RealFFTPlan *plan | | REAL4FFTPlan *plan | |
| ); | | ); | |
|
| | | #define LALRealPowerSpectrum LALREAL4PowerSpectrum | |
| | | | |
| void | | void | |
| LALREAL4VectorFFT( | | LALREAL4VectorFFT( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *output, | | REAL4Vector *output, | |
| REAL4Vector *input, | | REAL4Vector *input, | |
|
| RealFFTPlan *plan | | REAL4FFTPlan *plan | |
| ); | | ); | |
| | | | |
|
| /** OLD ROUTINES **/ | | /* | |
| #ifdef KEEP_OLD_FFT | | * | |
| #define KEEP_OLD_REAL_FFT | | * LAL REAL8 functions | |
| #endif | | * | |
| | | */ | |
| #ifdef KEEP_OLD_REAL_FFT | | | |
| | | | |
| void | | | |
| LALEstimateFwdRealFFTPlan ( | | | |
| LALStatus *stat, | | | |
| RealFFTPlan **plan, | | | |
| UINT4 size | | | |
| ); | | | |
| | | | |
| void | | | |
| LALEstimateInvRealFFTPlan ( | | | |
| LALStatus *stat, | | | |
| RealFFTPlan **plan, | | | |
| UINT4 size | | | |
| ); | | | |
| | | | |
| void | | | |
| LALMeasureFwdRealFFTPlan ( | | | |
| LALStatus *stat, | | | |
| RealFFTPlan **plan, | | | |
| UINT4 size | | | |
| ); | | | |
| | | | |
| void | | void | |
|
| LALMeasureInvRealFFTPlan ( | | LALCreateForwardREAL8FFTPlan( | |
| LALStatus *stat, | | LALStatus *status, | |
| RealFFTPlan **plan, | | REAL8FFTPlan **plan, | |
| UINT4 size | | UINT4 size, | |
| | | INT4 measure | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALREAL4VectorSequenceFFT ( | | LALCreateReverseREAL8FFTPlan( | |
| LALStatus *stat, | | LALStatus *status, | |
| REAL4VectorSequence *vout, | | REAL8FFTPlan **plan, | |
| REAL4VectorSequence *vinp, | | UINT4 size, | |
| RealFFTPlan *plan | | INT4 measure | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALFwdRealFFT ( | | LALDestroyREAL8FFTPlan( | |
| LALStatus *stat, | | LALStatus *status, | |
| COMPLEX8Vector *vout, | | REAL8FFTPlan **plan | |
| REAL4Vector *vinp, | | | |
| RealFFTPlan *plan | | | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALInvRealFFT ( | | LALForwardREAL8FFT( | |
| LALStatus *stat, | | LALStatus *status, | |
| REAL4Vector *vout, | | COMPLEX16Vector *output, | |
| COMPLEX8Vector *vinp, | | REAL8Vector *input, | |
| RealFFTPlan *plan | | REAL8FFTPlan *plan | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALFwdRealSequenceFFT ( | | LALReverseREAL8FFT( | |
| LALStatus *stat, | | LALStatus *status, | |
| COMPLEX8VectorSequence *vout, | | REAL8Vector *output, | |
| REAL4VectorSequence *vinp, | | COMPLEX16Vector *input, | |
| RealFFTPlan *plan | | REAL8FFTPlan *plan | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALInvRealSequenceFFT ( | | LALREAL8PowerSpectrum ( | |
| LALStatus *stat, | | LALStatus *status, | |
| REAL4VectorSequence *vout, | | REAL8Vector *spec, | |
| COMPLEX8VectorSequence *vinp, | | REAL8Vector *data, | |
| RealFFTPlan *plan | | REAL8FFTPlan *plan | |
| ); | | ); | |
| | | | |
| void | | void | |
|
| LALRealSequencePowerSpectrum ( | | LALREAL8VectorFFT( | |
| LALStatus *stat, | | LALStatus *status, | |
| REAL4VectorSequence *vout, | | REAL8Vector *output, | |
| REAL4VectorSequence *vinp, | | REAL8Vector *input, | |
| RealFFTPlan *plan | | REAL8FFTPlan *plan | |
| ); | | ); | |
| | | | |
|
| #endif /* KEEP_OLD_REAL_FFT */ | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { | | #pragma { | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _REALFFT_H */ | | #endif /* _REALFFT_H */ | |
| | | | |
End of changes. 35 change blocks. |
| 80 lines changed or deleted | | 256 lines changed or added | |
|
| RingSearch.h | | RingSearch.h | |
| /**** <lalVerbatim file="RingSearchHV"> | | /**** <lalVerbatim file="RingSearchHV"> | |
| * Author: Jolien Creighton | | * Author: Jolien Creighton | |
|
| * $Id: RingSearch.h,v 1.4 2002/06/06 19:13:05 jolien Exp $ | | * $Id: RingSearch.h,v 1.11 2005/06/15 19:53:10 jolien Exp $ | |
| **** </lalVerbatim> */ | | **** </lalVerbatim> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \section{Header \texttt{RingSearch.h}} | | * \section{Header \texttt{RingSearch.h}} | |
| * | | * | |
| * Black hole ringdown search code. | | * Black hole ringdown search code. | |
| * | | * | |
| * \subsection*{Synopsis} | | * \subsection*{Synopsis} | |
| * \begin{verbatim} | | * \begin{verbatim} | |
| | | | |
| skipping to change at line 25 | | skipping to change at line 25 | |
| * \end{verbatim} | | * \end{verbatim} | |
| * | | * | |
| * Routines for searching for black hole ringdown waveforms. | | * Routines for searching for black hole ringdown waveforms. | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| #ifndef _RINGSEARCH_H | | #ifndef _RINGSEARCH_H | |
| #define _RINGSEARCH_H | | #define _RINGSEARCH_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
|
| | | #include <lal/LIGOMetadataTables.h> | |
| | | #include <lal/TimeFreqFFT.h> | |
| #include <lal/RealFFT.h> | | #include <lal/RealFFT.h> | |
|
| | | #include <lal/Window.h> | |
| #include <lal/Ring.h> | | #include <lal/Ring.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( RINGSEARCHH, "$Id: RingSearch.h,v 1.4 2002/06/06 19:13:05 jolien Ex
p $" ); | | NRCSID( RINGSEARCHH, "$Id: RingSearch.h,v 1.11 2005/06/15 19:53:10 jolien E
xp $" ); | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * \subsection*{Error conditions} | | * \subsection*{Error conditions} | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalErrTable> */ | | /**** <lalErrTable> */ | |
| #define RINGSEARCHH_ENULL 00001 | | #define RINGSEARCHH_ENULL 00001 | |
| #define RINGSEARCHH_ENNUL 00002 | | #define RINGSEARCHH_ENNUL 00002 | |
| #define RINGSEARCHH_EALOC 00004 | | #define RINGSEARCHH_EALOC 00004 | |
| #define RINGSEARCHH_ESIZE 00010 | | #define RINGSEARCHH_ESIZE 00010 | |
| #define RINGSEARCHH_ESZMM 00020 | | #define RINGSEARCHH_ESZMM 00020 | |
| #define RINGSEARCHH_ENSEG 00040 | | #define RINGSEARCHH_ENSEG 00040 | |
| #define RINGSEARCHH_EIOPT 00100 | | #define RINGSEARCHH_EIOPT 00100 | |
| #define RINGSEARCHH_EFLOW 00200 | | #define RINGSEARCHH_EFLOW 00200 | |
| #define RINGSEARCHH_EFREQ 00400 | | #define RINGSEARCHH_EFREQ 00400 | |
| #define RINGSEARCHH_EQUAL 01000 | | #define RINGSEARCHH_EQUAL 01000 | |
|
| | | #define RINGSEARCHH_ELSEG 02000 | |
| | | | |
| #define RINGSEARCHH_MSGENULL "Null pointer" | | #define RINGSEARCHH_MSGENULL "Null pointer" | |
| #define RINGSEARCHH_MSGENNUL "Non-null pointer" | | #define RINGSEARCHH_MSGENNUL "Non-null pointer" | |
| #define RINGSEARCHH_MSGEALOC "Memory allocation error" | | #define RINGSEARCHH_MSGEALOC "Memory allocation error" | |
| #define RINGSEARCHH_MSGESIZE "Invalid segment size" | | #define RINGSEARCHH_MSGESIZE "Invalid segment size" | |
| #define RINGSEARCHH_MSGESZMM "Size mismatch" | | #define RINGSEARCHH_MSGESZMM "Size mismatch" | |
| #define RINGSEARCHH_MSGENSEG "Non integer number of segments in data" | | #define RINGSEARCHH_MSGENSEG "Non integer number of segments in data" | |
| #define RINGSEARCHH_MSGEIOPT "Invalid option" | | #define RINGSEARCHH_MSGEIOPT "Invalid option" | |
| #define RINGSEARCHH_MSGEFLOW "Invalid low frequency cutoff" | | #define RINGSEARCHH_MSGEFLOW "Invalid low frequency cutoff" | |
| #define RINGSEARCHH_MSGEFREQ "Invalid bank frequency range" | | #define RINGSEARCHH_MSGEFREQ "Invalid bank frequency range" | |
| #define RINGSEARCHH_MSGEQUAL "Invalid bank quality range" | | #define RINGSEARCHH_MSGEQUAL "Invalid bank quality range" | |
|
| | | #define RINGSEARCHH_MSGELSEG "Less than two segments in data" | |
| /**** </lalErrTable> */ | | /**** </lalErrTable> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Structures} | | * \subsection*{Structures} | |
| * | | * | |
| * \subsubsection*{Type \texttt{RingSearchParams}} | | * \subsubsection*{Type \texttt{RingSearchParams}} | |
| * \idx[Type]{RingSearchParams} | | * \idx[Type]{RingSearchParams} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef struct | | typedef struct | |
| tagRingSearchParams | | tagRingSearchParams | |
| { | | { | |
| UINT4 segmentSize; | | UINT4 segmentSize; | |
| UINT4 numSegments; | | UINT4 numSegments; | |
| COMPLEX8FrequencySeries *dataSegment; | | COMPLEX8FrequencySeries *dataSegment; | |
| REAL4FrequencySeries *invSpectrum; | | REAL4FrequencySeries *invSpectrum; | |
| RealFFTPlan *forwardPlan; | | RealFFTPlan *forwardPlan; | |
| RealFFTPlan *reversePlan; | | RealFFTPlan *reversePlan; | |
|
| | | AvgSpecMethod avgSpecMeth; | |
| | | REAL4 avgSpecNorm; | |
| REAL4 dynRangeFac; | | REAL4 dynRangeFac; | |
| UINT4 invSpecTrunc; | | UINT4 invSpecTrunc; | |
| REAL4 lowFrequency; | | REAL4 lowFrequency; | |
|
| | | REAL4 highpassFrequency; | |
| REAL4 minFrequency; | | REAL4 minFrequency; | |
| REAL4 maxFrequency; | | REAL4 maxFrequency; | |
| REAL4 minQuality; | | REAL4 minQuality; | |
| REAL4 maxQuality; | | REAL4 maxQuality; | |
|
| | | REAL4 templatePhase; | |
| REAL4 maxMismatch; | | REAL4 maxMismatch; | |
| REAL4 sampleRate; | | REAL4 sampleRate; | |
| RingTemplateBank *templateBank; | | RingTemplateBank *templateBank; | |
| UINT4 templatesSent; | | UINT4 templatesSent; | |
| UINT4 templatesDone; | | UINT4 templatesDone; | |
| INT4 searchMaster; | | INT4 searchMaster; | |
| INT4 myProcNumber; | | INT4 myProcNumber; | |
| INT4 numSlaves; | | INT4 numSlaves; | |
| UINT4 numEvents; | | UINT4 numEvents; | |
| REAL4 threshold; | | REAL4 threshold; | |
| CHAR ifoName[3]; | | CHAR ifoName[3]; | |
| INT4 maximizeEvents; | | INT4 maximizeEvents; | |
| INT4 keepResults; | | INT4 keepResults; | |
| UINT4 numResults; | | UINT4 numResults; | |
| REAL4TimeSeries *result; | | REAL4TimeSeries *result; | |
|
| | | INT4 testZeroData; | |
| | | INT4 testInject; | |
| | | LIGOTimeGPS testInjectTime; | |
| | | REAL4 testInjectFreq; | |
| | | REAL4 testInjectQual; | |
| | | REAL4 testInjectAmpl; | |
| | | REAL4 testInjectPhase; | |
| } | | } | |
| RingSearchParams; | | RingSearchParams; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure contains the ring search parameters. The structure is | | * This structure contains the ring search parameters. The structure is | |
| * primarily for internal use, but some of the fields can be modified. | | * primarily for internal use, but some of the fields can be modified. | |
| * | | * | |
| * This structure is created by \verb+LALFindChirpInit()+ and is destroyed | | * This structure is created by \verb+LALFindChirpInit()+ and is destroyed | |
| * by \verb+LALFindChirpFini()+, and modified as needed in the other routin
es. | | * by \verb+LALFindChirpFini()+, and modified as needed in the other routin
es. | |
| | | | |
| skipping to change at line 129 | | skipping to change at line 145 | |
| * \item[\texttt{forwardPlan}] Forward FFT plan. | | * \item[\texttt{forwardPlan}] Forward FFT plan. | |
| * \item[\texttt{reversePlan}] Reverse FFT plan. | | * \item[\texttt{reversePlan}] Reverse FFT plan. | |
| * \item[\texttt{dynRangeFac}] Dynamical range factor used to scale strai
n. | | * \item[\texttt{dynRangeFac}] Dynamical range factor used to scale strai
n. | |
| * \item[\texttt{invSpecTrunc}] Number of points of the time-domain invers
e | | * \item[\texttt{invSpecTrunc}] Number of points of the time-domain invers
e | |
| * spectrum response to keep. | | * spectrum response to keep. | |
| * \item[\texttt{lowFrequency}] Low frequency (Hz) cutoff of data and spec
trum. | | * \item[\texttt{lowFrequency}] Low frequency (Hz) cutoff of data and spec
trum. | |
| * \item[\texttt{minFrequency}] Minimum ring frequency (Hz) for the bank. | | * \item[\texttt{minFrequency}] Minimum ring frequency (Hz) for the bank. | |
| * \item[\texttt{maxFrequency}] Maximum ring frequency (Hz) for the bank. | | * \item[\texttt{maxFrequency}] Maximum ring frequency (Hz) for the bank. | |
| * \item[\texttt{minQuality}] Minimum ring quality for the bank. | | * \item[\texttt{minQuality}] Minimum ring quality for the bank. | |
| * \item[\texttt{maxQuality}] Maximum ring quality for the bank. | | * \item[\texttt{maxQuality}] Maximum ring quality for the bank. | |
|
| | | * \item[\texttt{maxQuality}] Phase of templates (rad) in the bank. | |
| * \item[\texttt{maxMismatch}] Maximum allowed mismatch for the bank. | | * \item[\texttt{maxMismatch}] Maximum allowed mismatch for the bank. | |
| * \item[\texttt{sampleRate}] Sample rate of the data. | | * \item[\texttt{sampleRate}] Sample rate of the data. | |
| * \item[\texttt{templateBank}] The template bank. | | * \item[\texttt{templateBank}] The template bank. | |
| * \item[\texttt{templatesSent}] For MPI code: number of templates sent. | | * \item[\texttt{templatesSent}] For MPI code: number of templates sent. | |
| * \item[\texttt{templatesDone}] For MPI code: number of templates done. | | * \item[\texttt{templatesDone}] For MPI code: number of templates done. | |
| * \item[\texttt{searchMaster}] For MPI code: non-zero if search master. | | * \item[\texttt{searchMaster}] For MPI code: non-zero if search master. | |
| * \item[\texttt{myProcNumber}] For MPI code: MPI comm rank. | | * \item[\texttt{myProcNumber}] For MPI code: MPI comm rank. | |
| * \item[\texttt{numSlaves}] For MPI code: number of slaves. | | * \item[\texttt{numSlaves}] For MPI code: number of slaves. | |
| * \item[\texttt{numEvents}] Cumulative number of events found. | | * \item[\texttt{numEvents}] Cumulative number of events found. | |
| * \item[\texttt{threshold}] SNR threshold for an event. | | * \item[\texttt{threshold}] SNR threshold for an event. | |
| | | | |
| skipping to change at line 185 | | skipping to change at line 202 | |
| * \item[\texttt{response}] The response function. | | * \item[\texttt{response}] The response function. | |
| * \end{description} | | * \end{description} | |
| * | | * | |
| * | | * | |
| * \subsubsection*{Type \texttt{RingEventList}} | | * \subsubsection*{Type \texttt{RingEventList}} | |
| * \idx[Type]{RingEventList} | | * \idx[Type]{RingEventList} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef struct | | typedef struct | |
|
| tagRingEventList | | | |
| { | | | |
| CHAR ifoName[3]; | | | |
| INT8 startTimeNS; | | | |
| REAL4 duration; | | | |
| REAL4 amplitude; | | | |
| REAL4 frequency; | | | |
| REAL4 quality; | | | |
| REAL4 mass; | | | |
| REAL4 snr; | | | |
| REAL4 confidence; | | | |
| struct tagRingEventList *next; | | | |
| } | | | |
| RingEventList; | | | |
| /**** </lalVerbatim> */ | | | |
| /**** <lalLaTeX> | | | |
| * | | | |
| * This structure is a node on a linked list of events returned by the | | | |
| * \verb+LALRingSearch()+ function. The fields are: | | | |
| * | | | |
| * \begin{description} | | | |
| * \item[\texttt{ifoName}] The IFO name (e.g., ``H1,'' ``L1,'' etc.). | | | |
| * \item[\texttt{startTimeNS}] The start time of the event in GPS nanosecon | | | |
| ds. | | | |
| * \item[\texttt{duration}] The duration of the event in seconds. | | | |
| * \item[\texttt{amplitude}] The amplitude of the event. | | | |
| * \item[\texttt{frequency}] The central frequency of the ring filter. | | | |
| * \item[\texttt{quality}] The quality factor of the ring filter. | | | |
| * \item[\texttt{mass}] The mass of a black hole corresponding to the ring | | | |
| * filter. | | | |
| * \item[\texttt{snr}] The amplitude signal-to-noise ratio of the event. | | | |
| * \item[\texttt{confidence}] The statistical confidence of this event. | | | |
| * \item[\texttt{next}] Pointer to the next element in the linked list. | | | |
| * \end{description} | | | |
| * | | | |
| * | | | |
| * \subsubsection*{Type \texttt{RingSearchInput}} | | | |
| * \idx[Type]{RingSearchInput} | | | |
| * | | | |
| **** </lalLaTeX> */ | | | |
| /**** <lalVerbatim> */ | | | |
| typedef struct | | | |
| tagRingSearchInput | | tagRingSearchInput | |
| { | | { | |
| UINT4 startTemplate; | | UINT4 startTemplate; | |
| UINT4 templatesToDo; | | UINT4 templatesToDo; | |
| } | | } | |
| RingSearchInput; | | RingSearchInput; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure is the input to the \verb+LALRingSearch()+ function. | | * This structure is the input to the \verb+LALRingSearch()+ function. | |
| | | | |
| skipping to change at line 249 | | skipping to change at line 225 | |
| * \item[\texttt{startTemplate}] The number of the template in the template | | * \item[\texttt{startTemplate}] The number of the template in the template | |
| * to use as the first filter. | | * to use as the first filter. | |
| * \item[\texttt{templatesToDo}] The number of templates from the bank to | | * \item[\texttt{templatesToDo}] The number of templates from the bank to | |
| * to use as filters. | | * to use as filters. | |
| * \end{description} | | * \end{description} | |
| * | | * | |
| * \subsubsection*{Type \texttt{AvgSpecParams}} | | * \subsubsection*{Type \texttt{AvgSpecParams}} | |
| * \idx[Type]{AvgSpecParams} | | * \idx[Type]{AvgSpecParams} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
|
| | | #ifndef AVG_SPEC_DECLARED | |
| | | #define AVG_SPEC_DECLARED | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef struct | | typedef struct | |
| tagAvgSpecParams | | tagAvgSpecParams | |
| { | | { | |
| UINT4 segsize; | | UINT4 segsize; | |
| RealFFTPlan *fwdplan; | | RealFFTPlan *fwdplan; | |
|
| | | WindowType wintype; | |
| } | | } | |
| AvgSpecParams; | | AvgSpecParams; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
|
| | | void | |
| | | LALMedianSpectrum( | |
| | | LALStatus *status, | |
| | | REAL4FrequencySeries *output, | |
| | | REAL4TimeSeries *input, | |
| | | AvgSpecParams *params | |
| | | ); | |
| | | #endif | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * This structure contains parameters for routines that compute average | | * This structure contains parameters for routines that compute average | |
| * power spectra. The fields are: | | * power spectra. The fields are: | |
| * | | * | |
| * \begin{description} | | * \begin{description} | |
| * \item[\texttt{segsize}] The size of each segment of data. | | * \item[\texttt{segsize}] The size of each segment of data. | |
| * \item[\texttt{fwdplan}] Forward real FFT plan for that segment size. | | * \item[\texttt{fwdplan}] Forward real FFT plan for that segment size. | |
|
| | | * \item[\texttt{wintype}] type of window to apply to FFT. | |
| * \end{description} | | * \end{description} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| void LALRingSearchInit( | | void LALRingSearchInit( | |
| LALStatus *status, | | LALStatus *status, | |
| RingSearchParams **searchParams, | | RingSearchParams **searchParams, | |
|
| const CHAR **argv, | | CHAR **argv, | |
| INT4 argc | | INT4 argc | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALRingSearchFini( | | LALRingSearchFini( | |
| LALStatus *status, | | LALStatus *status, | |
| RingSearchParams **searchParams | | RingSearchParams **searchParams | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALRingSearchConditionData( | | LALRingSearchConditionData( | |
| LALStatus *status, | | LALStatus *status, | |
| RingSearchParams *params, | | RingSearchParams *params, | |
| RingSearchData *data | | RingSearchData *data | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALRingSearch( | | LALRingSearch( | |
| LALStatus *status, | | LALStatus *status, | |
|
| RingEventList **output, | | SnglBurstTable **output, | |
| RingSearchInput *input, | | RingSearchInput *input, | |
| RingSearchParams *params | | RingSearchParams *params | |
| ); | | ); | |
| | | | |
|
| void | | | |
| LALMedianSpectrum( | | | |
| LALStatus *status, | | | |
| REAL4FrequencySeries *output, | | | |
| REAL4TimeSeries *input, | | | |
| AvgSpecParams *params | | | |
| ); | | | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \vfill{\footnotesize\input{RingSearchHV}} | | * \vfill{\footnotesize\input{RingSearchHV}} | |
| * \newpage\input{RingSearchInitC} | | * \newpage\input{RingSearchInitC} | |
| * \newpage\input{RingSearchConditionDataC} | | * \newpage\input{RingSearchConditionDataC} | |
| * \newpage\input{RingSearchC} | | * \newpage\input{RingSearchC} | |
| * \newpage\input{RingSearchTestC} | | * \newpage\input{RingSearchTestC} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| | | | |
End of changes. 19 change blocks. |
| 54 lines changed or deleted | | 33 lines changed or added | |
|
| SeqFactories.h | | SeqFactories.h | |
| /*----------------------------------------------------------------------- | | /*----------------------------------------------------------------------- | |
| | | | |
| File Name: SeqFactories.h | | File Name: SeqFactories.h | |
| | | | |
| <lalVerbatim file="SeqFactoriesHV"> | | <lalVerbatim file="SeqFactoriesHV"> | |
|
| Revision: $Id: SeqFactories.h,v 1.9 2002/05/21 17:14:37 teviet Exp $ | | Revision: $Id: SeqFactoriesH.m4,v 1.3 2004/11/10 20:41:21 jolien Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| -------------------------------------------------------------------------*/ | | -------------------------------------------------------------------------*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{SeqFactories.h}} | | \section{Header \texttt{SeqFactories.h}} | |
| \label{s:SeqFactories.h} | | \label{s:SeqFactories.h} | |
| | | | |
| Provides prototype and status code information for use of CreateVectorSeque
nce | | Provides prototype and status code information for use of CreateVectorSeque
nce | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| #ifndef _SEQFACTORIES_H | | #ifndef _SEQFACTORIES_H | |
| #define _SEQFACTORIES_H | | #define _SEQFACTORIES_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| #include <lal/AVFactories.h> | | #include <lal/AVFactories.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (SEQFACTORIESH, "$Id: SeqFactories.h,v 1.9 2002/05/21 17:14:37 tevie
t Exp $"); | | NRCSID (SEQFACTORIESH, "$Id: SeqFactoriesH.m4,v 1.3 2004/11/10 20:41:21 jol
ien Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| \input{SeqFactoriesHErrTab} | | \input{SeqFactoriesHErrTab} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| <lalErrTable file="SeqFactoriesHErrTab"> | | <lalErrTable file="SeqFactoriesHErrTab"> | |
| | | | |
| skipping to change at line 123 | | skipping to change at line 123 | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| typedef struct tagCreateArraySequenceIn { | | typedef struct tagCreateArraySequenceIn { | |
| UINT4 length; | | UINT4 length; | |
| UINT4Vector *dimLength; | | UINT4Vector *dimLength; | |
| } CreateArraySequenceIn; | | } CreateArraySequenceIn; | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorSequenceFactoriesC} | | \newpage\input{VectorSequenceFactoriesC} | |
|
| | | | |
| | | \newpage | |
| | | \subsection{XLAL Functions} | |
| | | | |
| | | \subsubsection*{Synopsis} | |
| | | \begin{verbatim} | |
| | | REAL4VectorSequence * XLALCreateVectorSequence(UINT4 length, UINT4 veclen); | |
| | | void XLALCreateVectorSequence(REAL4VectorSequence *vecseq); | |
| | | | |
| | | <vecseqtype> * XLALCreate<vecseqtype>(UINT4 length, UINT4 veclen); | |
| | | void XLALCreate<vecseqtype>(<vecseqtype> *vecseq); | |
| | | \end{verbatim} | |
| | | \idx{XLALCreateREAL4VectorSequence} | |
| | | \idx{XLALDestroyREAL4VectorSequence} | |
| | | \idx{XLALCreate<type>VectorSequence} | |
| | | \idx{XLALDestroy<type>VectorSequence} | |
| | | | |
| | | Here \verb+<vecseqtype>+ is one of | |
| | | \verb+COMPLEX16VectorSequence+, | |
| | | \verb+COMPLEX8VectorSequence+, | |
| | | \verb+REAL8VectorSequence+, | |
| | | \verb+REAL4VectorSequence+, | |
| | | \verb+INT8VectorSequence+, | |
| | | \verb+INT4VectorSequence+, | |
| | | \verb+INT2VectorSequence+, | |
| | | \verb+UINT8VectorSequence+, | |
| | | \verb+UINT4VectorSequence+, | |
| | | \verb+UINT2VectorSequence+, or | |
| | | \verb+CHARVectorSequence+. | |
| | | | |
| | | \subsubsection*{Description} | |
| | | | |
| | | The \verb+XLALCreate<type>VectorSequence+ functions create vector sequences | |
| | | of type \verb+<type>, length \verb+length+, and vector length \verb+veclen+ | |
| | | . | |
| | | The function \verb+XLALCreateVectorSequence+ is the same as | |
| | | \verb+XLALCreateREAL4VectorSequence+. | |
| | | | |
| | | The \verb+XLALDestroy<type>VectorSequence+ functions deallocate the memory | |
| | | allocation pointed to by \verb+vecseq+ including its contents. The functio | |
| | | n | |
| | | \verb+XLALDestroyVectorSequence+ is the same as | |
| | | \verb+XLALDestroyREAL4VectorSequence+. | |
| | | | |
| | | \subsubsection*{Return Values} | |
| | | | |
| | | The create functions return a pointer to the created vector sequence if | |
| | | successful; upon failure they will return \verb+NULL+ and set \verb+xlalErr | |
| | | no+ | |
| | | to one of the following values: \verb+XLAL_ENOMEM+ if memory allocation | |
| | | failed, or \verb+XLAL_EBADLEN+ if the requested \verb+length+ or \verb+vecl | |
| | | en+ | |
| | | is zero. | |
| | | | |
| | | The destroy functions do not have a return value. They can fail if they ar | |
| | | e | |
| | | passed a \verb+NULL+ pointer, in which case \verb+xlalErrno+ is set to | |
| | | \verb+XLAL_EFAULT+, or if the vector sequency passed to the destroy routine | |
| | | has zero length, vector length, or \verb+NULL+ data pointer then | |
| | | \verb+xlalErrno+ is set to \verb+XLAL_EINVAL+. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALCreateSequence(LALStatus *, REAL4Sequence **, UINT4); | | REAL4VectorSequence * XLALCreateVectorSequence ( UINT4 length, UINT4 veclen | |
| void LALCHARCreateSequence(LALStatus *, CHARSequence **, UINT4); | | ); | |
| void LALI2CreateSequence(LALStatus *, INT2Sequence **, UINT4); | | void XLALDestroyVectorSequence ( REAL4VectorSequence * vecseq ); | |
| void LALI4CreateSequence(LALStatus *, INT4Sequence **, UINT4); | | | |
| void LALI8CreateSequence(LALStatus *, INT8Sequence **, UINT4); | | | |
| void LALU2CreateSequence(LALStatus *, UINT2Sequence **, UINT4); | | | |
| void LALU4CreateSequence(LALStatus *, UINT4Sequence **, UINT4); | | | |
| void LALU8CreateSequence(LALStatus *, UINT8Sequence **, UINT4); | | | |
| void LALSCreateSequence(LALStatus *, REAL4Sequence **, UINT4); | | | |
| void LALDCreateSequence(LALStatus *, REAL8Sequence **, UINT4); | | | |
| void LALCCreateSequence(LALStatus *, COMPLEX8Sequence **, UINT4); | | | |
| void LALZCreateSequence(LALStatus *, COMPLEX16Sequence **, UINT4); | | | |
| | | | |
|
| | | void LALCreateSequence(LALStatus *, REAL4Sequence **, UINT4); | |
| void LALDestroySequence(LALStatus *, REAL4Sequence **); | | void LALDestroySequence(LALStatus *, REAL4Sequence **); | |
|
| void LALCHARDestroySequence(LALStatus *, CHARSequence **); | | | |
| void LALI2DestroySequence(LALStatus *, INT2Sequence **); | | | |
| void LALI4DestroySequence(LALStatus *, INT4Sequence **); | | | |
| void LALI8DestroySequence(LALStatus *, INT8Sequence **); | | | |
| void LALU2DestroySequence(LALStatus *, UINT2Sequence **); | | | |
| void LALU4DestroySequence(LALStatus *, UINT4Sequence **); | | | |
| void LALU8DestroySequence(LALStatus *, UINT8Sequence **); | | | |
| void LALSDestroySequence(LALStatus *, REAL4Sequence **); | | | |
| void LALDDestroySequence(LALStatus *, REAL8Sequence **); | | | |
| void LALCDestroySequence(LALStatus *, COMPLEX8Sequence **); | | | |
| void LALZDestroySequence(LALStatus *, COMPLEX16Sequence **); | | | |
| | | | |
| void LALCreateVectorSequence(LALStatus *, | | | |
| REAL4VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALCHARCreateVectorSequence(LALStatus *, | | | |
| CHARVectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALI2CreateVectorSequence(LALStatus *, | | | |
| INT2VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALI4CreateVectorSequence(LALStatus *, | | | |
| INT4VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALI8CreateVectorSequence(LALStatus *, | | | |
| INT8VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALU2CreateVectorSequence(LALStatus *, | | | |
| UINT2VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALU4CreateVectorSequence(LALStatus *, | | | |
| UINT4VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALU8CreateVectorSequence(LALStatus *, | | | |
| UINT8VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALSCreateVectorSequence(LALStatus *, | | | |
| REAL4VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALDCreateVectorSequence(LALStatus *, | | | |
| REAL8VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALCCreateVectorSequence(LALStatus *, | | | |
| COMPLEX8VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| void LALZCreateVectorSequence(LALStatus *, | | | |
| COMPLEX16VectorSequence **, | | | |
| CreateVectorSequenceIn *); | | | |
| | | | |
| void LALDestroyVectorSequence (LALStatus *, | | | |
| REAL4VectorSequence **); | | | |
| void LALCHARDestroyVectorSequence (LALStatus *, | | | |
| CHARVectorSequence **); | | | |
| void LALI2DestroyVectorSequence(LALStatus *, | | | |
| INT2VectorSequence **); | | | |
| void LALI4DestroyVectorSequence(LALStatus *, | | | |
| INT4VectorSequence **); | | | |
| void LALI8DestroyVectorSequence(LALStatus *, | | | |
| INT8VectorSequence **); | | | |
| void LALU2DestroyVectorSequence(LALStatus *, | | | |
| UINT2VectorSequence **); | | | |
| void LALU4DestroyVectorSequence(LALStatus *, | | | |
| UINT4VectorSequence **); | | | |
| void LALU8DestroyVectorSequence(LALStatus *, | | | |
| UINT8VectorSequence **); | | | |
| void LALSDestroyVectorSequence(LALStatus *, | | | |
| REAL4VectorSequence **); | | | |
| void LALDDestroyVectorSequence(LALStatus *, | | | |
| REAL8VectorSequence **); | | | |
| void LALCDestroyVectorSequence(LALStatus *, | | | |
| COMPLEX8VectorSequence **); | | | |
| void LALZDestroyVectorSequence(LALStatus *, | | | |
| COMPLEX16VectorSequence **); | | | |
| | | | |
|
| /* <lalLaTeX> | | void LALCreateVectorSequence(LALStatus *, REAL4VectorSequence **, | |
| \newpage\input{ArraySequenceFactoriesC} | | CreateVectorSequenceIn *); | |
| </lalLaTeX> */ | | void LALDestroyVectorSequence(LALStatus *, REAL4VectorSequence**); | |
| | | | |
| | | void LALCreateArraySequence(LALStatus *, REAL4ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALDestroyArraySequence(LALStatus *, REAL4ArraySequence **); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | CHARVectorSequence * XLALCreateCHARVectorSequence ( UINT4 length, UINT4 vec | |
| | | len ); | |
| | | void XLALDestroyCHARVectorSequence ( CHARVectorSequence * vecseq ); | |
| | | | |
| | | void LALCHARCreateSequence ( LALStatus *status, | |
| | | CHARSequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALCHARDestroySequence ( LALStatus *status, | |
| | | CHARSequence **sequence); | |
| | | | |
| | | void LALCHARCreateVectorSequence ( LALStatus *status, | |
| | | CHARVectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALCHARDestroyVectorSequence ( LALStatus *status, | |
| | | CHARVectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | INT2VectorSequence * XLALCreateINT2VectorSequence ( UINT4 length, UINT4 vec | |
| | | len ); | |
| | | void XLALDestroyINT2VectorSequence ( INT2VectorSequence * vecseq ); | |
| | | | |
| | | void LALI2CreateSequence ( LALStatus *status, | |
| | | INT2Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALI2DestroySequence ( LALStatus *status, | |
| | | INT2Sequence **sequence); | |
| | | | |
| | | void LALI2CreateVectorSequence ( LALStatus *status, | |
| | | INT2VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALI2DestroyVectorSequence ( LALStatus *status, | |
| | | INT2VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALI2CreateArraySequence ( LALStatus *status, | |
| | | INT2ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALI2DestroyArraySequence ( LALStatus *status, | |
| | | INT2ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | INT4VectorSequence * XLALCreateINT4VectorSequence ( UINT4 length, UINT4 vec | |
| | | len ); | |
| | | void XLALDestroyINT4VectorSequence ( INT4VectorSequence * vecseq ); | |
| | | | |
| | | void LALI4CreateSequence ( LALStatus *status, | |
| | | INT4Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALI4DestroySequence ( LALStatus *status, | |
| | | INT4Sequence **sequence); | |
| | | | |
| | | void LALI4CreateVectorSequence ( LALStatus *status, | |
| | | INT4VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALI4DestroyVectorSequence ( LALStatus *status, | |
| | | INT4VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALI4CreateArraySequence ( LALStatus *status, | |
| | | INT4ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALI4DestroyArraySequence ( LALStatus *status, | |
| | | INT4ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | INT8VectorSequence * XLALCreateINT8VectorSequence ( UINT4 length, UINT4 vec | |
| | | len ); | |
| | | void XLALDestroyINT8VectorSequence ( INT8VectorSequence * vecseq ); | |
| | | | |
| | | void LALI8CreateSequence ( LALStatus *status, | |
| | | INT8Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALI8DestroySequence ( LALStatus *status, | |
| | | INT8Sequence **sequence); | |
| | | | |
| | | void LALI8CreateVectorSequence ( LALStatus *status, | |
| | | INT8VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALI8DestroyVectorSequence ( LALStatus *status, | |
| | | INT8VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALI8CreateArraySequence ( LALStatus *status, | |
| | | INT8ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALI8DestroyArraySequence ( LALStatus *status, | |
| | | INT8ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | UINT2VectorSequence * XLALCreateUINT2VectorSequence ( UINT4 length, UINT4 v | |
| | | eclen ); | |
| | | void XLALDestroyUINT2VectorSequence ( UINT2VectorSequence * vecseq ); | |
| | | | |
| | | void LALU2CreateSequence ( LALStatus *status, | |
| | | UINT2Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALU2DestroySequence ( LALStatus *status, | |
| | | UINT2Sequence **sequence); | |
| | | | |
| | | void LALU2CreateVectorSequence ( LALStatus *status, | |
| | | UINT2VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALU2DestroyVectorSequence ( LALStatus *status, | |
| | | UINT2VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALU2CreateArraySequence ( LALStatus *status, | |
| | | UINT2ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALU2DestroyArraySequence ( LALStatus *status, | |
| | | UINT2ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | UINT4VectorSequence * XLALCreateUINT4VectorSequence ( UINT4 length, UINT4 v | |
| | | eclen ); | |
| | | void XLALDestroyUINT4VectorSequence ( UINT4VectorSequence * vecseq ); | |
| | | | |
| | | void LALU4CreateSequence ( LALStatus *status, | |
| | | UINT4Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALU4DestroySequence ( LALStatus *status, | |
| | | UINT4Sequence **sequence); | |
| | | | |
| | | void LALU4CreateVectorSequence ( LALStatus *status, | |
| | | UINT4VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALU4DestroyVectorSequence ( LALStatus *status, | |
| | | UINT4VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALU4CreateArraySequence ( LALStatus *status, | |
| | | UINT4ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALU4DestroyArraySequence ( LALStatus *status, | |
| | | UINT4ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | UINT8VectorSequence * XLALCreateUINT8VectorSequence ( UINT4 length, UINT4 v | |
| | | eclen ); | |
| | | void XLALDestroyUINT8VectorSequence ( UINT8VectorSequence * vecseq ); | |
| | | | |
| | | void LALU8CreateSequence ( LALStatus *status, | |
| | | UINT8Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALU8DestroySequence ( LALStatus *status, | |
| | | UINT8Sequence **sequence); | |
| | | | |
| | | void LALU8CreateVectorSequence ( LALStatus *status, | |
| | | UINT8VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALU8DestroyVectorSequence ( LALStatus *status, | |
| | | UINT8VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALU8CreateArraySequence ( LALStatus *status, | |
| | | UINT8ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALU8DestroyArraySequence ( LALStatus *status, | |
| | | UINT8ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | REAL4VectorSequence * XLALCreateREAL4VectorSequence ( UINT4 length, UINT4 v | |
| | | eclen ); | |
| | | void XLALDestroyREAL4VectorSequence ( REAL4VectorSequence * vecseq ); | |
| | | | |
| | | void LALSCreateSequence ( LALStatus *status, | |
| | | REAL4Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALSDestroySequence ( LALStatus *status, | |
| | | REAL4Sequence **sequence); | |
| | | | |
| | | void LALSCreateVectorSequence ( LALStatus *status, | |
| | | REAL4VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALSDestroyVectorSequence ( LALStatus *status, | |
| | | REAL4VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALSCreateArraySequence ( LALStatus *status, | |
| | | REAL4ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALSDestroyArraySequence ( LALStatus *status, | |
| | | REAL4ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | REAL8VectorSequence * XLALCreateREAL8VectorSequence ( UINT4 length, UINT4 v | |
| | | eclen ); | |
| | | void XLALDestroyREAL8VectorSequence ( REAL8VectorSequence * vecseq ); | |
| | | | |
| | | void LALDCreateSequence ( LALStatus *status, | |
| | | REAL8Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALDDestroySequence ( LALStatus *status, | |
| | | REAL8Sequence **sequence); | |
| | | | |
| | | void LALDCreateVectorSequence ( LALStatus *status, | |
| | | REAL8VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALDDestroyVectorSequence ( LALStatus *status, | |
| | | REAL8VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALDCreateArraySequence ( LALStatus *status, | |
| | | REAL8ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALDDestroyArraySequence ( LALStatus *status, | |
| | | REAL8ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | COMPLEX8VectorSequence * XLALCreateCOMPLEX8VectorSequence ( UINT4 length, U | |
| | | INT4 veclen ); | |
| | | void XLALDestroyCOMPLEX8VectorSequence ( COMPLEX8VectorSequence * vecseq ); | |
| | | | |
| | | void LALCCreateSequence ( LALStatus *status, | |
| | | COMPLEX8Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALCDestroySequence ( LALStatus *status, | |
| | | COMPLEX8Sequence **sequence); | |
| | | | |
| | | void LALCCreateVectorSequence ( LALStatus *status, | |
| | | COMPLEX8VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALCDestroyVectorSequence ( LALStatus *status, | |
| | | COMPLEX8VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | void LALCCreateArraySequence ( LALStatus *status, | |
| | | COMPLEX8ArraySequence **arraySequence, | |
| | | CreateArraySequenceIn *aSeqParams); | |
| | | | |
| | | void LALCDestroyArraySequence ( LALStatus *status, | |
| | | COMPLEX8ArraySequence **arraySeqence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
| | | COMPLEX16VectorSequence * XLALCreateCOMPLEX16VectorSequence ( UINT4 length, | |
| | | UINT4 veclen ); | |
| | | void XLALDestroyCOMPLEX16VectorSequence ( COMPLEX16VectorSequence * vecseq | |
| | | ); | |
| | | | |
| | | void LALZCreateSequence ( LALStatus *status, | |
| | | COMPLEX16Sequence **sequence, | |
| | | UINT4); | |
| | | | |
| | | void LALZDestroySequence ( LALStatus *status, | |
| | | COMPLEX16Sequence **sequence); | |
| | | | |
| | | void LALZCreateVectorSequence ( LALStatus *status, | |
| | | COMPLEX16VectorSequence **vectorSequence, | |
| | | CreateVectorSequenceIn *vSeqParams); | |
| | | | |
| | | void LALZDestroyVectorSequence ( LALStatus *status, | |
| | | COMPLEX16VectorSequence **vectorSequence); | |
| | | | |
| | | /* | |
| | | | |
| | | */ | |
| | | | |
|
| void LALCreateArraySequence(LALStatus *, | | void LALZCreateArraySequence ( LALStatus *status, | |
| REAL4ArraySequence **, | | COMPLEX16ArraySequence **arraySequence, | |
| CreateArraySequenceIn *); | | CreateArraySequenceIn *aSeqParams); | |
| void LALI2CreateArraySequence(LALStatus *, | | | |
| INT2ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALI4CreateArraySequence(LALStatus *, | | | |
| INT4ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALI8CreateArraySequence(LALStatus *, | | | |
| INT8ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALU2CreateArraySequence(LALStatus *, | | | |
| UINT2ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALU4CreateArraySequence(LALStatus *, | | | |
| UINT4ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALU8CreateArraySequence(LALStatus *, | | | |
| UINT8ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALSCreateArraySequence(LALStatus *, | | | |
| REAL4ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALDCreateArraySequence(LALStatus *, | | | |
| REAL8ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALCCreateArraySequence(LALStatus *, | | | |
| COMPLEX8ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| void LALZCreateArraySequence(LALStatus *, | | | |
| COMPLEX16ArraySequence **, | | | |
| CreateArraySequenceIn *); | | | |
| | | | |
| void LALDestroyArraySequence (LALStatus *, | | | |
| REAL4ArraySequence **); | | | |
| void LALI2DestroyArraySequence(LALStatus *, | | | |
| INT2ArraySequence **); | | | |
| void LALI4DestroyArraySequence(LALStatus *, | | | |
| INT4ArraySequence **); | | | |
| void LALI8DestroyArraySequence(LALStatus *, | | | |
| INT8ArraySequence **); | | | |
| void LALU2DestroyArraySequence(LALStatus *, | | | |
| UINT2ArraySequence **); | | | |
| void LALU4DestroyArraySequence(LALStatus *, | | | |
| UINT4ArraySequence **); | | | |
| void LALU8DestroyArraySequence(LALStatus *, | | | |
| UINT8ArraySequence **); | | | |
| void LALSDestroyArraySequence(LALStatus *, | | | |
| REAL4ArraySequence **); | | | |
| void LALDDestroyArraySequence(LALStatus *, | | | |
| REAL8ArraySequence **); | | | |
| void LALCDestroyArraySequence(LALStatus *, | | | |
| COMPLEX8ArraySequence **); | | | |
| void LALZDestroyArraySequence(LALStatus *, | | | |
| COMPLEX16ArraySequence **); | | | |
| | | | |
|
| /* Test program. */ | | void LALZDestroyArraySequence ( LALStatus *status, | |
| | | COMPLEX16ArraySequence **arraySeqence); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorSequenceFactoriesTestC} | | \newpage\input{VectorSequenceFactoriesTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{ArraySequenceFactoriesTestC} | | \newpage\input{ArraySequenceFactoriesTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
End of changes. 9 change blocks. |
| 147 lines changed or deleted | | 425 lines changed or added | |
|
| SkyCoordinates.h | | SkyCoordinates.h | |
|
| /******************************* <lalVerbatim file="SkyCoordinatesHV"> | | /** \file | |
| Author: Creighton, T. D. | | * \ingroup SkyCoordinates | |
| $Id: SkyCoordinates.h,v 1.11 2001/12/05 21:10:49 jolien Exp $ | | * \author Creighton, T. D. | |
| **************************************************** </lalVerbatim> */ | | * \date 2002 | |
| | | * \brief This header covers routines to perform coordinate transformation | |
| /********************************************************** <lalLaTeX> | | s | |
| | | * among the various spherical coordinate systems used in astronomy. | |
| \section{Header \texttt{SkyCoordinates.h}} | | */ | |
| \label{s:SkyCoordinates.h} | | | |
| | | | |
| Provides routines to convert among various sky coordinate systems. | | | |
| | | | |
| \subsection*{Synopsis} | | | |
| \begin{verbatim} | | | |
| #include <lal/SkyCoordinates.h> | | | |
| \end{verbatim} | | | |
| | | | |
| This header covers routines to perform coordinate transformations | | | |
| among the various spherical coordinate systems used in astronomy. | | | |
| Most of these routines are discussed in Sec.~5.1 | | | |
| of~\cite{Lang_K:1998}; we reproduce here some of the essential | | | |
| elements of this discussion. | | | |
| | | | |
| \begin{wrapfigure}{r}{0.55\textwidth} | | | |
| \vspace{-2ex} | | | |
| \begin{center} | | | |
| \resizebox{0.5\textwidth}{!}{\includegraphics{inject_lat_long}} \\ | | | |
| \parbox{0.5\textwidth}{\caption{\label{fig:lat-long} Definition of | | | |
| latitude $\phi$ and longitude $\lambda$ for an arbitrary coordinate | | | |
| system.}} | | | |
| \end{center} | | | |
| \vspace{-2ex} | | | |
| \end{wrapfigure} | | | |
| A general spatial coordinate system is shown in | | | |
| Fig.~\ref{fig:lat-long}. It is defined by six parameters: three | | | |
| positions specifying the location of the origin $O$, two angles | | | |
| specifying the direction of the \emph{pole} or $z$-axis, and one | | | |
| further angle specifying a \emph{reference meridian} or $x$-axis | | | |
| orthogonal to the $z$-axis. A $y$-axis can also be defined such that | | | |
| $x$, $y$, and $z$ form an orthogonal right-handed coordinate system; | | | |
| however, in astronomy it is more conventional to use spherical | | | |
| coordinates, defined as follows: | | | |
| | | | |
| For any given point $P$, define a plane (called its meridian) | | | |
| containing both the $z$-axis and the point in question. The | | | |
| \emph{longitude} $\lambda$ is the angle in the $x$-$y$ plane from the | | | |
| $x$-axis to the line where the object's meridian crosses the $x$-$y$ | | | |
| plane. The \emph{latitude} $\phi$ is the angle in the meridian plane | | | |
| between this line and the direction to the object. The | | | |
| \emph{distance} $r$ is simply measured in a straight line from the | | | |
| origin to the point. Longitude is defined to increase in the | | | |
| right-handed direction about the $z$-axis (i.e.\ the $y$-axis lies at | | | |
| \emph{positive} $\pi/2$~radians longitude), and is typically given in | | | |
| the range $[0,2\pi)$~radians. Latitude is defined to increase towards | | | |
| the $z$-axis (i.e.\ the $z$-axis lies at \emph{positive} | | | |
| $\pi/2$~radians latitude), and is typically given in the range | | | |
| $[-\pi/2,\pi/2]$~radians; a point with latitude $\pm\pi/2$~radians has | | | |
| arbitrary (undefined) longitude. Distance should always be positive. | | | |
| This convention is shown in Fig.~\ref{fig:lat-long}. | | | |
| | | | |
| In the routines in this module, we do not perform transformations | | | |
| between coordinate systems having different origins. By default, all | | | |
| coordinates are assumed to be centred on the observer; however, one | | | |
| may also consider coordinate systems that are \emph{geogentric} | | | |
| (having their origin at the centre of the Earth), \emph{heliocentric} | | | |
| (origin at the centre of the Sun), \emph{barycentric} (origin at the | | | |
| centre of mass of the solar system), and \emph{Galactocentric} (origin | | | |
| at the centre of our Galaxy). Since we ignore translations in the | | | |
| coordinate origin, distances remain unchanged, so these routines only | | | |
| consider transformations in latitude and longitude. To put it another | | | |
| way, these routines transform \emph{directions} in space, not | | | |
| \emph{locations} in space. These directions are generically stored in | | | |
| the \verb@SkyPosition@ structure, defined below. | | | |
| | | | |
| The coordinate systems that we consider are defined as follows: | | | |
| | | | |
| \begin{wrapfigure}{r}{0.63\textwidth} | | | |
| \vspace{-2ex} | | | |
| \begin{center} | | | |
| \resizebox{0.58\textwidth}{!}{\includegraphics{inject_horizon}} \\ | | | |
| \parbox{0.58\textwidth}{\caption{\label{fig:horizon} Definition of the | | | |
| horizon coordinate system.}} | | | |
| \end{center} | | | |
| \vspace{-2ex} | | | |
| \end{wrapfigure} | | | |
| \paragraph{Horizon coordinates:} This is a local coordinate system for | | | |
| a particular observation point $O$ on the Earth, as shown in | | | |
| Fig.~\ref{fig:horizon}. The $z$-axis is defined to be the direction | | | |
| opposite to the local acceleration due to gravity. The $x$-axis is | | | |
| defined to lie in the plane formed by the $z$-axis and the Earth's | | | |
| rotational axis, and to be directed into the northern hemisphere. In | | | |
| this coordinate system, the latitude coordinate is called the | | | |
| \emph{altitude} and the longitude coordinate is the \emph{negative} of | | | |
| what astronomers call the \emph{azimuth}; this sign reversal is due to | | | |
| the fact that astronomers define azimuth to increase clockwise, and | | | |
| our longitudinal coordinates uniformly increase counterclockwise about | | | |
| the $z$-axis. | | | |
| | | | |
| This coordinate system is related to the geographic coordinate system | | | |
| (below) by the geographic latitude $\phi_z$ and longitude $\lambda_z$ | | | |
| of the observer's $z$-axis direction. | | | |
| | | | |
| \begin{wrapfigure}{l}{0.43\textwidth} | | | |
| \vspace{-4ex} | | | |
| \begin{center} | | | |
| \resizebox{0.38\textwidth}{!}{\includegraphics{inject_geographic}} \\ | | | |
| \parbox{0.38\textwidth}{\caption{\label{fig:geographic} Definition of | | | |
| the geographic (Earth-fixed) coordinate system.}} | | | |
| \end{center} | | | |
| \end{wrapfigure} | | | |
| \paragraph{Geographic coordinates:} This is a planetwide Earth-fixed | | | |
| coordinate system, shown in Fig.~\ref{fig:geographic}. The $z$-axis | | | |
| is defined to be parallel to the Earth's axis, in the direction of the | | | |
| Earth's north pole. The $x$-axis is defined to be parallel to the | | | |
| direction perpendicular from the Earth's rotation axis to a reference | | | |
| point in Greenwich, UK (the \emph{prime meridian}. Note that we adopt | | | |
| a longitude convention that is consistent with the | | | |
| \textit{Astronomical Almanac}, but opposite to that | | | |
| in~\cite{Lang_K:1998}, in that our geographic longitudes increase | | | |
| \emph{eastward} (counterclockwise) like the rest of our longitudinal | | | |
| coordinates. | | | |
| | | | |
| The terms ``latitude'' and ``longitude'' without qualification | | | |
| normally refer to geographic latitude and longitude. However, we | | | |
| emphasize once again that geographic latitude and longitude as defined | | | |
| above refer to directions in space, not to locations on the Earth's | | | |
| surface. This can lead to some confusion. The \emph{geodetic} | | | |
| latitude and longitude of a point on the Earth's surface are the | | | |
| latitude and longitude of its vertical direction; this is the standard | | | |
| meaning used by cartographers, and relates directly to the | | | |
| horizon-based coordinate system above. However, one can also define a | | | |
| \emph{geocentric} latitude and longitude for a point on the surface, | | | |
| which are the latitude and longitude of the direction from the | | | |
| geometric centre of the Earth through that point. These angles are | | | |
| not necessarily the same, due to the Earth's ellipticity, as shown in | | | |
| Fig.~\ref{fig:geodetic} in \verb@TerrestrialCoordinates.h@. | | | |
| | | | |
| Geographic coordinates are related to sky-fixed equatorial coordinates | | | |
| by specifying the counterclockwise angle \emph{to} the prime meridian | | | |
| \emph{from} the reference meridian $\Upsilon$ of the sky-fixed | | | |
| coordinates, as defined below. This angle is called the Greenwich | | | |
| Mean Sidereal Time (GMST), and is often specified in hours, minutes, | | | |
| and seconds. | | | |
| | | | |
| \begin{wrapfigure}{r}{0.46\textwidth} | | | |
| \vspace{-2ex} | | | |
| \begin{center} | | | |
| \resizebox{0.41\textwidth}{!}{\includegraphics{inject_ecliptic}} \\ | | | |
| \parbox{0.41\textwidth}{\caption{\label{fig:ecliptic} Definition of | | | |
| the ecliptic sky-fixed coordinate systems.}} | | | |
| \end{center} | | | |
| \vspace{-2ex} | | | |
| \end{wrapfigure} | | | |
| \paragraph{Equatorial coordinates:} This is the standard sky-fixed | | | |
| coordinate system. The $z$-axis is defined as for geographic | | | |
| coordinates, above; the plane orthogonal to this passing through the | | | |
| Earth's centre is called the \emph{equator}. The $x$-axis is defined | | | |
| to be the direction, as viewed from the centre of the Earth, where the | | | |
| Sun appears to cross the equator moving north in spring. This is | | | |
| called the \emph{vernal equinox} $\Upsilon$, and is shown in | | | |
| Fig.~\ref{fig:ecliptic}. In this coordinate system, the latitude | | | |
| coordinate is called the \emph{declination} $\delta$ and the longitude | | | |
| coordinate is called the \emph{right ascension} $\alpha$. | | | |
| | | | |
| \paragraph{Ecliptic coordinates:} This is another sky-fixed coordinate | | | |
| system, shown in Fig.~\ref{fig:ecliptic}. The $z$-axis is defined to | | | |
| be the direction orthogonal to the orbital plane of the Earth about | | | |
| the Sun, directed such that the Earth orbits in a right-handed sense. | | | |
| The $x$-axis is defined as for equatorial coordinates, above; we note | | | |
| that by definition it lies parallel to the intersection of the | | | |
| equatorial and orbital planes of the Earth. | | | |
| | | | |
| The equatorial and ecliptic coordinate systems are related by a single | | | |
| angle $\epsilon$, called the \emph{obliquity of the ecliptic} (that | | | |
| is, the inclination of the Earth's rotation axis relative to its | | | |
| orbital axis). Ecliptic latitude is normally denoted as $\beta$ and | | | |
| ecliptic longitude as $\lambda$. | | | |
| | | | |
| \begin{wrapfigure}{l}{0.505\textwidth} | | | |
| \vspace{-4ex} | | | |
| \begin{center} | | | |
| \resizebox{0.455\textwidth}{!}{\includegraphics{inject_galactic}} \\ | | | |
| \parbox{0.455\textwidth}{\caption{\label{fig:galactic} Definition of | | | |
| the Galactic coordinate system.}} | | | |
| \end{center} | | | |
| \end{wrapfigure} | | | |
| \paragraph{Galactic coordinates:} This coordinate system is shown in | | | |
| Fig.~\ref{fig:galactic}. The $z$-axis is defined to be the direction | | | |
| orthogonal to the plane of our Galaxy and pointing into the northern | | | |
| hemisphere of the equatorial coordinate system. (Unfortunately this | | | |
| convention has the unintuitive result that the physical rotation of | | | |
| the Galaxy is left-handed about this axis.) The $x$-axis is defined | | | |
| to be the direction of the Galactic centre as viewed from the Earth. | | | |
| The Galactic latitude coordinate is normally denoted as $b$ and the | | | |
| Galactic longitude as $l$. | | | |
| | | | |
| The definition of the Galactic coordinate system is completely | | | |
| unrelated to any of the the other coordinate systems; thus, the | | | |
| relationship between Galactic and equatorial coodinates requires one | | | |
| to specify three arbitrary (but constant) angles. Two of these are | | | |
| the right ascension $\alpha_\mathrm{NGP}$ and declination | | | |
| $\delta_\mathrm{NPG}$ of the North Galactic Pole ($z$-axis) in the | | | |
| equatorial coordinate system, the third is the Galactic longitude | | | |
| $l_\mathrm{ascend}$ of the point where the Galactic plane ascends | | | |
| through the equatorial plane; i.e.\ the $l$ value for the direction | | | |
| along the intersection of the Galactic and equatorial planes, such | | | |
| that right-handed rotation about the Galactic $z$-axis moves you from | | | |
| south to north through the equator. | | | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | | |
| | | | |
| #ifndef _SKYCOORDINATES_H | | #ifndef _SKYCOORDINATES_H | |
| #define _SKYCOORDINATES_H | | #define _SKYCOORDINATES_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( SKYCOORDINATESH, "$Id: SkyCoordinates.h,v 1.11 2001/12/05 21:10:49
jolien Exp $" ); | | NRCSID( SKYCOORDINATESH, "$Id: SkyCoordinates.h,v 1.16 2005/08/25 15:37:53
reinhard Exp $" ); | |
| | | | |
|
| /********************************************************** <lalLaTeX> | | /** \name Error codes */ | |
| \subsection*{Error conditions} | | /*@{*/ | |
| ****************************************** </lalLaTeX><lalErrTable> */ | | | |
| #define SKYCOORDINATESH_ENUL 1 | | #define SKYCOORDINATESH_ENUL 1 | |
| #define SKYCOORDINATESH_ESYS 2 | | #define SKYCOORDINATESH_ESYS 2 | |
| #define SKYCOORDINATESH_EZERO 3 | | #define SKYCOORDINATESH_EZERO 3 | |
| #define SKYCOORDINATESH_ESING 4 | | #define SKYCOORDINATESH_ESING 4 | |
| | | | |
| #define SKYCOORDINATESH_MSGENUL "Unexpected null pointer in arguments" | | #define SKYCOORDINATESH_MSGENUL "Unexpected null pointer in arguments" | |
| #define SKYCOORDINATESH_MSGESYS "Wrong coordinate system in input" | | #define SKYCOORDINATESH_MSGESYS "Wrong coordinate system in input" | |
| #define SKYCOORDINATESH_MSGEZERO "Angular coordinates undefined at origin" | | #define SKYCOORDINATESH_MSGEZERO "Angular coordinates undefined at origin" | |
| #define SKYCOORDINATESH_MSGESING "Point is inside singular ellipsoid" | | #define SKYCOORDINATESH_MSGESING "Point is inside singular ellipsoid" | |
|
| /******************************************** </lalErrTable><lalLaTeX> | | /*@}*/ | |
| | | | |
| \subsection*{Types} | | | |
| | | | |
| \subsubsection*{Enumeration \texttt{CoordinateSystem}} | | | |
| \idx[Type]{CoordinateSystem} | | | |
| | | | |
| This enumerated type is used to identify data as being in one of the | | | |
| coordinate systems discussed above. The allowed values are: | | | |
| | | | |
| \idx[Constant]{COORDINATESYSTEM\_HORIZON} | | | |
| \idx[Constant]{COORDINATESYSTEM\_GEOGRAPHIC} | | | |
| \idx[Constant]{COORDINATESYSTEM\_EQUATORIAL} | | | |
| \idx[Constant]{COORDINATESYSTEM\_ECLIPTIC} | | | |
| \idx[Constant]{COORDINATESYSTEM\_GALACTIC} | | | |
| \medskip\noindent | | | |
| \begin{tabular}{ll} | | | |
| \verb@COORDINATESYSTEM_HORIZON@ & A horizon coordinate system. \\ | | | |
| \verb@COORDINATESYSTEM_GEOGRAPHIC@ & The Earth-fixed geographic | | | |
| coordinate system. \\ | | | |
| \verb@COORDINATESYSTEM_EQUATORIAL@ & The sky-fixed equatorial | | | |
| coordinate system. \\ | | | |
| \verb@COORDINATESYSTEM_ECLIPTIC@ & The ecliptic coordinate system. \\ | | | |
| \verb@COORDINATESYSTEM_GALACTIC@ & The galactic coordinate system. | | | |
| \end{tabular} | | | |
| \bigskip | | | |
| | | | |
|
| ******************************************************* </lalLaTeX> */ | | /*---------- exported types ---------- */ | |
| | | | |
|
| | | /** This enumerated type is used to identify data as being in one of the | |
| | | * coordinate systems discussed in \ref SkyCoordinates. */ | |
| typedef enum { | | typedef enum { | |
|
| COORDINATESYSTEM_HORIZON, | | COORDINATESYSTEM_HORIZON, /**< A horizon coordinate system. */ | |
| COORDINATESYSTEM_GEOGRAPHIC, | | COORDINATESYSTEM_GEOGRAPHIC, /**< The Earth-fixed geographic coordinate s | |
| COORDINATESYSTEM_EQUATORIAL, | | ystem. */ | |
| COORDINATESYSTEM_ECLIPTIC, | | COORDINATESYSTEM_EQUATORIAL, /**< The sky-fixed equatorial coordinate sys | |
| COORDINATESYSTEM_GALACTIC | | tem. */ | |
| | | COORDINATESYSTEM_ECLIPTIC, /**< The ecliptic coordinate system. */ | |
| | | COORDINATESYSTEM_GALACTIC /**< The galactic coordinate system. */ | |
| } CoordinateSystem; | | } CoordinateSystem; | |
| | | | |
|
| /********************************************************** <lalLaTeX> | | /** This structure stores the two spherical coordinates of a sky position; | |
| | | * ie a generic latitude and longitude; the structure is not defined | |
| \subsubsection*{Structure \texttt{SkyPosition}} | | * specific to a particular coordinate system, but maintains a tag | |
| \idx[Type]{SkyPosition} | | * indicating which coordinate system it is expressed in. | |
| | | */ | |
| This structure stores the two spherical coordinates of a sky position; | | | |
| i.e.\ a generic latitude and longitude. The structure is not defined | | | |
| specific to a particular coordinate system, but maintains a tag | | | |
| indicating which coordinate system it is expressed in. The fields | | | |
| are: | | | |
| | | | |
| \begin{description} | | | |
| \item[\texttt{REAL8 longitude}] The longitudinal coordinate (in | | | |
| radians), as defined above. | | | |
| | | | |
| \item[\texttt{REAL8 latitude}] The latitudinal coordinate (in | | | |
| radians), as defined above. | | | |
| | | | |
| \item[\texttt{CoordinateSystem system}] The coordinate system in which | | | |
| the latitude and longitude have been expressed. | | | |
| \end{description} | | | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | | |
| | | | |
| typedef struct tagSkyPosition { | | typedef struct tagSkyPosition { | |
|
| REAL8 longitude; | | REAL8 longitude; /**< The longitudinal coordinate (in radians | |
| REAL8 latitude; | | ), as defined above.*/ | |
| CoordinateSystem system; | | REAL8 latitude; /**< The latitudinal coordinate (in radians) | |
| | | , as defined above. */ | |
| | | CoordinateSystem system; /**< The coordinate system in which latitude | |
| | | /longitude are expressed. */ | |
| } SkyPosition; | | } SkyPosition; | |
| | | | |
|
| /********************************************************** <lalLaTeX> | | /** This structure stores the location of a point on (or near) the surface | |
| | | * of the Earth in both geodetic and geocentric coordinates, as described | |
| \subsubsection*{Structure \texttt{EarthPosition}} | | * in TerrestrialCoordinates.c . | |
| \idx[Type]{EarthPosition} | | */ | |
| | | | |
| This structure stores the location of a point on (or near) the surface | | | |
| of the Earth in both geodetic and geocentric coordinates, as described | | | |
| in \verb@TerrestrialCoordinates.c@. The fields are: | | | |
| | | | |
| \begin{description} | | | |
| \item[\texttt{SkyPosition geodetic}] The geographic coordinates of the | | | |
| upward vertical direction from the point; that is, the point's | | | |
| \emph{geodetic} latitude and longitude. | | | |
| | | | |
| \item[\texttt{REAL8 elevation}] The vertical distance of the point above | | | |
| the reference ellipsoid, in metres. | | | |
| | | | |
| \item[\texttt{REAL8 x, y, z}] The Earth-fixed geocentric Cartesian | | | |
| coordinates of the point, in metres. | | | |
| | | | |
| \item[\texttt{REAL8 radius}] The distance of the point from the | | | |
| geocentre, in metres. | | | |
| | | | |
| \item[\texttt{SkyPosition geocentric}] The geographic coordinates of | | | |
| the direction from the centre of the Earth through the point; that is, | | | |
| the point's \emph{geocentric} latitude and longitude. | | | |
| \end{description} | | | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | | |
| | | | |
| typedef struct tagEarthPosition { | | typedef struct tagEarthPosition { | |
|
| SkyPosition geodetic; | | SkyPosition geodetic; /**< The geographic coordinates of the | |
| REAL8 elevation; | | * upward vertical direction from the point; | |
| REAL8 x, y, z; | | that is, the point's | |
| REAL8 radius; | | * <em>geodetic</em> latitude and longitude. | |
| SkyPosition geocentric; | | */ | |
| } EarthPosition; | | | |
| | | | |
| /********************************************************** <lalLaTeX> | | | |
| | | | |
|
| \subsubsection*{Structure \texttt{ConvertSkyParams}} | | REAL8 elevation; /**< The vertical distance of the point abov | |
| \idx[Type]{ConvertSkyParams} | | e the reference ellipsoid, | |
| | | * in metres.*/ | |
| | | | |
|
| This structure stores parameters for the function | | REAL8 x, y, z; /**< The Earth-fixed geocentric Cartesian co | |
| \verb@LALConvertSkyPosition()@. The fields are: | | ordinates of the point, | |
| | | *in metres.*/ | |
| | | | |
|
| \begin{description} | | REAL8 radius; /**< The distance of the point from | |
| \item[\texttt{CoordinateSystem system}] The coordinate system to which | | the geocentre, in metres. */ | |
| one is transforming. | | | |
| | | | |
| \item[\texttt{SkyPosition *zenith}] The position of the zenith of the | | | |
| horizon coordinate system; may be \verb@NULL@ if one is neither | | | |
| converting to nor from a horizon system. | | | |
| | | | |
| \item[\texttt{LIGOTimeGPS *gpsTime}] The GPS time for conversions | | | |
| between Earth-fixed and sky-fixed coordinates; may be \verb@NULL@ if | | | |
| no such conversion is required (or if one is transforming to or from | | | |
| horizon coordinates and \verb@*zenith@ is given in the sky-fixed | | | |
| equatorial system). | | | |
| \end{description} | | | |
| | | | |
|
| ******************************************************* </lalLaTeX> */ | | SkyPosition geocentric; /**< The geographic coordinates of the dire | |
| | | ction from the centre | |
| | | * of the Earth through the point; that is, | |
| | | the point's | |
| | | * <em>geocentric</em> latitude and longitud | |
| | | e.*/ | |
| | | } EarthPosition; | |
| | | | |
|
| | | /** This structure stores parameters for the function <tt>LALConvertSkyPosi | |
| | | tion()</tt>. | |
| | | */ | |
| typedef struct tagConvertSkyParams { | | typedef struct tagConvertSkyParams { | |
|
| CoordinateSystem system; | | CoordinateSystem system; /**< The coordinate system to which one is | |
| SkyPosition *zenith; | | transforming. */ | |
| LIGOTimeGPS *gpsTime; | | | |
| | | SkyPosition *zenith; /**< The position of the zenith of the horiz | |
| | | on coordinate system; | |
| | | * may be <tt>NULL</tt> if one is neither co | |
| | | nverting to nor from | |
| | | * a horizon system. */ | |
| | | | |
| | | LIGOTimeGPS *gpsTime; /**< The GPS time for conversions be | |
| | | tween Earth-fixed and | |
| | | * sky-fixed coordinates; may be <tt>NULL</t | |
| | | t> if no such conversion | |
| | | * is required (or if one is transforming to | |
| | | or from horizon | |
| | | * coordinates and <tt>*zenith</tt> is given | |
| | | in the sky-fixed | |
| | | * equatorial system). */ | |
| } ConvertSkyParams; | | } ConvertSkyParams; | |
| | | | |
|
| /* <lalLaTeX> | | /* ---------- Function prototypes ---------- */ | |
| \vfill{\footnotesize\input{SkyCoordinatesHV}} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| /* Function prototypes. */ | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{CelestialCoordinatesC} | | | |
| </lalLaTeX> */ | | | |
| void | | void | |
| LALGalacticToEquatorial( LALStatus *, | | LALGalacticToEquatorial( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input ); | | SkyPosition *input ); | |
| | | | |
| void | | void | |
| LALEquatorialToGalactic( LALStatus *, | | LALEquatorialToGalactic( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input ); | | SkyPosition *input ); | |
| | | | |
| void | | void | |
| LALEclipticToEquatorial( LALStatus *, | | LALEclipticToEquatorial( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input ); | | SkyPosition *input ); | |
| | | | |
| void | | void | |
| LALEquatorialToEcliptic( LALStatus *, | | LALEquatorialToEcliptic( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input ); | | SkyPosition *input ); | |
| | | | |
|
| /* <lalLaTeX> | | | |
| \newpage\input{TerrestrialCoordinatesC} | | | |
| </lalLaTeX> */ | | | |
| void | | void | |
| LALGeographicToEquatorial( LALStatus *, | | LALGeographicToEquatorial( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input, | | SkyPosition *input, | |
| LIGOTimeGPS *gpsTime ); | | LIGOTimeGPS *gpsTime ); | |
| | | | |
| void | | void | |
| LALEquatorialToGeographic( LALStatus *, | | LALEquatorialToGeographic( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input, | | SkyPosition *input, | |
| | | | |
| skipping to change at line 433 | | skipping to change at line 146 | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input, | | SkyPosition *input, | |
| const SkyPosition *zenith ); | | const SkyPosition *zenith ); | |
| | | | |
| void | | void | |
| LALGeodeticToGeocentric( LALStatus *, EarthPosition *location ); | | LALGeodeticToGeocentric( LALStatus *, EarthPosition *location ); | |
| | | | |
| void | | void | |
| LALGeocentricToGeodetic( LALStatus *, EarthPosition *location ); | | LALGeocentricToGeodetic( LALStatus *, EarthPosition *location ); | |
| | | | |
|
| /* <lalLaTeX> | | | |
| \newpage\input{SkyCoordinatesC} | | | |
| </lalLaTeX> */ | | | |
| void | | void | |
| LALConvertSkyCoordinates( LALStatus *, | | LALConvertSkyCoordinates( LALStatus *, | |
| SkyPosition *output, | | SkyPosition *output, | |
| SkyPosition *input, | | SkyPosition *input, | |
| ConvertSkyParams *params ); | | ConvertSkyParams *params ); | |
| | | | |
|
| /* <lalLaTeX> | | void LALNormalizeSkyPosition (LALStatus *status, SkyPosition *posOut, const | |
| %\newpage\input{SkyCoordinatesTestC} | | SkyPosition *posIn); | |
| </lalLaTeX> */ | | | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _SKYCOORDINATES_H */ | | #endif /* _SKYCOORDINATES_H */ | |
| | | | |
End of changes. 21 change blocks. |
| 351 lines changed or deleted | | 82 lines changed or added | |
|
| StochasticCrossCorrelation.h | | StochasticCrossCorrelation.h | |
| /*********************** <lalVerbatim file="StochasticCrossCorrelationHV"> | | /*********************** <lalVerbatim file="StochasticCrossCorrelationHV"> | |
| Author: UTB Relativity Group; contact whelan@phys.utb.edu (original by S. D
rasco) | | Author: UTB Relativity Group; contact whelan@phys.utb.edu (original by S. D
rasco) | |
|
| $Id: StochasticCrossCorrelation.h,v 1.25 2002/06/10 05:46:24 whelan Exp $ | | $Id: StochasticCrossCorrelation.h,v 1.28 2004/05/13 22:30:17 tania Exp $ | |
| *********************************************************** </lalVerbatim>
*/ | | *********************************************************** </lalVerbatim>
*/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \section{Header \texttt{StochasticCrossCorrelation.h}} | | \section{Header \texttt{StochasticCrossCorrelation.h}} | |
| \label{stochastic:s:StochasticCrossCorrelation.h} | | \label{stochastic:s:StochasticCrossCorrelation.h} | |
| | | | |
| Provides prototype and error code information for the modules needed | | Provides prototype and error code information for the modules needed | |
| to calculate the standard optimally-filtered cross-correlation | | to calculate the standard optimally-filtered cross-correlation | |
| statistic for stochastic background searches, given a pair of data | | statistic for stochastic background searches, given a pair of data | |
| segments, along with appropriate representations of the detector | | segments, along with appropriate representations of the detector | |
| | | | |
| skipping to change at line 195 | | skipping to change at line 195 | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/DetectorSite.h> | | #include <lal/DetectorSite.h> | |
| #include <lal/Units.h> | | #include <lal/Units.h> | |
| #include <lal/TimeFreqFFT.h> | | #include <lal/TimeFreqFFT.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| NRCSID( STOCHASTICCROSSCORRELATIONH, | | NRCSID( STOCHASTICCROSSCORRELATIONH, | |
|
| "$Id: StochasticCrossCorrelation.h,v 1.25 2002/06/10 05:46:24 whela
n Exp $" ); | | "$Id: StochasticCrossCorrelation.h,v 1.28 2004/05/13 22:30:17 tania
Exp $" ); | |
| | | | |
| /****************** <lalErrTable file="StochasticCrossCorrelationHE"> */ | | /****************** <lalErrTable file="StochasticCrossCorrelationHE"> */ | |
| | | | |
| #define STOCHASTICCROSSCORRELATIONH_ENULLPTR 1 | | #define STOCHASTICCROSSCORRELATIONH_ENULLPTR 1 | |
| #define STOCHASTICCROSSCORRELATIONH_ESAMEPTR 2 | | #define STOCHASTICCROSSCORRELATIONH_ESAMEPTR 2 | |
| #define STOCHASTICCROSSCORRELATIONH_EZEROLEN 3 | | #define STOCHASTICCROSSCORRELATIONH_EZEROLEN 3 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAF 4 | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAF 4 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAT 5 | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAT 5 | |
| #define STOCHASTICCROSSCORRELATIONH_ENEGFMIN 6 | | #define STOCHASTICCROSSCORRELATIONH_ENEGFMIN 6 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMTIME 7 | | #define STOCHASTICCROSSCORRELATIONH_EMMTIME 7 | |
| | | | |
| skipping to change at line 339 | | skipping to change at line 339 | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticCrossCorrelationInput { | | typedef struct tagStochasticCrossCorrelationInput { | |
| COMPLEX8FrequencySeries *hBarTildeOne; | | COMPLEX8FrequencySeries *hBarTildeOne; | |
| COMPLEX8FrequencySeries *hBarTildeTwo; | | COMPLEX8FrequencySeries *hBarTildeTwo; | |
| COMPLEX8FrequencySeries *optimalFilter; | | COMPLEX8FrequencySeries *optimalFilter; | |
| } StochasticCrossCorrelationInput; | | } StochasticCrossCorrelationInput; | |
| | | | |
|
| | | typedef struct tagStochasticCrossCorrelationCalInput { | |
| | | COMPLEX8FrequencySeries *hBarTildeOne; | |
| | | COMPLEX8FrequencySeries *hBarTildeTwo; | |
| | | REAL4FrequencySeries *optimalFilter; | |
| | | COMPLEX8FrequencySeries *responseFunctionOne; | |
| | | COMPLEX8FrequencySeries *responseFunctionTwo; | |
| | | } StochasticCrossCorrelationCalInput; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPCC"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPCC"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticCrossCorrelationStatistic( | | LALStochasticCrossCorrelationStatistic( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4WithUnits *output, | | REAL4WithUnits *output, | |
| const StochasticCrossCorrelationInput *input, | | const StochasticCrossCorrelationInput *input, | |
| BOOLEAN epochsMatch); | | BOOLEAN epochsMatch); | |
| | | | |
| void | | void | |
| | | | |
| skipping to change at line 362 | | skipping to change at line 370 | |
| const StochasticCrossCorrelationInput *input, | | const StochasticCrossCorrelationInput *input, | |
| BOOLEAN epochsMatch); | | BOOLEAN epochsMatch); | |
| | | | |
| void | | void | |
| LALStochasticCrossCorrelationSpectrum( | | LALStochasticCrossCorrelationSpectrum( | |
| LALStatus *status, | | LALStatus *status, | |
| COMPLEX8FrequencySeries *output, | | COMPLEX8FrequencySeries *output, | |
| const StochasticCrossCorrelationInput *input, | | const StochasticCrossCorrelationInput *input, | |
| BOOLEAN epochsMatch); | | BOOLEAN epochsMatch); | |
| | | | |
|
| | | void | |
| | | LALStochasticCrossCorrelationStatisticCal( | |
| | | LALStatus *status, | |
| | | REAL4WithUnits *output, | |
| | | const StochasticCrossCorrelationCalInput *input, | |
| | | BOOLEAN epochsMatch); | |
| | | | |
| | | void | |
| | | LALStochasticHeterodynedCrossCorrelationStatisticCal( | |
| | | LALStatus *status, | |
| | | COMPLEX8WithUnits *output, | |
| | | const StochasticCrossCorrelationCalInput *input, | |
| | | BOOLEAN epochsMatch); | |
| | | | |
| | | void | |
| | | LALStochasticCrossCorrelationSpectrumCal( | |
| | | LALStatus *status, | |
| | | COMPLEX8FrequencySeries *output, | |
| | | const StochasticCrossCorrelationCalInput *input, | |
| | | BOOLEAN epochsMatch); | |
| | | | |
| /********** </lalVerbatim> *********/ | | /********** </lalVerbatim> *********/ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with ZeroPadAndFFT.c * | | * Structures and prototypes associated with ZeroPadAndFFT.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| | | | |
| skipping to change at line 501 | | skipping to change at line 530 | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticOptimalFilterInput { | | typedef struct tagStochasticOptimalFilterInput { | |
| REAL4FrequencySeries *overlapReductionFunction; | | REAL4FrequencySeries *overlapReductionFunction; | |
| REAL4FrequencySeries *omegaGW; | | REAL4FrequencySeries *omegaGW; | |
| COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD1; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD1; | |
| COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD2; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD2; | |
| } StochasticOptimalFilterInput; | | } StochasticOptimalFilterInput; | |
| | | | |
|
| | | typedef struct tagStochasticOptimalFilterCalInput { | |
| | | REAL4FrequencySeries *overlapReductionFunction; | |
| | | REAL4FrequencySeries *omegaGW; | |
| | | REAL4FrequencySeries *calibratedInverseNoisePSD1; | |
| | | REAL4FrequencySeries *calibratedInverseNoisePSD2; | |
| | | } StochasticOptimalFilterCalInput; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPOF"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPOF"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticOptimalFilter( | | LALStochasticOptimalFilter( | |
| LALStatus *status, | | LALStatus *status, | |
| COMPLEX8FrequencySeries *optimalFilter, | | COMPLEX8FrequencySeries *optimalFilter, | |
| const StochasticOptimalFilterInput *input, | | const StochasticOptimalFilterInput *input, | |
| const REAL4WithUnits *lambda); | | const REAL4WithUnits *lambda); | |
| | | | |
|
| | | void | |
| | | LALStochasticOptimalFilterCal( | |
| | | LALStatus *status, | |
| | | REAL4FrequencySeries *optimalFilter, | |
| | | const StochasticOptimalFilterCalInput *input, | |
| | | const REAL4WithUnits *lambda); | |
| | | | |
| /********** </lalVerbatim> *********/ | | /********** </lalVerbatim> *********/ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with * | | * Structures and prototypes associated with * | |
| * StochasticOptimalFilterNormalization.c * | | * StochasticOptimalFilterNormalization.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| skipping to change at line 669 | | skipping to change at line 712 | |
| of the half-calibrated noise power spectral density. | | of the half-calibrated noise power spectral density. | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticInverseNoiseOutput { | | typedef struct tagStochasticInverseNoiseOutput { | |
| REAL4FrequencySeries *calibratedInverseNoisePSD; | | REAL4FrequencySeries *calibratedInverseNoisePSD; | |
| COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD; | |
| } StochasticInverseNoiseOutput; | | } StochasticInverseNoiseOutput; | |
| | | | |
|
| | | typedef struct tagStochasticInverseNoiseCalOutput { | |
| | | REAL4FrequencySeries *calibratedInverseNoisePSD; | |
| | | } StochasticInverseNoiseCalOutput; | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsubsection*{\texttt{struct StochasticInverseNoiseInput}} | | \subsubsection*{\texttt{struct StochasticInverseNoiseInput}} | |
| \idx[Type]{StochasticInverseNoiseInput} | | \idx[Type]{StochasticInverseNoiseInput} | |
| | | | |
| \noindent | | \noindent | |
| Contains the inputs to \texttt{LALStochasticInverseNoise()}. | | Contains the inputs to \texttt{LALStochasticInverseNoise()}. | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL4FrequencySeries *unCalibratedNoisePSD}] | | \item[\texttt{REAL4FrequencySeries *unCalibratedNoisePSD}] | |
| | | | |
| skipping to change at line 701 | | skipping to change at line 748 | |
| } StochasticInverseNoiseInput; | | } StochasticInverseNoiseInput; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPIN"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPIN"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticInverseNoise( | | LALStochasticInverseNoise( | |
| LALStatus *status, | | LALStatus *status, | |
| StochasticInverseNoiseOutput *output, | | StochasticInverseNoiseOutput *output, | |
| const StochasticInverseNoiseInput *input); | | const StochasticInverseNoiseInput *input); | |
| | | | |
|
| | | void | |
| | | LALStochasticInverseNoiseCal( | |
| | | LALStatus *status, | |
| | | StochasticInverseNoiseCalOutput *output, | |
| | | const StochasticInverseNoiseInput *input); | |
| | | | |
| /********** </lalVerbatim> *********/ | | /********** </lalVerbatim> *********/ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with StochasticOmegaGW.c * | | * Structures and prototypes associated with StochasticOmegaGW.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| | | | |
End of changes. 8 change blocks. |
| 2 lines changed or deleted | | 55 lines changed or added | |
|
| StreamInput.h | | StreamInput.h | |
| /********************************** <lalVerbatim file="StreamInputHV"> | | /********************************** <lalVerbatim file="StreamInputHV"> | |
| Author: Creighton, T. D. | | Author: Creighton, T. D. | |
|
| $Id: StreamInput.h,v 1.4 2002/06/05 00:20:31 teviet Exp $ | | $Id: StreamInput.h,v 1.6 2005/06/14 20:18:02 jolien Exp $ | |
| **************************************************** </lalVerbatim> */ | | **************************************************** </lalVerbatim> */ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| \section{Header \texttt{StreamInput.h}} | | \section{Header \texttt{StreamInput.h}} | |
| \label{s:StreamInput.h} | | \label{s:StreamInput.h} | |
| | | | |
| Provides routines to read data from an open stream and store it in LAL | | Provides routines to read data from an open stream and store it in LAL | |
| data structures. | | data structures. | |
| | | | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| \end{enumerate} | | \end{enumerate} | |
| In particular, there is no need to translate routines such as | | In particular, there is no need to translate routines such as | |
| \verb@fscanf()@; one should simply read data into a LAL | | \verb@fscanf()@; one should simply read data into a LAL | |
| \verb@CHARVector@ and then use \verb@sscanf()@ to format the input. | | \verb@CHARVector@ and then use \verb@sscanf()@ to format the input. | |
| This is the approach used in the numerical input routines in | | This is the approach used in the numerical input routines in | |
| \verb@StreamVectorInput.c@ and \verb@StreamVectorSequenceInput.c@. | | \verb@StreamVectorInput.c@ and \verb@StreamVectorSequenceInput.c@. | |
| | | | |
| The routines in \verb@StreamSequenceInput.c@ are less robust but much | | The routines in \verb@StreamSequenceInput.c@ are less robust but much | |
| more efficient: they use \verb@fscanf()@ to parse the input stream | | more efficient: they use \verb@fscanf()@ to parse the input stream | |
| directly. They are intended primarily for test programs that may need | | directly. They are intended primarily for test programs that may need | |
|
| to read large datafiles of undetermined length. | | to read large datafiles of undetermined length. The routines in | |
| | | \verb@StreamSeriesInput.c@ and \verb@StreamGridInput.c@ also parse the | |
| | | input stream directly using \verb@fscanf()@, to avoid potentially | |
| | | crippling computational overhead. | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| #ifndef _STREAMINPUT_H | | #ifndef _STREAMINPUT_H | |
| #define _STREAMINPUT_H | | #define _STREAMINPUT_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
|
| | | #include <lal/Grid.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID(STREAMINPUTH,"$Id: StreamInput.h,v 1.4 2002/06/05 00:20:31 teviet Ex
p $"); | | NRCSID(STREAMINPUTH,"$Id: StreamInput.h,v 1.6 2005/06/14 20:18:02 jolien Ex
p $"); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| ****************************************** </lalLaTeX><lalErrTable> */ | | ****************************************** </lalLaTeX><lalErrTable> */ | |
| #define STREAMINPUTH_ENUL 1 | | #define STREAMINPUTH_ENUL 1 | |
| #define STREAMINPUTH_EOUT 2 | | #define STREAMINPUTH_EOUT 2 | |
| #define STREAMINPUTH_EMEM 3 | | #define STREAMINPUTH_EMEM 3 | |
| #define STREAMINPUTH_ELEN 4 | | #define STREAMINPUTH_ELEN 4 | |
| #define STREAMINPUTH_ESLEN 5 | | #define STREAMINPUTH_ESLEN 5 | |
| #define STREAMINPUTH_EVLEN 6 | | #define STREAMINPUTH_EVLEN 6 | |
| | | | |
| skipping to change at line 83 | | skipping to change at line 87 | |
| #define STREAMINPUTH_EDIM 8 | | #define STREAMINPUTH_EDIM 8 | |
| #define STREAMINPUTH_EFMT 9 | | #define STREAMINPUTH_EFMT 9 | |
| #define STREAMINPUTH_EBUF 10 | | #define STREAMINPUTH_EBUF 10 | |
| | | | |
| #define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments" | | #define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments" | |
| #define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer" | | #define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer" | |
| #define STREAMINPUTH_MSGEMEM "Memory allocation error" | | #define STREAMINPUTH_MSGEMEM "Memory allocation error" | |
| #define STREAMINPUTH_MSGELEN "No numbers were read" | | #define STREAMINPUTH_MSGELEN "No numbers were read" | |
| #define STREAMINPUTH_MSGESLEN "Not enough numbers read to fill sequence" | | #define STREAMINPUTH_MSGESLEN "Not enough numbers read to fill sequence" | |
| #define STREAMINPUTH_MSGEVLEN "Could not determine complex vectorLength" | | #define STREAMINPUTH_MSGEVLEN "Could not determine complex vectorLength" | |
|
| #define STREAMINPUTH_MSGEDLEN "No dimLength given" | | #define STREAMINPUTH_MSGEDLEN "Dimension lengths inconsistent or not given" | |
| #define STREAMINPUTH_MSGEDIM "Inconsistent or non-positive arrayDim value" | | #define STREAMINPUTH_MSGEDIM "Inconsistent or non-positive arrayDim value" | |
| #define STREAMINPUTH_MSGEFMT "Badly formatted number" | | #define STREAMINPUTH_MSGEFMT "Badly formatted number" | |
| #define STREAMINPUTH_MSGEBUF "BUFFSIZE not a multiple of largest complex t
ype size" | | #define STREAMINPUTH_MSGEBUF "BUFFSIZE not a multiple of largest complex t
ype size" | |
| /******************************************** </lalErrTable><lalLaTeX> | | /******************************************** </lalErrTable><lalLaTeX> | |
| | | | |
| \subsection*{Types} | | \subsection*{Types} | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{StreamInputHV}} | | \vfill{\footnotesize\input{StreamInputHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamVectorInputC} | | \newpage\input{StreamVectorInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALCHARReadVector( LALStatus *stat, CHARVector **vector, FILE *stream ); | | LALCHARReadVector( LALStatus *status, CHARVector **vector, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadVector( LALStatus *stat, INT2Vector **vector, FILE *stream, BOOLE
AN strict ); | | LALI2ReadVector( LALStatus *status, INT2Vector **vector, FILE *stream, BOO
LEAN strict ); | |
| | | | |
| void | | void | |
|
| LALI4ReadVector( LALStatus *stat, INT4Vector **vector, FILE *stream, BOOLE
AN strict ); | | LALI4ReadVector( LALStatus *status, INT4Vector **vector, FILE *stream, BOO
LEAN strict ); | |
| | | | |
| void | | void | |
|
| LALI8ReadVector( LALStatus *stat, INT8Vector **vector, FILE *stream, BOOLE
AN strict ); | | LALI8ReadVector( LALStatus *status, INT8Vector **vector, FILE *stream, BOO
LEAN strict ); | |
| | | | |
| void | | void | |
|
| LALU2ReadVector( LALStatus *stat, UINT2Vector **vector, FILE *stream, BOOL
EAN strict ); | | LALU2ReadVector( LALStatus *status, UINT2Vector **vector, FILE *stream, BO
OLEAN strict ); | |
| | | | |
| void | | void | |
|
| LALU4ReadVector( LALStatus *stat, UINT4Vector **vector, FILE *stream, BOOL
EAN strict ); | | LALU4ReadVector( LALStatus *status, UINT4Vector **vector, FILE *stream, BO
OLEAN strict ); | |
| | | | |
| void | | void | |
|
| LALU8ReadVector( LALStatus *stat, UINT8Vector **vector, FILE *stream, BOOL
EAN strict ); | | LALU8ReadVector( LALStatus *status, UINT8Vector **vector, FILE *stream, BO
OLEAN strict ); | |
| | | | |
| void | | void | |
|
| LALSReadVector( LALStatus *stat, REAL4Vector **vector, FILE *stream, BOOLE
AN strict ); | | LALSReadVector( LALStatus *status, REAL4Vector **vector, FILE *stream, BOO
LEAN strict ); | |
| | | | |
| void | | void | |
|
| LALDReadVector( LALStatus *stat, REAL8Vector **vector, FILE *stream, BOOLE
AN strict ); | | LALDReadVector( LALStatus *status, REAL8Vector **vector, FILE *stream, BOO
LEAN strict ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamVectorSequenceInputC} | | \newpage\input{StreamVectorSequenceInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALCHARReadVectorSequence( LALStatus *stat, CHARVectorSequence **sequence,
FILE *stream ); | | LALCHARReadVectorSequence( LALStatus *status, CHARVectorSequence **sequenc
e, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadVectorSequence( LALStatus *stat, INT2VectorSequence **sequence, F
ILE *stream ); | | LALI2ReadVectorSequence( LALStatus *status, INT2VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI4ReadVectorSequence( LALStatus *stat, INT4VectorSequence **sequence, F
ILE *stream ); | | LALI4ReadVectorSequence( LALStatus *status, INT4VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI8ReadVectorSequence( LALStatus *stat, INT8VectorSequence **sequence, F
ILE *stream ); | | LALI8ReadVectorSequence( LALStatus *status, INT8VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU2ReadVectorSequence( LALStatus *stat, UINT2VectorSequence **sequence,
FILE *stream ); | | LALU2ReadVectorSequence( LALStatus *status, UINT2VectorSequence **sequence
, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU4ReadVectorSequence( LALStatus *stat, UINT4VectorSequence **sequence,
FILE *stream ); | | LALU4ReadVectorSequence( LALStatus *status, UINT4VectorSequence **sequence
, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU8ReadVectorSequence( LALStatus *stat, UINT8VectorSequence **sequence,
FILE *stream ); | | LALU8ReadVectorSequence( LALStatus *status, UINT8VectorSequence **sequence
, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALSReadVectorSequence( LALStatus *stat, REAL4VectorSequence **sequence, F
ILE *stream ); | | LALSReadVectorSequence( LALStatus *status, REAL4VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALDReadVectorSequence( LALStatus *stat, REAL8VectorSequence **sequence, F
ILE *stream ); | | LALDReadVectorSequence( LALStatus *status, REAL8VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamSequenceInputC} | | \newpage\input{StreamSequenceInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALCHARReadSequence( LALStatus *stat, CHARSequence **sequence, FILE *stream
); | | LALCHARReadSequence( LALStatus *status, CHARSequence **sequence, FILE *stre
am ); | |
| | | | |
| void | | void | |
|
| LALI2ReadSequence( LALStatus *stat, INT2Sequence **sequence, FILE *stream )
; | | LALI2ReadSequence( LALStatus *status, INT2Sequence **sequence, FILE *stream
); | |
| | | | |
| void | | void | |
|
| LALI4ReadSequence( LALStatus *stat, INT4Sequence **sequence, FILE *stream )
; | | LALI4ReadSequence( LALStatus *status, INT4Sequence **sequence, FILE *stream
); | |
| | | | |
| void | | void | |
|
| LALI8ReadSequence( LALStatus *stat, INT8Sequence **sequence, FILE *stream )
; | | LALI8ReadSequence( LALStatus *status, INT8Sequence **sequence, FILE *stream
); | |
| | | | |
| void | | void | |
|
| LALU2ReadSequence( LALStatus *stat, UINT2Sequence **sequence, FILE *stream
); | | LALU2ReadSequence( LALStatus *status, UINT2Sequence **sequence, FILE *strea
m ); | |
| | | | |
| void | | void | |
|
| LALU4ReadSequence( LALStatus *stat, UINT4Sequence **sequence, FILE *stream
); | | LALU4ReadSequence( LALStatus *status, UINT4Sequence **sequence, FILE *strea
m ); | |
| | | | |
| void | | void | |
|
| LALU8ReadSequence( LALStatus *stat, UINT8Sequence **sequence, FILE *stream
); | | LALU8ReadSequence( LALStatus *status, UINT8Sequence **sequence, FILE *strea
m ); | |
| | | | |
| void | | void | |
|
| LALSReadSequence( LALStatus *stat, REAL4Sequence **sequence, FILE *stream )
; | | LALSReadSequence( LALStatus *status, REAL4Sequence **sequence, FILE *stream
); | |
| | | | |
| void | | void | |
|
| LALDReadSequence( LALStatus *stat, REAL8Sequence **sequence, FILE *stream )
; | | LALDReadSequence( LALStatus *status, REAL8Sequence **sequence, FILE *stream
); | |
| | | | |
| void | | void | |
|
| LALCReadSequence( LALStatus *stat, COMPLEX8Sequence **sequence, FILE *strea
m ); | | LALCReadSequence( LALStatus *status, COMPLEX8Sequence **sequence, FILE *str
eam ); | |
| | | | |
| void | | void | |
|
| LALZReadSequence( LALStatus *stat, COMPLEX16Sequence **sequence, FILE *stre
am ); | | LALZReadSequence( LALStatus *status, COMPLEX16Sequence **sequence, FILE *st
ream ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamSeriesInputC} | | \newpage\input{StreamSeriesInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALI2ReadTSeries( LALStatus *stat, INT2TimeSeries *series, FILE *stream ); | | LALI2ReadTSeries( LALStatus *status, INT2TimeSeries *series, FILE *stream )
; | |
| void | | void | |
|
| LALI4ReadTSeries( LALStatus *stat, INT4TimeSeries *series, FILE *stream ); | | LALI4ReadTSeries( LALStatus *status, INT4TimeSeries *series, FILE *stream )
; | |
| void | | void | |
|
| LALI8ReadTSeries( LALStatus *stat, INT8TimeSeries *series, FILE *stream ); | | LALI8ReadTSeries( LALStatus *status, INT8TimeSeries *series, FILE *stream )
; | |
| void | | void | |
|
| LALU2ReadTSeries( LALStatus *stat, UINT2TimeSeries *series, FILE *stream ); | | LALU2ReadTSeries( LALStatus *status, UINT2TimeSeries *series, FILE *stream
); | |
| void | | void | |
|
| LALU4ReadTSeries( LALStatus *stat, UINT4TimeSeries *series, FILE *stream ); | | LALU4ReadTSeries( LALStatus *status, UINT4TimeSeries *series, FILE *stream
); | |
| void | | void | |
|
| LALU8ReadTSeries( LALStatus *stat, UINT8TimeSeries *series, FILE *stream ); | | LALU8ReadTSeries( LALStatus *status, UINT8TimeSeries *series, FILE *stream
); | |
| void | | void | |
|
| LALSReadTSeries( LALStatus *stat, REAL4TimeSeries *series, FILE *stream ); | | LALSReadTSeries( LALStatus *status, REAL4TimeSeries *series, FILE *stream )
; | |
| void | | void | |
|
| LALDReadTSeries( LALStatus *stat, REAL8TimeSeries *series, FILE *stream ); | | LALDReadTSeries( LALStatus *status, REAL8TimeSeries *series, FILE *stream )
; | |
| void | | void | |
|
| LALCReadTSeries( LALStatus *stat, COMPLEX8TimeSeries *series, FILE *stream
); | | LALCReadTSeries( LALStatus *status, COMPLEX8TimeSeries *series, FILE *strea
m ); | |
| void | | void | |
|
| LALZReadTSeries( LALStatus *stat, COMPLEX16TimeSeries *series, FILE *stream
); | | LALZReadTSeries( LALStatus *status, COMPLEX16TimeSeries *series, FILE *stre
am ); | |
| | | | |
| void | | void | |
|
| LALI2ReadTVectorSeries( LALStatus *stat, INT2TimeVectorSeries *series, FILE
*stream ); | | LALI2ReadTVectorSeries( LALStatus *status, INT2TimeVectorSeries *series, FI
LE *stream ); | |
| void | | void | |
|
| LALI4ReadTVectorSeries( LALStatus *stat, INT4TimeVectorSeries *series, FILE
*stream ); | | LALI4ReadTVectorSeries( LALStatus *status, INT4TimeVectorSeries *series, FI
LE *stream ); | |
| void | | void | |
|
| LALI8ReadTVectorSeries( LALStatus *stat, INT8TimeVectorSeries *series, FILE
*stream ); | | LALI8ReadTVectorSeries( LALStatus *status, INT8TimeVectorSeries *series, FI
LE *stream ); | |
| void | | void | |
|
| LALU2ReadTVectorSeries( LALStatus *stat, UINT2TimeVectorSeries *series, FIL
E *stream ); | | LALU2ReadTVectorSeries( LALStatus *status, UINT2TimeVectorSeries *series, F
ILE *stream ); | |
| void | | void | |
|
| LALU4ReadTVectorSeries( LALStatus *stat, UINT4TimeVectorSeries *series, FIL
E *stream ); | | LALU4ReadTVectorSeries( LALStatus *status, UINT4TimeVectorSeries *series, F
ILE *stream ); | |
| void | | void | |
|
| LALU8ReadTVectorSeries( LALStatus *stat, UINT8TimeVectorSeries *series, FIL
E *stream ); | | LALU8ReadTVectorSeries( LALStatus *status, UINT8TimeVectorSeries *series, F
ILE *stream ); | |
| void | | void | |
|
| LALSReadTVectorSeries( LALStatus *stat, REAL4TimeVectorSeries *series, FILE
*stream ); | | LALSReadTVectorSeries( LALStatus *status, REAL4TimeVectorSeries *series, FI
LE *stream ); | |
| void | | void | |
|
| LALDReadTVectorSeries( LALStatus *stat, REAL8TimeVectorSeries *series, FILE
*stream ); | | LALDReadTVectorSeries( LALStatus *status, REAL8TimeVectorSeries *series, FI
LE *stream ); | |
| void | | void | |
|
| LALCReadTVectorSeries( LALStatus *stat, COMPLEX8TimeVectorSeries *series, F
ILE *stream ); | | LALCReadTVectorSeries( LALStatus *status, COMPLEX8TimeVectorSeries *series,
FILE *stream ); | |
| void | | void | |
|
| LALZReadTVectorSeries( LALStatus *stat, COMPLEX16TimeVectorSeries *series,
FILE *stream ); | | LALZReadTVectorSeries( LALStatus *status, COMPLEX16TimeVectorSeries *series
, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadTArraySeries( LALStatus *stat, INT2TimeArraySeries *series, FILE *
stream ); | | LALI2ReadTArraySeries( LALStatus *status, INT2TimeArraySeries *series, FILE
*stream ); | |
| void | | void | |
|
| LALI4ReadTArraySeries( LALStatus *stat, INT4TimeArraySeries *series, FILE *
stream ); | | LALI4ReadTArraySeries( LALStatus *status, INT4TimeArraySeries *series, FILE
*stream ); | |
| void | | void | |
|
| LALI8ReadTArraySeries( LALStatus *stat, INT8TimeArraySeries *series, FILE *
stream ); | | LALI8ReadTArraySeries( LALStatus *status, INT8TimeArraySeries *series, FILE
*stream ); | |
| void | | void | |
|
| LALU2ReadTArraySeries( LALStatus *stat, UINT2TimeArraySeries *series, FILE
*stream ); | | LALU2ReadTArraySeries( LALStatus *status, UINT2TimeArraySeries *series, FIL
E *stream ); | |
| void | | void | |
|
| LALU4ReadTArraySeries( LALStatus *stat, UINT4TimeArraySeries *series, FILE
*stream ); | | LALU4ReadTArraySeries( LALStatus *status, UINT4TimeArraySeries *series, FIL
E *stream ); | |
| void | | void | |
|
| LALU8ReadTArraySeries( LALStatus *stat, UINT8TimeArraySeries *series, FILE
*stream ); | | LALU8ReadTArraySeries( LALStatus *status, UINT8TimeArraySeries *series, FIL
E *stream ); | |
| void | | void | |
|
| LALSReadTArraySeries( LALStatus *stat, REAL4TimeArraySeries *series, FILE *
stream ); | | LALSReadTArraySeries( LALStatus *status, REAL4TimeArraySeries *series, FILE
*stream ); | |
| void | | void | |
|
| LALDReadTArraySeries( LALStatus *stat, REAL8TimeArraySeries *series, FILE *
stream ); | | LALDReadTArraySeries( LALStatus *status, REAL8TimeArraySeries *series, FILE
*stream ); | |
| void | | void | |
|
| LALCReadTArraySeries( LALStatus *stat, COMPLEX8TimeArraySeries *series, FIL
E *stream ); | | LALCReadTArraySeries( LALStatus *status, COMPLEX8TimeArraySeries *series, F
ILE *stream ); | |
| void | | void | |
|
| LALZReadTArraySeries( LALStatus *stat, COMPLEX16TimeArraySeries *series, FI
LE *stream ); | | LALZReadTArraySeries( LALStatus *status, COMPLEX16TimeArraySeries *series,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadFSeries( LALStatus *stat, INT2FrequencySeries *series, FILE *strea
m ); | | LALI2ReadFSeries( LALStatus *status, INT2FrequencySeries *series, FILE *str
eam ); | |
| void | | void | |
|
| LALI4ReadFSeries( LALStatus *stat, INT4FrequencySeries *series, FILE *strea
m ); | | LALI4ReadFSeries( LALStatus *status, INT4FrequencySeries *series, FILE *str
eam ); | |
| void | | void | |
|
| LALI8ReadFSeries( LALStatus *stat, INT8FrequencySeries *series, FILE *strea
m ); | | LALI8ReadFSeries( LALStatus *status, INT8FrequencySeries *series, FILE *str
eam ); | |
| void | | void | |
|
| LALU2ReadFSeries( LALStatus *stat, UINT2FrequencySeries *series, FILE *stre
am ); | | LALU2ReadFSeries( LALStatus *status, UINT2FrequencySeries *series, FILE *st
ream ); | |
| void | | void | |
|
| LALU4ReadFSeries( LALStatus *stat, UINT4FrequencySeries *series, FILE *stre
am ); | | LALU4ReadFSeries( LALStatus *status, UINT4FrequencySeries *series, FILE *st
ream ); | |
| void | | void | |
|
| LALU8ReadFSeries( LALStatus *stat, UINT8FrequencySeries *series, FILE *stre
am ); | | LALU8ReadFSeries( LALStatus *status, UINT8FrequencySeries *series, FILE *st
ream ); | |
| void | | void | |
|
| LALSReadFSeries( LALStatus *stat, REAL4FrequencySeries *series, FILE *strea
m ); | | LALSReadFSeries( LALStatus *status, REAL4FrequencySeries *series, FILE *str
eam ); | |
| void | | void | |
|
| LALDReadFSeries( LALStatus *stat, REAL8FrequencySeries *series, FILE *strea
m ); | | LALDReadFSeries( LALStatus *status, REAL8FrequencySeries *series, FILE *str
eam ); | |
| void | | void | |
|
| LALCReadFSeries( LALStatus *stat, COMPLEX8FrequencySeries *series, FILE *st
ream ); | | LALCReadFSeries( LALStatus *status, COMPLEX8FrequencySeries *series, FILE *
stream ); | |
| void | | void | |
|
| LALZReadFSeries( LALStatus *stat, COMPLEX16FrequencySeries *series, FILE *s | | LALZReadFSeries( LALStatus *status, COMPLEX16FrequencySeries *series, FILE | |
| tream ); | | *stream ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{StreamGridInputC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALI2ReadGrid( LALStatus *status, INT2Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALI4ReadGrid( LALStatus *status, INT4Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALI8ReadGrid( LALStatus *status, INT8Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALU2ReadGrid( LALStatus *status, UINT2Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALU4ReadGrid( LALStatus *status, UINT4Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALU8ReadGrid( LALStatus *status, UINT8Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALSReadGrid( LALStatus *status, REAL4Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALDReadGrid( LALStatus *status, REAL8Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALCReadGrid( LALStatus *status, COMPLEX8Grid **grid, FILE *stream ); | |
| | | void | |
| | | LALZReadGrid( LALStatus *status, COMPLEX16Grid **grid, FILE *stream ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamInputTestC} | | \newpage\input{StreamInputTestC} | |
| \newpage\input{StreamSeriesInputTestC} | | \newpage\input{StreamSeriesInputTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 74 change blocks. |
| 74 lines changed or deleted | | 102 lines changed or added | |
|
| StreamOutput.h | | StreamOutput.h | |
| /********************************* <lalVerbatim file="StreamOutputHV"> | | /********************************* <lalVerbatim file="StreamOutputHV"> | |
| Author: Creighton, T. D. | | Author: Creighton, T. D. | |
|
| $Id: StreamOutput.h,v 1.1 2002/05/29 19:55:14 teviet Exp $ | | $Id: StreamOutput.h,v 1.3 2005/06/14 20:18:02 jolien Exp $ | |
| **************************************************** </lalVerbatim> */ | | **************************************************** </lalVerbatim> */ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| \section{Header \texttt{StreamOutput.h}} | | \section{Header \texttt{StreamOutput.h}} | |
| \label{s:StreamOutput.h} | | \label{s:StreamOutput.h} | |
| | | | |
| Provides routines to write data from LAL data structures to an open | | Provides routines to write data from LAL data structures to an open | |
| stream. | | stream. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include "StreamOutput.h" | | #include "StreamOutput.h" | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent This header provides prototypes for routines that write the | | \noindent This header provides prototypes for routines that write the | |
|
| contents of LAL time and frequency series structures to a file (or | | contents of LAL time/frequency series structures or grid structures to | |
| other I/O) stream, in a standard format. The routines do not provide | | a file (or other I/O) stream, in a standard format. The routines do | |
| a system-level interface to create files and open or close file | | not provide a system-level interface to create files and open or close | |
| streams; they simply assume that they have been passed an open, | | file streams; they simply assume that they have been passed an open, | |
| writeable stream. Nonetheless, because they involve I/O stream | | writeable stream. Nonetheless, because they involve I/O stream | |
| manipulation, these routines are placed in the \verb@lalsupport@ | | manipulation, these routines are placed in the \verb@lalsupport@ | |
| library rather than in \verb@lal@ proper. | | library rather than in \verb@lal@ proper. | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| #ifndef _STREAMOUTPUT_H | | #ifndef _STREAMOUTPUT_H | |
| #define _STREAMOUTPUT_H | | #define _STREAMOUTPUT_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
|
| | | #include <lal/Grid.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( STREAMOUTPUTH, "$Id: StreamOutput.h,v 1.1 2002/05/29 19:55:14 tevie
t Exp $" ); | | NRCSID( STREAMOUTPUTH, "$Id: StreamOutput.h,v 1.3 2005/06/14 20:18:02 jolie
n Exp $" ); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| ****************************************** </lalLaTeX><lalErrTable> */ | | ****************************************** </lalLaTeX><lalErrTable> */ | |
| #define STREAMOUTPUTH_ENUL 1 | | #define STREAMOUTPUTH_ENUL 1 | |
| #define STREAMOUTPUTH_EPRN 2 | | #define STREAMOUTPUTH_EPRN 2 | |
| | | | |
| #define STREAMOUTPUTH_MSGENUL "Unexpected null pointer in arguments" | | #define STREAMOUTPUTH_MSGENUL "Unexpected null pointer in arguments" | |
| #define STREAMOUTPUTH_MSGEPRN "Print statement failed" | | #define STREAMOUTPUTH_MSGEPRN "Print statement failed" | |
| /******************************************** </lalErrTable><lalLaTeX> | | /******************************************** </lalErrTable><lalLaTeX> | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 66 | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{StreamOutputHV}} | | \vfill{\footnotesize\input{StreamOutputHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamSeriesOutputC} | | \newpage\input{StreamSeriesOutputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALI2WriteTSeries( LALStatus *stat, FILE *stream, INT2TimeSeries *series )
; | | LALI2WriteTSeries( LALStatus *status, FILE *stream, INT2TimeSeries *series
); | |
| void | | void | |
|
| LALI4WriteTSeries( LALStatus *stat, FILE *stream, INT4TimeSeries *series )
; | | LALI4WriteTSeries( LALStatus *status, FILE *stream, INT4TimeSeries *series
); | |
| void | | void | |
|
| LALI8WriteTSeries( LALStatus *stat, FILE *stream, INT8TimeSeries *series )
; | | LALI8WriteTSeries( LALStatus *status, FILE *stream, INT8TimeSeries *series
); | |
| void | | void | |
|
| LALU2WriteTSeries( LALStatus *stat, FILE *stream, UINT2TimeSeries *series
); | | LALU2WriteTSeries( LALStatus *status, FILE *stream, UINT2TimeSeries *serie
s ); | |
| void | | void | |
|
| LALU4WriteTSeries( LALStatus *stat, FILE *stream, UINT4TimeSeries *series
); | | LALU4WriteTSeries( LALStatus *status, FILE *stream, UINT4TimeSeries *serie
s ); | |
| void | | void | |
|
| LALU8WriteTSeries( LALStatus *stat, FILE *stream, UINT8TimeSeries *series
); | | LALU8WriteTSeries( LALStatus *status, FILE *stream, UINT8TimeSeries *serie
s ); | |
| void | | void | |
|
| LALSWriteTSeries( LALStatus *stat, FILE *stream, REAL4TimeSeries *series )
; | | LALSWriteTSeries( LALStatus *status, FILE *stream, REAL4TimeSeries *series
); | |
| void | | void | |
|
| LALDWriteTSeries( LALStatus *stat, FILE *stream, REAL8TimeSeries *series )
; | | LALDWriteTSeries( LALStatus *status, FILE *stream, REAL8TimeSeries *series
); | |
| void | | void | |
|
| LALCWriteTSeries( LALStatus *stat, FILE *stream, COMPLEX8TimeSeries *serie
s ); | | LALCWriteTSeries( LALStatus *status, FILE *stream, COMPLEX8TimeSeries *ser
ies ); | |
| void | | void | |
|
| LALZWriteTSeries( LALStatus *stat, FILE *stream, COMPLEX16TimeSeries *seri
es ); | | LALZWriteTSeries( LALStatus *status, FILE *stream, COMPLEX16TimeSeries *se
ries ); | |
| | | | |
| void | | void | |
|
| LALI2WriteTVectorSeries( LALStatus *stat, FILE *stream, INT2TimeVectorSeri
es *series ); | | LALI2WriteTVectorSeries( LALStatus *status, FILE *stream, INT2TimeVectorSe
ries *series ); | |
| void | | void | |
|
| LALI4WriteTVectorSeries( LALStatus *stat, FILE *stream, INT4TimeVectorSeri
es *series ); | | LALI4WriteTVectorSeries( LALStatus *status, FILE *stream, INT4TimeVectorSe
ries *series ); | |
| void | | void | |
|
| LALI8WriteTVectorSeries( LALStatus *stat, FILE *stream, INT8TimeVectorSeri
es *series ); | | LALI8WriteTVectorSeries( LALStatus *status, FILE *stream, INT8TimeVectorSe
ries *series ); | |
| void | | void | |
|
| LALU2WriteTVectorSeries( LALStatus *stat, FILE *stream, UINT2TimeVectorSer
ies *series ); | | LALU2WriteTVectorSeries( LALStatus *status, FILE *stream, UINT2TimeVectorS
eries *series ); | |
| void | | void | |
|
| LALU4WriteTVectorSeries( LALStatus *stat, FILE *stream, UINT4TimeVectorSer
ies *series ); | | LALU4WriteTVectorSeries( LALStatus *status, FILE *stream, UINT4TimeVectorS
eries *series ); | |
| void | | void | |
|
| LALU8WriteTVectorSeries( LALStatus *stat, FILE *stream, UINT8TimeVectorSer
ies *series ); | | LALU8WriteTVectorSeries( LALStatus *status, FILE *stream, UINT8TimeVectorS
eries *series ); | |
| void | | void | |
|
| LALSWriteTVectorSeries( LALStatus *stat, FILE *stream, REAL4TimeVectorSeri
es *series ); | | LALSWriteTVectorSeries( LALStatus *status, FILE *stream, REAL4TimeVectorSe
ries *series ); | |
| void | | void | |
|
| LALDWriteTVectorSeries( LALStatus *stat, FILE *stream, REAL8TimeVectorSeri
es *series ); | | LALDWriteTVectorSeries( LALStatus *status, FILE *stream, REAL8TimeVectorSe
ries *series ); | |
| void | | void | |
|
| LALCWriteTVectorSeries( LALStatus *stat, FILE *stream, COMPLEX8TimeVectorS
eries *series ); | | LALCWriteTVectorSeries( LALStatus *status, FILE *stream, COMPLEX8TimeVecto
rSeries *series ); | |
| void | | void | |
|
| LALZWriteTVectorSeries( LALStatus *stat, FILE *stream, COMPLEX16TimeVector
Series *series ); | | LALZWriteTVectorSeries( LALStatus *status, FILE *stream, COMPLEX16TimeVect
orSeries *series ); | |
| | | | |
| void | | void | |
|
| LALI2WriteTArraySeries( LALStatus *stat, FILE *stream, INT2TimeArraySeries
*series ); | | LALI2WriteTArraySeries( LALStatus *status, FILE *stream, INT2TimeArraySeri
es *series ); | |
| void | | void | |
|
| LALI4WriteTArraySeries( LALStatus *stat, FILE *stream, INT4TimeArraySeries
*series ); | | LALI4WriteTArraySeries( LALStatus *status, FILE *stream, INT4TimeArraySeri
es *series ); | |
| void | | void | |
|
| LALI8WriteTArraySeries( LALStatus *stat, FILE *stream, INT8TimeArraySeries
*series ); | | LALI8WriteTArraySeries( LALStatus *status, FILE *stream, INT8TimeArraySeri
es *series ); | |
| void | | void | |
|
| LALU2WriteTArraySeries( LALStatus *stat, FILE *stream, UINT2TimeArraySerie
s *series ); | | LALU2WriteTArraySeries( LALStatus *status, FILE *stream, UINT2TimeArraySer
ies *series ); | |
| void | | void | |
|
| LALU4WriteTArraySeries( LALStatus *stat, FILE *stream, UINT4TimeArraySerie
s *series ); | | LALU4WriteTArraySeries( LALStatus *status, FILE *stream, UINT4TimeArraySer
ies *series ); | |
| void | | void | |
|
| LALU8WriteTArraySeries( LALStatus *stat, FILE *stream, UINT8TimeArraySerie
s *series ); | | LALU8WriteTArraySeries( LALStatus *status, FILE *stream, UINT8TimeArraySer
ies *series ); | |
| void | | void | |
|
| LALSWriteTArraySeries( LALStatus *stat, FILE *stream, REAL4TimeArraySeries
*series ); | | LALSWriteTArraySeries( LALStatus *status, FILE *stream, REAL4TimeArraySeri
es *series ); | |
| void | | void | |
|
| LALDWriteTArraySeries( LALStatus *stat, FILE *stream, REAL8TimeArraySeries
*series ); | | LALDWriteTArraySeries( LALStatus *status, FILE *stream, REAL8TimeArraySeri
es *series ); | |
| void | | void | |
|
| LALCWriteTArraySeries( LALStatus *stat, FILE *stream, COMPLEX8TimeArraySer
ies *series ); | | LALCWriteTArraySeries( LALStatus *status, FILE *stream, COMPLEX8TimeArrayS
eries *series ); | |
| void | | void | |
|
| LALZWriteTArraySeries( LALStatus *stat, FILE *stream, COMPLEX16TimeArraySe
ries *series ); | | LALZWriteTArraySeries( LALStatus *status, FILE *stream, COMPLEX16TimeArray
Series *series ); | |
| | | | |
| void | | void | |
|
| LALI2WriteFSeries( LALStatus *stat, FILE *stream, INT2FrequencySeries *ser
ies ); | | LALI2WriteFSeries( LALStatus *status, FILE *stream, INT2FrequencySeries *s
eries ); | |
| void | | void | |
|
| LALI4WriteFSeries( LALStatus *stat, FILE *stream, INT4FrequencySeries *ser
ies ); | | LALI4WriteFSeries( LALStatus *status, FILE *stream, INT4FrequencySeries *s
eries ); | |
| void | | void | |
|
| LALI8WriteFSeries( LALStatus *stat, FILE *stream, INT8FrequencySeries *ser
ies ); | | LALI8WriteFSeries( LALStatus *status, FILE *stream, INT8FrequencySeries *s
eries ); | |
| void | | void | |
|
| LALU2WriteFSeries( LALStatus *stat, FILE *stream, UINT2FrequencySeries *se
ries ); | | LALU2WriteFSeries( LALStatus *status, FILE *stream, UINT2FrequencySeries *
series ); | |
| void | | void | |
|
| LALU4WriteFSeries( LALStatus *stat, FILE *stream, UINT4FrequencySeries *se
ries ); | | LALU4WriteFSeries( LALStatus *status, FILE *stream, UINT4FrequencySeries *
series ); | |
| void | | void | |
|
| LALU8WriteFSeries( LALStatus *stat, FILE *stream, UINT8FrequencySeries *se
ries ); | | LALU8WriteFSeries( LALStatus *status, FILE *stream, UINT8FrequencySeries *
series ); | |
| void | | void | |
|
| LALSWriteFSeries( LALStatus *stat, FILE *stream, REAL4FrequencySeries *ser
ies ); | | LALSWriteFSeries( LALStatus *status, FILE *stream, REAL4FrequencySeries *s
eries ); | |
| void | | void | |
|
| LALDWriteFSeries( LALStatus *stat, FILE *stream, REAL8FrequencySeries *ser
ies ); | | LALDWriteFSeries( LALStatus *status, FILE *stream, REAL8FrequencySeries *s
eries ); | |
| void | | void | |
|
| LALCWriteFSeries( LALStatus *stat, FILE *stream, COMPLEX8FrequencySeries *
series ); | | LALCWriteFSeries( LALStatus *status, FILE *stream, COMPLEX8FrequencySeries
*series ); | |
| void | | void | |
|
| LALZWriteFSeries( LALStatus *stat, FILE *stream, COMPLEX16FrequencySeries | | LALZWriteFSeries( LALStatus *status, FILE *stream, COMPLEX16FrequencySerie | |
| *series ); | | s *series ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{StreamGridOutputC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALI2WriteGrid( LALStatus *status, FILE *stream, INT2Grid *grid ); | |
| | | void | |
| | | LALI4WriteGrid( LALStatus *status, FILE *stream, INT4Grid *grid ); | |
| | | void | |
| | | LALI8WriteGrid( LALStatus *status, FILE *stream, INT8Grid *grid ); | |
| | | void | |
| | | LALU2WriteGrid( LALStatus *status, FILE *stream, UINT2Grid *grid ); | |
| | | void | |
| | | LALU4WriteGrid( LALStatus *status, FILE *stream, UINT4Grid *grid ); | |
| | | void | |
| | | LALU8WriteGrid( LALStatus *status, FILE *stream, UINT8Grid *grid ); | |
| | | void | |
| | | LALSWriteGrid( LALStatus *status, FILE *stream, REAL4Grid *grid ); | |
| | | void | |
| | | LALDWriteGrid( LALStatus *status, FILE *stream, REAL8Grid *grid ); | |
| | | void | |
| | | LALCWriteGrid( LALStatus *status, FILE *stream, COMPLEX8Grid *grid ); | |
| | | void | |
| | | LALZWriteGrid( LALStatus *status, FILE *stream, COMPLEX16Grid *grid ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _STREAMOUTPUT_H */ | | #endif /* _STREAMOUTPUT_H */ | |
| | | | |
End of changes. 44 change blocks. |
| 47 lines changed or deleted | | 72 lines changed or added | |
|
| Units.h | | Units.h | |
| /********************************* <lalVerbatim file="UnitsHV"> | | /********************************* <lalVerbatim file="UnitsHV"> | |
|
| Author: J. T. Whelan <whelan@oates.utb.edu> | | Author: J. T. Whelan <jtwhelan@loyno.edu> | |
| $Id: Units.h,v 1.9 2002/01/29 00:33:24 whelan Exp $ | | $Id: Units.h,v 1.13 2005/06/03 22:12:58 kipp Exp $ | |
| ********************************** </lalVerbatim> */ | | ********************************** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{Units.h}} | | \section{Header \texttt{Units.h}} | |
| \label{tools:s:Units.h} | | \label{tools:s:Units.h} | |
| | | | |
| Provides prototypes for manipulation of units and declares | | Provides prototypes for manipulation of units and declares | |
| \texttt{extern} constants for the basic and derived SI units. | | \texttt{extern} constants for the basic and derived SI units. | |
| | | | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 67 | |
| \item[\texttt{UINT2 denominatorMinusOne}] One less than the denominator. | | \item[\texttt{UINT2 denominatorMinusOne}] One less than the denominator. | |
| \end{description} | | \end{description} | |
| | | | |
| \vfill{\footnotesize\input{UnitsHV}} | | \vfill{\footnotesize\input{UnitsHV}} | |
| | | | |
| \newpage\input{UnitDefsC} | | \newpage\input{UnitDefsC} | |
| \newpage\input{UnitNormalizeC} | | \newpage\input{UnitNormalizeC} | |
| \newpage\input{UnitRaiseC} | | \newpage\input{UnitRaiseC} | |
| \newpage\input{UnitMultiplyC} | | \newpage\input{UnitMultiplyC} | |
| \newpage\input{UnitCompareC} | | \newpage\input{UnitCompareC} | |
|
| | | | |
| | | \newpage\subsection{XLAL Functions} | |
| | | | |
| | | \subsubsection*{Synopsis} | |
| | | \begin{verbatim} | |
| | | #include <lal/Units.h> | |
| | | | |
| | | char * XLALUnitAsString( char *string, UINT4 length, const LALUnit *input ) | |
| | | ; | |
| | | LALUnit * XLALParseUnitString( LALUnit *output, const char *string ); | |
| | | int XLALUnitNormalize( LALUnit *unit ); | |
| | | int XLALUnitCompare( const LALUnit *unit1, const LALUnit *unit2 ); | |
| | | LALUnit * XLALUnitMultiply( LALUnit *output, const LALUnit *unit1, | |
| | | const LALUnit *unit2 ); | |
| | | LALUnit * XLALUnitRaiseRAT4( LALUnit *output, const LALUnit *input, | |
| | | const RAT4 *power ); | |
| | | LALUnit * XLALUnitRaiseINT2( LALUnit *output, const LALUnit *input, | |
| | | INT2 power ); | |
| | | LALUnit * XLALUnitSquare( LALUnit *output, const LALUnit *input ); | |
| | | LALUnit * XLALUnitSqrt( LALUnit *output, const LALUnit *input ); | |
| | | \end{verbatim} | |
| | | \idx{XLALUnitAsString} | |
| | | \idx{XLALParseUnitString} | |
| | | \idx{XLALUnitNormalize} | |
| | | \idx{XLALUnitCompare} | |
| | | \idx{XLALUnitMultiply} | |
| | | \idx{XLALUnitRaiseRAT4} | |
| | | \idx{XLALUnitRaiseINT2} | |
| | | \idx{XLALUnitSquare} | |
| | | \idx{XLALUnitSqrt} | |
| | | | |
| | | \subsubsection*{Description} | |
| | | | |
| | | \verb+XLALUnitAsString+ converts a \verb+LALUnit+ structure into a characte | |
| | | r | |
| | | string of maximum length \verb+length+ (including NUL termination) | |
| | | representation of the units. The inverse function, \verb+XLALParseUnitStri | |
| | | ng+ | |
| | | parses a character string to produce a \verb+LALUnit+ structure; if | |
| | | \verb+output+ is \verb+NULL+, memory for the output is allocated. If the i | |
| | | nput | |
| | | \verb+string+ is \verb+NULL+ or is empty then the output units are | |
| | | dimensionless: \verb+lalDimensionlessUnit+. | |
| | | | |
| | | \verb+XLALUnitNormalize+ puts a \verb+LALUnit+ structure into normal form | |
| | | by simplifying all unit exponent fractions to their simplest form. | |
| | | | |
| | | \verb+XLALUnitCompare+ compares two \verb+LALUnit+ structures: they are the | |
| | | same if their normal forms are identical. | |
| | | | |
| | | \verb+XLALUnitMultiply+ multiplies two \verb+LALUnit+ structures. The resu | |
| | | lt | |
| | | is put into normal form. | |
| | | | |
| | | \verb+XLALUnitRaiseRAT4+ raises a \verb+LALUnit+ structure to a rational | |
| | | power given by the \verb+RAT4+ structure \verb+power+. | |
| | | \verb+XLALUnitRaiseINT2+ raises a \verb+LALUnit+ structure to an integer | |
| | | power \verb+power+. | |
| | | \verb+XLALUnitSquare+ produces the square of a \verb+LALUnit+ structure. | |
| | | \verb+XLALUnitSqrt+ produces the square-root of a \verb+LALUnit+ structure. | |
| | | | |
| | | \subsubsection*{Return Values} | |
| | | | |
| | | \verb+XLALUnitAsString+ returns the pointer to the input \verb+string+, whi | |
| | | ch | |
| | | is populated with the unit string if successful. If there is a failure, | |
| | | \verb+XLALUnitAsString+ returns a \verb+NULL+ pointer and \verb+xlalErrno+ | |
| | | is set to one of the following values: \verb+XLAL_EFAULT+ if one of the | |
| | | input pointers is \verb+NULL+ or \verb+XLAL_EBADLEN+ if the length of the | |
| | | string is insufficent for the unit string. | |
| | | | |
| | | \verb+XLALParseUnitString+ returns the pointer \verb+output+ upon return | |
| | | or a pointer to newly allocated memory if \verb+output+ was \verb+NULL+; | |
| | | on failure, \verb+XLALParseUnitString+ returns \verb+NULL+ and sets | |
| | | \verb+xlalErrno+ to one of the following values: \verb+XLAL_ENOMEM+ | |
| | | if the routine was unable to allocate memory for the output or | |
| | | \verb+XLAL_EFAILED+ if the routine was unable to parse the unit string. | |
| | | | |
| | | \verb+XLALUnitNormalize+ returns 0 upon success or \verb+XLAL_FAILURE+ | |
| | | if the input pointer is \verb+NULL+, in which case \verb+xlalErrno+ | |
| | | is set to \verb+XLAL_EFAULT+ | |
| | | | |
| | | \verb+XLALUnitCompare+ returns 1 if the the normal form of the two unit | |
| | | structures are the same or 0 if they are different. It returns | |
| | | \verb+XLAL_FAILURE+ and \verb+xlalErrno+ is set to \verb+XLAL_EFAULT+ | |
| | | if one of the input pointers is \verb+NULL+. | |
| | | | |
| | | \verb+XLALUnitMultiply+ | |
| | | \verb+XLALUnitRaiseRAT4+ | |
| | | \verb+XLALUnitRaiseINT2+ | |
| | | \verb+XLALUnitSquare+ and | |
| | | \verb+XLALUnitSqrt+ all return a pointer to the output unit structure | |
| | | \verb+output+ upon success or \verb+NULL+ upon failure. If there is | |
| | | a failure, \verb+xlalErrno+ is set to one of the following values: | |
| | | \verb+XLAL_EFAULT+ if one of the input pointers is \verb+NULL+, | |
| | | \verb+XLAL_ERANGE+ if one of the unit powers exceeds the allowed range, | |
| | | or \verb+XLAL_EINVAL+ (for the raise functions only) if the unit power | |
| | | would not be an integer. | |
| | | | |
| \newpage\input{UnitsTestC} | | \newpage\input{UnitsTestC} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _UNITS_H | | #ifndef _UNITS_H | |
| #define _UNITS_H | | #define _UNITS_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (UNITSH, "$Id: Units.h,v 1.9 2002/01/29 00:33:24 whelan Exp $"); | | NRCSID (UNITSH, "$Id: Units.h,v 1.13 2005/06/03 22:12:58 kipp Exp $"); | |
| | | | |
| /******************************** <lalErrTable file="UnitsHErrTable"> */ | | /******************************** <lalErrTable file="UnitsHErrTable"> */ | |
| | | | |
| #define UNITSH_ENULLPIN 1 | | #define UNITSH_ENULLPIN 1 | |
| #define UNITSH_ENULLPOUT 2 | | #define UNITSH_ENULLPOUT 2 | |
| #define UNITSH_ENULLPD 3 | | #define UNITSH_ENULLPD 3 | |
| #define UNITSH_ENULLPPARAM 4 | | #define UNITSH_ENULLPPARAM 4 | |
| #define UNITSH_ESTRINGSIZE 5 | | #define UNITSH_ESTRINGSIZE 5 | |
| #define UNITSH_EOVERFLOW 6 | | #define UNITSH_EOVERFLOW 6 | |
| #define UNITSH_ENONINT 7 | | #define UNITSH_ENONINT 7 | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 197 | |
| #define UNITSH_MSGENULLPOUT "Null pointer to output" | | #define UNITSH_MSGENULLPOUT "Null pointer to output" | |
| #define UNITSH_MSGENULLPD "Null pointer to data member of vector" | | #define UNITSH_MSGENULLPD "Null pointer to data member of vector" | |
| #define UNITSH_MSGENULLPPARAM "Null pointer to parameters" | | #define UNITSH_MSGENULLPPARAM "Null pointer to parameters" | |
| #define UNITSH_MSGESTRINGSIZE "Output string too short" | | #define UNITSH_MSGESTRINGSIZE "Output string too short" | |
| #define UNITSH_MSGEOVERFLOW "Exponent outside of (U)INT2 bounds" | | #define UNITSH_MSGEOVERFLOW "Exponent outside of (U)INT2 bounds" | |
| #define UNITSH_MSGENONINT "Non-integer power of ten" | | #define UNITSH_MSGENONINT "Non-integer power of ten" | |
| #define UNITSH_MSGEPARSE "Error parsing unit string" | | #define UNITSH_MSGEPARSE "Error parsing unit string" | |
| | | | |
| /************************************ </lalErrTable> */ | | /************************************ </lalErrTable> */ | |
| | | | |
|
| | | /* The parameter structure for LALUnitRaise contains the numerator and | |
| | | * denominator-minus-one of the rational power. | |
| | | */ | |
| | | | |
| | | typedef struct | |
| | | tagRAT4 | |
| | | { | |
| | | INT2 numerator; | |
| | | UINT2 denominatorMinusOne; | |
| | | } RAT4; | |
| | | | |
| /********************************************************* | | /********************************************************* | |
| * * | | * * | |
| * Functions to manipulate unit structures * | | * Functions to manipulate unit structures * | |
| * * | | * * | |
| *********************************************************/ | | *********************************************************/ | |
| | | | |
|
| | | /* XLAL routines */ | |
| | | | |
| | | char * XLALUnitAsString( char *string, UINT4 length, const LALUnit *input ) | |
| | | ; | |
| | | LALUnit * XLALParseUnitString( LALUnit *output, const char *string ); | |
| | | int XLALUnitNormalize( LALUnit *unit ); | |
| | | int XLALUnitCompare( const LALUnit *unit1, const LALUnit *unit2 ); | |
| | | LALUnit * XLALUnitMultiply( LALUnit *output, const LALUnit *unit1, | |
| | | const LALUnit *unit2 ); | |
| | | LALUnit * XLALUnitDivide( LALUnit *output, const LALUnit *unit1, | |
| | | const LALUnit *unit2 ); | |
| | | LALUnit * XLALUnitRaiseRAT4( LALUnit *output, const LALUnit *input, | |
| | | const RAT4 *power ); | |
| | | LALUnit * XLALUnitRaiseINT2( LALUnit *output, const LALUnit *input, | |
| | | INT2 power ); | |
| | | LALUnit * XLALUnitSquare( LALUnit *output, const LALUnit *input ); | |
| | | LALUnit * XLALUnitSqrt( LALUnit *output, const LALUnit *input ); | |
| | | LALUnit * XLALUnitInvert( LALUnit *output, const LALUnit *input ); | |
| | | REAL8 XLALUnitPrefactor(const LALUnit *unit); | |
| | | int XLALUnitIsDimensionless(const LALUnit *unit); | |
| | | REAL8 XLALUnitRatio(const LALUnit *unit1, const LALUnit *unit2); | |
| | | | |
| /* LALUnitNormalize will reduce the rational powers in the basic unit | | /* LALUnitNormalize will reduce the rational powers in the basic unit | |
| * exponents, e.g. converting 2/2 to 1/1 and 3/6 to 1/2. | | * exponents, e.g. converting 2/2 to 1/1 and 3/6 to 1/2. | |
| */ | | */ | |
| | | | |
| void LALUnitNormalize (LALStatus *status, LALUnit *output, | | void LALUnitNormalize (LALStatus *status, LALUnit *output, | |
| const LALUnit *input); | | const LALUnit *input); | |
| | | | |
| /* Several functions take two Unit variables as input, so need the | | /* Several functions take two Unit variables as input, so need the | |
| * following structure. | | * following structure. | |
| */ | | */ | |
| | | | |
| skipping to change at line 144 | | skipping to change at line 269 | |
| const LALUnitPair *input); | | const LALUnitPair *input); | |
| | | | |
| /* LALUnitCompare will compare two Unit variables and return true if | | /* LALUnitCompare will compare two Unit variables and return true if | |
| * they are the equivalent (the same power of ten offset as well as | | * they are the equivalent (the same power of ten offset as well as | |
| * equivalent ratioanl powers of the base units). | | * equivalent ratioanl powers of the base units). | |
| */ | | */ | |
| | | | |
| void LALUnitCompare (LALStatus *status, BOOLEAN *output, | | void LALUnitCompare (LALStatus *status, BOOLEAN *output, | |
| const LALUnitPair *input); | | const LALUnitPair *input); | |
| | | | |
|
| /* The parameter structure for LALUnitRaise contains the numerator and | | | |
| * denominator-minus-one of the rational power. | | | |
| */ | | | |
| | | | |
| typedef struct | | | |
| tagRAT4 | | | |
| { | | | |
| INT2 numerator; | | | |
| UINT2 denominatorMinusOne; | | | |
| } RAT4; | | | |
| | | | |
| /* LALUnitRaise will raise a unit structure to a rational power; the | | /* LALUnitRaise will raise a unit structure to a rational power; the | |
| * most common choices will presumably be -1, 2, and 1/2. An error | | * most common choices will presumably be -1, 2, and 1/2. An error | |
| * occurs if input->powerOfTen is not evenly divisible by the | | * occurs if input->powerOfTen is not evenly divisible by the | |
| * denominator of the specified power | | * denominator of the specified power | |
| */ | | */ | |
| | | | |
| void LALUnitRaise (LALStatus *status, LALUnit *output, | | void LALUnitRaise (LALStatus *status, LALUnit *output, | |
| const LALUnit *input, const RAT4 *power); | | const LALUnit *input, const RAT4 *power); | |
| | | | |
| /* LALUnitAsString will convert an LALUnit structure into a | | /* LALUnitAsString will convert an LALUnit structure into a | |
| | | | |
End of changes. 6 change blocks. |
| 14 lines changed or deleted | | 135 lines changed or added | |
|
| Window.h | | Window.h | |
|
| /*************************************************** <lalVerbatim file="Win | | /************************************************ <lalVerbatim file="Window | |
| dowHV"> | | HV"> | |
| Author:Bruce Allen | | Authors: Allen, B., Brown, D. A., and Creighton, T. | |
| $Id: Window.h,v 1.10 2001/12/04 22:51:25 jolien Exp $ | | $Id: Window.h,v 1.14 2005/01/31 21:41:07 jolien Exp $ | |
| **************************************************** </lalVerbatim> */ | | **************************************************** </lalVerbatim> */ | |
| /*************************************************** <lalLaTeX> | | /*************************************************** <lalLaTeX> | |
| | | | |
| \section{Header \texttt{Window.h}} | | \section{Header \texttt{Window.h}} | |
| \label{s:Window.h} | | \label{s:Window.h} | |
| \idx[Constant]{Rectangular} | | \idx[Constant]{Rectangular} | |
| \idx[Constant]{Hann} | | \idx[Constant]{Hann} | |
| \idx[Constant]{Welch} | | \idx[Constant]{Welch} | |
| \idx[Constant]{Bartlett} | | \idx[Constant]{Bartlett} | |
| \idx[Constant]{Parzen} | | \idx[Constant]{Parzen} | |
| \idx[Constant]{Papoulis} | | \idx[Constant]{Papoulis} | |
|
| | | \idx[Constant]{Kaiser} | |
| | | \idx[Constant]{Creighton} | |
| \index{Apodize} | | \index{Apodize} | |
| \index{Taper} | | \index{Taper} | |
| \index{Power Spectrum} | | \index{Power Spectrum} | |
| \index{Bias in power spectrum} | | \index{Bias in power spectrum} | |
| \index{Spectral Estimation} | | \index{Spectral Estimation} | |
| | | | |
|
| This header file contains enums that define the different types | | This header file provides routines and structures to create and store | |
| of windows, and a parameter block which is used as input to | | window functions (also called a taper, lag window, or apodization | |
| the window-making function. This allows you to | | function). | |
| dreate a REAL4 vector structure containing a window (also called | | | |
| a taper, lag window, or apodization function). | | | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/Window.h> | | #include <lal/Window.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent | | \noindent | |
|
| The routine prototyped in this header file | | The routines prototyped in this header file create and destroy | |
| creates REAL4 vector structure containing a window (also called | | \verb@REAL4Window@ and \verb@REAL8Window@ structures, each containing | |
| a taper, lag window, or apodization function). The choices | | a window and ancillary information such as the the sum of squares of | |
| currently available are: | | the window elements. It is conventional to express windows as | |
| \begin{itemize} | | functions on the normalized domain $y\in[-1,1]$, where the window is | |
| \item Rectangular | | implicitly zero outside this domain. The available windows and their | |
| \item Hann | | formulae are: | |
| \item Welch | | \begin{center}\begin{tabular}{l@{\qquad$w(y)\;=\;$}l} | |
| \item Bartlett | | Rectanglar: & $1$ \\[1ex] | |
| \item Parzen | | Hann: & $\cos^2(\pi y/2)$ \\[1ex] | |
| \item Papoulis | | Welch: & $1-y^2$ \\[1ex] | |
| \item Hamming | | Bartlett: & $1-|y|$ \\[1ex] | |
| \end{itemize} | | Parzen: & $\left\{\begin{array}{c@{\qquad}c} | |
| It should be straighforward to add additional window functions if | | 1-6y^2(1-|y|) & |y|\leq1/2 \\ | |
| they are desired. | | 2(1-|y|)^3 & |y|>1/2 \end{array}\right.$ \\[3ex] | |
| | | Papoulis: & $\frac{1}{\pi}\sin(\pi |y|)+(1-|y|)\cos(\pi |y|)$ \\[1ex] | |
| The window functions are defined for $j=0,\cdots,N-1$ by the following | | Hamming: & $1-0.46[1-\cos(\pi y)]$ \\[1ex] | |
| formulae. Note that $N$ is the length of the vector. In these formulae, l | | Kaiser: & $I_0\left(\beta\sqrt{1-(1-|y|)^2}\right) | |
| et | | /I_0\left(\beta\right)$ \\[1ex] | |
| $x=2 \pi j/N$, and $y=|2j/N-1|$, | | Creighton: & $\exp\left[-\beta y^2/(1-y^2)\right]$ | |
| \begin{eqnarray*} | | \end{tabular}\end{center} | |
| {\rm Rectangular:\ } w_j &=& 1 \\ | | | |
| {\rm Hann:\ } w_j &=& {1 \over 2} ( 1 - \cos x ) \\ | | \begin{wrapfigure}{r}{0.65\textwidth} | |
| {\rm Welch:\ } w_j &=& 1 - y^2 \\ | | \vspace{-4ex} | |
| {\rm Bartlett:\ } w_j &=& 1 - y \\ | | \begin{center} | |
| {\rm Parzen:\ } w_j &=& 1 - 6 y^2 + 6 y^3 {\rm\ if\ } y\le 1/2\\ | | \resizebox{0.6\textwidth}{!}{\includegraphics{window_t}} \\ | |
| &=& 2 (1-y)^3 {\rm\ if\ } y>1/2\\ | | \parbox{0.6\textwidth}{\caption{\label{f:window-t} Various windows as | |
| {\rm Papoulis:\ } w_j &=& {1 \over \pi} \sin (\pi y ) + ( 1 - y ) \cos | | functions of the normalized independend variable $y$, choosing | |
| (\pi y )\\ | | $\beta=6$ for Kaiser and $\beta=2$ for Creighton.}} | |
| {\rm Hamming:\ } w_j &=& 1-0.46 (1 + \cos x ) \\ | | \end{center} | |
| \end{eqnarray*} | | \vspace{-2ex} | |
| | | \end{wrapfigure} | |
| These window functions are shown in Fig.~\ref{f:window} for $N=1024$. | | \noindent where $I_0(x)$ is the $0$th order, modified Bessel function | |
| | | of the first kind, and $\beta(\geq0)$ is a continuous shape parameter | |
| A couple of comments and warnings may be useful. First, the | | related to the amplitude of the sidelobes of the Fourier transform of | |
| definitions given here are taken from {\it Numerical Recipes in C} \cite{nu | | the window. As $\beta\rightarrow0$, the Kaiser and Creighton windows | |
| mrec} and | | approach a rectangular window. | |
| {\it Spectral Analysis for Physical Applications} \cite{pw}. | | | |
| The definitions of windows are {\it not standard}. In particular, | | It is straightforward to add new window functions as the need arises. | |
| some authors (e.g. J.G. Proakis and D.G. Manolakis, {\it Digital | | | |
| Signal Processing} \cite{pm}) and some standard computer applications (e.g. | | For discretely-sampled data $w_j$, $j=0,\ldots,N-1$, the | |
| {\tt | | transformation to the normalized domain $y$ is \emph{not | |
| MatLab}) use definitions in which $N$ is replaced by $N-1$ in the | | standardized}. In these routines we adopt the convention that | |
| definitions of $x$ and $y$, with $j$ covering the range | | $y=2j/N-1$, which is the one used by \textit{Numerical Recipes in | |
| $j=0,\cdots,N-1$. This has the advantage of making the window | | C}~\cite{numrec} and \textit{Spectral Analysis for Physical | |
| function ``more symmetric'', typically be appending an extra ``0'' to | | Applications}~\cite{pw}. Other authors (e.g.\ J.G. Proakis and | |
| the end of the array. It has the disadvantage that it throws out more | | D.G. Manolakis, \textit{Digital Signal Processing}~\cite{pm}) and some | |
| of your precious data. | | standard computer applications (e.g.\ \texttt{Matlab}) adopt the | |
| | | convention that $y=2j/(N-1)-1$. This has the advantage of making the | |
| If you want to get a window function that agrees with either Proakis | | window function exactly symmetric about $N/2$, typically by setting | |
| \& Manolakis, or with MatLab, just call {\tt LALWindow()} with length | | the final array element to zero. It has the disadvantage that it | |
| parameter $M-1$. Then create an array of length $M$, copy the | | throws out one more of your precious data. | |
| $M-1$ elements of the array returned by {\tt LALWindow()}, into it, | | | |
| and finally copy the {\it first} element of the array returned by {\tt | | If you want to get a window function that agrees with either Proakis \& | |
| LALWindow()} into the last element of your new array. | | Manolakis, or with Matlab, just call \verb|LALCreateREAL4Window()| with len | |
| | | gth | |
| | | parameter $M-1$. Then create an array of length $M$, copy the $M-1$ elemen | |
| | | ts | |
| | | of the window array returned by \verb|LALCreateREAL4Window()|, into it, and | |
| | | finally copy the {\it first} element of the array returned by | |
| | | \verb|LALCreateREAL4Window()| into the last element of your new array. | |
| | | | |
| | | \begin{wrapfigure}{l}{0.65\textwidth} | |
| | | \vspace{-2ex} | |
| | | \begin{center} | |
| | | \resizebox{0.6\textwidth}{!}{\includegraphics{window_f}} \\ | |
| | | \parbox{0.6\textwidth}{\caption{\label{f:window-f} Frequency behaviour | |
| | | of various windows as functions of the inverse of the normalized | |
| | | independend variable $y$, choosing $\beta=6$ for Kaiser and $\beta=2$ | |
| | | for Creighton. Solid lines demark the central lobe, circles mark the | |
| | | peaks of the sidelobes.}} | |
| | | \end{center} | |
| | | \vspace{-2ex} | |
| | | \end{wrapfigure} | |
| | | These window functions are shown as functions of $y$ in | |
| | | Fig.~\ref{f:window-t}. Their Fourier transforms are shown as | |
| | | functions of $1/y$ in Fig.~\ref{f:window-f}. Since the Fourier | |
| | | transform of windowed data is the Fourier transform of the data | |
| | | convolved with the Fourier transform of the window, | |
| | | Fig.~\ref{f:window-f} is the major guideline for selecting a window. | |
| | | One can see that windows with a narrow central lobe tend to have | |
| | | higher sidelobes, and windows which suppress their low-order sidelobes | |
| | | tend to have more power in the high-order sidelobes. The choice of | |
| | | window thus depends on whether one is trying to resolve nearby | |
| | | spectral features of comparable magnitude (suggesting a rectangular or | |
| | | a Welch window), to reduce spectral bias and low-order sidelobes (a | |
| | | Hamming or Kaiser window), or to measure a broad spectrum with a large | |
| | | dynamical range (a Creighton or a Papoulis window). A second | |
| | | consideration in some circumstances is computational cost: a | |
| | | rectangular window is trivial, and polynomial windows (e.g.\ Welch, | |
| | | Bartlett, Parzen) are somewhat cheaper than windows requiring a | |
| | | function call (e.g.\ Hann, Papoulis, Kaiser, Creighton). | |
| | | | |
| **********************************************************************</lal
LaTeX> */ | | **********************************************************************</lal
LaTeX> */ | |
| | | | |
| #ifndef _WINDOW_H | | #ifndef _WINDOW_H | |
| #define _WINDOW_H | | #define _WINDOW_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (WINDOWH, "$Id: Window.h,v 1.10 2001/12/04 22:51:25 jolien Exp $"); | | NRCSID (WINDOWH, "$Id: Window.h,v 1.14 2005/01/31 21:41:07 jolien Exp $"); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| *********************************************************** </lalLaTeX>*/ | | *********************************************************** </lalLaTeX>*/ | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| #define WINDOWH_ENULLPARAM 1 | | #define WINDOWH_ENULLPARAM 1 | |
| #define WINDOWH_ENULLVECTOR 2 | | #define WINDOWH_ENULLVECTOR 2 | |
| #define WINDOWH_EEALLOCATE 4 | | #define WINDOWH_EEALLOCATE 4 | |
| #define WINDOWH_EELENGTH 8 | | #define WINDOWH_EELENGTH 8 | |
| #define WINDOWH_ETYPEUNKNOWN 16 | | #define WINDOWH_ETYPEUNKNOWN 16 | |
| #define WINDOWH_ENULLHANDLE 32 | | #define WINDOWH_ENULLHANDLE 32 | |
| #define WINDOWH_EWRONGLENGTH 64 | | #define WINDOWH_EWRONGLENGTH 64 | |
| #define WINDOWH_ENULLDATA 128 | | #define WINDOWH_ENULLDATA 128 | |
|
| | | #define WINDOWH_ENNUL 256 | |
| | | #define WINDOWH_ENULL 512 | |
| | | #define WINDOWH_EBETA 1024 | |
| | | | |
| #define WINDOWH_MSGENULLPARAM "null input parameter structure pointer" | | #define WINDOWH_MSGENULLPARAM "null input parameter structure pointer" | |
| #define WINDOWH_MSGENULLVECTOR "null output vector pointer" | | #define WINDOWH_MSGENULLVECTOR "null output vector pointer" | |
| #define WINDOWH_MSGEEALLOCATE "unable to allocate vector to store window
" | | #define WINDOWH_MSGEEALLOCATE "unable to allocate vector to store window
" | |
| #define WINDOWH_MSGEELENGTH "length of window is <=0, must be positive
" | | #define WINDOWH_MSGEELENGTH "length of window is <=0, must be positive
" | |
| #define WINDOWH_MSGETYPEUNKNOWN "window is of unknown type" | | #define WINDOWH_MSGETYPEUNKNOWN "window is of unknown type" | |
| #define WINDOWH_MSGENULLHANDLE "input vector is null" | | #define WINDOWH_MSGENULLHANDLE "input vector is null" | |
| #define WINDOWH_MSGEWRONGLENGTH "input vector is the wrong length" | | #define WINDOWH_MSGEWRONGLENGTH "input vector is the wrong length" | |
| #define WINDOWH_MSGENULLDATA "data area of input vector is null" | | #define WINDOWH_MSGENULLDATA "data area of input vector is null" | |
|
| | | #define WINDOWH_MSGENULL "null pointer" | |
| | | #define WINDOWH_MSGENNUL "non-null pointer" | |
| | | #define WINDOWH_MSGEBETA "Invalid window shape parameter" | |
| /*********************************************************** </lalErrTabl
e>*/ | | /*********************************************************** </lalErrTabl
e>*/ | |
| /*<lalLaTeX> | | /*<lalLaTeX> | |
| | | | |
| \subsection*{Types} | | \subsection*{Types} | |
|
| \subsubsection*{\texttt{enum WindowType}} | | \subsubsection*{Enumeration \texttt{WindowType}} | |
| \idx[Type]{WindowType} | | \idx[Type]{WindowType} | |
| \idx[Constant]{WINDOWNAMELIST} | | \idx[Constant]{WINDOWNAMELIST} | |
| | | | |
|
| This enum defines the different possible types of windows that can be gener | | This enumeration defines the different possible types of windows that can b | |
| ated. | | e | |
| Any code should take into account that this list may grow if someone adds t | | generated. Any code should take into account that this list may grow if | |
| heir | | someone adds their favorite window to the list. {\bf WARNING:} additional | |
| favorite window to the list. {\bf WARNING:} additional window types must b | | window types must be added just before \texttt{NumberWindowTypes} and after | |
| e added just before | | the existing window types. Note that since an enum by default gives intege | |
| \texttt{NumberWindowTypes} and after the existing window types. Note that | | rs | |
| since an enum by default gives integers starting at zero and incrementing | | starting at zero and incrementing by one, the enum \texttt{NumberWindowType | |
| by one, the enum \texttt{NumberWindowTypes} | | s} | |
| will always give the correct number of window types, even if the list is ex | | will always give the correct number of window types, even if the list is | |
| tended | | extended in the future. The definition of the enum is: | |
| in the future. The definition of the enum is: | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| typedef enum {Rectangular, | | typedef enum {Rectangular, | |
| Hann, | | Hann, | |
| Welch, | | Welch, | |
| Bartlett, | | Bartlett, | |
| Parzen, | | Parzen, | |
| Papoulis, | | Papoulis, | |
| Hamming, | | Hamming, | |
|
| | | Kaiser, | |
| | | Creighton, | |
| NumberWindowTypes} WindowType; | | NumberWindowTypes} WindowType; | |
| \end{verbatim} | | \end{verbatim} | |
| For convenience, the following macro is also defined | | For convenience, the following macro is also defined | |
| \begin{verbatim} | | \begin{verbatim} | |
| #define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P
apoulis", | | #define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P
apoulis", | |
|
| "Hamming"} | | "Hamming", "Kaiser", "Creighton"} | |
| \end{verbatim} | | \end{verbatim} | |
| This string can be used to print out the name of any of the windows (see th
e | | This string can be used to print out the name of any of the windows (see th
e | |
|
| test program for an example of this). If a new window | | test program for an example of this). If a new window is added, be sure to | |
| is added, be sure to put its name onto the end of the array. | | put its name onto the end of the array. | |
| | | | |
|
| ***************************************************************************
</lalLaTeX> */ | | *****************************************************************</lalLaTeX
> */ | |
| /* Define the types of available windows */ | | /* Define the types of available windows */ | |
| /* WARNING: additional window types must be added just before */ | | /* WARNING: additional window types must be added just before */ | |
| /* NumberWindowTypes, and after the existing window types */ | | /* NumberWindowTypes, and after the existing window types */ | |
| | | | |
| typedef enum {Rectangular, | | typedef enum {Rectangular, | |
| Hann, | | Hann, | |
| Welch, | | Welch, | |
| Bartlett, | | Bartlett, | |
| Parzen, | | Parzen, | |
| Papoulis, | | Papoulis, | |
| Hamming, | | Hamming, | |
|
| | | Kaiser, | |
| | | Creighton, | |
| /* add any new window types just before this comment */ | | /* add any new window types just before this comment */ | |
| NumberWindowTypes} WindowType; | | NumberWindowTypes} WindowType; | |
| | | | |
|
| /* if you add new windows above, be sure to add a descriptive name below. | | /* if you add new windows above, be sure to add a descriptive name below. * | |
| */ | | / | |
| #define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P | | #define WINDOWNAMELIST \ | |
| apoulis","Hamming"} | | {"Rectangular","Hann","Welch","Bartlett","Parzen","Papoulis","Hamming","Kai | |
| | | ser","Creighton"} | |
| | | | |
|
| /**************************************************************************
*<lalLaTeX> | | /*******************************************************************<lalLaT
eX> | |
| | | | |
|
| \subsubsection*{\texttt{Structure LALWindowParams}} | | \subsubsection*{Structure \texttt{LALWindowParams}} | |
| \idx[Type]{LALWindowParams} | | \idx[Type]{LALWindowParams} | |
| This structure stores the parameters used to call the window function. | | This structure stores the parameters used to call the window function. | |
|
| It is also used to return the sum of the vector squared. | | It is also used to return the sum of the vector squared and the window | |
| The structure is defined by | | name. The fields of the structure are: | |
| \begin{verbatim} | | | |
| typedef struct tagLALWindowParams { | | | |
| INT4 length; <==> length of window (input) | | | |
| WindowType type; <==> type of window (input) | | | |
| REAL8 sumofsquares; <==> sum of window squared (output) | | | |
| CHAR* windowname; <==> pointer to a char string with window name | | | |
| (output) | | | |
| } LALWindowParams; | | | |
| \end{verbatim} | | | |
| The four fields are: | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT4 length}] The length of the window. This is used as input
. | | \item[\texttt{INT4 length}] The length of the window. This is used as input
. | |
| \item[\texttt{WindowType type}] The type of the window. This is used as inp
ut. | | \item[\texttt{WindowType type}] The type of the window. This is used as inp
ut. | |
|
| \item[\texttt{REAL8 sumofsquares}] The sum of the squares of the window vec | | \item[\texttt{REAL4 beta}] The shape parameter $\beta$ of certain windows. | |
| tor. This is used as output. | | This is used as input. | |
| | | \item[\texttt{REAL8 sumofsquares}] The sum of the squares of the window | |
| | | vector. This is used as output. | |
| \item[\texttt{CHAR* windowname}] A pointer to a character string containing
the window name. This is used as output. | | \item[\texttt{CHAR* windowname}] A pointer to a character string containing
the window name. This is used as output. | |
| \end{description} | | \end{description} | |
| | | | |
|
| ***************************************************************************
</lalLaTeX> */ | | ****************************************************************</lalLaTeX>
*/ | |
| | | | |
| typedef struct tagLALWindowParams { | | typedef struct tagLALWindowParams { | |
| INT4 length; /* length of window (input) */ | | INT4 length; /* length of window (input) */ | |
| WindowType type; /* type of window (input) */ | | WindowType type; /* type of window (input) */ | |
|
| | | REAL4 beta; /* shape parameters for certain windows */ | |
| REAL8 sumofsquares; /* sum of window squared (output) */ | | REAL8 sumofsquares; /* sum of window squared (output) */ | |
| const CHAR* windowname; /* pointer to a char string with window name (o
utput) */ | | const CHAR* windowname; /* pointer to a char string with window name (o
utput) */ | |
| } LALWindowParams; | | } LALWindowParams; | |
| | | | |
|
| void LALWindow (LALStatus *, | | /*******************************************************************<lalLaT | |
| REAL4Vector *, | | eX> | |
| LALWindowParams *); | | | |
| | | \subsubsection*{Structure \texttt{<datatype>Window}} | |
| | | \idx[Type]{REAL4Window} | |
| | | This structure stores the window and it's parameters (above), where | |
| | | \verb@<datatype>@ can be either \verb@REAL4@ or \verb@REAL8@. The | |
| | | fields of the structure are: | |
| | | \begin{description} | |
| | | \item[\texttt{WindowType type}] The type of the window. | |
| | | \item[\texttt{<datatype>Vector *data}] The window data. | |
| | | \item[\texttt{REAL4 beta}] The shape parameter $\beta$ of the window. | |
| | | \item[\texttt{REAL8 sumofsquares}] The sum of the squares of the window | |
| | | vector. | |
| | | \item[\texttt{CHAR windowname[LALNameLength]}] A pointer to a character str | |
| | | ing | |
| | | containing the window name. | |
| | | \end{description} | |
| | | | |
| | | ****************************************************************</lalLaTeX> | |
| | | */ | |
| | | typedef struct | |
| | | tagREAL4Window | |
| | | { | |
| | | WindowType type; | |
| | | REAL4Vector *data; | |
| | | CHAR windowname[LALNameLength]; | |
| | | REAL4 beta; | |
| | | REAL8 sumofsquares; | |
| | | } | |
| | | REAL4Window; | |
| | | | |
| | | typedef struct | |
| | | tagREAL8Window | |
| | | { | |
| | | WindowType type; | |
| | | REAL8Vector *data; | |
| | | CHAR windowname[LALNameLength]; | |
| | | REAL4 beta; | |
| | | REAL8 sumofsquares; | |
| | | } | |
| | | REAL8Window; | |
| | | | |
| | | REAL4Window *XLALCreateREAL4Window( UINT4 length, WindowType type, REAL4 be | |
| | | ta ); | |
| | | REAL8Window *XLALCreateREAL8Window( UINT4 length, WindowType type, REAL4 be | |
| | | ta ); | |
| | | REAL4Window *XLALCreateRectangularREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateHannREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateWelchREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateBartlettREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateParzenREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreatePapoulisREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateHammingREAL4Window( UINT4 length ); | |
| | | REAL4Window *XLALCreateKaiserREAL4Window( UINT4 length, REAL4 beta ); | |
| | | REAL4Window *XLALCreateCreightonREAL4Window( UINT4 length, REAL4 beta ); | |
| | | REAL8Window *XLALCreateRectangularREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateHannREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateWelchREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateBartlettREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateParzenREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreatePapoulisREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateHammingREAL8Window( UINT4 length ); | |
| | | REAL8Window *XLALCreateKaiserREAL8Window( UINT4 length, REAL4 beta ); | |
| | | REAL8Window *XLALCreateCreightonREAL8Window( UINT4 length, REAL4 beta ); | |
| | | void XLALDestroyREAL4Window( REAL4Window *window ); | |
| | | void XLALDestroyREAL8Window( REAL8Window *window ); | |
| | | | |
| | | void LALWindow ( | |
| | | LALStatus *, | |
| | | REAL4Vector *, | |
| | | LALWindowParams * | |
| | | ); | |
| | | | |
| | | void LALCreateREAL4Window ( | |
| | | LALStatus *status, | |
| | | REAL4Window **output, | |
| | | LALWindowParams *params | |
| | | ); | |
| | | | |
| | | void LALDestroyREAL4Window ( | |
| | | LALStatus *status, | |
| | | REAL4Window **output | |
| | | ); | |
| | | | |
| | | void LALCreateREAL8Window ( | |
| | | LALStatus *status, | |
| | | REAL8Window **output, | |
| | | LALWindowParams *params | |
| | | ); | |
| | | | |
| | | void LALDestroyREAL8Window ( | |
| | | LALStatus *status, | |
| | | REAL8Window **output | |
| | | ); | |
| | | | |
| /**************************************************************************
** <lalLaTeX> | | /**************************************************************************
** <lalLaTeX> | |
| \vfill{\footnotesize\input{WindowHV}} | | \vfill{\footnotesize\input{WindowHV}} | |
| \newpage | | \newpage | |
| \input{WindowC} | | \input{WindowC} | |
| \newpage | | \newpage | |
| \input{WindowTestC} | | \input{WindowTestC} | |
| ***************************************************************************
* </lalLaTeX> */ | | ***************************************************************************
* </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
End of changes. 22 change blocks. |
| 106 lines changed or deleted | | 238 lines changed or added | |
|