| 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 | |
|
| Calibration.h | | Calibration.h | |
| /**** <lalVerbatim file="CalibrationHV"> | | /**** <lalVerbatim file="CalibrationHV"> | |
| * Author: P. R. Brady, J. D. E. Creighton | | * Author: P. R. Brady, J. D. E. Creighton | |
|
| * $Id: Calibration.h,v 1.2 2001/12/20 20:31:25 patrick Exp $ | | * $Id: Calibration.h,v 1.17 2005/05/01 15:02:17 patrick Exp $ | |
| **** </lalVerbatim> */ | | **** </lalVerbatim> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \section{Header \texttt{Calibration.h}} | | * \section{Header \texttt{Calibration.h}} | |
| * | | * | |
| * \subsection*{Synopsis} | | * \subsection*{Synopsis} | |
| * \begin{verbatim} | | * \begin{verbatim} | |
| * #include <lal/Calibration.h> | | * #include <lal/Calibration.h> | |
| * \end{verbatim} | | * \end{verbatim} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
| #ifndef _CALIBRATION_H | | #ifndef _CALIBRATION_H | |
| #define _CALIBRATION_H | | #define _CALIBRATION_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
|
| | | #include <lal/BandPassTimeSeries.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } /** to match the previous brace **/ | | #pragma } /** to match the previous brace **/ | |
| #endif | | #endif | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Error conditions} | | * \subsection*{Error conditions} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalErrTable> */ | | /**** <lalErrTable> */ | |
| #define CALIBRATIONH_ENULL 001 | | #define CALIBRATIONH_ENULL 001 | |
|
| | | #define CALIBRATIONH_ESIZE 002 | |
| | | #define CALIBRATIONH_ESZMM 004 | |
| | | #define CALIBRATIONH_EZERO 010 | |
| | | #define CALIBRATIONH_ETIME 020 | |
| | | #define CALIBRATIONH_EUNIT 040 | |
| | | | |
| #define CALIBRATIONH_MSGENULL "Null pointer" | | #define CALIBRATIONH_MSGENULL "Null pointer" | |
|
| | | #define CALIBRATIONH_MSGESIZE "Invalid size" | |
| | | #define CALIBRATIONH_MSGESZMM "Size mismatch" | |
| | | #define CALIBRATIONH_MSGEZERO "Zero factor" | |
| | | #define CALIBRATIONH_MSGETIME "Time out of range" | |
| | | #define CALIBRATIONH_MSGEUNIT "Incompatible units" | |
| /**** </lalErrTable> */ | | /**** </lalErrTable> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * \subsection*{Structures} | | * \subsection*{Structures} | |
| * \idx[Type]{CalibrationType} | | * \idx[Type]{CalibrationType} | |
| * \idx[Type]{CalibrationRecord} | | * \idx[Type]{CalibrationRecord} | |
|
| | | * \idx[Type]{CalibrationFunctions} | |
| | | * \idx[Type]{CalibrationUpdateParams} | |
| | | * | |
| | | * \subsubsection*{Type \texttt{CalibrationType}} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef enum | | typedef enum | |
| { | | { | |
| CalibrationAmplitude = 001, | | CalibrationAmplitude = 001, | |
| CalibrationOffset = 002, | | CalibrationOffset = 002, | |
| CalibrationDelay = 004, | | CalibrationDelay = 004, | |
| CalibrationTransfer = 010, | | CalibrationTransfer = 010, | |
| CalibrationZPG = 020 | | CalibrationZPG = 020 | |
| } | | } | |
| CalibrationType; | | CalibrationType; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
|
| | | | |
| | | /**** <lalLaTeX> | |
| | | * | |
| | | * Document \verb+CalibrationType+ | |
| | | * | |
| | | * \subsubsection*{Type \texttt{CalFactors}} | |
| | | * | |
| | | **** </lalLaTeX> */ | |
| | | /**** <lalVerbatim> */ | |
| | | typedef struct | |
| | | tagCalFactors | |
| | | { | |
| | | COMPLEX16 alpha; | |
| | | COMPLEX16 alphabeta; | |
| | | COMPLEX16 beta; | |
| | | COMPLEX16 exc; | |
| | | COMPLEX16 asq; | |
| | | COMPLEX16 darm; | |
| | | } | |
| | | CalFactors; | |
| | | /**** </lalVerbatim> */ | |
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * Document \verb+CalibrationType+ | | * Document \verb+CalibrationType+ | |
| * | | * | |
|
| | | * \subsubsection*{Type \texttt{UpdateFactorsParams}} | |
| | | * | |
| | | **** </lalLaTeX> */ | |
| | | /**** <lalVerbatim> */ | |
| | | typedef struct | |
| | | tagUpdateFactorsParams | |
| | | { | |
| | | REAL8 lineFrequency; | |
| | | COMPLEX16 openloop; | |
| | | COMPLEX16 digital; | |
| | | REAL4TimeSeries *darmCtrl; | |
| | | REAL4TimeSeries *asQ; | |
| | | REAL4TimeSeries *exc; | |
| | | } | |
| | | UpdateFactorsParams; | |
| | | /**** </lalVerbatim> */ | |
| | | | |
| | | /**** <lalLaTeX> | |
| | | * | |
| | | * Document \verb+CalibrationType+ | |
| | | * | |
| | | * \subsubsection*{Type \texttt{CalibrationRecord}} | |
| | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| /**** <lalVerbatim> */ | | /**** <lalVerbatim> */ | |
| typedef struct | | typedef struct | |
| tagCalibrationRecord | | tagCalibrationRecord | |
| { | | { | |
| CHAR name[LALNameLength]; | | CHAR name[LALNameLength]; | |
| LIGOTimeGPS epoch; | | LIGOTimeGPS epoch; | |
| REAL8 duration; | | REAL8 duration; | |
| CHAR reference[LALNameLength]; | | CHAR reference[LALNameLength]; | |
| LALUnit units; | | LALUnit units; | |
| | | | |
| skipping to change at line 81 | | skipping to change at line 141 | |
| REAL8 conversion; | | REAL8 conversion; | |
| REAL8 offset; | | REAL8 offset; | |
| REAL8 delay; | | REAL8 delay; | |
| COMPLEX8FrequencySeries *transfer; | | COMPLEX8FrequencySeries *transfer; | |
| REAL8Vector *zeros; | | REAL8Vector *zeros; | |
| REAL8Vector *poles; | | REAL8Vector *poles; | |
| REAL8 gain; | | REAL8 gain; | |
| } | | } | |
| CalibrationRecord; | | CalibrationRecord; | |
| /**** </lalVerbatim> */ | | /**** </lalVerbatim> */ | |
|
| | | | |
| /**** <lalLaTeX> | | /**** <lalLaTeX> | |
| * | | * | |
| * Document \verb+CalibrationRecord+ | | * Document \verb+CalibrationRecord+ | |
| * | | * | |
|
| | | * \subsubsection*{Type \texttt{CalibrationFunctions}} | |
| | | * | |
| | | **** </lalLaTeX> */ | |
| | | /**** <lalVerbatim> */ | |
| | | typedef struct | |
| | | tagCalibrationFunctions | |
| | | { | |
| | | COMPLEX8FrequencySeries *responseFunction; | |
| | | COMPLEX8FrequencySeries *sensingFunction; | |
| | | } | |
| | | CalibrationFunctions; | |
| | | /**** </lalVerbatim> */ | |
| | | /**** <lalLaTeX> | |
| | | * The type \texttt{CalibrationFunctions} contains two calibration function | |
| | | s, | |
| | | * the sensing function $C(f)$ and the response function $R(f)$. While the | |
| | | * response function is the function that is most often wanted, the sensing | |
| | | * function is needed in updating calibration from one epoch to another. | |
| | | * | |
| | | * \subsubsection*{Type \texttt{CalibrationUpdateParams}} | |
| | | * | |
| | | **** </lalLaTeX> */ | |
| | | /**** <lalVerbatim> */ | |
| | | typedef struct | |
| | | tagCalibrationUpdateParams | |
| | | { | |
| | | LIGOTimeGPS epoch; | |
| | | LIGOTimeGPS duration; | |
| | | CHAR *ifo; | |
| | | COMPLEX8 alpha; | |
| | | COMPLEX8 alphabeta; | |
| | | COMPLEX8TimeSeries *openLoopFactor; | |
| | | COMPLEX8TimeSeries *sensingFactor; | |
| | | } | |
| | | CalibrationUpdateParams; | |
| | | /**** </lalVerbatim> */ | |
| | | /**** <lalLaTeX> | |
| | | * The type \texttt{CalibrationUpdateParams} contains two time series | |
| | | * representing an overall gain factor for the open-loop gain function $H(f | |
| | | )$ | |
| | | * and the sensing function $C(f)$. These transfer functions are known to | |
| | | * change (by an overall factor) with time, and these two factors can be | |
| | | * tracked using the injected calibration lines. The factors are stored | |
| | | * in this structure as (very-slowly varying) time series, and are to be | |
| | | * used in updating the calibration functions described previously. | |
| | | * (The response function can be computed from the open-loop gain and the | |
| | | * sensing function. It is simply $R(f)=[1+H(f)]/C(f)$.) In addition, thi | |
| | | s | |
| | | * structure contains the present epoch and the duration of the data to be | |
| | | * calibrated to identify the particular set of | |
| | | * factors (from those recorded in the time series) to use. | |
| | | * | |
| * \vfill{\footnotesize\input{CalibrationHV}} | | * \vfill{\footnotesize\input{CalibrationHV}} | |
| * \newpage\input{ComputeTransferC} | | * \newpage\input{ComputeTransferC} | |
| * | | * | |
| **** </lalLaTeX> */ | | **** </lalLaTeX> */ | |
| | | | |
|
| | | typedef | |
| | | struct StrainOutTag { | |
| | | REAL8TimeSeries h; /* timeseries containing h(t) */ | |
| | | REAL8TimeSeries hC; /* timeseries containing the control signal * | |
| | | / | |
| | | REAL8TimeSeries hR; /* timeseries containing the residual signal | |
| | | */ | |
| | | COMPLEX16TimeSeries alpha; /* alpha time series */ | |
| | | COMPLEX16TimeSeries beta; /* beta time series */ | |
| | | COMPLEX16TimeSeries alphabeta; /* alpha time series */ | |
| | | } StrainOut; | |
| | | | |
| | | typedef | |
| | | struct StrainInTag { | |
| | | REAL4TimeSeries AS_Q ; /* timeseries containing ASQ */ | |
| | | REAL4TimeSeries DARM_ERR;/* timeseries containing DARM_ERR */ | |
| | | REAL4TimeSeries DARM ; /* timeseries containing DARM_CTRL */ | |
| | | REAL4TimeSeries EXC ; /* timeseries containing the excitation */ | |
| | | COMPLEX16 Do; /* digital filter at cal line frequency */ | |
| | | COMPLEX16 Go; /* OLG at cal line frequency */ | |
| | | REAL8 f; /* calibration line frequency */ | |
| | | REAL4 To; /* factors integration time */ | |
| | | REAL8IIRFilter *Cinv; /* Filters for inverse of sensing function */ | |
| | | INT4 CinvUSF; /* Upsampling factor for sensing function */ | |
| | | INT4 CinvDelay; /* Overall inverse sensing function delay */ | |
| | | REAL8IIRFilter *AA; /* Filters for analog actuation function */ | |
| | | INT4 AADelay; /* Overall analog actuation function delay */ | |
| | | REAL8IIRFilter *AX; /* Digital filters for x arm actuation function | |
| | | */ | |
| | | REAL8IIRFilter *AY; /* Digital filters for y arm actuation function | |
| | | */ | |
| | | INT4 NCinv; /* Numbers of filters of each type */ | |
| | | INT4 NAA; | |
| | | INT4 NAX; | |
| | | INT4 NAY; | |
| | | INT4 delta; | |
| | | INT4 usefactors; | |
| | | INT4 wings; /* size of wings in seconds */ | |
| | | INT4 fftconv; | |
| | | INT4 outalphas; | |
| | | } StrainIn; | |
| | | | |
| | | typedef | |
| | | struct MyIIRFilter { | |
| | | INT4 yOrder; | |
| | | INT4 xOrder; | |
| | | REAL8 a[20]; | |
| | | REAL8 b[20]; | |
| | | REAL8 yhist[20]; | |
| | | REAL8 xhist[20]; | |
| | | } MyIIRFilter; | |
| | | | |
| void LALComputeTransfer( LALStatus *status, CalibrationRecord *calrec ); | | void LALComputeTransfer( LALStatus *status, CalibrationRecord *calrec ); | |
| | | | |
|
| | | void | |
| | | LALUpdateCalibration( | |
| | | LALStatus *status, | |
| | | CalibrationFunctions *output, | |
| | | CalibrationFunctions *input, | |
| | | CalibrationUpdateParams *params | |
| | | ); | |
| | | | |
| | | void | |
| | | LALResponseConvert( | |
| | | LALStatus *status, | |
| | | COMPLEX8FrequencySeries *output, | |
| | | COMPLEX8FrequencySeries *input | |
| | | ); | |
| | | | |
| | | INT4 | |
| | | XLALResponseConvert( | |
| | | COMPLEX8FrequencySeries *output, | |
| | | COMPLEX8FrequencySeries *input | |
| | | ); | |
| | | | |
| | | void LALComputeCalibrationFactors( | |
| | | LALStatus *status, | |
| | | CalFactors *output, | |
| | | UpdateFactorsParams *input | |
| | | ); | |
| | | | |
| | | void LALComputeStrain( | |
| | | LALStatus *status, | |
| | | StrainOut *output, | |
| | | StrainIn *input | |
| | | ); | |
| | | | |
| | | void LALGetFactors( | |
| | | LALStatus *status, | |
| | | StrainOut *output, | |
| | | StrainIn *input | |
| | | ); | |
| | | | |
| | | void LALFIRFilter(LALStatus *status, | |
| | | REAL8TimeSeries *tseries, | |
| | | REAL8IIRFilter *FIR); | |
| | | | |
| | | void LALMakeFIRLP(LALStatus *status, | |
| | | REAL8IIRFilter *G, | |
| | | int USF); | |
| | | | |
| | | void LALMakeFIRLPALPHAS(LALStatus *status, | |
| | | REAL8IIRFilter *G); | |
| | | | |
| | | void LALMakeFIRHP(LALStatus *status, | |
| | | REAL8IIRFilter *G); | |
| | | | |
| | | void LALCopyFilter(LALStatus *status, | |
| | | REAL8IIRFilter **F2, | |
| | | REAL8IIRFilter *F1, | |
| | | int ORDER); | |
| | | | |
| | | void LALFreeFilter(LALStatus *status, | |
| | | REAL8IIRFilter *F2, | |
| | | int ORDER); | |
| | | | |
| | | int XLALDivideTimeSeries(REAL8TimeSeries *hR, REAL8TimeSeries *ALPHAS); | |
| | | int XLALUpsample(REAL8TimeSeries *uphR, REAL8TimeSeries *hR, int up_factor) | |
| | | ; | |
| | | int XLALUpsampleLinear(REAL8TimeSeries *uphR, REAL8TimeSeries *hR, int up_f | |
| | | actor); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { /** to match the next brace **/ | | #pragma { /** to match the next brace **/ | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _CALIBRATION_H */ | | #endif /* _CALIBRATION_H */ | |
| | | | |
End of changes. 11 change blocks. |
| 1 lines changed or deleted | | 234 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 | |
|
| FindChirpChisq.h | | FindChirpChisq.h | |
| /*----------------------------------------------------------------------- | | /*----------------------------------------------------------------------- | |
| * | | * | |
| * File Name: FindChirpChisq.h | | * File Name: FindChirpChisq.h | |
| * | | * | |
| * Author: Anderson, W. G., and Brown, D. A. | | * Author: Anderson, W. G., and Brown, D. A. | |
| * | | * | |
|
| * Revision: $Id: FindChirpChisq.h,v 1.5 2002/01/18 01:47:31 duncan Exp $ | | * Revision: $Id: FindChirpChisq.h,v 1.19 2005/01/11 00:32:27 duncan Exp $ | |
| * | | * | |
| *----------------------------------------------------------------------- | | *----------------------------------------------------------------------- | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalVerbatim file="FindChirpChisqHV"> | | <lalVerbatim file="FindChirpChisqHV"> | |
| Author: Anderson, W. G., and Brown, D. A. | | Author: Anderson, W. G., and Brown, D. A. | |
|
| $Id: FindChirpChisq.h,v 1.5 2002/01/18 01:47:31 duncan Exp $ | | $Id: FindChirpChisq.h,v 1.19 2005/01/11 00:32:27 duncan Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| <lalLaTeX> | | <lalLaTeX> | |
| \section{Header \texttt{FindChirpChisq.h}} | | \section{Header \texttt{FindChirpChisq.h}} | |
| \label{s:FindChirpChisq.h} | | \label{s:FindChirpChisq.h} | |
| | | | |
| Provides prototypes and functions to perform a $\chi^2$ veto on binary | | Provides prototypes and functions to perform a $\chi^2$ veto on binary | |
| inspiral chirps using data generated by the \texttt{FindChirpFilter()} | | inspiral chirps using data generated by the \texttt{FindChirpFilter()} | |
| function. | | function. | |
| | | | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \input{FindChirpChisqHDoc} | | \input{FindChirpChisqHDoc} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #ifndef _FINDCHIRPCHISQH_H | | #ifndef _FINDCHIRPCHISQH_H | |
| #define _FINDCHIRPCHISQH_H | | #define _FINDCHIRPCHISQH_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
|
| | | #include <lal/FindChirpDatatypes.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (SPFINDCHIRPCHISQH, "$Id: FindChirpChisq.h,v 1.5 2002/01/18 01:47:31
duncan Exp $"); | | NRCSID (SPFINDCHIRPCHISQH, "$Id: FindChirpChisq.h,v 1.19 2005/01/11 00:32:2
7 duncan Exp $"); | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| #define FINDCHIRPCHISQH_ENULL 1 | | #define FINDCHIRPCHISQH_ENULL 1 | |
| #define FINDCHIRPCHISQH_ENNUL 2 | | #define FINDCHIRPCHISQH_ENNUL 2 | |
| #define FINDCHIRPCHISQH_ENUMZ 3 | | #define FINDCHIRPCHISQH_ENUMZ 3 | |
| #define FINDCHIRPCHISQH_ECHIZ 4 | | #define FINDCHIRPCHISQH_ECHIZ 4 | |
| #define FINDCHIRPCHISQH_EALOC 5 | | #define FINDCHIRPCHISQH_EALOC 5 | |
|
| | | #define FINDCHIRPCHISQH_EUAPX 6 | |
| | | #define FINDCHIRPCHISQH_EIAPX 7 | |
| | | #define FINDCHIRPCHISQH_EBINS 8 | |
| #define FINDCHIRPCHISQH_MSGENULL "Null pointer" | | #define FINDCHIRPCHISQH_MSGENULL "Null pointer" | |
| #define FINDCHIRPCHISQH_MSGENNUL "Non-null pointer" | | #define FINDCHIRPCHISQH_MSGENNUL "Non-null pointer" | |
| #define FINDCHIRPCHISQH_MSGENUMZ "Number of points is zero or negative" | | #define FINDCHIRPCHISQH_MSGENUMZ "Number of points is zero or negative" | |
| #define FINDCHIRPCHISQH_MSGECHIZ "Number of chisq bins is zero or negative" | | #define FINDCHIRPCHISQH_MSGECHIZ "Number of chisq bins is zero or negative" | |
| #define FINDCHIRPCHISQH_MSGEALOC "Memory allocation error" | | #define FINDCHIRPCHISQH_MSGEALOC "Memory allocation error" | |
|
| | | #define FINDCHIRPCHISQH_MSGEUAPX "Unknown waveform approximant" | |
| | | #define FINDCHIRPCHISQH_MSGEIAPX "Incorrect waveform approximant" | |
| | | #define FINDCHIRPCHISQH_MSGEBINS "Error computing chisq bin boundaries" | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Types} | | \subsection*{Types} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| /* --- structure for storing input to the chisq veto ---------------------
*/ | | /* --- structure for storing input to the chisq veto ---------------------
*/ | |
|
| #pragma <lalVerbatim file="FindChirpChisqHFindChirpChisqInput"> | | /* <lalVerbatim file="FindChirpChisqHFindChirpChisqInput"> */ | |
| typedef struct | | typedef struct | |
| tagFindChirpChisqInput | | tagFindChirpChisqInput | |
| { | | { | |
| COMPLEX8Vector *qtildeVec; | | COMPLEX8Vector *qtildeVec; | |
| COMPLEX8Vector *qVec; | | COMPLEX8Vector *qVec; | |
| } | | } | |
| FindChirpChisqInput; | | FindChirpChisqInput; | |
|
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsubsection*{Structure \texttt{FindChirpChisqInput}} | | \subsubsection*{Structure \texttt{FindChirpChisqInput}} | |
| \idx[Type]{FindChirpChisqInput} | | \idx[Type]{FindChirpChisqInput} | |
| | | | |
| \input{FindChirpChisqHFindChirpChisqInput} | | \input{FindChirpChisqHFindChirpChisqInput} | |
| | | | |
| \noindent This structure contains the input to the $\chi^2$ veto function. | | \noindent This structure contains the input to the $\chi^2$ veto function. | |
| The quantities should be populated by \texttt{FindChirpFilter()} on entry. | | The quantities should be populated by \texttt{FindChirpFilter()} on entry. | |
| The fields are: | | The fields are: | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 111 | |
| \item[\texttt{COMPLEX8Vector *qtildeVec}] A vector containing the frequncy | | \item[\texttt{COMPLEX8Vector *qtildeVec}] A vector containing the frequncy | |
| domain quantity $\tilde{q}_k$ as defined in \texttt{FindChirpFilter()}. | | domain quantity $\tilde{q}_k$ as defined in \texttt{FindChirpFilter()}. | |
| | | | |
| \item[\texttt{COMPLEX8Vector *qVec}] A vector containing the time | | \item[\texttt{COMPLEX8Vector *qVec}] A vector containing the time | |
| domain quantity $q_j$ as defined in \texttt{FindChirpFilter()}. | | domain quantity $q_j$ as defined in \texttt{FindChirpFilter()}. | |
| \end{description} | | \end{description} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| /* --- parameter structure for the chisq veto ----------------------------
*/ | | /* --- parameter structure for the chisq veto ----------------------------
*/ | |
|
| #pragma <lalVerbatim file="FindChirpChisqHFindChirpChisqParams"> | | /* <lalVerbatim file="FindChirpChisqHFindChirpChisqParams"> */ | |
| typedef struct | | typedef struct | |
| tagFindChirpChisqParams | | tagFindChirpChisqParams | |
| { | | { | |
|
| REAL4 chisqNorm; | | REAL4 norm; | |
| | | REAL4 a1; | |
| | | REAL4 b1; | |
| | | REAL4 b2; | |
| UINT4Vector *chisqBinVec; | | UINT4Vector *chisqBinVec; | |
|
| | | UINT4Vector *chisqBinVecBCV; | |
| ComplexFFTPlan *plan; | | ComplexFFTPlan *plan; | |
| COMPLEX8Vector *qtildeBinVec; | | COMPLEX8Vector *qtildeBinVec; | |
|
| | | COMPLEX8Vector *qtildeBinVecBCV; | |
| COMPLEX8Vector **qBinVecPtr; | | COMPLEX8Vector **qBinVecPtr; | |
|
| | | COMPLEX8Vector **qBinVecPtrBCV; | |
| | | Approximant approximant; | |
| } | | } | |
| FindChirpChisqParams; | | FindChirpChisqParams; | |
|
| #pragma </lalVerbatim> | | /* </lalVerbatim> */ | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsubsection*{Structure \texttt{FindChirpChisqParams}} | | \subsubsection*{Structure \texttt{FindChirpChisqParams}} | |
| \idx[Type]{FindChirpChisqParams} | | \idx[Type]{FindChirpChisqParams} | |
| | | | |
| \input{FindChirpChisqHFindChirpChisqParams} | | \input{FindChirpChisqHFindChirpChisqParams} | |
| | | | |
| \noindent This structure contains the parameters used by the $\chi^2$ veto | | \noindent This structure contains the parameters used by the $\chi^2$ veto | |
| function \texttt{FindChirpChisqVeto()}. It is created and destroyed by the | | function \texttt{FindChirpChisqVeto()}. It is created and destroyed by the | |
| \texttt{FindChirpChisqVetoInit()} and \texttt{FindChirpChisqVetoFinalize()} | | \texttt{FindChirpChisqVetoInit()} and \texttt{FindChirpChisqVetoFinalize()} | |
| functions. The fields are: | | functions. The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{REAL4 chisqNorm}] The normalization... | | \item[\texttt{REAL4 norm}] The normalization factor for the SP templates. | |
| | | Equals $4 \Delta t / (N segNorm)$. | |
| | | | |
|
| \item[\texttt{UINT4Vector *chisqBinVec}] A vector containing the... | | \item[\texttt{REAL4 a1}] BCV-template normalization parameter. | |
| | | | |
| | | \item[\texttt{REAL4 b1}] BCV-template normalization parameter. | |
| | | | |
| | | \item[\texttt{REAL4 b2}] BCV-template normalization parameter. | |
| | | | |
| | | \item[\texttt{REAL4 bankMatch}] Template bank match... | |
| | | | |
| | | \item[\texttt{UINT4Vector *chisqBinVec}] A vector containing the boundaries | |
| | | of the bins for the chi-squared veto for the stationary phase chirps, or th | |
| | | e | |
| | | boundaries of the bins for the first sum of the chi-squared veto for the | |
| | | BCV templates. | |
| | | | |
| | | \item[\texttt{UINT4Vector *chisqBinVecBCV}] A vector containing the boundar | |
| | | ies | |
| | | of the bins for the second part of the chi-squared statistic, for the BCV | |
| | | templates. | |
| | | | |
| \item[\texttt{ComplexFFTPlan *plan}] The FFTW plan used by the inverse DFT. | | \item[\texttt{ComplexFFTPlan *plan}] The FFTW plan used by the inverse DFT. | |
| | | | |
| \item[\texttt{COMPLEX8Vector *qtildeBinVec}] ... | | \item[\texttt{COMPLEX8Vector *qtildeBinVec}] ... | |
| | | | |
|
| \item[\texttt{COMPLEX8Vector **qBinVecPtr}] ... | | \item[\texttt{COMPLEX8Vector *qtildeBinVecBCV}] ... | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector **qBinVecPtr}] Pointer to an array of pointers | |
| | | . | |
| | | Corresponds to $q^{(1)}_l(t_j)$, which is the contribution of the $l$-th | |
| | | frequency | |
| | | bin to the signal-to-noise ratio at the time $t_j$ (up to the appropriate | |
| | | normalization). It is used for both the stationary phase chirps and the | |
| | | BCV templates. | |
| | | | |
| | | \item[\texttt{COMPLEX8Vector **qBinVecPtrBCV}] Pointer to an array of point | |
| | | ers. | |
| | | Corresponds to $q^{(2)}_l(t_j)$, which is the contribution of the $l$-th | |
| | | frequency | |
| | | bin to the signal-to-noise ratio at the time $t_j$ (up to the appropriate | |
| | | normalization). It is used only for the BCV templates. | |
| | | | |
| \end{description} | | \end{description} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \vfill{\footnotesize\input{FindChirpChisqHV}} | | \vfill{\footnotesize\input{FindChirpChisqHV}} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
|
| \newpage\input{FindChirpChisqC} | | \newpage\input{FindChirpChisqInitC} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| void | | void | |
| LALFindChirpChisqVetoInit ( | | LALFindChirpChisqVetoInit ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpChisqParams *params, | | FindChirpChisqParams *params, | |
| UINT4 numChisqBins, | | UINT4 numChisqBins, | |
| UINT4 numPoints | | UINT4 numPoints | |
| ); | | ); | |
| | | | |
| void | | void | |
| LALFindChirpChisqVetoFinalize ( | | LALFindChirpChisqVetoFinalize ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpChisqParams *params, | | FindChirpChisqParams *params, | |
| UINT4 numChisqBins | | UINT4 numChisqBins | |
| ); | | ); | |
| | | | |
|
| | | #if 0 | |
| | | <lalLaTeX> | |
| | | \newpage\input{FindChirpChisqC} | |
| | | </lalLaTeX> | |
| | | #endif | |
| | | | |
| | | void | |
| | | LALFindChirpComputeChisqBins( | |
| | | LALStatus *status, | |
| | | UINT4Vector *chisqBinVec, | |
| | | FindChirpSegment *fcSeg, | |
| | | UINT4 kmax | |
| | | ); | |
| | | | |
| void | | void | |
| LALFindChirpChisqVeto ( | | LALFindChirpChisqVeto ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL4Vector *chisqVec, | | REAL4Vector *chisqVec, | |
| FindChirpChisqInput *input, | | FindChirpChisqInput *input, | |
| FindChirpChisqParams *params | | FindChirpChisqParams *params | |
| ); | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { | | #pragma { | |
| | | | |
End of changes. 19 change blocks. |
| 12 lines changed or deleted | | 74 lines changed or added | |
|
| FindChirpSP.h | | FindChirpSP.h | |
| /*----------------------------------------------------------------------- | | /*----------------------------------------------------------------------- | |
| * | | * | |
| * File Name: FindChirpSP.h | | * File Name: FindChirpSP.h | |
| * | | * | |
| * Author: Brown, D. A. | | * Author: Brown, D. A. | |
| * | | * | |
|
| * Revision: $Id: FindChirpSP.h,v 1.6 2002/01/18 01:47:31 duncan Exp $ | | * Revision: $Id: FindChirpSP.h,v 1.22 2005/11/05 02:48:30 duncan Exp $ | |
| * | | * | |
| *----------------------------------------------------------------------- | | *----------------------------------------------------------------------- | |
| */ | | */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalVerbatim file="FindChirpSPHV"> | | <lalVerbatim file="FindChirpSPHV"> | |
| Author: Brown, D. A. | | Author: Brown, D. A. | |
|
| $Id: FindChirpSP.h,v 1.6 2002/01/18 01:47:31 duncan Exp $ | | $Id: FindChirpSP.h,v 1.22 2005/11/05 02:48:30 duncan Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| <lalLaTeX> | | <lalLaTeX> | |
| \section{Header \texttt{FindChirpSP.h}} | | \section{Header \texttt{FindChirpSP.h}} | |
| \label{s:FindChirpSP.h} | | \label{s:FindChirpSP.h} | |
| | | | |
| Provides structures and functions to condition interferometer data | | Provides structures and functions to condition interferometer data | |
| and generate binary inspiral chirps using the stationary phase approximatio
n. | | and generate binary inspiral chirps using the stationary phase approximatio
n. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| #endif | | #endif | |
| | | | |
| #ifndef _FINDCHIRPSPH_H | | #ifndef _FINDCHIRPSPH_H | |
| #define _FINDCHIRPSPH_H | | #define _FINDCHIRPSPH_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| #include <lal/RealFFT.h> | | #include <lal/RealFFT.h> | |
| #include <lal/DataBuffer.h> | | #include <lal/DataBuffer.h> | |
| #include <lal/LALInspiral.h> | | #include <lal/LALInspiral.h> | |
| #include <lal/FindChirp.h> | | #include <lal/FindChirp.h> | |
|
| | | #include <lal/FindChirpChisq.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (FINDCHIRPSPH, "$Id: FindChirpSP.h,v 1.6 2002/01/18 01:47:31 duncan
Exp $"); | | NRCSID (FINDCHIRPSPH, "$Id: FindChirpSP.h,v 1.22 2005/11/05 02:48:30 duncan
Exp $"); | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| #define FINDCHIRPSPH_ENULL 1 | | #define FINDCHIRPSPH_ENULL 1 | |
| #define FINDCHIRPSPH_ENNUL 2 | | #define FINDCHIRPSPH_ENNUL 2 | |
| #define FINDCHIRPSPH_EALOC 3 | | #define FINDCHIRPSPH_EALOC 3 | |
| #define FINDCHIRPSPH_ENUMZ 4 | | #define FINDCHIRPSPH_ENUMZ 4 | |
| #define FINDCHIRPSPH_ESEGZ 5 | | #define FINDCHIRPSPH_ESEGZ 5 | |
| #define FINDCHIRPSPH_EMISM 6 | | #define FINDCHIRPSPH_EMISM 6 | |
| #define FINDCHIRPSPH_EDELT 7 | | #define FINDCHIRPSPH_EDELT 7 | |
| #define FINDCHIRPSPH_EFLOW 8 | | #define FINDCHIRPSPH_EFLOW 8 | |
| #define FINDCHIRPSPH_EDYNR 9 | | #define FINDCHIRPSPH_EDYNR 9 | |
| #define FINDCHIRPSPH_EISTN 10 | | #define FINDCHIRPSPH_EISTN 10 | |
|
| | | #define FINDCHIRPSPH_EDIVZ 11 | |
| | | #define FINDCHIRPSPH_EMAPX 12 | |
| | | #define FINDCHIRPSPH_EUAPX 13 | |
| #define FINDCHIRPSPH_MSGENULL "Null pointer" | | #define FINDCHIRPSPH_MSGENULL "Null pointer" | |
| #define FINDCHIRPSPH_MSGENNUL "Non-null pointer" | | #define FINDCHIRPSPH_MSGENNUL "Non-null pointer" | |
| #define FINDCHIRPSPH_MSGEALOC "Memory allocation error" | | #define FINDCHIRPSPH_MSGEALOC "Memory allocation error" | |
| #define FINDCHIRPSPH_MSGENUMZ "Invalid number of segments" | | #define FINDCHIRPSPH_MSGENUMZ "Invalid number of segments" | |
| #define FINDCHIRPSPH_MSGESEGZ "Invalid number of points in segments" | | #define FINDCHIRPSPH_MSGESEGZ "Invalid number of points in segments" | |
| #define FINDCHIRPSPH_MSGEMISM "Mismatch between number of points in segment
s" | | #define FINDCHIRPSPH_MSGEMISM "Mismatch between number of points in segment
s" | |
| #define FINDCHIRPSPH_MSGEDELT "deltaT is zero or negative" | | #define FINDCHIRPSPH_MSGEDELT "deltaT is zero or negative" | |
| #define FINDCHIRPSPH_MSGEFLOW "Low frequency cutoff is negative" | | #define FINDCHIRPSPH_MSGEFLOW "Low frequency cutoff is negative" | |
| #define FINDCHIRPSPH_MSGEDYNR "Dynamic range scaling is zero or negative" | | #define FINDCHIRPSPH_MSGEDYNR "Dynamic range scaling is zero or negative" | |
| #define FINDCHIRPSPH_MSGEISTN "Truncation of inverse power spectrum is nega
tive" | | #define FINDCHIRPSPH_MSGEISTN "Truncation of inverse power spectrum is nega
tive" | |
|
| | | #define FINDCHIRPSPH_MSGEDIVZ "Attempting to divide by zero" | |
| | | #define FINDCHIRPSPH_MSGEMAPX "Mismatch in waveform approximant" | |
| | | #define FINDCHIRPSPH_MSGEUAPX "Unknown approximant" | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \subsection*{Types} | | \subsection*{Types} | |
|
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
| /* --- the parameter structure for the data conditioning function -------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpSPHFindChirpSPDataParams"> | | | |
| typedef struct | | | |
| tagFindChirpSPDataParams | | | |
| { | | | |
| REAL4Vector *ampVec; | | | |
| RealFFTPlan *fwdPlan; | | | |
| RealFFTPlan *invPlan; | | | |
| REAL4Vector *vVec; | | | |
| REAL4Vector *wVec; | | | |
| COMPLEX8Vector *wtildeVec; | | | |
| REAL4Vector *tmpltPowerVec; | | | |
| REAL4 deltaT; | | | |
| REAL4 fLow; | | | |
| REAL4 dynRange; | | | |
| UINT4 invSpecTrunc; | | | |
| } | | | |
| FindChirpSPDataParams; | | | |
| #pragma </lalVerbatim> | | | |
| #if 0 | | | |
| <lalLaTeX> | | | |
| \subsubsection*{Structure \texttt{FindChirpSPDataParams}} | | | |
| \idx[Type]{FindChirpSPDataParams} | | | |
| | | | |
| \input{FindChirpSPHFindChirpSPDataParams} | | | |
| | | | |
| \noindent This structure contains the parameters needed to call the | | | |
| \texttt{FindChirpSPData()} function. It should be initialized by | | | |
| \texttt{FindChirpSPDataInit()} and destroyed by | | | |
| \texttt{FindChirpSPDataFinalize()}. The fields are: | | | |
| | | | |
| \begin{description} | | | |
| \item[\texttt{REAL4Vector *ampVec}] A vector containing the frequency domai | | | |
| n | | | |
| quantity $k/N$, where $k$ is the frequency series index and $N$ is the numb | | | |
| er | | | |
| of points in a data segment. | | | |
| | | | |
| \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 *fwdPlan}] 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 *vVec}] {\color{red} FIXME} A vector to contain | | | |
| the time domain interferometer output $v(t_j)$. This is obsolete since LIGO | | | |
| gives us $v(t_j)$ as floats. The 40m prototype gave integers which needed t | | | |
| o | | | |
| be cast to floats. | | | |
| | | | |
| \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 which on exit from | | | |
| \texttt{FindChirpSPData()} contains the inverse of the strain one sided pow | | | |
| er | | | |
| spectral density, after trunction in the time domain, that is | | | |
| $ \tilde{w}_k = {1}/{\ospsd}$. | | | |
| | | | |
| \item[\texttt{REAL4Vector *tmpltPowerVec}] A vector which on exit from | | | |
| \texttt{FindChirpSPData()} contains the quantity | | | |
| \begin{equation} | | | |
| \mathtt{tmpltPower[k]} = \frac{f^{-7/3}}{\ospsd} | | | |
| \end{equation} | | | |
| | | | |
| \item[\texttt{REAL4 deltaT}] {\color{red} FIXME} The sampling interval | | | |
| $\Delta t$. Should be a \texttt{REAL8} or derived from the input time serie | | | |
| s | | | |
| \texttt{chan}. | | | |
| | | | |
| \item[\texttt{REAL4 fLow}] The low frequency cutoff for the algorithm. All | | | |
| data is zero below this frequency. | | | |
| | | | |
| \item[\texttt{REAL4 dynRange}] A dynamic range factor which cancells from | | | |
| the filter output (if set correctly in \texttt{FindChirpSPTmplt()} as well) | | | |
| . | | | |
| This allows quantities to be stored in the range of \texttt{REAL4} rather | | | |
| than \texttt{REAL8}. | | | |
| | | | |
| \item[\texttt{UINT4 invSpecTrunc}] The length to which to truncate the inve | | | |
| rse | | | |
| power spectral density of the data in the time domain. If set to zero, no | | | |
| truncation is performed. | | | |
| \end{description} | | | |
| </lalLaTeX> | | | |
| #endif | | | |
| | | | |
| /* --- vector of DataSegment, as defined the framedata package ----------- | | | |
| */ | | | |
| #pragma <lalVerbatim file="FindChirpSPHFindChirpSPTmpltParams"> | | | |
| typedef struct | | | |
| tagFindChirpSPTmpltParams | | | |
| { | | | |
| REAL4 deltaT; | | | |
| REAL4 fLow; | | | |
| REAL4 dynRange; | | | |
| REAL4Vector *xfacVec; | | | |
| } | | | |
| FindChirpSPTmpltParams; | | | |
| #pragma </lalVerbatim> | | | |
| #if 0 | | | |
| <lalLaTeX> | | | |
| \subsubsection*{Structure \texttt{FindChirpSPTmpltParams}} | | | |
| \idx[Type]{FindChirpSPTmpltParams} | | | |
| | | | |
|
| \input{FindChirpSPHFindChirpSPTmpltParams} | | None. | |
| | | | |
| \noindent This structure contains the parameters for generation of | | | |
| stationary phase templates by the function \texttt{FindChirpSPTmplt()} | | | |
| It should be initialized by \texttt{FindChirpSPTmpltInit()} and destroyed b | | | |
| y | | | |
| \texttt{FindChirpSPTmpltFinalize()}. The fields are: | | | |
| | | | |
| \begin{description} | | | |
| \item[\texttt{REAL4 *deltaT}] {\color{red} FIXME} The sampling interval | | | |
| $\Delta t$. Should be a \texttt{REAL8}. | | | |
| | | | |
| \item[\texttt{REAL4 fLow}] The low frequency cutoff for the algorithm. All | | | |
| data is zero below this frequency. | | | |
| | | | |
| \item[\texttt{REAL4 dynRange}] A dynamic range factor which cancells from | | | |
| the filter output (if set correctly in \texttt{FindChirpSPData()} as well). | | | |
| This allows quantities to be stored in the range of \texttt{REAL4} rather | | | |
| than \texttt{REAL8}. | | | |
| | | | |
| \item[\texttt{REAL4Vector *xfacVec}] A vector containing the frequency | | | |
| domain quantity $k^{-7/6}$. | | | |
| \end{description} | | | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \vfill{\footnotesize\input{FindChirpSPHV}} | | \vfill{\footnotesize\input{FindChirpSPHV}} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \newpage\input{FindChirpSPDataC} | | \newpage\input{FindChirpSPDataC} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| void | | void | |
|
| LALFindChirpSPDataInit ( | | | |
| LALStatus *status, | | | |
| FindChirpSPDataParams **output, | | | |
| FindChirpInitParams *params | | | |
| ); | | | |
| | | | |
| void | | | |
| LALFindChirpSPData ( | | LALFindChirpSPData ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpSegmentVector *fcSegVec, | | FindChirpSegmentVector *fcSegVec, | |
| DataSegmentVector *dataSegVec, | | DataSegmentVector *dataSegVec, | |
|
| FindChirpSPDataParams *params | | FindChirpDataParams *params | |
| ); | | | |
| | | | |
| void | | | |
| LALFindChirpSPDataFinalize ( | | | |
| LALStatus *status, | | | |
| FindChirpSPDataParams **output | | | |
| ); | | ); | |
| | | | |
| #if 0 | | #if 0 | |
| <lalLaTeX> | | <lalLaTeX> | |
| \newpage\input{FindChirpSPTemplateC} | | \newpage\input{FindChirpSPTemplateC} | |
| </lalLaTeX> | | </lalLaTeX> | |
| #endif | | #endif | |
| | | | |
| void | | void | |
|
| LALFindChirpSPTemplateInit ( | | | |
| LALStatus *status, | | | |
| FindChirpSPTmpltParams **output, | | | |
| FindChirpInitParams *params | | | |
| ); | | | |
| | | | |
| void | | | |
| LALFindChirpSPTemplate ( | | LALFindChirpSPTemplate ( | |
| LALStatus *status, | | LALStatus *status, | |
| FindChirpTemplate *fcTmplt, | | FindChirpTemplate *fcTmplt, | |
| InspiralTemplate *tmplt, | | InspiralTemplate *tmplt, | |
|
| FindChirpSPTmpltParams *params | | FindChirpTmpltParams *params | |
| ); | | | |
| | | | |
| void | | | |
| LALFindChirpSPTemplateFinalize ( | | | |
| LALStatus *status, | | | |
| FindChirpSPTmpltParams **output | | | |
| ); | | ); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #pragma { | | #pragma { | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _FINDCHIRPSPH_H */ | | #endif /* _FINDCHIRPSPH_H */ | |
| | | | |
End of changes. 12 change blocks. |
| 165 lines changed or deleted | | 13 lines changed or added | |
|