AVFactories.h   AVFactories.h 
skipping to change at line 18 skipping to change at line 18
#define _AVFACTORIES_H #define _AVFACTORIES_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup AVFactories_h * \addtogroup AVFactories_h
*
\brief Provides prototype and status code information for use of CreateVect * \brief Provides prototype and status code information for use of CreateV
or, ector,
CreateArray, ResizeVector, ResizeArray, DestroyVector and DestroyArray * CreateArray, ResizeVector, ResizeArray, DestroyVector and DestroyArray
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/AVFactories.h> * \code
\endcode * #include <lal/AVFactories.h>
* \endcode
\section secXLALfcts XLAL Functions *
* \section secXLALfcts XLAL Functions
\code *
REAL4Vector * XLALCreateVector(UINT4 length); * \code
REAL4Vector * XLALResizeVector(REAL4Vector *vector, UINT4 length); * REAL4Vector * XLALCreateVector(UINT4 length);
void XLALDestroyVector(REAL4Vector *vector, 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 ); * <vectype> * XLALCreate<vectype>(UINT4 length );
void XLALDestroy<vectype>(<vectype> *vector); * <vectype> * XLALResize<vectype>(<vectype> *vector, UINT4 length );
* void XLALDestroy<vectype>(<vectype> *vector);
REAL4Array * XLALCreateArrayL(UINT4 ndim, ...); *
REAL4Array * XLALCreateArrayV(UINT4 ndim, UINT4 *dims); * REAL4Array * XLALCreateArrayL(UINT4 ndim, ...);
REAL4Array * XLALCreateArray(UINT4Vector *dimLength); * REAL4Array * XLALCreateArrayV(UINT4 ndim, UINT4 *dims);
REAL4Array * XLALResizeArrayL(REAL4Array *array, UINT4 ndim, ...); * REAL4Array * XLALCreateArray(UINT4Vector *dimLength);
REAL4Array * XLALResizeArrayV(REAL4Array *array, UINT4 ndim, UINT4 *dims); * REAL4Array * XLALResizeArrayL(REAL4Array *array, UINT4 ndim, ...);
REAL4Array * XLALResizeArray(REAL4Array *array, UINT4Vector *dimLength); * REAL4Array * XLALResizeArrayV(REAL4Array *array, UINT4 ndim, UINT4 *dims
void XLALDestroyArray(REAL4Array *array); );
* REAL4Array * XLALResizeArray(REAL4Array *array, UINT4Vector *dimLength);
<arrtype> * XLALCreate<arrtype>L(UINT4 ndim, ...); * void XLALDestroyArray(REAL4Array *array);
<arrtype> * XLALCreate<arrtype>V(UINT4 ndim, UINT4 *dims); *
<arrtype> * XLALCreate<arrtype>(UINT4Vector *dimLength); * <arrtype> * XLALCreate<arrtype>L(UINT4 ndim, ...);
<arrtype> * XLALResize<arrtype>L(<arrtype> *array, UINT4 ndim, ...); * <arrtype> * XLALCreate<arrtype>V(UINT4 ndim, UINT4 *dims);
<arrtype> * XLALResize<arrtype>V(<arrtype> *array, UINT4 ndim, UINT4 *dims) * <arrtype> * XLALCreate<arrtype>(UINT4Vector *dimLength);
; * <arrtype> * XLALResize<arrtype>L(<arrtype> *array, UINT4 ndim, ...);
<arrtype> * XLALResize<arrtype>(<arrtype> *array, UINT4Vector *dimLength); * <arrtype> * XLALResize<arrtype>V(<arrtype> *array, UINT4 ndim, UINT4 *di
void XLALDestroy<arrtype>(<arrtype> *array); ms);
\endcode * <arrtype> * XLALResize<arrtype>(<arrtype> *array, UINT4Vector *dimLength
);
Here <tt>\<vectype\></tt> is one of * void XLALDestroy<arrtype>(<arrtype> *array);
\c COMPLEX16Vector, * \endcode
\c COMPLEX8Vector, *
\c REAL8Vector, * Here <tt>\<vectype\></tt> is one of
\c REAL4Vector, * \c COMPLEX16Vector,
\c INT8Vector, * \c COMPLEX8Vector,
\c INT4Vector, * \c REAL8Vector,
\c INT2Vector, * \c REAL4Vector,
\c UINT8Vector, * \c INT8Vector,
\c UINT4Vector, * \c INT4Vector,
\c UINT2Vector, or * \c INT2Vector,
\c CHARVector, * \c UINT8Vector,
and <tt>\<arrtype\></tt> is one of * \c UINT4Vector,
\c COMPLEX16Array, * \c UINT2Vector, or
\c COMPLEX8Array, * \c CHARVector,
\c REAL8Array, * and <tt>\<arrtype\></tt> is one of
\c REAL4Array, * \c COMPLEX16Array,
\c INT8Array, * \c COMPLEX8Array,
\c INT4Array, * \c REAL8Array,
\c INT2Array, * \c REAL4Array,
\c UINT8Array, * \c INT8Array,
\c UINT4Array, or * \c INT4Array,
\c UINT2Array. * \c INT2Array,
* \c UINT8Array,
\subsection ss_AVF_desc Description * \c UINT4Array, or
* \c UINT2Array.
The <tt>XLALCreate\<type\>%Vector</tt> functions create vectors of the spec *
ified * \subsection ss_AVF_desc Description
\c length number of objects of type <tt>\<type\></tt>. The function *
\c XLALCreateVector() is the same as \c XLALCreateREAL4Vector(). * The <tt>XLALCreate\<type\>%Vector</tt> functions create vectors of the s
pecified
The <tt>XLALDestroy\<type\>%Vector</tt> functions deallocate the memory all * \c length number of objects of type <tt>\<type\></tt>. The function
ocation * \c XLALCreateVector() is the same as \c XLALCreateREAL4Vector().
pointed to by \c vector including its contents. The function *
\c XLALDestroyVector() is the same as \c XLALDestroyREAL4Vector(). * The <tt>XLALDestroy\<type\>%Vector</tt> functions deallocate the memory
allocation
The <tt>XLALResize\<type\>%Vector</tt> functions resize the supplied vector * pointed to by \c vector including its contents. The function
\c vector to the new size \c length. If \c vector is \c NULL * \c XLALDestroyVector() is the same as \c XLALDestroyREAL4Vector().
then this is equivalent to <tt>XLALCreate\<type\>%Vector</tt>. If \c lengt *
h * The <tt>XLALResize\<type\>%Vector</tt> functions resize the supplied vec
is zero then this is equivalent to <tt>XLALDestroy\<type\>%Vector</tt> and tor
the * \c vector to the new size \c length. If \c vector is \c NULL
routine returns \c NULL. Otherwise, the amount of data in the vector * then this is equivalent to <tt>XLALCreate\<type\>%Vector</tt>. If \c le
is realloced using \c LALRealloc(). The function ngth
\c XLALResizeVector() is the same as \c XLALResizeREAL4Vector(). * is zero then this is equivalent to <tt>XLALDestroy\<type\>%Vector</tt> a
nd the
The <tt>XLALCreate\<type\>Array</tt> * routine returns \c NULL. Otherwise, the amount of data in the vector
<tt>XLALCreate\<type\>ArrayL</tt> * is realloced using \c LALRealloc(). The function
<tt>XLALCreate\<type\>ArrayV</tt> * \c XLALResizeVector() is the same as \c XLALResizeREAL4Vector().
all create an object of type <tt>\<type\>Array</tt>. They differ in the wa *
y * The <tt>XLALCreate\<type\>Array</tt>
that the dimensions of the array are specified. The function * <tt>XLALCreate\<type\>ArrayL</tt>
<tt>XLALCreate\<type\>Array</tt> allocates an array with dimensions specifi * <tt>XLALCreate\<type\>ArrayV</tt>
ed * all create an object of type <tt>\<type\>Array</tt>. They differ in the
by the \c UINT4Vector \c dimLength which is a vector of dimension way
lengths for the array. The function * that the dimensions of the array are specified. The function
<tt>XLALCreate\<type\>ArrayV</tt> provides these dimensions with two argume * <tt>XLALCreate\<type\>Array</tt> allocates an array with dimensions spec
nts: ified
\c ndim is the number of dimensions and \c dims is an array of * by the \c UINT4Vector \c dimLength which is a vector of dimension
\c UINT4 values for the dimensions. The function * lengths for the array. The function
<tt>XLALCreate\<type\>ArrayL</tt> also specifies the dimensions as argument * <tt>XLALCreate\<type\>ArrayV</tt> provides these dimensions with two arg
s. uments:
Here, the first argument, \c ndim, is the number of dimensions, and * \c ndim is the number of dimensions and \c dims is an array of
this is followed by \c ndim arguments that provide the dimensions. * \c UINT4 values for the dimensions. The function
Note that for this function, a maximum of 16 dimensions can be provided * <tt>XLALCreate\<type\>ArrayL</tt> also specifies the dimensions as argum
(that is, \c ndim cannot be more than 16 and there cannot be more than ents.
16 arguments after the first). * Here, the first argument, \c ndim, is the number of dimensions, and
The \c XLALCreateArray() * this is followed by \c ndim arguments that provide the dimensions.
\c XLALCreateArrayL() * Note that for this function, a maximum of 16 dimensions can be provided
\c XLALCreateArrayV() * (that is, \c ndim cannot be more than 16 and there cannot be more than
functions are equivalent to the * 16 arguments after the first).
\c XLALCreateREAL4Array() * The \c XLALCreateArray()
\c XLALCreateREAL4ArrayL() * \c XLALCreateArrayL()
\c XLALCreateREAL4ArrayV() * \c XLALCreateArrayV()
functions respectively. * functions are equivalent to the
* \c XLALCreateREAL4Array()
The <tt>XLALDestroy\<type\>Array</tt> functions deallocate the memory alloc * \c XLALCreateREAL4ArrayL()
ation * \c XLALCreateREAL4ArrayV()
pointed to by \c array including its contents. The function * functions respectively.
\c XLALDestroyArray() is the same as \c XLALDestroyREAL4Array(). *
* The <tt>XLALDestroy\<type\>Array</tt> functions deallocate the memory al
The <tt>XLALResize\<type\>Array</tt> location
<tt>XLALResize\<type\>ArrayL</tt> * pointed to by \c array including its contents. The function
<tt>XLALResize\<type\>ArrayV</tt> * \c XLALDestroyArray() is the same as \c XLALDestroyREAL4Array().
functions resize the provided array \c array. The arguments after the *
first are interpreted in the same way as for the * The <tt>XLALResize\<type\>Array</tt>
<tt>XLALCreate\<type\>Array</tt> * <tt>XLALResize\<type\>ArrayL</tt>
<tt>XLALCreate\<type\>ArrayL</tt> * <tt>XLALResize\<type\>ArrayV</tt>
<tt>XLALCreate\<type\>ArrayV</tt> * functions resize the provided array \c array. The arguments after the
functions. If \c array is \c NULL, the resize functions are equivalent * first are interpreted in the same way as for the
to the corresponding create function. If \c ndim is zero for * <tt>XLALCreate\<type\>Array</tt>
<tt>XLALResize\<type\>ArrayL</tt> or * <tt>XLALCreate\<type\>ArrayL</tt>
<tt>XLALResize\<type\>ArrayV</tt>, or if \c dimLength is \c NULL for * <tt>XLALCreate\<type\>ArrayV</tt>
<tt>XLALResize\<type\>Array</tt>, then these functions are equivalent to * functions. If \c array is \c NULL, the resize functions are equivalent
<tt>XLALDestroy\<type\>Array</tt>. * to the corresponding create function. If \c ndim is zero for
The \c XLALResizeArray() * <tt>XLALResize\<type\>ArrayL</tt> or
\c XLALResizeArrayL() * <tt>XLALResize\<type\>ArrayV</tt>, or if \c dimLength is \c NULL for
\c XLALResizeArrayV() * <tt>XLALResize\<type\>Array</tt>, then these functions are equivalent to
functions are equivalent to the * <tt>XLALDestroy\<type\>Array</tt>.
\c XLALResizeREAL4Array() * The \c XLALResizeArray()
\c XLALResizeREAL4ArrayL() * \c XLALResizeArrayL()
\c XLALResizeREAL4ArrayV() * \c XLALResizeArrayV()
functions respectively. * functions are equivalent to the
* \c XLALResizeREAL4Array()
\subsection ss_AVF_return Return Values * \c XLALResizeREAL4ArrayL()
* \c XLALResizeREAL4ArrayV()
If successful, the create and resize functions return a pointer to the same * functions respectively.
data that was passed to the function. The resize functions will return *
a \c NULL pointer if the size of the new object was zero. Upon failure * \subsection ss_AVF_return Return Values
these routines will return \c NULL and will set \c xlalErrno to *
one of these values: \c #XLAL_ENOMEM if a memory allocation failed, * If successful, the create and resize functions return a pointer to the s
\c #XLAL_EBADLEN if an invalid length was provided (for example, a ame
zero-size allocation with a create function), \c XLAL_EINVAL if an * data that was passed to the function. The resize functions will return
invalid argument is provided (for example, if the pointer to an * a \c NULL pointer if the size of the new object was zero. Upon failure
array of dimensions is \c NULL). * these routines will return \c NULL and will set \c xlalErrno to
* one of these values: \c #XLAL_ENOMEM if a memory allocation failed,
The destroy function does not return any value. If the function is passed * \c #XLAL_EBADLEN if an invalid length was provided (for example, a
a * zero-size allocation with a create function), \c XLAL_EINVAL if an
\c NULL pointer, it will set \c xlalErrno to \c #XLAL_EFAULT. * invalid argument is provided (for example, if the pointer to an
If the function is passed an object that appears corrupted (e.g., a * array of dimensions is \c NULL).
vector with zero length or will a \c NULL data pointer) it will set *
\c xlalErrno to \c #XLAL_EINVAL. * The destroy function does not return any value. If the function is pass
ed a
*/ * \c NULL pointer, it will set \c xlalErrno to \c #XLAL_EFAULT.
* If the function is passed an object that appears corrupted (e.g., a
* vector with zero length or will a \c NULL data pointer) it will set
* \c xlalErrno to \c #XLAL_EINVAL.
*
*/
/*@{ */ /*@{ */
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define AVFACTORIESH_ELENGTH 1 /**< Illegal length. */ #define AVFACTORIESH_ELENGTH 1 /**< Illegal length. */
#define AVFACTORIESH_EVPTR 2 /**< Null vector/array handle. */ #define AVFACTORIESH_EVPTR 2 /**< Null vector/array handle. */
#define AVFACTORIESH_EUPTR 4 /**< Non-null vector/array pointer. */ #define AVFACTORIESH_EUPTR 4 /**< Non-null vector/array pointer. */
#define AVFACTORIESH_EDPTR 8 /**< Null vector/array data. */ #define AVFACTORIESH_EDPTR 8 /**< Null vector/array data. */
#define AVFACTORIESH_EMALLOC 16 /**< Malloc failure. */ #define AVFACTORIESH_EMALLOC 16 /**< Malloc failure. */
/*@}*/ /*@}*/
skipping to change at line 191 skipping to change at line 192
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define AVFACTORIESH_MSGELENGTH "Illegal length." #define AVFACTORIESH_MSGELENGTH "Illegal length."
#define AVFACTORIESH_MSGEVPTR "Null vector/array handle." #define AVFACTORIESH_MSGEVPTR "Null vector/array handle."
#define AVFACTORIESH_MSGEUPTR "Non-null vector/array pointer." #define AVFACTORIESH_MSGEUPTR "Non-null vector/array pointer."
#define AVFACTORIESH_MSGEDPTR "Null vector/array data." #define AVFACTORIESH_MSGEDPTR "Null vector/array data."
#define AVFACTORIESH_MSGEMALLOC "Malloc failure." #define AVFACTORIESH_MSGEMALLOC "Malloc failure."
/** \endcond */ /** \endcond */
/** /**
\defgroup ArrayFactories_c Module ArrayFactories.c * \defgroup ArrayFactories_c Module ArrayFactories.c
\ingroup AVFactories_h * \ingroup AVFactories_h
*
\brief Create/destroy \<datatype\>Array objects. * \brief Create/destroy \<datatype\>Array objects.
*
\heading{Description} * ### Description ###
*
The \c CreateArray family of functions create a \<datatype\>Array of the ap * The \c CreateArray family of functions create a \<datatype\>Array of the
propriate dimensions. appropriate dimensions.
*
The \c DestroyArray family of functions return the storage allocated by the * The \c DestroyArray family of functions return the storage allocated by
\c CreateArray functions to the system. the \c CreateArray functions to the system.
*
*/ */
/*@{*/ /*@{*/
/** \name INT2 array prototypes */ /** \name INT2 array prototypes */
/*@{*/ /*@{*/
INT2Array * XLALCreateINT2ArrayL ( UINT4, ... ); INT2Array * XLALCreateINT2ArrayL ( UINT4, ... );
INT2Array * XLALCreateINT2ArrayV ( UINT4, UINT4 * ); INT2Array * XLALCreateINT2ArrayV ( UINT4, UINT4 * );
INT2Array * XLALCreateINT2Array ( UINT4Vector * ); INT2Array * XLALCreateINT2Array ( UINT4Vector * );
INT2Array * XLALResizeINT2ArrayL ( INT2Array *, UINT4, ... ); INT2Array * XLALResizeINT2ArrayL ( INT2Array *, UINT4, ... );
INT2Array * XLALResizeINT2ArrayV ( INT2Array *, UINT4, UINT4 * ); INT2Array * XLALResizeINT2ArrayV ( INT2Array *, UINT4, UINT4 * );
INT2Array * XLALResizeINT2Array ( INT2Array *, UINT4Vector * ); INT2Array * XLALResizeINT2Array ( INT2Array *, UINT4Vector * );
skipping to change at line 311 skipping to change at line 312
/*@}*/ /*@}*/
/** \name REAL4 array prototypes (default name) */ /** \name REAL4 array prototypes (default name) */
/*@{*/ /*@{*/
REAL4Array * XLALCreateArrayL ( UINT4, ... ); REAL4Array * XLALCreateArrayL ( UINT4, ... );
REAL4Array * XLALCreateArrayV ( UINT4, UINT4 * ); REAL4Array * XLALCreateArrayV ( UINT4, UINT4 * );
REAL4Array * XLALCreateArray ( UINT4Vector * ); REAL4Array * XLALCreateArray ( UINT4Vector * );
REAL4Array * XLALResizeArrayL ( REAL4Array *, UINT4, ... ); REAL4Array * XLALResizeArrayL ( REAL4Array *, UINT4, ... );
REAL4Array * XLALResizeArrayV ( REAL4Array *, UINT4, UINT4 * ); REAL4Array * XLALResizeArrayV ( REAL4Array *, UINT4, UINT4 * );
REAL4Array * XLALResizeArray ( REAL4Array *, UINT4Vector * ); REAL4Array * XLALResizeArray ( REAL4Array *, UINT4Vector * );
#ifndef SWIG /* exclude from SWIG interface */
void XLALDestroyArray ( REAL4Array * ); void XLALDestroyArray ( REAL4Array * );
#endif /* SWIG */
void LALCreateArray ( LALStatus *, REAL4Array **, UINT4Vector * ); void LALCreateArray ( LALStatus *, REAL4Array **, UINT4Vector * );
void LALResizeArray ( LALStatus *, REAL4Array **, UINT4Vector * ); void LALResizeArray ( LALStatus *, REAL4Array **, UINT4Vector * );
void LALDestroyArray ( LALStatus *, REAL4Array ** ); void LALDestroyArray ( LALStatus *, REAL4Array ** );
/*@}*/ /*@}*/
/** \name REAL8 array prototypes */ /** \name REAL8 array prototypes */
/*@{*/ /*@{*/
REAL8Array * XLALCreateREAL8ArrayL ( UINT4, ... ); REAL8Array * XLALCreateREAL8ArrayL ( UINT4, ... );
REAL8Array * XLALCreateREAL8ArrayV ( UINT4, UINT4 * ); REAL8Array * XLALCreateREAL8ArrayV ( UINT4, UINT4 * );
REAL8Array * XLALCreateREAL8Array ( UINT4Vector * ); REAL8Array * XLALCreateREAL8Array ( UINT4Vector * );
skipping to change at line 362 skipping to change at line 365
COMPLEX16Array * XLALResizeCOMPLEX16Array ( COMPLEX16Array *, UINT4Vector * ); COMPLEX16Array * XLALResizeCOMPLEX16Array ( COMPLEX16Array *, UINT4Vector * );
void XLALDestroyCOMPLEX16Array ( COMPLEX16Array * ); void XLALDestroyCOMPLEX16Array ( COMPLEX16Array * );
void LALZCreateArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * ); void LALZCreateArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * );
void LALZResizeArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * ); void LALZResizeArray ( LALStatus *, COMPLEX16Array **, UINT4Vector * );
void LALZDestroyArray ( LALStatus *, COMPLEX16Array ** ); void LALZDestroyArray ( LALStatus *, COMPLEX16Array ** );
/*@}*/ /*@}*/
/*@}*/ /*@}*/
/* ---------- end: ArrayFactories_c ---------- */ /* ---------- end: ArrayFactories_c ---------- */
/** \defgroup VectorFactories_c Module VectorFactories.c /**
\ingroup AVFactories_h * \defgroup VectorFactories_c Module VectorFactories.c
* \ingroup AVFactories_h
\brief Create/destroy \<datatype\>%Vector objects. *
* \brief Create/destroy \<datatype\>%Vector objects.
\heading{Description} *
* ### Description ###
The \c CreateVector family of functions create a \<datatype\>%Vector of the *
appropriate dimensions. * The \c CreateVector family of functions create a \<datatype\>%Vector of
the appropriate dimensions.
The \c ResizeVector family of functions changes the amount of storage alloc *
ated by the \c CreateVector functions. * The \c ResizeVector family of functions changes the amount of storage al
located by the \c CreateVector functions.
The \c DestroyVector family of functions return the storage allocated by th *
e \c CreateVector functions to the system. * The \c DestroyVector family of functions return the storage allocated by
the \c CreateVector functions to the system.
*/ *
*/
/*@{*/ /*@{*/
/** \name CHAR vector prototypes */ /** \name CHAR vector prototypes */
/*@{*/ /*@{*/
CHARVector * XLALCreateCHARVector ( UINT4 length ); CHARVector * XLALCreateCHARVector ( UINT4 length );
CHARVector * XLALResizeCHARVector ( CHARVector * vector, UINT4 length ); CHARVector * XLALResizeCHARVector ( CHARVector * vector, UINT4 length );
void XLALDestroyCHARVector ( CHARVector * vector ); void XLALDestroyCHARVector ( CHARVector * vector );
void LALCHARCreateVector ( LALStatus *, CHARVector **, UINT4 ); void LALCHARCreateVector ( LALStatus *, CHARVector **, UINT4 );
void LALCHARResizeVector ( LALStatus *, CHARVector **, UINT4 ); void LALCHARResizeVector ( LALStatus *, CHARVector **, UINT4 );
void LALCHARDestroyVector ( LALStatus *, CHARVector ** ); void LALCHARDestroyVector ( LALStatus *, CHARVector ** );
skipping to change at line 462 skipping to change at line 466
void XLALDestroyREAL4Vector ( REAL4Vector * vector ); void XLALDestroyREAL4Vector ( REAL4Vector * vector );
void LALSCreateVector ( LALStatus *, REAL4Vector **, UINT4 ); void LALSCreateVector ( LALStatus *, REAL4Vector **, UINT4 );
void LALSResizeVector ( LALStatus *, REAL4Vector **, UINT4 ); void LALSResizeVector ( LALStatus *, REAL4Vector **, UINT4 );
void LALSDestroyVector ( LALStatus *, REAL4Vector ** ); void LALSDestroyVector ( LALStatus *, REAL4Vector ** );
/*@}*/ /*@}*/
/** \name REAL4 vector prototypes (default name) */ /** \name REAL4 vector prototypes (default name) */
/*@{*/ /*@{*/
REAL4Vector * XLALCreateVector ( UINT4 length ); REAL4Vector * XLALCreateVector ( UINT4 length );
REAL4Vector * XLALResizeVector ( REAL4Vector * vector, UINT4 length ); REAL4Vector * XLALResizeVector ( REAL4Vector * vector, UINT4 length );
#ifndef SWIG /* exclude from SWIG interface */
void XLALDestroyVector ( REAL4Vector * vector ); void XLALDestroyVector ( REAL4Vector * vector );
#endif /* SWIG */
void LALCreateVector ( LALStatus *, REAL4Vector **, UINT4 ); void LALCreateVector ( LALStatus *, REAL4Vector **, UINT4 );
void LALResizeVector ( LALStatus *, REAL4Vector **, UINT4 ); void LALResizeVector ( LALStatus *, REAL4Vector **, UINT4 );
void LALDestroyVector ( LALStatus *, REAL4Vector ** ); void LALDestroyVector ( LALStatus *, REAL4Vector ** );
/*@}*/ /*@}*/
/** \name REAL8 vector prototypes */ /** \name REAL8 vector prototypes */
/*@{*/ /*@{*/
REAL8Vector * XLALCreateREAL8Vector ( UINT4 length ); REAL8Vector * XLALCreateREAL8Vector ( UINT4 length );
REAL8Vector * XLALResizeREAL8Vector ( REAL8Vector * vector, UINT4 length ); REAL8Vector * XLALResizeREAL8Vector ( REAL8Vector * vector, UINT4 length );
void XLALDestroyREAL8Vector ( REAL8Vector * vector ); void XLALDestroyREAL8Vector ( REAL8Vector * vector );
 End of changes. 7 change blocks. 
195 lines changed or deleted 205 lines changed or added


 Audio.h   Audio.h 
skipping to change at line 21 skipping to change at line 21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/* vim: set noet ts=4 sw=4: */ /* vim: set noet ts=4 sw=4: */
/** \file /**
* \file
* \ingroup std * \ingroup std
* \author Creighton, J. D. E. * \author Creighton, J. D. E.
* \brief Routines for exporting time series data as sound files. * \brief Routines for exporting time series data as sound files.
* *
* Supported formats are AU and WAVE. AIFF is not supported at this time. * Supported formats are AU and WAVE. AIFF is not supported at this time.
* *
* This code is based on code written by Paul Bourke. See: * This code is based on code written by Paul Bourke. See:
* http://local.wasp.uwa.edu.au/~pbourke/dataformats/au/ * http://local.wasp.uwa.edu.au/~pbourke/dataformats/au/
* http://local.wasp.uwa.edu.au/~pbourke/dataformats/wave/ * http://local.wasp.uwa.edu.au/~pbourke/dataformats/wave/
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 BandPassTimeSeries.h   BandPassTimeSeries.h 
skipping to change at line 34 skipping to change at line 34
#include <lal/IIRFilter.h> #include <lal/IIRFilter.h>
#include <lal/ZPGFilter.h> #include <lal/ZPGFilter.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup BandPassTimeSeries_h * \addtogroup BandPassTimeSeries_h
\author Creighton, T. D. * \author Creighton, T. D.
*
\brief Provides routines to low- or high-pass filter a time series. * \brief Provides routines to low- or high-pass filter a time series.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/BandPassTimeSeries.h> * \code
\endcode * #include <lal/BandPassTimeSeries.h>
* \endcode
This header covers routines that apply a time-domain low- or *
high-pass filter to a data series of type <tt>\<datatype\>TimeSeries</tt>. * This header covers routines that apply a time-domain low- or
Further documentation is given in the individual routines' modules. * high-pass filter to a data series of type <tt>\<datatype\>TimeSeries</tt
>.
*/ * Further documentation is given in the individual routines' modules.
*
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define BANDPASSTIMESERIESH_ENUL 1 /**< Unexpected null pointer in argu ments */ #define BANDPASSTIMESERIESH_ENUL 1 /**< Unexpected null pointer in argu ments */
#define BANDPASSTIMESERIESH_EBAD 2 /**< Bad filter parameters */ #define BANDPASSTIMESERIESH_EBAD 2 /**< Bad filter parameters */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define BANDPASSTIMESERIESH_MSGENUL "Unexpected null pointer in arguments" #define BANDPASSTIMESERIESH_MSGENUL "Unexpected null pointer in arguments"
#define BANDPASSTIMESERIESH_MSGEBAD "Bad filter parameters" #define BANDPASSTIMESERIESH_MSGEBAD "Bad filter parameters"
/** \endcond */ /** \endcond */
/** This structure stores data used for constructing a low- or high-pass /**
* This structure stores data used for constructing a low- or high-pass
* filter: either the order and characteristic frequency of the filter, * filter: either the order and characteristic frequency of the filter,
* or the frequencies and desired attenuations at the ends of some * or the frequencies and desired attenuations at the ends of some
* transition band. In the latter case, a nonzero filter order parameter * transition band. In the latter case, a nonzero filter order parameter
* \c n indicates a maximum allowed order * \c n indicates a maximum allowed order
*/ */
typedef struct tagPassBandParamStruc{ typedef struct tagPassBandParamStruc{
CHAR *name; /**< A user-assigned name */ CHAR *name; /**< A user-assigned name */
INT4 nMax; /**< The maximum desired filter order (actual order may be l ess if specified attenuations do not require a high order) */ INT4 nMax; /**< The maximum desired filter order (actual order may be l ess if specified attenuations do not require a high order) */
REAL8 f1; /**< The reference frequencies of the transition band */ REAL8 f1; /**< The reference frequencies of the transition band */
REAL8 f2; /**< The reference frequencies of the transition band */ REAL8 f2; /**< The reference frequencies of the transition band */
 End of changes. 2 change blocks. 
16 lines changed or deleted 19 lines changed or added


 Calibration.h   Calibration.h 
skipping to change at line 32 skipping to change at line 32
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/BandPassTimeSeries.h> #include <lal/BandPassTimeSeries.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** \addtogroup Calibration_h /**
* \addtogroup Calibration_h
* \author P. R. Brady, J. D. E. Creighton * \author P. R. Brady, J. D. E. Creighton
* \brief Calibration API * \brief Calibration API
* *
* \heading{Synopsis} * ### Synopsis ###
*
* \code * \code
* #include <lal/Calibration.h> * #include <lal/Calibration.h>
* \endcode * \endcode
* *
*/ */
/*@{*/ /*@{*/
/**\name Error Codes */ /**\name Error Codes */
/*@{*/ /*@{*/
#define CALIBRATIONH_ENULL 001 /**< Null pointer */ #define CALIBRATIONH_ENULL 001 /**< Null pointer */
skipping to change at line 121 skipping to change at line 123
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;
/** The type CalibrationFunctions contains two calibration functions, /**
* The type CalibrationFunctions contains two calibration functions,
* the sensing function \f$C(f)\f$ and the response function \f$R(f)\f$. W hile the * the sensing function \f$C(f)\f$ and the response function \f$R(f)\f$. W hile the
* response function is the function that is most often wanted, the sensing * response function is the function that is most often wanted, the sensing
* function is needed in updating calibration from one epoch to another. * function is needed in updating calibration from one epoch to another.
*/ */
typedef struct typedef struct
tagCalibrationFunctions tagCalibrationFunctions
{ {
COMPLEX8FrequencySeries *responseFunction; COMPLEX8FrequencySeries *responseFunction;
COMPLEX8FrequencySeries *sensingFunction; COMPLEX8FrequencySeries *sensingFunction;
} }
CalibrationFunctions; CalibrationFunctions;
/** The type \c CalibrationUpdateParams contains two time series /**
* The type \c CalibrationUpdateParams contains two time series
* representing an overall gain factor for the open-loop gain function \f$H (f)\f$ * representing an overall gain factor for the open-loop gain function \f$H (f)\f$
* and the sensing function \f$C(f)\f$. These transfer functions are known to * and the sensing function \f$C(f)\f$. These transfer functions are known to
* change (by an overall factor) with time, and these two factors can be * change (by an overall factor) with time, and these two factors can be
* tracked using the injected calibration lines. The factors are stored * tracked using the injected calibration lines. The factors are stored
* in this structure as (very-slowly varying) time series, and are to be * in this structure as (very-slowly varying) time series, and are to be
* used in updating the calibration functions described previously. * used in updating the calibration functions described previously.
* (The response function can be computed from the open-loop gain and the * (The response function can be computed from the open-loop gain and the
* sensing function. It is simply \f$R(f)=[1+H(f)]/C(f)\f$.) In addition, this * sensing function. It is simply \f$R(f)=[1+H(f)]/C(f)\f$.) In addition, this
* structure contains the present epoch and the duration of the data to be * structure contains the present epoch and the duration of the data to be
* calibrated to identify the particular set of * calibrated to identify the particular set of
 End of changes. 4 change blocks. 
4 lines changed or deleted 8 lines changed or added


 CoarseGrainFrequencySeries.h   CoarseGrainFrequencySeries.h 
skipping to change at line 30 skipping to change at line 30
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifndef _COARSEGRAINFREQUENCYSERIES_H #ifndef _COARSEGRAINFREQUENCYSERIES_H
#define _COARSEGRAINFREQUENCYSERIES_H #define _COARSEGRAINFREQUENCYSERIES_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup CoarseGrainFrequencySeries_h * \addtogroup CoarseGrainFrequencySeries_h
\author UTB Relativity Group; contact whelan@phys.utb.edu (original by S * \author UTB Relativity Group; contact whelan@phys.utb.edu (original by S
. Drasco) . Drasco)
*
\brief Provides prototype, structure and error code information for rout * \brief Provides prototype, structure and error code information for rout
ines which coarse-grain a frequency series. ines which coarse-grain a frequency series.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/CoarseGrainFrequencySeries.h> * \code
\endcode * #include <lal/CoarseGrainFrequencySeries.h>
* \endcode
\heading{Description} *
* ### Description ###
These functions are designed to facilitate approximation of integrals *
such as * These functions are designed to facilitate approximation of integrals
\f[ * such as
\int g(f)\,h(f)\,df * \f[
\f] * \int g(f)\,h(f)\,df
when \f$g(f)\f$ and \f$h(f)\f$ are sampled with different frequency * \f]
resolutions. If the frequency resolution were the same for both * when \f$g(f)\f$ and \f$h(f)\f$ are sampled with different frequency
functions, e.g., a frequency spacing of \f$\delta f\f$ and a start * resolutions. If the frequency resolution were the same for both
frequency of \f$f_0\f$, so that the \f$k\f$th element corresponded to a * functions, e.g., a frequency spacing of \f$\delta f\f$ and a start
frequency \f$f_k = f_0 + k\delta f\f$, the approximation would be defined * frequency of \f$f_0\f$, so that the \f$k\f$th element corresponded to a
as * frequency \f$f_k = f_0 + k\delta f\f$, the approximation would be define
\f[ d
\int g(f)\,h(f)\,df \approx \delta f \sum_k g_k h_k * as
\f] * \f[
whose contribution from the \f$k\f$th element is [It is * \int g(f)\,h(f)\,df \approx \delta f \sum_k g_k h_k
important to make the limits of integration symmetric about \f$f_k\f$ to * \f]
maintain reality conditions when dealing with Fourier transforms of * whose contribution from the \f$k\f$th element is [It is
real quantities.] * important to make the limits of integration symmetric about \f$f_k\f$ to
\f[ * maintain reality conditions when dealing with Fourier transforms of
\int_{f_k-\delta f/2}^{f_k+\delta f/2} g(f)\,h(f)\,df \approx * real quantities.]
\delta f g_k h_k * \f[
\ . * \int_{f_k-\delta f/2}^{f_k+\delta f/2} g(f)\,h(f)\,df \approx
\f] * \delta f g_k h_k
The central idea in our definitions of coarse graining will thus be * \ .
the correspondence * \f]
\anchor utilities_e_coarse \f{equation}{ * The central idea in our definitions of coarse graining will thus be
\label{utilities_e_coarse} * the correspondence
h_k \approx \frac{1}{\delta f} * \f{equation}{
\int_{f_k-\delta f/2}^{f_k+\delta f/2} h(f)\,df * \label{utilities_e_coarse}
\f} * h_k \approx \frac{1}{\delta f}
* \int_{f_k-\delta f/2}^{f_k+\delta f/2} h(f)\,df
The purpose of this function is to obtain a frequency series \f$\{h_k\}\f$ * \f}
with start frequency \f$f_0\f$ and frequency spacing \f$\delta f\f$ from a *
finer-grained frequency series \f$\{h'_\ell\}\f$ with start frequency * The purpose of this function is to obtain a frequency series \f$\{h_k\}\
\f$f'_0\f$ and frequency spacing \f$\delta f'\f$. Focussing on the \f$k\f$ f$
th * with start frequency \f$f_0\f$ and frequency spacing \f$\delta f\f$ from
element of the coarse-grained series, which represents a frequency a
range from \f$f_k-\delta f/2\f$ to \f$f_k+\delta f/2\f$, we consider the * finer-grained frequency series \f$\{h'_\ell\}\f$ with start frequency
elements of the fine-grained series whose frequency ranges overlap * \f$f'_0\f$ and frequency spacing \f$\delta f'\f$. Focussing on the \f$k
with this. (Fig.\figref{utilities_f_coarse} \f$th
* element of the coarse-grained series, which represents a frequency
\floatfig{htbp,utilities_f_coarse} * range from \f$f_k-\delta f/2\f$ to \f$f_k+\delta f/2\f$, we consider the
\image html utilitiesCoarseGrain.png "Fig. [utilities_f_coarse]: Coarse gr * elements of the fine-grained series whose frequency ranges overlap
aining a frequency series" * with this (\figref{utilitiesCoarseGrain}).
\image latex utilitiesCoarseGrain.pdf "Coarse graining a frequency series" *
* \figure{utilitiesCoarseGrain,pdf,0.6,Coarse graining a frequency series}
We define \f$\ell^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptstyle *
{\rm min}}_k\f$ * We define \f$\ell^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptst
to be the indices of the first and last elements of yle{\rm min}}_k\f$
\f$h'_\ell\f$ which overlap \e completely with the frequency range * to be the indices of the first and last elements of
corresponding to \f$h_k\f$. These are most easily defined in terms of * \f$h'_\ell\f$ which overlap \e completely with the frequency range
non-integer indices \f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and * corresponding to \f$h_k\f$. These are most easily defined in terms of
\f$\lambda^{\scriptstyle\textrm{max}}_k\f$ which correspond to the location * non-integer indices \f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and
s * \f$\lambda^{\scriptstyle\textrm{max}}_k\f$ which correspond to the locat
of fine-grained elements which would exactly reach the edges of the ions
coarse-grained element with index \f$k\f$. These are defined by * of fine-grained elements which would exactly reach the edges of the
\f{eqnarray*}{ * coarse-grained element with index \f$k\f$. These are defined by
f_0 + \left(k-\frac{1}{2}\right) \delta f * \f{eqnarray}{
&=& f'_0 + \left(\lambda^{\scriptstyle\textrm{min}}_k-\frac{1}{2}\right) * f_0 + \left(k-\frac{1}{2}\right) \delta f
\delta f' \\ * &=& f'_0 + \left(\lambda^{\scriptstyle\textrm{min}}_k-\frac{1}{2}\right)
f_0 + \left(k+\frac{1}{2}\right) \delta f * \delta f' \\
&=& f'_0 + \left(\lambda^{\scriptstyle\textrm{max}}_k+\frac{1}{2}\right) * f_0 + \left(k+\frac{1}{2}\right) \delta f
\delta f' * &=& f'_0 + \left(\lambda^{\scriptstyle\textrm{max}}_k+\frac{1}{2}\right)
\f} * \delta f'
or, defining the offset \f$\Omega=(f_0-f'_0)/\delta f'\f$ and the coarse * \f}
graining ratio \f$\rho = \delta f / \delta f'\f$, * or, defining the offset \f$\Omega=(f_0-f'_0)/\delta f'\f$ and the coarse
\f{eqnarray*}{ * graining ratio \f$\rho = \delta f / \delta f'\f$,
\lambda^{\scriptstyle\textrm{min}}_k &=& * \f{eqnarray}{
\Omega + \left(k-\frac{1}{2}\right) \rho + \frac{1}{2}\\ * \lambda^{\scriptstyle\textrm{min}}_k &=&
\lambda^{\scriptstyle\textrm{max}}_k &=& * \Omega + \left(k-\frac{1}{2}\right) \rho + \frac{1}{2}\\
\Omega + \left(k+\frac{1}{2}\right) \rho - \frac{1}{2} * \lambda^{\scriptstyle\textrm{max}}_k &=&
\ . * \Omega + \left(k+\frac{1}{2}\right) \rho - \frac{1}{2}
\f} * \ .
Examination of Fig.\figref{utilities_f_coarse} shows that * \f}
\f$\ell^{\scriptstyle\textrm{min}}_k\f$ is the smallest integer not less th * Examination of \figref{utilitiesCoarseGrain} shows that
an * \f$\ell^{\scriptstyle\textrm{min}}_k\f$ is the smallest integer not less
\f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptstyle{\rm than
min}}_k\f$ is the largest integer not greater than * \f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptstyle{\rm
\f$\lambda^{\scriptstyle\textrm{min}}_k\f$. * min}}_k\f$ is the largest integer not greater than
* \f$\lambda^{\scriptstyle\textrm{min}}_k\f$.
With these definitions, approximating the integral in *
\eqref{utilities_e_coarse} gives * With these definitions, approximating the integral in
\anchor utilities_e_coarseapprox \f{equation}{\label{utilities_e_coarseappr * \eqref{utilities_e_coarse} gives
ox} * \f{equation}{
h_k = \frac{1}{\rho} * \label{utilities_e_coarseapprox}
\left( * h_k = \frac{1}{\rho}
(\ell^{\scriptstyle\textrm{min}}_k - \lambda^{\scriptstyle\textrm{min}}_k * \left(
) * (\ell^{\scriptstyle\textrm{min}}_k - \lambda^{\scriptstyle\textrm{min}}_
h'_{\ell^{\scriptscriptstyle\textrm{min}}_k-1} k)
+ \sum_{\ell=\ell^{\scriptscriptstyle\textrm{min}}_k} * h'_{\ell^{\scriptscriptstyle\textrm{min}}_k-1}
^{\ell^{\scriptscriptstyle\textrm{max}}_k} * + \sum_{\ell=\ell^{\scriptscriptstyle\textrm{min}}_k}
h'_\ell * ^{\ell^{\scriptscriptstyle\textrm{max}}_k}
+ (\lambda^{\scriptstyle\textrm{max}}_k - \ell^{\scriptstyle\textrm{max}} * h'_\ell
_k) * + (\lambda^{\scriptstyle\textrm{max}}_k - \ell^{\scriptstyle\textrm{max}
h'_{\ell^{\scriptscriptstyle\textrm{max}}_k+1} }_k)
\right) * h'_{\ell^{\scriptscriptstyle\textrm{max}}_k+1}
\f} * \right)
* \f}
In the special case \f$f_0=f'_0\f$, we assume both frequency series *
represent the independent parts of larger frequency series * In the special case \f$f_0=f'_0\f$, we assume both frequency series
\f$\{h_k|k=-(N-1)\ldots(N-1)\}\f$ and \f$\{h'_\ell|\ell=-(N-1)\ldots(N-1)\} * represent the independent parts of larger frequency series
\f$ * \f$\{h_k|k=-(N-1)\ldots(N-1)\}\f$ and \f$\{h'_\ell|\ell=-(N-1)\ldots(N-1
which obey \f$h_{-k}=h_k^*\f$ and \f$h'_{-\ell}{}=h'_\ell{}^*\f$ (e.g., )\}\f$
fourier transforms of real data). In that case, the DC element of the * which obey \f$h_{-k}=h_k^*\f$ and \f$h'_{-\ell}{}=h'_\ell{}^*\f$ (e.g.,
coarse-grained series can be built out of both positive- and implied * fourier transforms of real data). In that case, the DC element of the
negative-frequency elements in the fine-grained series. * coarse-grained series can be built out of both positive- and implied
\f{equation}{ * negative-frequency elements in the fine-grained series.
h_0 = \frac{1}{\rho} * \f{equation}{
\left[ * h_0 = \frac{1}{\rho}
h'_0 * \left[
+ 2\ \mathrm{Re} * h'_0
\left( * + 2\ \mathrm{Re}
\sum_{\ell=1}^{\ell^{\scriptscriptstyle\textrm{max}}_0} * \left(
h'_\ell * \sum_{\ell=1}^{\ell^{\scriptscriptstyle\textrm{max}}_0}
+ (\lambda^{\scriptstyle\textrm{max}}_0 - \ell^{\scriptstyle\textrm{m * h'_\ell
ax}}_0) * + (\lambda^{\scriptstyle\textrm{max}}_0 - \ell^{\scriptstyle\textrm{max}
h'_{\ell^{\scriptscriptstyle\textrm{max}}_0+1} }_0)
\right) * h'_{\ell^{\scriptscriptstyle\textrm{max}}_0+1}
\right] * \right)
\f} * \right]
* \f}
\heading{Algorithm} *
* ### Algorithm ###
These routines move through the output series, using *
\eqref{utilities_e_coarseapprox} to add up the contributions from the * These routines move through the output series, using
bins in the fine-grained series. * \eqref{utilities_e_coarseapprox} to add up the contributions from the
* bins in the fine-grained series.
\heading{Notes} *
<ul> * ### Notes ###
<li> The coarse graining ratio must obey \f$\rho\ge 1\f$ (so the *
coarse-grained frequency spacing must be less than the fine-grained * <ul>
one). Additionally, the bins in the fine-grained frequency series * <li> The coarse graining ratio must obey \f$\rho\ge 1\f$ (so the
must \e completely overlap those in the coarse-grained frequency * coarse-grained frequency spacing must be less than the fine-grained
series. In particular, since the lowest frequency in the first bin * one). Additionally, the bins in the fine-grained frequency series
of the coarse-grained series is \f$f_{\scriptstyle{\rm min}}=f_0-\delta f * must \e completely overlap those in the coarse-grained frequency
/2\f$ * series. In particular, since the lowest frequency in the first bin
and the last is \f$f_{\scriptstyle{\rm max}}=f_0 + (N-1) \delta f +\delta * of the coarse-grained series is \f$f_{\scriptstyle{\rm min}}=f_0-\delta
f/2\f$ f/2\f$
(taking into account the width of the bins), the conitions are * and the last is \f$f_{\scriptstyle{\rm max}}=f_0 + (N-1) \delta f +\delt
\f{eqnarray*}{ a f/2\f$
f_0 - \frac{\delta f}{2} &\ge& f'_0 - \frac{\delta f'}{2}\\ * (taking into account the width of the bins), the conitions are
f_0 + \left(N-\frac{1}{2}\right)\,\delta f &\le& * \f{eqnarray}{
f'_0 + \left(N'-\frac{1}{2}\right)\,\delta f' * f_0 - \frac{\delta f}{2} &\ge& f'_0 - \frac{\delta f'}{2}\\
\f} * f_0 + \left(N-\frac{1}{2}\right)\,\delta f &\le&
(The special case \f$f_0=f'_0=0\f$ is an * f'_0 + \left(N'-\frac{1}{2}\right)\,\delta f'
exception to the condition on the minimum frequency.)</li> * \f}
<li> The routines return an error if either minimum frequency * (The special case \f$f_0=f'_0=0\f$ is an
(\f$f_{\scriptstyle\textrm{min}}\f$ or \f$f'_{\scriptstyle\textrm{min}}\f * exception to the condition on the minimum frequency.)</li>
$) is * <li> The routines return an error if either minimum frequency
negative (unless \f$f_0=0\f$ or \f$f'_0=0\f$, respectively).</li> * (\f$f_{\scriptstyle\textrm{min}}\f$ or \f$f'_{\scriptstyle\textrm{min}}\
</ul> f$) is
* negative (unless \f$f_0=0\f$ or \f$f'_0=0\f$, respectively).</li>
*/ * </ul>
*
*/
/*@{*/ /*@{*/
/**\name Error Codes */ /**\name Error Codes */
/*@{*/ /*@{*/
#define COARSEGRAINFREQUENCYSERIESH_ENULLPTR 1 /**< Null po inter */ #define COARSEGRAINFREQUENCYSERIESH_ENULLPTR 1 /**< Null po inter */
#define COARSEGRAINFREQUENCYSERIESH_ESAMEPTR 2 /**< Input a nd Output pointers the same */ #define COARSEGRAINFREQUENCYSERIESH_ESAMEPTR 2 /**< Input a nd Output pointers the same */
#define COARSEGRAINFREQUENCYSERIESH_EZEROLEN 3 /**< Zero le ngth for data member of series */ #define COARSEGRAINFREQUENCYSERIESH_EZEROLEN 3 /**< Zero le ngth for data member of series */
#define COARSEGRAINFREQUENCYSERIESH_ENONPOSDELTAF 4 /**< Negativ e or zero frequency spacing */ #define COARSEGRAINFREQUENCYSERIESH_ENONPOSDELTAF 4 /**< Negativ e or zero frequency spacing */
#define COARSEGRAINFREQUENCYSERIESH_ENEGFMIN 5 /**< Negativ e start frequency */ #define COARSEGRAINFREQUENCYSERIESH_ENEGFMIN 5 /**< Negativ e start frequency */
#define COARSEGRAINFREQUENCYSERIESH_EMMHETERO 7 /**< Mismatc h in heterodyning frequencies */ #define COARSEGRAINFREQUENCYSERIESH_EMMHETERO 7 /**< Mismatc h in heterodyning frequencies */
 End of changes. 1 change blocks. 
167 lines changed or deleted 169 lines changed or added


 ComplexFFT.h   ComplexFFT.h 
skipping to change at line 37 skipping to change at line 37
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
* \addtogroup ComplexFFT_h * \addtogroup ComplexFFT_h
* *
* \brief Performs complex-to-complex FFTs. * \brief Performs complex-to-complex FFTs.
* *
* \heading{Synopsis} * ### Synopsis ###
*
* \code * \code
* #include <lal/ComplexFFT.h> * #include <lal/ComplexFFT.h>
* \endcode * \endcode
* *
* Perform complex-to-complex fast Fourier transforms of vectors using the * Perform complex-to-complex fast Fourier transforms of vectors using the
* package FFTW [\ref fj_1998]. * package FFTW \cite fj_1998.
* *
*/ */
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define COMPLEXFFTH_ENULL 1 /**< Null pointer */ #define COMPLEXFFTH_ENULL 1 /**< Null pointer */
#define COMPLEXFFTH_ENNUL 2 /**< Non-null pointer */ #define COMPLEXFFTH_ENNUL 2 /**< Non-null pointer */
#define COMPLEXFFTH_ESIZE 4 /**< Invalid input size */ #define COMPLEXFFTH_ESIZE 4 /**< Invalid input size */
#define COMPLEXFFTH_ESZMM 8 /**< Size mismatch */ #define COMPLEXFFTH_ESZMM 8 /**< Size mismatch */
#define COMPLEXFFTH_ESLEN 16 /**< Invalid/mismatched sequence lengths */ #define COMPLEXFFTH_ESLEN 16 /**< Invalid/mismatched sequence lengths */
#define COMPLEXFFTH_ESAME 32 /**< Input/Output data vectors are the same */ #define COMPLEXFFTH_ESAME 32 /**< Input/Output data vectors are the same */
skipping to change at line 90 skipping to change at line 91
typedef struct tagCOMPLEX16FFTPlan COMPLEX16FFTPlan; typedef struct tagCOMPLEX16FFTPlan COMPLEX16FFTPlan;
#define tagComplexFFTPlan tagCOMPLEX8FFTPlan #define tagComplexFFTPlan tagCOMPLEX8FFTPlan
#define ComplexFFTPlan COMPLEX8FFTPlan #define ComplexFFTPlan COMPLEX8FFTPlan
/* /*
* *
* XLAL COMPLEX8 functions * XLAL COMPLEX8 functions
* *
*/ */
/** Returns a new COMPLEX8FFTPlan /**
* * Returns a new COMPLEX8FFTPlan
* A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a. * A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a.
* A different plan is required for each size of the complex data vectors * A different plan is required for each size of the complex data vectors
* and for each direction of transform (forward or reverse). * and for each direction of transform (forward or reverse).
* A forward transform performs * A forward transform performs
* \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f]
* where N, the size of the transform, is the length of the vectors z and Z . * where N, the size of the transform, is the length of the vectors z and Z .
* A reverse transform performs * A reverse transform performs
* \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f] * \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f]
* where N, the size of the transform, is the length of the vectors w and W . * where N, the size of the transform, is the length of the vectors w and W .
* *
* @note * @note
* The reverse transform of the forward transform of some data is * The reverse transform of the forward transform of some data is
* equal to N times the original data (we therefore call it a "reverse" * equal to N times the original data (we therefore call it a "reverse"
* transform rather than an "inverse" transform). * transform rather than an "inverse" transform).
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] fwdflg Set non-zero for a forward FFT plan; * @param[in] fwdflg Set non-zero for a forward FFT plan;
* otherwise create a reverse plan * otherwise create a reverse plan
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed * @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateCOMPLEX8Plan() function shall fail if: * The \c XLALCreateCOMPLEX8Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX8FFTPlan * XLALCreateCOMPLEX8FFTPlan( UINT4 size, int fwdflg, int me asurelvl ); COMPLEX8FFTPlan * XLALCreateCOMPLEX8FFTPlan( UINT4 size, int fwdflg, int me asurelvl );
/** Returns a new COMPLEX8FFTPlan for a forward transform /**
* Returns a new COMPLEX8FFTPlan for a forward transform
* *
* A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a. * A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a.
* A different plan is required for each size of the complex data vectors. * A different plan is required for each size of the complex data vectors.
* A forward transform performs * A forward transform performs
* \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f]
* where N, the size of the transform, is the length of the vector z and Z. * where N, the size of the transform, is the length of the vector z and Z.
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed * @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateForwardCOMPLEX8Plan() function shall fail if: * The \c XLALCreateForwardCOMPLEX8Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX8FFTPlan * XLALCreateForwardCOMPLEX8FFTPlan( UINT4 size, int measure lvl ); COMPLEX8FFTPlan * XLALCreateForwardCOMPLEX8FFTPlan( UINT4 size, int measure lvl );
/** Returns a new COMPLEX8FFTPlan for a reverse transform /**
* Returns a new COMPLEX8FFTPlan for a reverse transform
* *
* A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a. * A COMPLEX8FFTPlan is required to perform a FFT that involves complex dat a.
* A reverse transform performs * A reverse transform performs
* \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f] * \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f]
* where N, the size of the transform, is the length of the vectors w and W . * where N, the size of the transform, is the length of the vectors w and W .
* *
* @note * @note
* The reverse transform of the forward transform of some data is * The reverse transform of the forward transform of some data is
* equal to N times the original data (we therefore call it a "reverse" * equal to N times the original data (we therefore call it a "reverse"
* transform rather than an "inverse" transform). * transform rather than an "inverse" transform).
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed * @return A pointer to an allocated \c COMPLEX8FFTPlan structure is return ed
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateReverseCOMPLEX8Plan() function shall fail if: * The \c XLALCreateReverseCOMPLEX8Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX8FFTPlan * XLALCreateReverseCOMPLEX8FFTPlan( UINT4 size, int measure lvl ); COMPLEX8FFTPlan * XLALCreateReverseCOMPLEX8FFTPlan( UINT4 size, int measure lvl );
/** Destroys a COMPLEX8FFTPlan /**
* Destroys a COMPLEX8FFTPlan
* @param[in] plan A pointer to the COMPLEX8FFTPlan to be destroyed. * @param[in] plan A pointer to the COMPLEX8FFTPlan to be destroyed.
* @return None. * @return None.
*/ */
void XLALDestroyCOMPLEX8FFTPlan( COMPLEX8FFTPlan *plan ); void XLALDestroyCOMPLEX8FFTPlan( COMPLEX8FFTPlan *plan );
/** Perform a COMPLEX8Vector to COMPLEX8Vector FFT /**
* Perform a COMPLEX8Vector to COMPLEX8Vector FFT
* *
* This routine computes * This routine computes
* \f[Z[k] = \sum_{j=0}^{N-1} e^{\mp2\pi ijk/N}\,z[j],\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{\mp2\pi ijk/N}\,z[j],\f]
* and where the minus sign is used if a forward plan is provided as the ar gument * and where the minus sign is used if a forward plan is provided as the ar gument
* and the plus sign is used if a reverse plan is provided as the argument; * and the plus sign is used if a reverse plan is provided as the argument;
* here N is the length of the input and output vectors z and Z. * here N is the length of the input and output vectors z and Z.
* *
* @param[out] output The complex output data vector Z of length N * @param[out] output The complex output data vector Z of length N
* @param[in] input The input complex data vector z of length N * @param[in] input The input complex data vector z of length N
* @param[in] plan The FFT plan to use for the transform * @param[in] plan The FFT plan to use for the transform
* @note * @note
* The input and output vectors must be distinct. * The input and output vectors must be distinct.
* @return 0 upon successful completion or non-zero upon failure. * @return 0 upon successful completion or non-zero upon failure.
* @par Errors: * @par Errors:
* The \c XLALCOMPLEX8VectorFFT() function shall fail if: * The \c XLALCOMPLEX8VectorFFT() function shall fail if:
* - [\c XLAL_EFAULT] A \c NULL pointer is provided as one of the argument * - [\c XLAL_EFAULT] A \c NULL pointer is provided as one of the arguments
s. .
* - [\c XLAL_EINVAL] A argument is invalid or the input and output data * - [\c XLAL_EINVAL] A argument is invalid or the input and output data
* vectors are the same. * vectors are the same.
* - [\c XLAL_EBADLEN] The input vector, output vector, and plan size are * - [\c XLAL_EBADLEN] The input vector, output vector, and plan size are
* incompatible. * incompatible.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* . * .
*/ */
int XLALCOMPLEX8VectorFFT( COMPLEX8Vector * restrict output, COMPLEX8Vector * restrict input, int XLALCOMPLEX8VectorFFT( COMPLEX8Vector * _LAL_RESTRICT_ output, const CO MPLEX8Vector * _LAL_RESTRICT_ input,
const COMPLEX8FFTPlan *plan ); const COMPLEX8FFTPlan *plan );
/* /*
* *
* XLAL COMPLEX16 functions * XLAL COMPLEX16 functions
* *
*/ */
/** Returns a new COMPLEX16FFTPlan /**
* Returns a new COMPLEX16FFTPlan
* *
* A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta. * A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta.
* A different plan is required for each size of the complex data vectors * A different plan is required for each size of the complex data vectors
* and for each direction of transform (forward or reverse). * and for each direction of transform (forward or reverse).
* A forward transform performs * A forward transform performs
* \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f]
* where N, the size of the transform, is the length of the vectors z and Z . * where N, the size of the transform, is the length of the vectors z and Z .
* A reverse transform performs * A reverse transform performs
* \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f] * \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f]
* where N, the size of the transform, is the length of the vectors w and W . * where N, the size of the transform, is the length of the vectors w and W .
* *
* @note * @note
* The reverse transform of the forward transform of some data is * The reverse transform of the forward transform of some data is
* equal to N times the original data (we therefore call it a "reverse" * equal to N times the original data (we therefore call it a "reverse"
* transform rather than an "inverse" transform). * transform rather than an "inverse" transform).
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] fwdflg Set non-zero for a forward FFT plan; * @param[in] fwdflg Set non-zero for a forward FFT plan;
* otherwise create a reverse plan * otherwise create a reverse plan
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned * @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateCOMPLEX16Plan() function shall fail if: * The \c XLALCreateCOMPLEX16Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX16FFTPlan * XLALCreateCOMPLEX16FFTPlan( UINT4 size, int fwdflg, int measurelvl ); COMPLEX16FFTPlan * XLALCreateCOMPLEX16FFTPlan( UINT4 size, int fwdflg, int measurelvl );
/** Returns a new COMPLEX16FFTPlan for a forward transform /**
* Returns a new COMPLEX16FFTPlan for a forward transform
* *
* A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta. * A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta.
* A different plan is required for each size of the complex data vectors. * A different plan is required for each size of the complex data vectors.
* A forward transform performs * A forward transform performs
* \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{-2\pi ijk/N}\,z[j]\f]
* where N, the size of the transform, is the length of the vector z and Z. * where N, the size of the transform, is the length of the vector z and Z.
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned * @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateForwardCOMPLEX16Plan() function shall fail if: * The \c XLALCreateForwardCOMPLEX16Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX16FFTPlan * XLALCreateForwardCOMPLEX16FFTPlan( UINT4 size, int measu relvl ); COMPLEX16FFTPlan * XLALCreateForwardCOMPLEX16FFTPlan( UINT4 size, int measu relvl );
/** Returns a new COMPLEX16FFTPlan for a reverse transform /**
* Returns a new COMPLEX16FFTPlan for a reverse transform
* *
* A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta. * A COMPLEX16FFTPlan is required to perform a FFT that involves complex da ta.
* A reverse transform performs * A reverse transform performs
* \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f] * \f[w[j] = \sum_{k=0}^{N-1} e^{+2\pi ijk/N}\,W[k]\f]
* where N, the size of the transform, is the length of the vectors w and W . * where N, the size of the transform, is the length of the vectors w and W .
* *
* @note * @note
* The reverse transform of the forward transform of some data is * The reverse transform of the forward transform of some data is
* equal to N times the original data (we therefore call it a "reverse" * equal to N times the original data (we therefore call it a "reverse"
* transform rather than an "inverse" transform). * transform rather than an "inverse" transform).
* *
* @param[in] size The number of points in the complex data. * @param[in] size The number of points in the complex data.
* @param[in] measurelvl Measurement level for plan creation: * @param[in] measurelvl Measurement level for plan creation:
* - 0: no measurement, just estimate the plan; * - 0: no measurement, just estimate the plan;
* - 1: measure the best plan; * - 1: measure the best plan;
* - 2: perform a lengthy measurement of the best plan * - 2: perform a lengthy measurement of the best plan;
; * - 3: perform an exhasutive measurement of the best plan.
* - 3: perform an exhasutive measurement of the best
plan.
* @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned * @return A pointer to an allocated \c COMPLEX16FFTPlan structure is retur ned
* upon successful completion. Otherwise, a \c NULL pointer is returned * upon successful completion. Otherwise, a \c NULL pointer is returned
* and \c xlalErrno is set to indicate the error. * and \c xlalErrno is set to indicate the error.
* @par Errors: * @par Errors:
* The \c XLALCreateReverseCOMPLEX16Plan() function shall fail if: * The \c XLALCreateReverseCOMPLEX16Plan() function shall fail if:
* - [\c XLAL_EBADLEN] The size of the requested plan is 0. * - [\c XLAL_EBADLEN] The size of the requested plan is 0.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed. * - [\c XLAL_EFAILED] The call to the underlying FFTW routine failed.
* . * .
*/ */
COMPLEX16FFTPlan * XLALCreateReverseCOMPLEX16FFTPlan( UINT4 size, int measu relvl ); COMPLEX16FFTPlan * XLALCreateReverseCOMPLEX16FFTPlan( UINT4 size, int measu relvl );
/** Destroys a COMPLEX16FFTPlan /**
* Destroys a COMPLEX16FFTPlan
* @param[in] plan A pointer to the COMPLEX16FFTPlan to be destroyed. * @param[in] plan A pointer to the COMPLEX16FFTPlan to be destroyed.
* @return None. * @return None.
*/ */
void XLALDestroyCOMPLEX16FFTPlan( COMPLEX16FFTPlan *plan ); void XLALDestroyCOMPLEX16FFTPlan( COMPLEX16FFTPlan *plan );
/** Perform a COMPLEX16Vector to COMPLEX16Vector FFT /**
* Perform a COMPLEX16Vector to COMPLEX16Vector FFT
* *
* This routine computes * This routine computes
* \f[Z[k] = \sum_{j=0}^{N-1} e^{\mp2\pi ijk/N}\,z[j],\f] * \f[Z[k] = \sum_{j=0}^{N-1} e^{\mp2\pi ijk/N}\,z[j],\f]
* and where the minus sign is used if a forward plan is provided as the ar gument * and where the minus sign is used if a forward plan is provided as the ar gument
* and the plus sign is used if a reverse plan is provided as the argument; * and the plus sign is used if a reverse plan is provided as the argument;
* here N is the length of the input and output vectors z and Z. * here N is the length of the input and output vectors z and Z.
* *
* @param[out] output The complex output data vector Z of length N * @param[out] output The complex output data vector Z of length N
* @param[in] input The input complex data vector z of length N * @param[in] input The input complex data vector z of length N
* @param[in] plan The FFT plan to use for the transform * @param[in] plan The FFT plan to use for the transform
* @note * @note
* The input and output vectors must be distinct. * The input and output vectors must be distinct.
* @return 0 upon successful completion or non-zero upon failure. * @return 0 upon successful completion or non-zero upon failure.
* @par Errors: * @par Errors:
* The \c XLALCOMPLEX16VectorFFT() function shall fail if: * The \c XLALCOMPLEX16VectorFFT() function shall fail if:
* - [\c XLAL_EFAULT] A \c NULL pointer is provided as one of the argument * - [\c XLAL_EFAULT] A \c NULL pointer is provided as one of the arguments
s. .
* - [\c XLAL_EINVAL] A argument is invalid or the input and output data * - [\c XLAL_EINVAL] A argument is invalid or the input and output data
* vectors are the same. * vectors are the same.
* - [\c XLAL_EBADLEN] The input vector, output vector, and plan size are * - [\c XLAL_EBADLEN] The input vector, output vector, and plan size are
* incompatible. * incompatible.
* - [\c XLAL_ENOMEM] Insufficient storage space is available. * - [\c XLAL_ENOMEM] Insufficient storage space is available.
* . * .
*/ */
int XLALCOMPLEX16VectorFFT( COMPLEX16Vector * restrict output, COMPLEX16Vec tor * restrict input, int XLALCOMPLEX16VectorFFT( COMPLEX16Vector * _LAL_RESTRICT_ output, const COMPLEX16Vector * _LAL_RESTRICT_ input,
const COMPLEX16FFTPlan *plan ); const COMPLEX16FFTPlan *plan );
/* /*
* *
* LAL COMPLEX8 functions * LAL COMPLEX8 functions
* *
*/ */
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateForwardCOMPLEX8FFTPlan() instead. * @deprecated Use XLALCreateForwardCOMPLEX8FFTPlan() instead.
*/ */
void void
LALCreateForwardCOMPLEX8FFTPlan( LALCreateForwardCOMPLEX8FFTPlan(
LALStatus *status, LALStatus *status,
COMPLEX8FFTPlan **plan, COMPLEX8FFTPlan **plan,
UINT4 size, UINT4 size,
INT4 measure INT4 measure
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateForwardCOMPLEX8FFTPlan() instead. * @deprecated Use XLALCreateForwardCOMPLEX8FFTPlan() instead.
*/ */
#define LALCreateForwardComplexFFTPlan LALCreateForwardCOMPLEX8FFTPlan #define LALCreateForwardComplexFFTPlan LALCreateForwardCOMPLEX8FFTPlan
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateReverseCOMPLEX8FFTPlan() instead. * @deprecated Use XLALCreateReverseCOMPLEX8FFTPlan() instead.
*/ */
void void
LALCreateReverseCOMPLEX8FFTPlan( LALCreateReverseCOMPLEX8FFTPlan(
LALStatus *status, LALStatus *status,
COMPLEX8FFTPlan **plan, COMPLEX8FFTPlan **plan,
UINT4 size, UINT4 size,
INT4 measure INT4 measure
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateReverseCOMPLEX8FFTPlan() instead. * @deprecated Use XLALCreateReverseCOMPLEX8FFTPlan() instead.
*/ */
#define LALCreateReverseComplexFFTPlan LALCreateReverseCOMPLEX8FFTPlan #define LALCreateReverseComplexFFTPlan LALCreateReverseCOMPLEX8FFTPlan
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALDestroyCOMPLEX8FFTPlan() instead. * @deprecated Use XLALDestroyCOMPLEX8FFTPlan() instead.
*/ */
void void
LALDestroyCOMPLEX8FFTPlan ( LALDestroyCOMPLEX8FFTPlan (
LALStatus *status, LALStatus *status,
COMPLEX8FFTPlan **plan COMPLEX8FFTPlan **plan
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALDestroyCOMPLEX8FFTPlan() instead. * @deprecated Use XLALDestroyCOMPLEX8FFTPlan() instead.
*/ */
#define LALDestroyComplexFFTPlan LALDestroyCOMPLEX8FFTPlan #define LALDestroyComplexFFTPlan LALDestroyCOMPLEX8FFTPlan
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCOMPLEX8VectorFFT() instead. * @deprecated Use XLALCOMPLEX8VectorFFT() instead.
*/ */
void void
LALCOMPLEX8VectorFFT ( LALCOMPLEX8VectorFFT (
LALStatus *status, LALStatus *status,
COMPLEX8Vector *output, COMPLEX8Vector *output,
COMPLEX8Vector *input, COMPLEX8Vector *input,
COMPLEX8FFTPlan *plan COMPLEX8FFTPlan *plan
); );
/* /*
* *
* LAL COMPLEX16 functions * LAL COMPLEX16 functions
* *
*/ */
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateForwardCOMPLEX16FFTPlan() instead. * @deprecated Use XLALCreateForwardCOMPLEX16FFTPlan() instead.
*/ */
void void
LALCreateForwardCOMPLEX16FFTPlan( LALCreateForwardCOMPLEX16FFTPlan(
LALStatus *status, LALStatus *status,
COMPLEX16FFTPlan **plan, COMPLEX16FFTPlan **plan,
UINT4 size, UINT4 size,
INT4 measure INT4 measure
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCreateReverseCOMPLEX16FFTPlan() instead. * @deprecated Use XLALCreateReverseCOMPLEX16FFTPlan() instead.
*/ */
void void
LALCreateReverseCOMPLEX16FFTPlan( LALCreateReverseCOMPLEX16FFTPlan(
LALStatus *status, LALStatus *status,
COMPLEX16FFTPlan **plan, COMPLEX16FFTPlan **plan,
UINT4 size, UINT4 size,
INT4 measure INT4 measure
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALDestroyCOMPLEX16FFTPlan() instead. * @deprecated Use XLALDestroyCOMPLEX16FFTPlan() instead.
*/ */
void void
LALDestroyCOMPLEX16FFTPlan ( LALDestroyCOMPLEX16FFTPlan (
LALStatus *status, LALStatus *status,
COMPLEX16FFTPlan **plan COMPLEX16FFTPlan **plan
); );
/** \b DEPRECATED /**
* \b DEPRECATED
* @deprecated Use XLALCOMPLEX16VectorFFT() instead. * @deprecated Use XLALCOMPLEX16VectorFFT() instead.
*/ */
void void
LALCOMPLEX16VectorFFT ( LALCOMPLEX16VectorFFT (
LALStatus *status, LALStatus *status,
COMPLEX16Vector *output, COMPLEX16Vector *output,
COMPLEX16Vector *input, COMPLEX16Vector *input,
COMPLEX16FFTPlan *plan COMPLEX16FFTPlan *plan
); );
 End of changes. 42 change blocks. 
105 lines changed or deleted 114 lines changed or added


 ConfigFile.h   ConfigFile.h 
skipping to change at line 31 skipping to change at line 31
#define _CONFIGFILE_H #define _CONFIGFILE_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/StringInput.h> #include <lal/StringInput.h>
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** \addtogroup ConfigFile_h /**
* \addtogroup ConfigFile_h
* \author Reinhard Prix * \author Reinhard Prix
* \brief Module for general parsing of simple ASCII-based config-files. * \brief Module for general parsing of simple ASCII-based config-files.
*
\heading{Description} * ### Description ###
*
This module provides routines for reading formatted * This module provides routines for reading formatted
config-files containing definitions of the form <tt>variable = value</tt>. * config-files containing definitions of the form <tt>variable = value</tt
The general syntax is somewhat similar to the one provided by the >.
perl-module <tt>ConfigParser</tt> (cf. * The general syntax is somewhat similar to the one provided by the
http://www.python.org/doc/current/lib/module-ConfigParser.html) * perl-module <tt>ConfigParser</tt> (cf.
* http://www.python.org/doc/current/lib/module-ConfigParser.html)
Comments are allowed using either '<tt>\#</tt>' or <tt>\%</tt>. *
You can also use line-continuation using a '<tt>\\</tt>' at the end of the * Comments are allowed using either '<tt>\#</tt>' or <tt>\%</tt>.
line. * You can also use line-continuation using a '<tt>\\</tt>' at the end of
Also note that comment-signs '<tt>\#\%</tt>' within double-quotes &quot;... the line.
&quot; * Also note that comment-signs '<tt>\#\%</tt>' within double-quotes &quot;
are <em>not</em> treated as comment-characters. ...&quot;
Semi-colons <tt>;</tt> are ignored, but can be used to separate several ass * are <em>not</em> treated as comment-characters.
ignments on the same line. * Semi-colons <tt>;</tt> are ignored, but can be used to separate several
The general syntax is best illustrated assignments on the same line.
using a simple example: * The general syntax is best illustrated
\code * using a simple example:
# comment line * \code
var1 = 1.0; var2 = 3.1; ## several assignments on a line, separated by '; * # comment line
' * var1 = 1.0; var2 = 3.1; ## several assignments on a line, separated by
somevar = some text.\ ';'
You can also use\ * somevar = some text.\
line-continuation * You can also use\
var3 = 4 # whatever that means * line-continuation
note = "this is also possible, and # here does nothing" * var3 = 4 # whatever that means
a_switch = true #possible values: 0,1,true,false,yes,no, case insensitive * note = "this is also possible, and # here does nothing"
... * a_switch = true #possible values: 0,1,true,false,yes,no, case insensiti
\endcode ve
* ...
Note that TABS generally get replaced by a single space, which can be * \endcode
useful in the case of line-continuation (see example). All leading and *
trailing spaces in are ignore (except within double-quotes). * Note that TABS generally get replaced by a single space, which can be
* useful in the case of line-continuation (see example). All leading and
The general approach of reading from such a config-file, is to first * trailing spaces in are ignore (except within double-quotes).
call XLALParseDataFile() which loads and pre-parses the contents of the *
config-file into the structure LALParsedDataFile. Then one can read in * The general approach of reading from such a config-file, is to first
config-variables either using one of the type-strict custom-wrappers * call XLALParseDataFile() which loads and pre-parses the contents of the
<tt>XLALReadConfig<TYPE>Variable()</tt> or the general-purpose reading func * config-file into the structure LALParsedDataFile. Then one can read in
tion * config-variables either using one of the type-strict custom-wrappers
XLALReadConfigVariable(). * <tt>XLALReadConfig<TYPE>Variable()</tt> or the general-purpose reading f
unction
A boolean variable read by XLALReadConfigBOOLVariable() can have any of the * XLALReadConfigVariable().
values *
<tt>{1, 0, yes, no, true, false}</tt>, where the comparison is done * A boolean variable read by XLALReadConfigBOOLVariable() can have any of
<em>case-insensitively</em>, i.e. you can also use 'True' or 'FALSE'.... the values
* <tt>{1, 0, yes, no, true, false}</tt>, where the comparison is done
If one wishes a tight sytnax for the config-file, one can check * <em>case-insensitively</em>, i.e. you can also use 'True' or 'FALSE'....
that there are no illegal entries in the config-file. This is done *
by checking at the end that all config-file entries have been * If one wishes a tight sytnax for the config-file, one can check
successfully parsed, using: * that there are no illegal entries in the config-file. This is done
XLALCheckConfigReadComplete(), where \a strictness is either * by checking at the end that all config-file entries have been
CONFIGFILE_WARN or CONFIGFILE_ERROR. * successfully parsed, using:
In the first case only a warning is issued, while in the second it is * XLALCheckConfigReadComplete(), where \a strictness is either
treated as a LAL-error if some config-file entries have not been * CONFIGFILE_WARN or CONFIGFILE_ERROR.
read-in. (The use of this function is optional). * In the first case only a warning is issued, while in the second it is
* treated as a LAL-error if some config-file entries have not been
The configfile-data should be freed at the end using * read-in. (The use of this function is optional).
XLALDestroyParsedDataFile(). *
* The configfile-data should be freed at the end using
\par Notes * XLALDestroyParsedDataFile().
*
XLALReadConfigSTRINGVariable() and XLALReadConfigSTRINGVariable() are not * \par Notes
the same as using <tt>%quot;\%s&quot;</tt> as a format string, as they read *
the * XLALReadConfigSTRINGVariable() and XLALReadConfigSTRINGVariable() are no
<em>rest</em> of the logical line (excluding comments) as a string. t
* the same as using <tt>%quot;\%s&quot;</tt> as a format string, as they r
In the case of XLALReadConfigSTRINGVariable(), the required ead the
memory is allocated and has to be freed by the caller, while for * <em>rest</em> of the logical line (excluding comments) as a string.
XLALReadConfigSTRINGVariable() the caller has to provide a *
CHARVector of length N, which defines the maximum length of * In the case of XLALReadConfigSTRINGVariable(), the required
string to be read. * memory is allocated and has to be freed by the caller, while for
* XLALReadConfigSTRINGVariable() the caller has to provide a
\note instead of using these functions directly, it might be * CHARVector of length N, which defines the maximum length of
more convenient to use the \ref UserInput_h. * string to be read.
*
*/ * \note instead of using these functions directly, it might be
* more convenient to use the \ref UserInput_h.
*
*/
/*@{*/ /*@{*/
/** Levels of strictness for config-file parsing. */ /** Levels of strictness for config-file parsing. */
typedef enum { typedef enum {
CONFIGFILE_IGNORE = 0, /**< ignore missing config-variable or unpar sed config-entries */ CONFIGFILE_IGNORE = 0, /**< ignore missing config-variable or unpar sed config-entries */
CONFIGFILE_WARN, /**< issue a warning but don't report an err or. */ CONFIGFILE_WARN, /**< issue a warning but don't report an err or. */
CONFIGFILE_ERROR, /**< issue an error-message and report a LAL -error */ CONFIGFILE_ERROR, /**< issue an error-message and report a LAL -error */
CONFIGFILE_LAST CONFIGFILE_LAST
} ConfigStrictness; } ConfigStrictness;
/** This structure defines a config-variable to be read in using the /**
* general-purpose reading function LALReadConfigVariable(). */ * This structure defines a config-variable to be read in using the
* general-purpose reading function LALReadConfigVariable().
*/
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
SWIGLAL(IMMUTABLE_MEMBERS(tagLALConfigVar, secName, varName, fmt)); SWIGLAL(IMMUTABLE_MEMBERS(tagLALConfigVar, secName, varName, fmt));
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagLALConfigVar { typedef struct tagLALConfigVar {
const CHAR *secName; /**< Section name within which to find varN ame. May be NULL */ const CHAR *secName; /**< Section name within which to find varN ame. May be NULL */
const CHAR *varName; /**< Variable-name to be read in the config- file */ const CHAR *varName; /**< Variable-name to be read in the config- file */
const CHAR *fmt; /**< Format string for reading (<tt>sscanf() </tt>-style) */ const CHAR *fmt; /**< Format string for reading (<tt>sscanf() </tt>-style) */
ConfigStrictness strictness; /**< what to do if variable not found: ignor e, warn, error */ ConfigStrictness strictness; /**< what to do if variable not found: ignor e, warn, error */
} LALConfigVar; } LALConfigVar;
/** This structure is returned by LALParseDataFile() and holds the contents /**
of an * This structure is returned by LALParseDataFile() and holds the contents
of an
* ASCII data-file in a pre-parsed form, namely stripped from all comments ('\#', '\%'), * ASCII data-file in a pre-parsed form, namely stripped from all comments ('\#', '\%'),
* spurious whitespaces, and separated into lines (taking into account line -continuation * spurious whitespaces, and separated into lines (taking into account line -continuation
* by '\\' at the end of lines). * by '\\' at the end of lines).
* This is used as the input structure in the config-variable reading routi nes. * This is used as the input structure in the config-variable reading routi nes.
*/ */
typedef struct tagLALParsedDataFile { typedef struct tagLALParsedDataFile {
TokenList *lines; /**< list of pre-parsed data-file lines */ TokenList *lines; /**< list of pre-parsed data-file lines */
BOOLEAN *wasRead; /**< keep track of successfully read lines for stric tness-checking */ BOOLEAN *wasRead; /**< keep track of successfully read lines for stric tness-checking */
} LALParsedDataFile; } LALParsedDataFile;
/* Function prototypes */ /* Function prototypes */
int XLALParseDataFile (LALParsedDataFile **cfgdata, const CHAR *fname); int XLALParseDataFile (LALParsedDataFile **cfgdata, const CHAR *fname);
int XLALParseDataFileContent (LALParsedDataFile **cfgdata, const CHAR *stri
ng );
void XLALDestroyParsedDataFile (LALParsedDataFile *cfgdata); void XLALDestroyParsedDataFile (LALParsedDataFile *cfgdata);
int XLALConfigSectionExists(const LALParsedDataFile *, const CHAR *); int XLALConfigSectionExists(const LALParsedDataFile *, const CHAR *);
LALStringVector *XLALListConfigFileSections ( const LALParsedDataFile *cfgd ata );
int int
XLALReadConfigBOOLVariable (BOOLEAN *varp, XLALReadConfigBOOLVariable (BOOLEAN *varp,
const LALParsedDataFile *cfgdata, const LALParsedDataFile *cfgdata,
const CHAR *secName, const CHAR *secName,
const CHAR *varName, const CHAR *varName,
BOOLEAN *wasRead); BOOLEAN *wasRead);
int int
XLALReadConfigINT4Variable (INT4 *varp, XLALReadConfigINT4Variable (INT4 *varp,
const LALParsedDataFile *cfgdata, const LALParsedDataFile *cfgdata,
skipping to change at line 220 skipping to change at line 227
#define CONFIGFILEH_MSGEFMT "Config variable not readable using given format-string." #define CONFIGFILEH_MSGEFMT "Config variable not readable using given format-string."
#define CONFIGFILEH_MSGETOKENS "The input ConfigData seems corrupte d." #define CONFIGFILEH_MSGETOKENS "The input ConfigData seems corrupte d."
#define CONFIGFILEH_MSGENONULL "Output pointer is not NULL" #define CONFIGFILEH_MSGENONULL "Output pointer is not NULL"
#define CONFIGFILEH_MSGEUNKNOWN "Unknown config-file entry f ound" #define CONFIGFILEH_MSGEUNKNOWN "Unknown config-file entry f ound"
#define CONFIGFILEH_MSGEMEM "Out of memory" #define CONFIGFILEH_MSGEMEM "Out of memory"
#define CONFIGFILEH_MSGEBOOL "Illegal BOOLEAN entry" #define CONFIGFILEH_MSGEBOOL "Illegal BOOLEAN entry"
#define CONFIGFILEH_MSGESTRING "Malformed quoted string" #define CONFIGFILEH_MSGESTRING "Malformed quoted string"
#define CONFIGFILEH_MSGEXLAL "Failure in XLAL function" #define CONFIGFILEH_MSGEXLAL "Failure in XLAL function"
/** \endcond */ /** \endcond */
/** \name Deprecated LAL-interface /**
* \name Deprecated LAL-interface
* These functions are deprecated, and you should user their XLAL-equivalen ts instead. * These functions are deprecated, and you should user their XLAL-equivalen ts instead.
*/ /*@{*/ */
/*@{*/
void LALParseDataFile (LALStatus *, LALParsedDataFile **cfgdata, const CHAR *fname); void LALParseDataFile (LALStatus *, LALParsedDataFile **cfgdata, const CHAR *fname);
void LALDestroyParsedDataFile (LALStatus *, LALParsedDataFile **cfgdata); void LALDestroyParsedDataFile (LALStatus *, LALParsedDataFile **cfgdata);
void LALReadConfigBOOLVariable (LALStatus *, BOOLEAN *varp, const LALParsed DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead); void LALReadConfigBOOLVariable (LALStatus *, BOOLEAN *varp, const LALParsed DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigINT4Variable (LALStatus *, INT4 *varp, const LALParsedDat aFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead); void LALReadConfigINT4Variable (LALStatus *, INT4 *varp, const LALParsedDat aFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigREAL8Variable (LALStatus *, REAL8 *varp, const LALParsedD ataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead); void LALReadConfigREAL8Variable (LALStatus *, REAL8 *varp, const LALParsedD ataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigSTRINGVariable (LALStatus *, CHAR **varp, const LALParsed DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead); void LALReadConfigSTRINGVariable (LALStatus *, CHAR **varp, const LALParsed DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigSTRINGNVariable (LALStatus *, CHARVector *varp, const LAL ParsedDataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead); void LALReadConfigSTRINGNVariable (LALStatus *, CHARVector *varp, const LAL ParsedDataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigVariable (LALStatus *, void *varp, const LALParsedDataFil e *cfgdata, const LALConfigVar *param, BOOLEAN *wasRead); void LALReadConfigVariable (LALStatus *, void *varp, const LALParsedDataFil e *cfgdata, const LALConfigVar *param, BOOLEAN *wasRead);
void LALCheckConfigReadComplete (LALStatus *, const LALParsedDataFile *cfgd ata, ConfigStrictness strict); void LALCheckConfigReadComplete (LALStatus *, const LALParsedDataFile *cfgd ata, ConfigStrictness strict);
 End of changes. 8 change blocks. 
86 lines changed or deleted 99 lines changed or added


 Date.h   Date.h 
skipping to change at line 48 skipping to change at line 48
#endif #endif
#define XLAL_BILLION_INT4 1000000000 #define XLAL_BILLION_INT4 1000000000
#define XLAL_BILLION_INT8 LAL_INT8_C( 1000000000 ) #define XLAL_BILLION_INT8 LAL_INT8_C( 1000000000 )
#define XLAL_BILLION_REAL8 1e9 #define XLAL_BILLION_REAL8 1e9
/** /**
* \addtogroup Date_h * \addtogroup Date_h
* \author D.W. Chin, J.D.E. Creighton and Kipp Cannon * \author D.W. Chin, J.D.E. Creighton and Kipp Cannon
* \brief Provides routines for manipulating date and time information. * \brief Provides routines for manipulating date and time information.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/Date.h> * \code
\endcode * #include <lal/Date.h>
* \endcode
This header covers routines for manipulating date and time *
information. The various time systems are discussed in [\ref esaa1992]. * This header covers routines for manipulating date and time
* information. The various time systems are discussed in \cite esaa1992.
*/ *
*/
/*@{*/ /*@{*/
/** The UNIX time of the GPS origin epoch. /**
* * The UNIX time of the GPS origin epoch.
* 1980 6 JAN 0h UTC is 3657 days after 1970 1 JAN 0h UTC: * 1980 6 JAN 0h UTC is 3657 days after 1970 1 JAN 0h UTC:
* 8 standard years of 365 days = 2920 days * 8 standard years of 365 days = 2920 days
* 2 leap years of 366 days = 734 days * 2 leap years of 366 days = 734 days
* 5 extra days. * 5 extra days.
* Hence 3657*86400=315964800. * Hence 3657*86400=315964800.
* *
* Note that this deliberately does not account for any leap seconds in the * Note that this deliberately does not account for any leap seconds in the
* interval. POSIX:2001 defines the relation between the UNIX time * 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 * \c time_t \c t and a broken down time \c struct \c tm \c utc as
* \code * \code
* t = utc.tm_sec + utc.tm_min*60 + utc.tm_hour*3600 * t = utc.tm_sec + utc.tm_min*60 + utc.tm_hour*3600
* + utc.tm_yday*86400 + (utc.tm_year-70)*31536000 * + utc.tm_yday*86400 + (utc.tm_year-70)*31536000
* + ((utc.tm_year-69)/4)*86400 - ((utc.tm_year-1)/100)*86400 * + ((utc.tm_year-69)/4)*86400 - ((utc.tm_year-1)/100)*86400
* + ((utc.tm_year+299)/400)*86400; * + ((utc.tm_year+299)/400)*86400;
* \endcode * \endcode
* so if you were to set \c utc.tm_sec=utc.tm_min=utc.tm_hour=0, * 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 utc.tm_yday=5, and \c utc.tm_year=80, then you get
* \c t=315964800. That is what this is. * \c t=315964800. That is what this is.
*/ */
#define XLAL_EPOCH_UNIX_GPS 315964800 #define XLAL_EPOCH_UNIX_GPS 315964800
#define XLAL_EPOCH_J2000_0_JD 2451545.0 /**< Julian Day of the J200 0.0 epoch (2000 JAN 1 12h UTC). */ #define XLAL_EPOCH_J2000_0_JD 2451545.0 /**< Julian Day of the J200 0.0 epoch (2000 JAN 1 12h UTC). */
#define XLAL_EPOCH_J2000_0_TAI_UTC 32 /**< Leap seconds (TAI-UTC) on the J2000.0 epoch (2000 JAN 1 12h UTC). */ #define XLAL_EPOCH_J2000_0_TAI_UTC 32 /**< Leap seconds (TAI-UTC) on the J2000.0 epoch (2000 JAN 1 12h UTC). */
#define XLAL_EPOCH_J2000_0_GPS 630763213 /**< GPS seconds of the J20 00.0 epoch (2000 JAN 1 12h UTC). */ #define XLAL_EPOCH_J2000_0_GPS 630763213 /**< GPS seconds of the J20 00.0 epoch (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_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 epoch (1980 JAN 6 0h UTC) */ #define XLAL_EPOCH_GPS_TAI_UTC 19 /**< Leap seconds (TAI-UTC) on the GPS epoch (1980 JAN 6 0h UTC) */
#define XLAL_MJD_REF 2400000.5 /**< Reference Julian Day f or Mean Julian Day. */ #define XLAL_MJD_REF 2400000.5 /**< Reference Julian Day f or Mean Julian Day. */
#define XLAL_MODIFIED_JULIEN_DAY(utc) (XLALJulianDay(utc)-XLAL_MJD_REF) /** < Modified Julian Day for specified civil time structure. */ #define XLAL_MODIFIED_JULIEN_DAY(utc) (XLALJulianDay(utc)-XLAL_MJD_REF) /** < Modified Julian Day for specified civil time structure. */
/** This structure stores pointers to a ::LALDetector and a /**
* This structure stores pointers to a ::LALDetector and a
* ::LIGOTimeGPS. Its sole purpose is to aggregate these * ::LIGOTimeGPS. Its sole purpose is to aggregate these
* structures for passing to functions. * structures for passing to functions.
*/ */
typedef struct typedef struct
tagLALPlaceAndGPS tagLALPlaceAndGPS
{ {
LALDetector *p_detector; /**< pointer to a detector */ const LALDetector *p_detector; /**< pointer to a detector */
LIGOTimeGPS *p_gps; /**< Pointer to a GPS time structure */ LIGOTimeGPS *p_gps; /**< Pointer to a GPS time structure */
} }
LALPlaceAndGPS; LALPlaceAndGPS;
/*@}*/ /*@}*/
/* ---------- Function prototypes : see respective source.c files for doxyg en documentation ---------- */ /* ---------- Function prototypes : see respective source.c files for doxyg en documentation ---------- */
#ifndef SWIG // exclude from SWIG interface #ifndef SWIG /* exclude from SWIG interface */
/* Converts GPS time to nano seconds stored as an INT8. */ /* Converts GPS time to nano seconds stored as an INT8. */
INT8 XLALGPSToINT8NS( const LIGOTimeGPS *epoch ); INT8 XLALGPSToINT8NS( const LIGOTimeGPS *epoch );
/* Converts nano seconds stored as an INT8 to GPS time. */ /* Converts nano seconds stored as an INT8 to GPS time. */
LIGOTimeGPS * XLALINT8NSToGPS( LIGOTimeGPS *epoch, INT8 ns ); LIGOTimeGPS * XLALINT8NSToGPS( LIGOTimeGPS *epoch, INT8 ns );
/* Sets GPS time given GPS integer seconds and residual nanoseconds. */ /* Sets GPS time given GPS integer seconds and residual nanoseconds. */
LIGOTimeGPS * XLALGPSSet( LIGOTimeGPS *epoch, INT4 gpssec, INT8 gpsnan ); LIGOTimeGPS * XLALGPSSet( LIGOTimeGPS *epoch, INT4 gpssec, INT8 gpsnan );
/* Sets GPS time given GPS seconds as a REAL8. */ /* Sets GPS time given GPS seconds as a REAL8. */
LIGOTimeGPS * XLALGPSSetREAL8( LIGOTimeGPS *epoch, REAL8 t ); LIGOTimeGPS * XLALGPSSetREAL8( LIGOTimeGPS *epoch, REAL8 t );
/* Returns GPS time as a REAL8. */ /* Returns GPS time as a REAL8. */
REAL8 XLALGPSGetREAL8( const LIGOTimeGPS *epoch ); REAL8 XLALGPSGetREAL8( const LIGOTimeGPS *epoch );
/** Breaks the GPS time into REAL8 integral and fractional parts, /**
* Breaks the GPS time into REAL8 integral and fractional parts,
* each of which has the same sign as the epoch. Returns the * each of which has the same sign as the epoch. Returns the
* fractional part, and stores the integral part (as a REAL8) * fractional part, and stores the integral part (as a REAL8)
* in the object pointed to by iptr. Like the standard C math * in the object pointed to by iptr. Like the standard C math
* library function modf(). */ * library function modf().
*/
REAL8 XLALGPSModf( REAL8 *iptr, const LIGOTimeGPS *epoch ); REAL8 XLALGPSModf( REAL8 *iptr, const LIGOTimeGPS *epoch );
/* Adds dt to a GPS time. */ /* Adds dt to a GPS time. */
LIGOTimeGPS * XLALGPSAdd( LIGOTimeGPS *epoch, REAL8 dt ); LIGOTimeGPS * XLALGPSAdd( LIGOTimeGPS *epoch, REAL8 dt );
/* Adds two GPS times. */ /* Adds two GPS times. */
LIGOTimeGPS * XLALGPSAddGPS( LIGOTimeGPS *epoch, const LIGOTimeGPS *dt ); LIGOTimeGPS * XLALGPSAddGPS( LIGOTimeGPS *epoch, const LIGOTimeGPS *dt );
/* Difference between two GPS times. */ /* Difference between two GPS times. */
REAL8 XLALGPSDiff( const LIGOTimeGPS *t1, const LIGOTimeGPS *t0 ); REAL8 XLALGPSDiff( const LIGOTimeGPS *t1, const LIGOTimeGPS *t0 );
skipping to change at line 155 skipping to change at line 159
/* Divide a GPS time by a REAL8 */ /* Divide a GPS time by a REAL8 */
LIGOTimeGPS *XLALGPSDivide( LIGOTimeGPS *gps, REAL8 x ); LIGOTimeGPS *XLALGPSDivide( LIGOTimeGPS *gps, REAL8 x );
/* Parse an ASCII string into a LIGOTimeGPS structure */ /* Parse an ASCII string into a LIGOTimeGPS structure */
int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr); int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr);
/* Return a string containing the ASCII base 10 representation of a LIGOTim eGPS. */ /* Return a string containing the ASCII base 10 representation of a LIGOTim eGPS. */
char *XLALGPSToStr(char *, const LIGOTimeGPS *t); char *XLALGPSToStr(char *, const LIGOTimeGPS *t);
#endif // !SWIG #endif /* !SWIG */
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(NEW_EMPTY_ARGUMENT(LIGOTimeGPS*, gpstime)); SWIGLAL(NEW_EMPTY_ARGUMENT(LIGOTimeGPS*, gpstime));
#endif #endif
/* This function returns the current GPS time according to the system clock */ /* This function returns the current GPS time according to the system clock */
LIGOTimeGPS* XLALGPSTimeNow( LIGOTimeGPS *gpstime ); LIGOTimeGPS* XLALGPSTimeNow( LIGOTimeGPS *gpstime );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL_CLEAR(NEW_EMPTY_ARGUMENT(LIGOTimeGPS*, gpstime)); SWIGLAL_CLEAR(NEW_EMPTY_ARGUMENT(LIGOTimeGPS*, gpstime));
#endif #endif
/* Returns the leap seconds TAI-UTC at a given GPS second. */ /* Returns the leap seconds TAI-UTC at a given GPS second. */
int XLALLeapSeconds( INT4 gpssec ); int XLALLeapSeconds( INT4 gpssec );
/* Returns the leap seconds GPS-UTC at a given GPS second. */ /* Returns the leap seconds GPS-UTC at a given GPS second. */
int XLALGPSLeapSeconds( INT4 gpssec ); int XLALGPSLeapSeconds( INT4 gpssec );
/* Returns the leap seconds TAI-UTC for a given UTC broken down time. */ /* Returns the leap seconds TAI-UTC for a given UTC broken down time. */
int XLALLeapSecondsUTC( const struct tm *utc ); int XLALLeapSecondsUTC( const struct tm *utc );
/* Returns the GPS seconds since the GPS epoch for a specified UTC time str ucture. */ /* Returns the GPS seconds since the GPS epoch for a specified UTC time str ucture. */
INT4 XLALUTCToGPS( const struct tm *utc ); INT4 XLALUTCToGPS( const struct tm *utc );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(EMPTY_ARGUMENT(struct tm*, utc)); SWIGLAL(EMPTY_ARGUMENT(struct tm*, utc));
#endif #endif
/* Returns a pointer to a tm structure representing the time /* Returns a pointer to a tm structure representing the time
* specified in seconds since the GPS epoch. */ * specified in seconds since the GPS epoch. */
struct tm* XLALGPSToUTC( struct tm *utc, INT4 gpssec ); struct tm* XLALGPSToUTC( struct tm *utc, INT4 gpssec );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL_CLEAR(EMPTY_ARGUMENT(struct tm*, utc)); SWIGLAL_CLEAR(EMPTY_ARGUMENT(struct tm*, utc));
#endif #endif
/* Returns the Julian Day (JD) corresponding to the date given in a broken /* Returns the Julian Day (JD) corresponding to the date given in a broken
* down time structure. */ * down time structure. */
REAL8 XLALJulianDay( const struct tm *utc ); REAL8 XLALJulianDay( const struct tm *utc );
/* Returns the Modified Julian Day (MJD) corresponding to the date given in a broken down time structure.*/ /* Returns the Modified Julian Day (MJD) corresponding to the date given in a broken down time structure.*/
INT4 XLALModifiedJulianDay( const struct tm *utc ); INT4 XLALModifiedJulianDay( const struct tm *utc );
 End of changes. 13 change blocks. 
25 lines changed or deleted 29 lines changed or added


 DetResponse.h   DetResponse.h 
skipping to change at line 36 skipping to change at line 36
#include <lal/LALConstants.h> #include <lal/LALConstants.h>
#include <lal/DetectorSite.h> #include <lal/DetectorSite.h>
#include <lal/SkyCoordinates.h> #include <lal/SkyCoordinates.h>
#include <lal/Date.h> #include <lal/Date.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/** \addtogroup DetResponse_h /**
\author David Chin <dwchin@umich.edu>, Kipp Cannon <kipp@gravity.phys.u * \addtogroup DetResponse_h
wm.edu> * \author David Chin <dwchin@umich.edu>, Kipp Cannon <kipp@gravity.phys.uw
m.edu>
\brief Provides routines to compute gravitational wave detector respons *
e to * \brief Provides routines to compute gravitational wave detector response
polarized planar gravitational wave originating from a given source, to
detected at a given time. * polarized planar gravitational wave originating from a given source,
* detected at a given time.
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/DetResponse.h> * \code
\endcode * #include <lal/DetResponse.h>
* \endcode
\heading{Description} *
* ### Description ###
These routines compute the antenna beam pattern for all supported detector *
types. <tt>XLALComputeDetAMResponse()</tt> computes the response at one * These routines compute the antenna beam pattern for all supported detect
instance in time, and <tt>XLALComputeDetAMResponseSeries()</tt> computes a or
vector of response for some length of time. * types. <tt>XLALComputeDetAMResponse()</tt> computes the response at one
* instance in time, and <tt>XLALComputeDetAMResponseSeries()</tt> computes
\heading{Algorithm} a
* vector of response for some length of time.
This code is a translation of the algorithm in the Maple worksheet by *
Anderson, <em>et al.</em> [\ref Anderson_2000]. We compute the \f$h\f$-ten * ### Algorithm ###
sors for *
\f$+\f$- and \f$\times\f$-polarized in the Earth-fixed frame, and then cont * This code is a translation of the algorithm in the Maple worksheet by
ract * Anderson, <em>et al.</em> \cite ABCCRW_2001. We compute the \f$h\f$-ten
them (take the scalar product) with the detector response tensors as sors for
described in the \ref LALDetectors_h section of the \c tools package. * \f$+\f$- and \f$\times\f$-polarized in the Earth-fixed frame, and then c
ontract
\ref LALDetectors_h provides predefined * them (take the scalar product) with the detector response tensors as
\c LALDetector structures representing most current detectors, * described in the \ref LALDetectors_h section of the \c tools package.
including LIGO (Hanford and Livingston), and GEO. *
* \ref LALDetectors_h provides predefined
\heading{Notes} * \c LALDetector structures representing most current detectors,
* including LIGO (Hanford and Livingston), and GEO.
For examples of usage, please see the test programs in the \c test director *
y. * ### Notes ###
*
*/ * For examples of usage, please see the test programs in the \c test direc
tory.
*
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define DETRESPONSEH_ENULLINPUT 1 /**< Input is NULL */ #define DETRESPONSEH_ENULLINPUT 1 /**< Input is NULL */
#define DETRESPONSEH_ENULLOUTPUT 2 /**< Output is NULL */ #define DETRESPONSEH_ENULLOUTPUT 2 /**< Output is NULL */
#define DETRESPONSEH_ESRCNOTEQUATORIAL 3 /**< Source coordinates not in Equatorial system */ #define DETRESPONSEH_ESRCNOTEQUATORIAL 3 /**< Source coordinates not in Equatorial system */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define DETRESPONSEH_MSGENULLINPUT "Input is NULL" #define DETRESPONSEH_MSGENULLINPUT "Input is NULL"
#define DETRESPONSEH_MSGENULLOUTPUT "Output is NULL" #define DETRESPONSEH_MSGENULLOUTPUT "Output is NULL"
#define DETRESPONSEH_MSGESRCNOTEQUATORIAL "Source coordinates not in Equato rial system" #define DETRESPONSEH_MSGESRCNOTEQUATORIAL "Source coordinates not in Equato rial system"
/** \endcond */ /** \endcond */
/** This structure contains gravitational wave source position (in Equatori /**
al * This structure contains gravitational wave source position (in Equatoria
l
* coördinates), and orientation angle. * coördinates), and orientation angle.
* The orientation is measured counter-clockwise with respect to the "line of ascending nodes", * The orientation is measured counter-clockwise with respect to the "line of ascending nodes",
* i.e. counter-clockwise with respect to a line perpendicular to the * i.e. counter-clockwise with respect to a line perpendicular to the
* source's meridian and extending westwards. For a source in the Northern * source's meridian and extending westwards. For a source in the Northern
* celestial hemisphere, and an observer in the Northern hemisphere standin g * celestial hemisphere, and an observer in the Northern hemisphere standin g
* such that they are facing South, this angle is measured counter-clockwis e * such that they are facing South, this angle is measured counter-clockwis e
* from a 3 o'clock position (pointing West) at the source. The polarizati on * from a 3 o'clock position (pointing West) at the source. The polarizati on
* convention is chosen such that if the source orientation were zero, the * convention is chosen such that if the source orientation were zero, the
* source would be a pure \f$+\f$-polarized source. * source would be a pure \f$+\f$-polarized source.
*/ */
skipping to change at line 112 skipping to change at line 114
CHAR name[LALNameLength]; /**< name of source, eg catalog number */ CHAR name[LALNameLength]; /**< name of source, eg catalog number */
SkyPosition equatorialCoords; /**< equatorial coordinates of source, in decimal RADIANS */ SkyPosition equatorialCoords; /**< equatorial coordinates of source, in decimal RADIANS */
REAL8 orientation; /**< Orientation angle (\f$\psi\f$) of source: REAL8 orientation; /**< Orientation angle (\f$\psi\f$) of source:
* counter-clockwise angle \f$x\f$-axi s makes with a line perpendicular to * counter-clockwise angle \f$x\f$-axi s makes with a line perpendicular to
* meridian of source in Westward dire ction (i.e. North of West), * meridian of source in Westward dire ction (i.e. North of West),
* in decimal radians. * in decimal radians.
*/ */
} }
LALSource; LALSource;
/** This structure aggregates a pointer to a \c LALDetector and a /**
* This structure aggregates a pointer to a \c LALDetector and a
* \c LALSource. Its sole function is to allow the user to pass * \c LALSource. Its sole function is to allow the user to pass
* detector and source parameters to the functions * detector and source parameters to the functions
* LALComputeDetAMResponse() and * LALComputeDetAMResponse() and
* LALComputeDetAMResponseSeries(). * LALComputeDetAMResponseSeries().
*/ */
typedef struct typedef struct
tagLALDetAndSource tagLALDetAndSource
{ {
LALDetector *pDetector; /**< Pointer to ::LALDetector object contain ing information about the detector */ const LALDetector *pDetector;/**< Pointer to ::LALDetector object contai ning information about the detector */
LALSource *pSource; /**< Pointer to ::LALSource object containin g information about the source */ LALSource *pSource; /**< Pointer to ::LALSource object containin g information about the source */
} }
LALDetAndSource; LALDetAndSource;
/** This structure encapsulates the detector AM (beam pattern) coefficients /**
for * This structure encapsulates the detector AM (beam pattern) coefficients
for
* one source at one instance in time. * one source at one instance in time.
*/ */
typedef struct typedef struct
tagLALDetAMResponse tagLALDetAMResponse
{ {
REAL4 plus; /**< Detector response to \f$+\f$-polarized gravitational ra diation */ REAL4 plus; /**< Detector response to \f$+\f$-polarized gravitational ra diation */
REAL4 cross; /**< Detector response to \f$\times\f$-polarized gravitation al radiation */ REAL4 cross; /**< Detector response to \f$\times\f$-polarized gravitation al radiation */
REAL4 scalar; /**< Detector response to scalar gravitational radia tion (NB: ignored at present -- scalar response computation not yet impleme nted) */ REAL4 scalar; /**< Detector response to scalar gravitational radia tion (NB: ignored at present -- scalar response computation not yet impleme nted) */
} }
LALDetAMResponse; LALDetAMResponse;
/** This structure aggregates together three ::REAL4TimeSeries objects cont /**
aining * This structure aggregates together three ::REAL4TimeSeries objects conta
ining
* time series of detector AM response. * time series of detector AM response.
*/ */
typedef struct typedef struct
tagLALDetAMResponseSeries tagLALDetAMResponseSeries
{ {
REAL4TimeSeries *pPlus; /**< timeseries of detector response to \f$+ \f$-polarized gravitational radiation */ REAL4TimeSeries *pPlus; /**< timeseries of detector response to \f$+ \f$-polarized gravitational radiation */
REAL4TimeSeries *pCross; /**< timeseries of detector response to \f$\ times\f$-polarized gravitational radiation */ REAL4TimeSeries *pCross; /**< timeseries of detector response to \f$\ times\f$-polarized gravitational radiation */
REAL4TimeSeries *pScalar; /**< timeseries of detector response to scal ar gravitational radiation (NB: not yet implemented.) */ REAL4TimeSeries *pScalar; /**< timeseries of detector response to scal ar gravitational radiation (NB: not yet implemented.) */
} }
LALDetAMResponseSeries; LALDetAMResponseSeries;
/** This structure encapsulates time and sampling information for computing /**
a * This structure encapsulates time and sampling information for computing
a
* ::LALDetAMResponseSeries. Its fields correspond to some fields of the * ::LALDetAMResponseSeries. Its fields correspond to some fields of the
* TimeSeries structures for easy conversion. * TimeSeries structures for easy conversion.
*/ */
typedef struct typedef struct
tagLALTimeIntervalAndNSample tagLALTimeIntervalAndNSample
{ {
LIGOTimeGPS epoch; /**< The start time \f$t_0\f$ of the time se ries */ LIGOTimeGPS epoch; /**< The start time \f$t_0\f$ of the time se ries */
REAL8 deltaT; /**< The sampling interval \f$\Delta t\f$, i n seconds */ REAL8 deltaT; /**< The sampling interval \f$\Delta t\f$, i n seconds */
UINT4 nSample; /**< The total number of samples to be compu ted */ UINT4 nSample; /**< The total number of samples to be compu ted */
} }
skipping to change at line 176 skipping to change at line 182
void void
LALComputeDetAMResponse( LALStatus *status, LALComputeDetAMResponse( LALStatus *status,
LALDetAMResponse *pResponse, LALDetAMResponse *pResponse,
const LALDetAndSource *pDetAndSrc, const LALDetAndSource *pDetAndSrc,
const LIGOTimeGPS *gps); const LIGOTimeGPS *gps);
void XLALComputeDetAMResponse( void XLALComputeDetAMResponse(
double *fplus, double *fplus,
double *fcross, double *fcross,
REAL4 D[3][3], const REAL4 D[3][3],
const double ra, const double ra,
const double dec, const double dec,
const double psi, const double psi,
const double gmst const double gmst
); );
void XLALComputeDetAMResponseExtraModes( void XLALComputeDetAMResponseExtraModes(
double *fplus, double *fplus,
double *fcross, double *fcross,
double *fb, double *fb,
double *fl, double *fl,
double *fx, double *fx,
double *fy, double *fy,
REAL4 D[3][3], const REAL4 D[3][3],
const double ra, const double ra,
const double dec, const double dec,
const double psi, const double psi,
const double gmst const double gmst
); );
/* /*
* Gives a time series of the detector's response to plus and cross * Gives a time series of the detector's response to plus and cross
* polarization * polarization
*/ */
void void
LALComputeDetAMResponseSeries( LALStatus *status, LALComputeDetAMResponseSeries( LALStatus *status,
LALDetAMResponseSeries *pResponseSer ies, LALDetAMResponseSeries *pResponseSer ies,
const LALDetAndSource *pDetAndSourc e, const LALDetAndSource *pDetAndSourc e,
const LALTimeIntervalAndNSample *pTimeInfo); const LALTimeIntervalAndNSample *pTimeInfo);
int XLALComputeDetAMResponseSeries( int XLALComputeDetAMResponseSeries(
REAL4TimeSeries **fplus, REAL4TimeSeries **fplus,
REAL4TimeSeries **fcross, REAL4TimeSeries **fcross,
REAL4 D[3][3], const REAL4 D[3][3],
const double ra, const double ra,
const double dec, const double dec,
const double psi, const double psi,
const LIGOTimeGPS *start, const LIGOTimeGPS *start,
const double deltaT, const double deltaT,
const int n const int n
); );
int XLALComputeDetAMResponseExtraModesSeries( int XLALComputeDetAMResponseExtraModesSeries(
REAL4TimeSeries **fplus, REAL4TimeSeries **fplus,
REAL4TimeSeries **fcross, REAL4TimeSeries **fcross,
REAL4TimeSeries **fb, REAL4TimeSeries **fb,
REAL4TimeSeries **fl, REAL4TimeSeries **fl,
REAL4TimeSeries **fx, REAL4TimeSeries **fx,
REAL4TimeSeries **fy, REAL4TimeSeries **fy,
REAL4 D[3][3], const REAL4 D[3][3],
const double ra, const double ra,
const double dec, const double dec,
const double psi, const double psi,
const LIGOTimeGPS *start, const LIGOTimeGPS *start,
const double deltaT, const double deltaT,
const int n const int n
); );
/*@}*/ /*@}*/
 End of changes. 11 change blocks. 
56 lines changed or deleted 64 lines changed or added


 Dirichlet.h   Dirichlet.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _DIRICHLET_H #ifndef _DIRICHLET_H
#define _DIRICHLET_H #define _DIRICHLET_H
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup Dirichlet_h * \addtogroup Dirichlet_h
\author UTB Relativity Group; contact whelan@phys.utb.edu * \author UTB Relativity Group; contact whelan@phys.utb.edu
*
\brief Provides prototype and error code information for <tt>LALDirichle * \brief Provides prototype and error code information for <tt>LALDirichle
t()</tt>, t()</tt>,
a routine which calculates the values of the Dirichlet kernel * a routine which calculates the values of the Dirichlet kernel
\f${\cal D}_N(x)\f$. * \f${\cal D}_N(x)\f$.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include "Dirichlet.h" * \code
\endcode * #include "Dirichlet.h"
* \endcode
*/ *
*/
/*@{*/ /*@{*/
/**\name Error Codes */ /**\name Error Codes */
/*@{*/ /*@{*/
#define DIRICHLETH_ENULLPIN 1 /**< Null pointer to input p arameters */ #define DIRICHLETH_ENULLPIN 1 /**< Null pointer to input p arameters */
#define DIRICHLETH_ENVALUE 2 /**< Dirichlet parameter N l ess than or equal to zero */ #define DIRICHLETH_ENVALUE 2 /**< Dirichlet parameter N l ess than or equal to zero */
#define DIRICHLETH_ESIZE 3 /**< Length parameter less t han or equal to zero */ #define DIRICHLETH_ESIZE 3 /**< Length parameter less t han or equal to zero */
#define DIRICHLETH_EDELTAX 4 /**< Spacing of x values les s than or equal to zero */ #define DIRICHLETH_EDELTAX 4 /**< Spacing of x values les s than or equal to zero */
#define DIRICHLETH_ENULLPOUT 5 /**< Null pointer to ouput v ector */ #define DIRICHLETH_ENULLPOUT 5 /**< Null pointer to ouput v ector */
#define DIRICHLETH_ESIZEMM 6 /**< Length of data member o f output vector does not equal length specified in input parameters */ #define DIRICHLETH_ESIZEMM 6 /**< Length of data member o f output vector does not equal length specified in input parameters */
 End of changes. 1 change blocks. 
14 lines changed or deleted 15 lines changed or added


 FFTWMutex.h   FFTWMutex.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _FFTWMUTEX_H #ifndef _FFTWMUTEX_H
#define _FFTWMUTEX_H #define _FFTWMUTEX_H
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void XLALFFTWWisdomLock(void);
void XLALFFTWWisdomUnlock(void);
#if defined(LAL_PTHREAD_LOCK) && defined(LAL_FFTW3_ENABLED) #if defined(LAL_PTHREAD_LOCK) && defined(LAL_FFTW3_ENABLED)
# include <pthread.h> # define LAL_FFTW_WISDOM_LOCK XLALFFTWWisdomLock()
extern pthread_mutex_t lalFFTWMutex; # define LAL_FFTW_WISDOM_UNLOCK XLALFFTWWisdomUnlock()
# define LAL_FFTW_PTHREAD_MUTEX_LOCK pthread_mutex_lock( &lalFFTWMutex )
# define LAL_FFTW_PTHREAD_MUTEX_UNLOCK pthread_mutex_unlock( &lalFFTWMutex
)
#else #else
# define LAL_FFTW_PTHREAD_MUTEX_LOCK # define LAL_FFTW_WISDOM_LOCK
# define LAL_FFTW_PTHREAD_MUTEX_UNLOCK # define LAL_FFTW_WISDOM_UNLOCK
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FFTWMUTEX_H */ #endif /* _FFTWMUTEX_H */
 End of changes. 3 change blocks. 
7 lines changed or deleted 7 lines changed or added


 Factorial.h   Factorial.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _FACTORIAL_H #ifndef _FACTORIAL_H
#define _FACTORIAL_H #define _FACTORIAL_H
#include <lal/LALAtomicDatatypes.h> #include <lal/LALAtomicDatatypes.h>
/** /**
* \addtogroup Factorial_h * \addtogroup Factorial_h
* \author Karl Wette * \author Karl Wette
* \brief Static tables of the factorial and double-factorial functions, an d derived quantities. * \brief Static tables of the factorial and double-factorial functions, an d derived quantities.
* *
* \heading{Description} * ### Description ###
* *
* The following tables of the factorial function are provided: * The following tables of the factorial function are provided:
* <ul> * <ul>
* <li>UINT8 LAL_FACT[\f$i\f$] = \f$i!\f$ * <li>UINT8 LAL_FACT[\f$i\f$] = \f$i!\f$
* <li>REAL8 LAL_FACT_INV[\f$i\f$] = \f$1/i!\f$ * <li>REAL8 LAL_FACT_INV[\f$i\f$] = \f$1/i!\f$
* <li>REAL8 LAL_FACT_LOG[\f$i\f$] = \f$\log i!\f$ * <li>REAL8 LAL_FACT_LOG[\f$i\f$] = \f$\log i!\f$
* </ul> * </ul>
* The maximum allowable index \f$i\f$ of these tables is LAL_FACT_MAX. * The maximum allowable index \f$i\f$ of these tables is LAL_FACT_MAX.
* This value is determines by the maximum value of \f$i!\f$ that can be st ored in an UINT8. * This value is determines by the maximum value of \f$i!\f$ that can be st ored in an UINT8.
* *
skipping to change at line 54 skipping to change at line 54
* <li>REAL8 LAL_FACT2_INV[\f$i\f$] = \f$1/i!!\f$ * <li>REAL8 LAL_FACT2_INV[\f$i\f$] = \f$1/i!!\f$
* <li>REAL8 LAL_FACT2_LOG[\f$i\f$] = \f$\log i!!\f$ * <li>REAL8 LAL_FACT2_LOG[\f$i\f$] = \f$\log i!!\f$
* </ul> * </ul>
* The maximum allowable index \f$i\f$ of these tables is LAL_FACT2_MAX. * The maximum allowable index \f$i\f$ of these tables is LAL_FACT2_MAX.
* This value is determines by the maximum value of \f$i!!\f$ that can be s tored in an UINT8. * This value is determines by the maximum value of \f$i!!\f$ that can be s tored in an UINT8.
* *
* All values were computed to 35 significant figures with Mathematica v8.0 .1.0 on 64-bit Linux. * All values were computed to 35 significant figures with Mathematica v8.0 .1.0 on 64-bit Linux.
*/ */
/*@{*/ /*@{*/
#ifndef SWIG // exclude from SWIG wrappings #ifndef SWIG /* exclude from SWIG wrappings */
#define LAL_FACT_MAX 20 #define LAL_FACT_MAX 20
static const UINT8 LAL_FACT[] = { \ static const UINT8 LAL_FACT[] = { \
1, \ 1, \
1, \ 1, \
2, \ 2, \
6, \ 6, \
24, \ 24, \
120, \ 120, \
skipping to change at line 243 skipping to change at line 243
31.5630772004027119079948674075766925, \ 31.5630772004027119079948674075766925, \
32.9944614266036191509564506162729398, \ 32.9944614266036191509564506162729398, \
34.8952817105779158319346843939362254, \ 34.8952817105779158319346843939362254, \
36.3617572565900931781397226486348514, \ 36.3617572565900931781397226486348514, \
38.2964790922400712073479210855431153, \ 38.2964790922400712073479210855431153, \
39.7957444610752394240688869731772086, \ 39.7957444610752394240688869731772086, \
41.7622149950397977544340816928339981, \ 41.7622149950397977544340816928339981, \
43.2922520225417196595260757880648636 \ 43.2922520225417196595260757880648636 \
}; };
#endif // SWIG #endif /* SWIG */
/*@}*/ /*@}*/
#endif /*_FACTORIAL_H*/ #endif /*_FACTORIAL_H*/
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 FileIO.h   FileIO.h 
skipping to change at line 31 skipping to change at line 31
#define _FILEIO_H #define _FILEIO_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <lal/LALStdio.h> #include <lal/LALStdio.h>
/* maximum string size to print with LAL Printf routines */
#define LAL_PRINTF_BUFSIZE 4096
/** /**
\addtogroup FileIO_h * \addtogroup FileIO_h
*
\brief Provides standard LAL support IO functions. * \brief Provides standard LAL support IO functions.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/LALStdio.h> * \code
#include <lal/FileIO.h> * #include <lal/LALStdio.h>
\endcode * #include <lal/FileIO.h>
* \endcode
Only use \ref FileIO.h in test code that links to the \c lalsupport libr *
ary. * Only use \ref FileIO.h in test code that links to the \c lalsupport libr
*/ ary.
*/
/*@{*/ /*@{*/
FILE *LALOpenDataFile( const char* ); FILE *LALOpenDataFile( const char* );
typedef struct tagLALFILE LALFILE; typedef struct tagLALFILE LALFILE;
LALFILE *lalstdin(void); LALFILE *lalstdin(void);
LALFILE *lalstdout(void); LALFILE *lalstdout(void);
LALFILE *lalstderr(void); LALFILE *lalstderr(void);
#define LALSTDIN (lalstdin()) #define LALSTDIN (lalstdin())
 End of changes. 2 change blocks. 
16 lines changed or deleted 14 lines changed or added


 FindRoot.h   FindRoot.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _FINDROOT_H #ifndef _FINDROOT_H
#define _FINDROOT_H #define _FINDROOT_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup FindRoot_h * \addtogroup FindRoot_h
*
\brief Root finding routines. * \brief Root finding routines.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/FindRoot.h> * \code
\endcode * #include <lal/FindRoot.h>
* \endcode
This header covers the routines for root finding. *
* This header covers the routines for root finding.
\heading{Description} *
* ### Description ###
The routine <tt>LALSBracketRoot()</tt> expands the specified domain until a *
root * The routine <tt>LALSBracketRoot()</tt> expands the specified domain unti
is contained. The routine <tt>LALDBracketRoot()</tt> is the same but for a l a root
double-precision function. * is contained. The routine <tt>LALDBracketRoot()</tt> is the same but fo
r a
The routine <tt>LALSBisectionFindRoot()</tt> bisects the domain (which must * double-precision function.
contain one *
root) until the root is found with the desired accuracy. The routine * The routine <tt>LALSBisectionFindRoot()</tt> bisects the domain (which m
<tt>LALDBisectionFindRoot()</tt> is the same but for a double-precision fun ust contain one
ction. * root) until the root is found with the desired accuracy. The routine
* <tt>LALDBisectionFindRoot()</tt> is the same but for a double-precision
\heading{Operating Instructions} function.
*
Suppose we want to find the root of the function \f$y = F(x;y_0) = y_0 + x^ * ### Operating Instructions ###
2\f$. *
Define the function: * Suppose we want to find the root of the function \f$y = F(x;y_0) = y_0 +
\code x^2\f$.
static void F( LALStatus *status, REAL4 *y, REAL4 x, void *y0 ) * Define the function:
{ * \code
INITSTATUS(status); * static void F( LALStatus *status, REAL4 *y, REAL4 x, void *y0 )
ASSERT( y0, status, 1, "Null pointer" ); * {
*y = *(REAL4 *)y0 + x*x; * INITSTATUS(status);
RETURN( status ); * ASSERT( y0, status, 1, "Null pointer" );
} * y = *(REAL4 *)y0 + x*x;
\endcode * RETURN( status );
* }
Then use the following code to bracket and find the root \f$x_0=1\f$ where * \endcode
\f$F(x_0;y_0=-1)=0\f$: *
\code * Then use the following code to bracket and find the root \f$x_0=1\f$ whe
static LALStatus status; re
SFindRootIn input; * \f$F(x_0;y_0=-1)=0\f$:
REAL4 y0; * \code
REAL4 x0; * static LALStatus status;
* SFindRootIn input;
y0 = -1; * REAL4 y0;
input.function = F; * REAL4 x0;
input.xmin = 0.1; *
input.xmax = 0.2; * y0 = -1;
input.xacc = 1e-5; * input.function = F;
* input.xmin = 0.1;
/\* expand domain until a root is bracketed *\/ * input.xmax = 0.2;
LALSBracketRoot( &status, &input, &y0 ); * input.xacc = 1e-5;
*
/\* bisect domain until root is found *\/ * /\* expand domain until a root is bracketed *\/
LALSBisectionFindRoot( &status, &x0, &input, &y0 ); * LALSBracketRoot( &status, &input, &y0 );
\endcode *
* /\* bisect domain until root is found *\/
\heading{Algorithm} * LALSBisectionFindRoot( &status, &x0, &input, &y0 );
* \endcode
This is an implementation of the root bracketing and bisection finding *
routines \c zbrac and \c rtbis in Numerical Recipes [\ref ptvf1992]. * ### Algorithm ###
*
*/ * This is an implementation of the root bracketing and bisection finding
* routines \c zbrac and \c rtbis in Numerical Recipes \cite ptvf1992.
*
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define FINDROOTH_ENULL 1 /**< Null pointer */ #define FINDROOTH_ENULL 1 /**< Null pointer */
#define FINDROOTH_EIDOM 2 /**< Invalid initial domain */ #define FINDROOTH_EIDOM 2 /**< Invalid initial domain */
#define FINDROOTH_EMXIT 4 /**< Maximum iterations exceeded */ #define FINDROOTH_EMXIT 4 /**< Maximum iterations exceeded */
#define FINDROOTH_EBRKT 8 /**< Root not bracketed */ #define FINDROOTH_EBRKT 8 /**< Root not bracketed */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define FINDROOTH_MSGENULL "Null pointer" #define FINDROOTH_MSGENULL "Null pointer"
#define FINDROOTH_MSGEIDOM "Invalid initial domain" #define FINDROOTH_MSGEIDOM "Invalid initial domain"
#define FINDROOTH_MSGEMXIT "Maximum iterations exceeded" #define FINDROOTH_MSGEMXIT "Maximum iterations exceeded"
#define FINDROOTH_MSGEBRKT "Root not bracketed" #define FINDROOTH_MSGEBRKT "Root not bracketed"
/** \endcond */ /** \endcond */
/** These are function pointers to functions that map REAL4 numbers to REAL /**
4 numbers. * These are function pointers to functions that map REAL4 numbers to REAL4
numbers.
*/ */
typedef struct typedef struct
tagSFindRootIn tagSFindRootIn
{ {
void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); /**< The fun ction to find the root of */ void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); /**< The fun ction to find the root of */
REAL4 xmax; /**< The maximum value of the domain interval to look for th e root */ REAL4 xmax; /**< The maximum value of the domain interval to look for th e root */
REAL4 xmin; /**< The minimum value of the domain interval to look for th e root */ REAL4 xmin; /**< The minimum value of the domain interval to look for th e root */
REAL4 xacc; /**< The accuracy desired for the root */ REAL4 xacc; /**< The accuracy desired for the root */
} }
SFindRootIn; SFindRootIn;
/** These are function pointers to functions that map REAL8 numbers to REAL /**
8 numbers. * These are function pointers to functions that map REAL8 numbers to REAL8
numbers.
*/ */
typedef struct typedef struct
tagDFindRootIn tagDFindRootIn
{ {
void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); /**< The fun ction to find the root of */ void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); /**< The fun ction to find the root of */
REAL8 xmax; /**< The maximum value of the domain interval to look for th e root */ REAL8 xmax; /**< The maximum value of the domain interval to look for th e root */
REAL8 xmin; /**< The minimum value of the domain interval to look for th e root */ REAL8 xmin; /**< The minimum value of the domain interval to look for th e root */
REAL8 xacc; /**< The accuracy desired for the root */ REAL8 xacc; /**< The accuracy desired for the root */
} }
DFindRootIn; DFindRootIn;
 End of changes. 3 change blocks. 
70 lines changed or deleted 75 lines changed or added


 FlatLatticeTiling.h   FlatLatticeTiling.h 
// /*
// Copyright (C) 2007, 2008, 2012 Karl Wette * Copyright (C) 2007, 2008, 2012 Karl Wette
// *
// This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version. * (at your option) any later version.
// *
// This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. * GNU General Public License for more details.
// *
// You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
// along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
// Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
// MA 02111-1307 USA * MA 02111-1307 USA
// */
#ifndef _FLATLATTICETILING_H #ifndef _FLATLATTICETILING_H
#define _FLATLATTICETILING_H #define _FLATLATTICETILING_H
#include <stdbool.h> #include <stdbool.h>
#include <gsl/gsl_vector.h> #include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h> #include <gsl/gsl_matrix.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/Random.h> #include <lal/Random.h>
#include <lal/GSLSupport.h> #include <lal/GSLSupport.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/// /**
/// \addtogroup FlatLatticeTiling_h * \addtogroup FlatLatticeTiling_h
/// \author Karl Wette * \author Karl Wette
/// \brief Lattice-based template generation for flat metric parameter spac * \brief Lattice-based template generation for flat metric parameter spac
es es
/// *
/// @{ * @{
*/
///
/// Flat lattice tiling bound function /** Flat lattice tiling bound function */
///
typedef void (*FlatLatticeBound)( typedef void (*FlatLatticeBound)(
const size_t dimension, ///< [in] Dimension on which bound applies const size_t dimension, /**< [in] Dimension on which bound applies *
const gsl_vector_uint* bound, ///< [in] Indices of current bounds /
const gsl_vector* point, ///< [in] Point on which to find bounds const gsl_vector_uint* bound, /**< [in] Indices of current bounds
const void* data, ///< [in] Arbitrary data describing paramete */
r space const gsl_vector* point, /**< [in] Point on which to find bounds */
const gsl_vector* incr, ///< [in] Increments of the lattice tiling g const void* data, /**< [in] Arbitrary data describing paramete
enerator r space */
const gsl_vector* bbox, ///< [in] Metric ellipse bounding box extent const gsl_vector* incr, /**< [in] Increments of the lattice tiling g
s enerator */
gsl_vector* lower, ///< [out] Lower bounds on point in dimensio const gsl_vector* bbox, /**< [in] Metric ellipse bounding box extent
n s */
gsl_vector* upper, ///< [out] Upper bounds on point in dimensio gsl_vector* lower, /**< [out] Lower bounds on point in dimensio
n n */
double* lower_pad, ///< [out] Padding of lower parameter space gsl_vector* upper, /**< [out] Upper bounds on point in dimensio
bounds n */
double* upper_pad ///< [out] Padding of upper parameter space double* lower_pad, /**< [out] Padding of lower parameter space
bounds bounds */
double* upper_pad /**< [out] Padding of upper parameter space
bounds */
); );
/// /** Flat tiling lattice generator function */
/// Flat tiling lattice generator function
///
typedef int (*FlatLatticeGenerator)( typedef int (*FlatLatticeGenerator)(
const size_t dimensions, ///< [in] Number of dimensions const size_t dimensions, /**< [in] Number of dimensions */
gsl_matrix** generator, ///< [out] Generator matrix gsl_matrix** generator, /**< [out] Generator matrix */
double* norm_thickness ///< [out] Normalised thickness double* norm_thickness /**< [out] Normalised thickness */
); );
/// /** Flat lattice tiling state structure */
/// Flat lattice tiling state structure
///
typedef struct tagFlatLatticeTiling FlatLatticeTiling; typedef struct tagFlatLatticeTiling FlatLatticeTiling;
/// /** Create a new flat lattice tiling state structure */
/// Create a new flat lattice tiling state structure
///
FlatLatticeTiling* XLALCreateFlatLatticeTiling( FlatLatticeTiling* XLALCreateFlatLatticeTiling(
const size_t dimensions ///< [in] Number of parameter space dimensio ns const size_t dimensions /**< [in] Number of parameter space dimensio ns */
); );
/// /** Destroy a flat lattice tiling state structure */
/// Destroy a flat lattice tiling state structure
///
void XLALDestroyFlatLatticeTiling( void XLALDestroyFlatLatticeTiling(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Return the number of dimensions being tiled */
/// Return the number of dimensions being tiled
///
size_t XLALGetFlatLatticeDimensions( size_t XLALGetFlatLatticeDimensions(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(GET_OBJECT(XLALGetFlatLatticePoint)); SWIGLAL(RETURNS_PROPERTY(XLALGetFlatLatticePoint));
#endif #endif
/// /** Return the current lattice tiling parameter space point */
/// Return the current lattice tiling parameter space point
///
const gsl_vector* XLALGetFlatLatticePoint( const gsl_vector* XLALGetFlatLatticePoint(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Return the current number of flat lattice tiling parameter space points
/// Return the current number of flat lattice tiling parameter space points */
///
unsigned long XLALGetFlatLatticePointCount( unsigned long XLALGetFlatLatticePointCount(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Return the increment vectors which are used to generate the lattice. */
/// Return the increment vectors which are used to generate the lattice.
///
gsl_matrix* XLALGetFlatLatticeIncrements( gsl_matrix* XLALGetFlatLatticeIncrements(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Set a parameter space bound on the flat lattice tiling */
/// Set a parameter space bound on the flat lattice tiling
///
int XLALSetFlatLatticeBound( int XLALSetFlatLatticeBound(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
const size_t dimension, ///< [in] Dimension on which bound a const size_t dimension, /**< [in] Dimension on which bound a
pplies pplies */
const bool singular, ///< [in] Is bound composed of singl const bool singular, /**< [in] Is bound composed of singl
e points? e points? */
const FlatLatticeBound func, ///< [in] Parameter space bound func const FlatLatticeBound func, /**< [in] Parameter space bound func
tion tion */
void* data ///< [in] Arbitrary data describing void* data /**< [in] Arbitrary data describing
parameter space parameter space */
); );
/// /** Set the flat tiling lattice generator */
/// Set the flat tiling lattice generator
///
int XLALSetFlatLatticeGenerator( int XLALSetFlatLatticeGenerator(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
const FlatLatticeGenerator generator ///< [in] Lattice generator function const FlatLatticeGenerator generator /**< [in] Lattice generator function
*/
); );
/// /** Set the flat lattice tiling metric and maximum mismatch */
/// Set the flat lattice tiling metric and maximum mismatch
///
int XLALSetFlatLatticeMetric( int XLALSetFlatLatticeMetric(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
const gsl_matrix* metric, ///< [in] Parameter space metric const gsl_matrix* metric, /**< [in] Parameter space metric */
const double max_mismatch ///< [in] Maximum prescribed mismatc const double max_mismatch /**< [in] Maximum prescribed mismatc
h h */
); );
/// /** Move to the next point in the flat lattice tiling parameter space. */
/// Move to the next point in the flat lattice tiling parameter space. /** Returns the index of the lowest dimension where the point has changed,
/// Returns the index of the lowest dimension where the point has changed, */
/// or a negative number when the template bank is exhausted. /** or a negative number when the template bank is exhausted. */
///
int XLALNextFlatLatticePoint( int XLALNextFlatLatticePoint(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Return to the beginning of a flat lattice tiling */
/// Return to the beginning of a flat lattice tiling
///
int XLALRestartFlatLatticeTiling( int XLALRestartFlatLatticeTiling(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
/// /** Calculate the total number of flat lattice tiling parameter space point
/// Calculate the total number of flat lattice tiling parameter space point s */
s
///
unsigned long XLALCountTotalFlatLatticePoints( unsigned long XLALCountTotalFlatLatticePoints(
FlatLatticeTiling* tiling ///< [in] Tiling state FlatLatticeTiling* tiling /**< [in] Tiling state */
); );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(INOUT_STRUCTS(gsl_matrix**, random_points, workspace)); SWIGLAL(INOUT_STRUCTS(gsl_matrix**, random_points, workspace));
SWIGLAL(INOUT_STRUCTS(gsl_vector**, nearest_distances)); SWIGLAL(INOUT_STRUCTS(gsl_vector**, nearest_distances));
SWIGLAL(INOUT_STRUCTS(gsl_vector_ulong**, nearest_indices)); SWIGLAL(INOUT_STRUCTS(gsl_vector_ulong**, nearest_indices));
#endif #endif
/// /** Generate random points within the flat lattice tiling parameter space,
/// Generate random points within the flat lattice tiling parameter space, */
/// then calculate the nearest flat lattice point to each random point /** then calculate the nearest flat lattice point to each random point */
///
int XLALNearestFlatLatticePointToRandomPoints( int XLALNearestFlatLatticePointToRandomPoints(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
RandomParams* rng, ///< [in] Random number generator RandomParams* rng, /**< [in] Random number generator */
const size_t num_random_points, ///< [in] Number of random points to const size_t num_random_points, /**< [in] Number of random points to
generate generate */
gsl_matrix** random_points, ///< [in/out] Pointer to matrix of r gsl_matrix** random_points, /**< [in/out] Pointer to matrix of r
andom points andom points */
gsl_vector_ulong** nearest_indices, ///< [in/out] Pointer to vector of i gsl_vector_ulong** nearest_indices, /**< [in/out] Pointer to vector of i
ndices of nearest lattice point ndices of nearest lattice point */
gsl_vector** nearest_distances, ///< [in/out] Pointer to vector of d gsl_vector** nearest_distances, /**< [in/out] Pointer to vector of d
istances to nearest lattice point istances to nearest lattice point */
gsl_matrix** workspace ///< [in/out] Pointer to workspace m gsl_matrix** workspace /**< [in/out] Pointer to workspace m
atrix for computing distances atrix for computing distances */
); );
/// /** Find the bounding box of the mismatch ellipses of a metric */
/// Find the bounding box of the mismatch ellipses of a metric
///
gsl_vector* XLALMetricEllipseBoundingBox( gsl_vector* XLALMetricEllipseBoundingBox(
const gsl_matrix* metric, ///< [in] Metric to bound const gsl_matrix* metric, /**< [in] Metric to bound */
const double max_mismatch ///< [in] Maximum mismatch with respect to m const double max_mismatch /**< [in] Maximum mismatch with respect to m
etric etric */
); );
/// /** Find the lattice increment vectors for a given metric and mismatch */
/// Find the lattice increment vectors for a given metric and mismatch
///
gsl_matrix* XLALMetricLatticeIncrements( gsl_matrix* XLALMetricLatticeIncrements(
const FlatLatticeGenerator generator, ///< [in] Lattice generator const FlatLatticeGenerator generator, /**< [in] Lattice generator
function function */
const gsl_matrix* metric, ///< [in] Parameter space metric const gsl_matrix* metric, /**< [in] Parameter space metric */
const double max_mismatch ///< [in] Maximum prescribed mismatc const double max_mismatch /**< [in] Maximum prescribed mismatc
h h */
); );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(FUNCTION_POINTER(XLALCubicLatticeGenerator)); SWIGLAL(FUNCTION_POINTER(XLALCubicLatticeGenerator));
#endif #endif
/// /** Calculate the generator matrix for a cubic (\f$Z_n\f$) lattice */
/// Calculate the generator matrix for a cubic (\f$Z_n\f$) lattice
///
int XLALCubicLatticeGenerator( int XLALCubicLatticeGenerator(
const size_t dimensions, ///< [in] Number of dimensions const size_t dimensions, /**< [in] Number of dimensions */
gsl_matrix** generator, ///< [out] Generator matrix gsl_matrix** generator, /**< [out] Generator matrix */
double* norm_thickness ///< [out] Normalised thickness double* norm_thickness /**< [out] Normalised thickness */
); );
#ifdef SWIG // SWIG interface directives #ifdef SWIG /* SWIG interface directives */
SWIGLAL(FUNCTION_POINTER(XLALAnstarLatticeGenerator)); SWIGLAL(FUNCTION_POINTER(XLALAnstarLatticeGenerator));
#endif #endif
/// /** Calculate the generator matrix for a \f$A_n^*\f$ lattice */
/// Calculate the generator matrix for a \f$A_n^*\f$ lattice
///
int XLALAnstarLatticeGenerator( int XLALAnstarLatticeGenerator(
const size_t dimensions, ///< [in] Number of dimensions const size_t dimensions, /**< [in] Number of dimensions */
gsl_matrix** generator, ///< [out] Generator matrix gsl_matrix** generator, /**< [out] Generator matrix */
double* norm_thickness ///< [out] Normalised thickness double* norm_thickness /**< [out] Normalised thickness */
); );
/// /** Set a constant parameter space bound, given by the minimum and */
/// Set a constant parameter space bound, given by the minimum and /** maximum of the two supplied bounds, on the flat lattice tiling */
/// maximum of the two supplied bounds, on the flat lattice tiling
///
int XLALSetFlatLatticeConstantBound( int XLALSetFlatLatticeConstantBound(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
const size_t dimension, ///< [in] Dimension on which bound applies const size_t dimension, /**< [in] Dimension on which bound applies *
const double bound1, ///< [in] First bound on dimension /
const double bound2 ///< [in] Second bound on dimension const double bound1, /**< [in] First bound on dimension */
const double bound2 /**< [in] Second bound on dimension */
); );
/// /** Set elliptical bounds in two dimensions on the flat lattice tiling */
/// Set elliptical bounds in two dimensions on the flat lattice tiling
///
int XLALSetFlatLatticeEllipticalBounds( int XLALSetFlatLatticeEllipticalBounds(
FlatLatticeTiling* tiling, ///< [in] Tiling state FlatLatticeTiling* tiling, /**< [in] Tiling state */
const size_t dimension, ///< [in] Dimension of X bound (Y bound is o const size_t dimension, /**< [in] Dimension of X bound (Y bound is o
ne higher) ne higher) */
const double x_centre, ///< [in] X centre of ellipse const double x_centre, /**< [in] X centre of ellipse */
const double y_centre, ///< [in] Y centre of ellipse const double y_centre, /**< [in] Y centre of ellipse */
const double x_semi, ///< [in] Length of X semi-diameter const double x_semi, /**< [in] Length of X semi-diameter */
const double y_semi ///< [in] Length of Y semi-diameter const double y_semi /**< [in] Length of Y semi-diameter */
); );
/// @} /** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 49 change blocks. 
184 lines changed or deleted 148 lines changed or added


 FrequencySeries.h   FrequencySeries.h 
skipping to change at line 33 skipping to change at line 33
#include <stddef.h> #include <stddef.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup FrequencySeriesManipulation * \addtogroup FrequencySeriesManipulation
\author Kipp Cannon <kipp@gravity.phys.uwm.edu> * \author Kipp Cannon <kipp@gravity.phys.uwm.edu>
*
\brief This is a suite of functions for creating, destroying, and manipulat * \brief This is a suite of functions for creating, destroying, and manipu
ing LAL lating LAL
frequency series. One pair of functions (the XLAL version and its LAL * frequency series. One pair of functions (the XLAL version and its LAL
counterpart) is available for each method and frequency series type. For * counterpart) is available for each method and frequency series type. Fo
example XLALCreateREAL4FrequencySeries() is available for creating r
frequency series of \c REAL4 data, and the LAL-stype wrapper * example XLALCreateREAL4FrequencySeries() is available for creating
LALCreateREAL4FrequencySeries() is provided which is equivalent to * frequency series of \c REAL4 data, and the LAL-stype wrapper
the XLAL version in all respects except that it adheres to the LAL calling * LALCreateREAL4FrequencySeries() is provided which is equivalent to
conventions (eg.\ it takes a \c LALStatus pointer as its first * the XLAL version in all respects except that it adheres to the LAL calli
argument, its return type is \c void, etc.). ng
* conventions (eg.\ it takes a \c LALStatus pointer as its first
*/ * argument, its return type is \c void, etc.).
*
*/
/*@{*/ /*@{*/
/** \name Creation Functions /**
* \name Creation Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALCreate<frequencyseriestype>() *
LALCreate<frequencyseriestype>() * XLALCreate<frequencyseriestype>()
\endcode * LALCreate<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions create LAL frequency series. An XLAL function returns a *
pointer to the newly created series or \c NULL on failure. The LAL * These functions create LAL frequency series. An XLAL function returns a
counterpart accepts the address of a pointer which it fills with the * pointer to the newly created series or \c NULL on failure. The LAL
address of the newly created series or \c NULL on failure. * counterpart accepts the address of a pointer which it fills with the
Additionally, the LAL wrapper provides standard LAL-style error checking * address of the newly created series or \c NULL on failure.
via a \c LALStatus pointer. * Additionally, the LAL wrapper provides standard LAL-style error checking
* via a \c LALStatus pointer.
*/ *
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALCreateCOMPLEX8FrequencySeries ( const CHAR *na me, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sample Units, size_t length ); COMPLEX8FrequencySeries *XLALCreateCOMPLEX8FrequencySeries ( const CHAR *na me, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sample Units, size_t length );
COMPLEX16FrequencySeries *XLALCreateCOMPLEX16FrequencySeries ( const CHAR * name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *samp leUnits, size_t length ); COMPLEX16FrequencySeries *XLALCreateCOMPLEX16FrequencySeries ( const CHAR * name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *samp leUnits, size_t length );
REAL4FrequencySeries *XLALCreateREAL4FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length ); REAL4FrequencySeries *XLALCreateREAL4FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length );
REAL8FrequencySeries *XLALCreateREAL8FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length ); REAL8FrequencySeries *XLALCreateREAL8FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length );
INT2FrequencySeries *XLALCreateINT2FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length ); INT2FrequencySeries *XLALCreateINT2FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length );
INT4FrequencySeries *XLALCreateINT4FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length ); INT4FrequencySeries *XLALCreateINT4FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length );
INT8FrequencySeries *XLALCreateINT8FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length ); INT8FrequencySeries *XLALCreateINT8FrequencySeries ( const CHAR *name, cons t LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, s ize_t length );
UINT2FrequencySeries *XLALCreateUINT2FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length ); UINT2FrequencySeries *XLALCreateUINT2FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length );
UINT4FrequencySeries *XLALCreateUINT4FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length ); UINT4FrequencySeries *XLALCreateUINT4FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length );
UINT8FrequencySeries *XLALCreateUINT8FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length ); UINT8FrequencySeries *XLALCreateUINT8FrequencySeries ( const CHAR *name, co nst LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length );
/*@}*/ /*@}*/
/** \name Destruction Functions /**
* \name Destruction Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALDestroy<frequencyseriestype>() *
LALDestroy<frequencyseriestype>() * XLALDestroy<frequencyseriestype>()
\endcode * LALDestroy<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions free all memory associated with a LAL frequency series. It *
is safe to pass \c NULL to these functions. * These functions free all memory associated with a LAL frequency series.
It
*/ * is safe to pass \c NULL to these functions.
*
*/
/*@{*/ /*@{*/
void XLALDestroyCOMPLEX8FrequencySeries ( COMPLEX8FrequencySeries *series ) ; void XLALDestroyCOMPLEX8FrequencySeries ( COMPLEX8FrequencySeries *series ) ;
void XLALDestroyCOMPLEX16FrequencySeries ( COMPLEX16FrequencySeries *series ); void XLALDestroyCOMPLEX16FrequencySeries ( COMPLEX16FrequencySeries *series );
void XLALDestroyREAL4FrequencySeries ( REAL4FrequencySeries *series ); void XLALDestroyREAL4FrequencySeries ( REAL4FrequencySeries *series );
void XLALDestroyREAL8FrequencySeries ( REAL8FrequencySeries *series ); void XLALDestroyREAL8FrequencySeries ( REAL8FrequencySeries *series );
void XLALDestroyINT2FrequencySeries ( INT2FrequencySeries *series ); void XLALDestroyINT2FrequencySeries ( INT2FrequencySeries *series );
void XLALDestroyINT4FrequencySeries ( INT4FrequencySeries *series ); void XLALDestroyINT4FrequencySeries ( INT4FrequencySeries *series );
void XLALDestroyINT8FrequencySeries ( INT8FrequencySeries *series ); void XLALDestroyINT8FrequencySeries ( INT8FrequencySeries *series );
void XLALDestroyUINT2FrequencySeries ( UINT2FrequencySeries *series ); void XLALDestroyUINT2FrequencySeries ( UINT2FrequencySeries *series );
void XLALDestroyUINT4FrequencySeries ( UINT4FrequencySeries *series ); void XLALDestroyUINT4FrequencySeries ( UINT4FrequencySeries *series );
void XLALDestroyUINT8FrequencySeries ( UINT8FrequencySeries *series ); void XLALDestroyUINT8FrequencySeries ( UINT8FrequencySeries *series );
/*@}*/ /*@}*/
/** \name Cutting Functions /**
* \name Cutting Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALCut<frequencyseriestype>() *
\endcode * XLALCut<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions create a new frequency series by extracting a section of an *
existing frequency series. * These functions create a new frequency series by extracting a section of
an
*/ * existing frequency series.
*
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALCutCOMPLEX8FrequencySeries ( const COMPLEX8Fre quencySeries *series, size_t first, size_t length ); COMPLEX8FrequencySeries *XLALCutCOMPLEX8FrequencySeries ( const COMPLEX8Fre quencySeries *series, size_t first, size_t length );
COMPLEX16FrequencySeries *XLALCutCOMPLEX16FrequencySeries ( const COMPLEX16 FrequencySeries *series, size_t first, size_t length ); COMPLEX16FrequencySeries *XLALCutCOMPLEX16FrequencySeries ( const COMPLEX16 FrequencySeries *series, size_t first, size_t length );
REAL4FrequencySeries *XLALCutREAL4FrequencySeries ( const REAL4FrequencySer ies *series, size_t first, size_t length ); REAL4FrequencySeries *XLALCutREAL4FrequencySeries ( const REAL4FrequencySer ies *series, size_t first, size_t length );
REAL8FrequencySeries *XLALCutREAL8FrequencySeries ( const REAL8FrequencySer ies *series, size_t first, size_t length ); REAL8FrequencySeries *XLALCutREAL8FrequencySeries ( const REAL8FrequencySer ies *series, size_t first, size_t length );
INT2FrequencySeries *XLALCutINT2FrequencySeries ( const INT2FrequencySeries *series, size_t first, size_t length ); INT2FrequencySeries *XLALCutINT2FrequencySeries ( const INT2FrequencySeries *series, size_t first, size_t length );
INT4FrequencySeries *XLALCutINT4FrequencySeries ( const INT4FrequencySeries *series, size_t first, size_t length ); INT4FrequencySeries *XLALCutINT4FrequencySeries ( const INT4FrequencySeries *series, size_t first, size_t length );
INT8FrequencySeries *XLALCutINT8FrequencySeries ( const INT8FrequencySeries *series, size_t first, size_t length ); INT8FrequencySeries *XLALCutINT8FrequencySeries ( const INT8FrequencySeries *series, size_t first, size_t length );
UINT2FrequencySeries *XLALCutUINT2FrequencySeries ( const UINT2FrequencySer ies *series, size_t first, size_t length ); UINT2FrequencySeries *XLALCutUINT2FrequencySeries ( const UINT2FrequencySer ies *series, size_t first, size_t length );
UINT4FrequencySeries *XLALCutUINT4FrequencySeries ( const UINT4FrequencySer ies *series, size_t first, size_t length ); UINT4FrequencySeries *XLALCutUINT4FrequencySeries ( const UINT4FrequencySer ies *series, size_t first, size_t length );
UINT8FrequencySeries *XLALCutUINT8FrequencySeries ( const UINT8FrequencySer ies *series, size_t first, size_t length ); UINT8FrequencySeries *XLALCutUINT8FrequencySeries ( const UINT8FrequencySer ies *series, size_t first, size_t length );
/*@}*/ /*@}*/
/** \name Resizing Functions /**
* \name Resizing Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALResize<frequencyseriestype>() *
XLALShrink<frequencyseriestype>() * XLALResize<frequencyseriestype>()
LALShrink<frequencyseriestype>() * XLALShrink<frequencyseriestype>()
\endcode * LALShrink<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions resize an existing frequency series. The new frequency *
series will have the given length, and its contents will consist of that * These functions resize an existing frequency series. The new frequency
part of the original time series that started at sample \c first. If * series will have the given length, and its contents will consist of that
\c first is negative, then the new time series is padded at the start * part of the original time series that started at sample \c first. If
by that many samples. The frequency series' heterodyne frequency, * \c first is negative, then the new time series is padded at the start
(f_{0}), is adjusted appropriately. * by that many samples. The frequency series' heterodyne frequency,
* (f_{0}), is adjusted appropriately.
The "Shrink" functions accept non-negative values for the parameter *
\c first, and are retained only for historical purposes. New code * The "Shrink" functions accept non-negative values for the parameter
should use the "Resize" variants. * \c first, and are retained only for historical purposes. New code
* should use the "Resize" variants.
*/ *
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALResizeCOMPLEX8FrequencySeries ( COMPLEX8Freque ncySeries *series, int first, size_t length ); COMPLEX8FrequencySeries *XLALResizeCOMPLEX8FrequencySeries ( COMPLEX8Freque ncySeries *series, int first, size_t length );
COMPLEX16FrequencySeries *XLALResizeCOMPLEX16FrequencySeries ( COMPLEX16Fre quencySeries *series, int first, size_t length ); COMPLEX16FrequencySeries *XLALResizeCOMPLEX16FrequencySeries ( COMPLEX16Fre quencySeries *series, int first, size_t length );
REAL4FrequencySeries *XLALResizeREAL4FrequencySeries ( REAL4FrequencySeries *series, int first, size_t length ); REAL4FrequencySeries *XLALResizeREAL4FrequencySeries ( REAL4FrequencySeries *series, int first, size_t length );
REAL8FrequencySeries *XLALResizeREAL8FrequencySeries ( REAL8FrequencySeries *series, int first, size_t length ); REAL8FrequencySeries *XLALResizeREAL8FrequencySeries ( REAL8FrequencySeries *series, int first, size_t length );
INT2FrequencySeries *XLALResizeINT2FrequencySeries ( INT2FrequencySeries *s eries, int first, size_t length ); INT2FrequencySeries *XLALResizeINT2FrequencySeries ( INT2FrequencySeries *s eries, int first, size_t length );
INT4FrequencySeries *XLALResizeINT4FrequencySeries ( INT4FrequencySeries *s eries, int first, size_t length ); INT4FrequencySeries *XLALResizeINT4FrequencySeries ( INT4FrequencySeries *s eries, int first, size_t length );
INT8FrequencySeries *XLALResizeINT8FrequencySeries ( INT8FrequencySeries *s eries, int first, size_t length ); INT8FrequencySeries *XLALResizeINT8FrequencySeries ( INT8FrequencySeries *s eries, int first, size_t length );
UINT2FrequencySeries *XLALResizeUINT2FrequencySeries ( UINT2FrequencySeries *series, int first, size_t length ); UINT2FrequencySeries *XLALResizeUINT2FrequencySeries ( UINT2FrequencySeries *series, int first, size_t length );
UINT4FrequencySeries *XLALResizeUINT4FrequencySeries ( UINT4FrequencySeries *series, int first, size_t length ); UINT4FrequencySeries *XLALResizeUINT4FrequencySeries ( UINT4FrequencySeries *series, int first, size_t length );
skipping to change at line 192 skipping to change at line 196
REAL4FrequencySeries *XLALShrinkREAL4FrequencySeries ( REAL4FrequencySeries *series, size_t first, size_t length ); REAL4FrequencySeries *XLALShrinkREAL4FrequencySeries ( REAL4FrequencySeries *series, size_t first, size_t length );
REAL8FrequencySeries *XLALShrinkREAL8FrequencySeries ( REAL8FrequencySeries *series, size_t first, size_t length ); REAL8FrequencySeries *XLALShrinkREAL8FrequencySeries ( REAL8FrequencySeries *series, size_t first, size_t length );
INT2FrequencySeries *XLALShrinkINT2FrequencySeries ( INT2FrequencySeries *s eries, size_t first, size_t length ); INT2FrequencySeries *XLALShrinkINT2FrequencySeries ( INT2FrequencySeries *s eries, size_t first, size_t length );
INT4FrequencySeries *XLALShrinkINT4FrequencySeries ( INT4FrequencySeries *s eries, size_t first, size_t length ); INT4FrequencySeries *XLALShrinkINT4FrequencySeries ( INT4FrequencySeries *s eries, size_t first, size_t length );
INT8FrequencySeries *XLALShrinkINT8FrequencySeries ( INT8FrequencySeries *s eries, size_t first, size_t length ); INT8FrequencySeries *XLALShrinkINT8FrequencySeries ( INT8FrequencySeries *s eries, size_t first, size_t length );
UINT2FrequencySeries *XLALShrinkUINT2FrequencySeries ( UINT2FrequencySeries *series, size_t first, size_t length ); UINT2FrequencySeries *XLALShrinkUINT2FrequencySeries ( UINT2FrequencySeries *series, size_t first, size_t length );
UINT4FrequencySeries *XLALShrinkUINT4FrequencySeries ( UINT4FrequencySeries *series, size_t first, size_t length ); UINT4FrequencySeries *XLALShrinkUINT4FrequencySeries ( UINT4FrequencySeries *series, size_t first, size_t length );
UINT8FrequencySeries *XLALShrinkUINT8FrequencySeries ( UINT8FrequencySeries *series, size_t first, size_t length ); UINT8FrequencySeries *XLALShrinkUINT8FrequencySeries ( UINT8FrequencySeries *series, size_t first, size_t length );
/*@}*/ /*@}*/
/** \name Addition Functions /**
* \name Addition Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALAdd<frequencyseriestype>() *
\endcode * XLALAdd<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions add the second argument to the first argument, returning a *
pointer to the first argument on success or NULL on failure. The two * These functions add the second argument to the first argument, returning
series must have the same epoch and frequency resolution, and have units a
that differ only by a dimensionless factor. * pointer to the first argument on success or NULL on failure. The two
* series must have the same epoch and frequency resolution, and have units
*/ * that differ only by a dimensionless factor.
*
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALAddCOMPLEX8FrequencySeries ( COMPLEX8Frequency Series *arg1, const COMPLEX8FrequencySeries *arg2 ); COMPLEX8FrequencySeries *XLALAddCOMPLEX8FrequencySeries ( COMPLEX8Frequency Series *arg1, const COMPLEX8FrequencySeries *arg2 );
COMPLEX16FrequencySeries *XLALAddCOMPLEX16FrequencySeries ( COMPLEX16Freque ncySeries *arg1, const COMPLEX16FrequencySeries *arg2 ); COMPLEX16FrequencySeries *XLALAddCOMPLEX16FrequencySeries ( COMPLEX16Freque ncySeries *arg1, const COMPLEX16FrequencySeries *arg2 );
REAL4FrequencySeries *XLALAddREAL4FrequencySeries ( REAL4FrequencySeries *a rg1, const REAL4FrequencySeries *arg2 ); REAL4FrequencySeries *XLALAddREAL4FrequencySeries ( REAL4FrequencySeries *a rg1, const REAL4FrequencySeries *arg2 );
REAL8FrequencySeries *XLALAddREAL8FrequencySeries ( REAL8FrequencySeries *a rg1, const REAL8FrequencySeries *arg2 ); REAL8FrequencySeries *XLALAddREAL8FrequencySeries ( REAL8FrequencySeries *a rg1, const REAL8FrequencySeries *arg2 );
INT2FrequencySeries *XLALAddINT2FrequencySeries ( INT2FrequencySeries *arg1 , const INT2FrequencySeries *arg2 ); INT2FrequencySeries *XLALAddINT2FrequencySeries ( INT2FrequencySeries *arg1 , const INT2FrequencySeries *arg2 );
INT4FrequencySeries *XLALAddINT4FrequencySeries ( INT4FrequencySeries *arg1 , const INT4FrequencySeries *arg2 ); INT4FrequencySeries *XLALAddINT4FrequencySeries ( INT4FrequencySeries *arg1 , const INT4FrequencySeries *arg2 );
INT8FrequencySeries *XLALAddINT8FrequencySeries ( INT8FrequencySeries *arg1 , const INT8FrequencySeries *arg2 ); INT8FrequencySeries *XLALAddINT8FrequencySeries ( INT8FrequencySeries *arg1 , const INT8FrequencySeries *arg2 );
UINT2FrequencySeries *XLALAddUINT2FrequencySeries ( UINT2FrequencySeries *a rg1, const UINT2FrequencySeries *arg2 ); UINT2FrequencySeries *XLALAddUINT2FrequencySeries ( UINT2FrequencySeries *a rg1, const UINT2FrequencySeries *arg2 );
UINT4FrequencySeries *XLALAddUINT4FrequencySeries ( UINT4FrequencySeries *a rg1, const UINT4FrequencySeries *arg2 ); UINT4FrequencySeries *XLALAddUINT4FrequencySeries ( UINT4FrequencySeries *a rg1, const UINT4FrequencySeries *arg2 );
UINT8FrequencySeries *XLALAddUINT8FrequencySeries ( UINT8FrequencySeries *a rg1, const UINT8FrequencySeries *arg2 ); UINT8FrequencySeries *XLALAddUINT8FrequencySeries ( UINT8FrequencySeries *a rg1, const UINT8FrequencySeries *arg2 );
/*@}*/ /*@}*/
/** \name Conjugation Functions /**
* \name Conjugation Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALConjugate<frequencyseriestype>() *
\endcode * XLALConjugate<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions replace a frequency series with its complex conjugate. *
* These functions replace a frequency series with its complex conjugate.
*/ *
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALConjugateCOMPLEX8FrequencySeries ( COMPLEX8Fre quencySeries *series ); COMPLEX8FrequencySeries *XLALConjugateCOMPLEX8FrequencySeries ( COMPLEX8Fre quencySeries *series );
COMPLEX16FrequencySeries *XLALConjugateCOMPLEX16FrequencySeries ( COMPLEX16 FrequencySeries *series ); COMPLEX16FrequencySeries *XLALConjugateCOMPLEX16FrequencySeries ( COMPLEX16 FrequencySeries *series );
/*@}*/ /*@}*/
/** \name Multiplication Functions /**
* \name Multiplication Functions
\heading{Synopsis} *
* ### Synopsis ###
\code *
#include <lal/FrequencySeries.h> * \code
* #include <lal/FrequencySeries.h>
XLALMultiply<frequencyseriestype>() *
\endcode * XLALMultiply<frequencyseriestype>()
* \endcode
\heading{Description} *
* ### Description ###
These functions multiply the first argument by the second argument, *
returning a pointer to the first argument on success or NULL on failure. * These functions multiply the first argument by the second argument,
The two series must have the same epoch and frequency resolution, and have * returning a pointer to the first argument on success or NULL on failure.
units that differ only by a dimensionless factor. * The two series must have the same epoch and frequency resolution, and ha
ve
*/ * units that differ only by a dimensionless factor.
*
*/
/*@{*/ /*@{*/
COMPLEX8FrequencySeries *XLALMultiplyCOMPLEX8FrequencySeries ( COMPLEX8Freq uencySeries *arg1, const COMPLEX8FrequencySeries *arg2 ); COMPLEX8FrequencySeries *XLALMultiplyCOMPLEX8FrequencySeries ( COMPLEX8Freq uencySeries *arg1, const COMPLEX8FrequencySeries *arg2 );
COMPLEX16FrequencySeries *XLALMultiplyCOMPLEX16FrequencySeries ( COMPLEX16F requencySeries *arg1, const COMPLEX16FrequencySeries *arg2 ); COMPLEX16FrequencySeries *XLALMultiplyCOMPLEX16FrequencySeries ( COMPLEX16F requencySeries *arg1, const COMPLEX16FrequencySeries *arg2 );
REAL4FrequencySeries *XLALMultiplyREAL4FrequencySeries ( REAL4FrequencySeri es *arg1, const REAL4FrequencySeries *arg2 ); REAL4FrequencySeries *XLALMultiplyREAL4FrequencySeries ( REAL4FrequencySeri es *arg1, const REAL4FrequencySeries *arg2 );
REAL8FrequencySeries *XLALMultiplyREAL8FrequencySeries ( REAL8FrequencySeri es *arg1, const REAL8FrequencySeries *arg2 ); REAL8FrequencySeries *XLALMultiplyREAL8FrequencySeries ( REAL8FrequencySeri es *arg1, const REAL8FrequencySeries *arg2 );
INT2FrequencySeries *XLALMultiplyINT2FrequencySeries ( INT2FrequencySeries *arg1, const INT2FrequencySeries *arg2 ); INT2FrequencySeries *XLALMultiplyINT2FrequencySeries ( INT2FrequencySeries *arg1, const INT2FrequencySeries *arg2 );
INT4FrequencySeries *XLALMultiplyINT4FrequencySeries ( INT4FrequencySeries *arg1, const INT4FrequencySeries *arg2 ); INT4FrequencySeries *XLALMultiplyINT4FrequencySeries ( INT4FrequencySeries *arg1, const INT4FrequencySeries *arg2 );
INT8FrequencySeries *XLALMultiplyINT8FrequencySeries ( INT8FrequencySeries *arg1, const INT8FrequencySeries *arg2 ); INT8FrequencySeries *XLALMultiplyINT8FrequencySeries ( INT8FrequencySeries *arg1, const INT8FrequencySeries *arg2 );
UINT2FrequencySeries *XLALMultiplyUINT2FrequencySeries ( UINT2FrequencySeri es *arg1, const UINT2FrequencySeries *arg2 ); UINT2FrequencySeries *XLALMultiplyUINT2FrequencySeries ( UINT2FrequencySeri es *arg1, const UINT2FrequencySeries *arg2 );
UINT4FrequencySeries *XLALMultiplyUINT4FrequencySeries ( UINT4FrequencySeri es *arg1, const UINT4FrequencySeries *arg2 ); UINT4FrequencySeries *XLALMultiplyUINT4FrequencySeries ( UINT4FrequencySeri es *arg1, const UINT4FrequencySeries *arg2 );
 End of changes. 8 change blocks. 
146 lines changed or deleted 159 lines changed or added


 Grid.h   Grid.h 
skipping to change at line 32 skipping to change at line 32
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup Grid_h * \addtogroup Grid_h
\author Creighton, T. D. * \author Creighton, T. D.
*
\brief Provides a structured datatype for a multidimensional rectilinear * \brief Provides a structured datatype for a multidimensional rectilinear
grid. grid.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/Grid.h> * \code
\endcode * #include <lal/Grid.h>
* \endcode
This header provides a new structured datatype storing data *
on a multidimensional rectilinear grid. It is in some sense a * This header provides a new structured datatype storing data
generalization of the series datatypes (frequency series, time series, * on a multidimensional rectilinear grid. It is in some sense a
etc.), representing evenly-sampled data over some physical parameter * generalization of the series datatypes (frequency series, time series,
space. * etc.), representing evenly-sampled data over some physical parameter
* space.
\heading{Structure <tt>\<datatype\>Grid</tt>} *
* ### Structure <tt>\<datatype\>Grid</tt> ###
This structure is a generalization of the LAL series types, *
storing data on an \f$m\f$-dimensional rectangular grid on a physical * This structure is a generalization of the LAL series types,
parameter space. The values on the grid are of type <tt>\<datatype\></tt> * storing data on an \f$m\f$-dimensional rectangular grid on a physical
which can be any LAL primitive \e numerical datatype (#INT2, * parameter space. The values on the grid are of type <tt>\<datatype\></t
#INT4, #INT8, #UINT2, #UINT4, #UINT8, t>
#REAL4, #REAL8, #COMPLEX8, #COMPLEX16). The * which can be any LAL primitive \e numerical datatype (#INT2,
data are stored in an array of dimension \f$M\geq m\f$: if \f$M=m\f$, then * #INT4, #INT8, #UINT2, #UINT4, #UINT8,
the * #REAL4, #REAL8, #COMPLEX8, #COMPLEX16). The
structure stores a single value for each grid point; if \f$M>m\f$, then * data are stored in an array of dimension \f$M\geq m\f$: if \f$M=m\f$, th
the structure stores a vector or array of values on the ``tangent en the
space'' of each grid point. We refer to \f$m\f$ as the \e grid * structure stores a single value for each grid point; if \f$M>m\f$, then
dimension and \f$M\f$ as the \e data dimension. The fields of the * the structure stores a vector or array of values on the ``tangent
structure are: * space'' of each grid point. We refer to \f$m\f$ as the \e grid
* dimension and \f$M\f$ as the \e data dimension. The fields of the
<dl> * structure are:
<dt><tt>CHAR name[LALNameLength]</tt></dt><dd> A name identifying the grid *
and/or the data being sampled.</dd> * <dl>
* <dt><tt>CHAR name[LALNameLength]</tt></dt><dd> A name identifying the gr
<dt><tt>LALUnit sampleUnits</tt></dt><dd> The physical units of the id
quantities on the grid.</dd> * and/or the data being sampled.</dd>
*
<dt><tt>LALUnit *dimUnits</tt></dt><dd> The physical units of the grid axes * <dt><tt>LALUnit sampleUnits</tt></dt><dd> The physical units of the
. * quantities on the grid.</dd>
This must be allocated as an array of length \f$m\f$.</dd> *
* <dt><tt>LALUnit *dimUnits</tt></dt><dd> The physical units of the grid a
<dt><tt>REAL8Vector *offset</tt></dt><dd> A vector \f$\mathbf{p}_0\f$ xes.
specifying the location of the grid point indexed by \f$(0,\ldots,0)\f$. * This must be allocated as an array of length \f$m\f$.</dd>
Must have dimensionality \f$m\f$.</dd> *
* <dt><tt>REAL8Vector *offset</tt></dt><dd> A vector \f$\mathbf{p}_0\f$
<dt><tt>REAL8Vector *interval</tt></dt><dd> The vector \f$\Delta\mathbf{p}\ * specifying the location of the grid point indexed by \f$(0,\ldots,0)\f$.
f$ * Must have dimensionality \f$m\f$.</dd>
specifying the grid spacing in each dimension. Must have *
dimensionality \f$m\f$.</dd> * <dt><tt>REAL8Vector *interval</tt></dt><dd> The vector \f$\Delta\mathbf{
p}\f$
<dt><tt>\<datatype\>Array *data</tt></dt><dd> Pointer to an array storing t * specifying the grid spacing in each dimension. Must have
he * dimensionality \f$m\f$.</dd>
data values at the corresponding grid points. The data dimension *
\f$M=\f$<tt>data->dimLength->length</tt> must be greater than or equal to * <dt><tt>\<datatype\>Array *data</tt></dt><dd> Pointer to an array storin
the grid dimension \f$m=\f$<tt>offset->length</tt>=<tt>interval->length</tt g the
>. * data values at the corresponding grid points. The data dimension
An index \f$\mathbf{i}=(i_0,\ldots,i_{M-1})\f$, where \f$i_k\f$ are integer * \f$M=\f$<tt>data->dimLength->length</tt> must be greater than or equal t
s o
from 0 to <tt>data->dimLength->data</tt>\f${}_k\f$, specifies a grid point * the grid dimension \f$m=\f$<tt>offset->length</tt>=<tt>interval->length<
located at \f$\mathbf{p}=\mathbf{p}_0+\sum_{k=0}^{n-1}\hat{\mathbf{e}}_k /tt>.
i_k \Delta p_k\f$ if \f$M=m\f$, or an array element \f$\mathsf{A}_{i_m\cdot * An index \f$\mathbf{i}=(i_0,\ldots,i_{M-1})\f$, where \f$i_k\f$ are inte
s gers
i_{M-1}}\f$ at that grid point if \f$M>m\f$. The values in * from 0 to <tt>data->dimLength->data</tt>\f${}_k\f$, specifies a grid poi
<tt>data->data</tt> are the value stored at each grid point (or array nt
element at each grid point), arranged in the manner discussed in * located at \f$\mathbf{p}=\mathbf{p}_0+\sum_{k=0}^{n-1}\hat{\mathbf{e}}_k
\ref LALDatatypes.h.</dd> * i_k \Delta p_k\f$ if \f$M=m\f$, or an array element \f$\mathsf{A}_{i_m\c
</dl> dots
* i_{M-1}}\f$ at that grid point if \f$M>m\f$. The values in
\heading{Prototypes} * <tt>data->data</tt> are the value stored at each grid point (or array
* element at each grid point), arranged in the manner discussed in
\code * \ref LALDatatypes.h.</dd>
void * </dl>
LAL<typecode>CreateGrid( LALStatus *stat, *
<datatype>Grid **grid, * ### Prototypes ###
UINT4Vector *dimLength, *
UINT4 dimension ) * \code
* void
void * LAL<typecode>CreateGrid( LALStatus *stat,
LAL<typecode>DestroyGrid( LALStatus *stat, * <datatype>Grid **grid,
<datatype>Grid **grid ) * UINT4Vector *dimLength,
\endcode * UINT4 dimension )
*
\heading{Description} * void
* LAL<typecode>DestroyGrid( LALStatus *stat,
These routines create or destroy a <tt>\<datatype\>Grid</tt> structure. * <datatype>Grid **grid )
The input vector \c dimLength stores the lengths of each dimension * \endcode
of the grid \e and of the array at each grid point: in the *
notation defined in \ref Grid.h, <tt>dimLength->length</tt>\f$=M\f$. The * ### Description ###
parameter \c dimension gives the dimension \f$m\f$ of the physical *
grid space; if \f$M>m\f$, then the remaining dimensions refer to a tangent * These routines create or destroy a <tt>\<datatype\>Grid</tt> structure.
space at each grid point. When creating a grid, the routines allocate * The input vector \c dimLength stores the lengths of each dimension
space for all the internal vectors and arrays, but no data are filled * of the grid \e and of the array at each grid point: in the
in, with the exception of the <tt>(*grid)->data->dimLength</tt> vector * notation defined in \ref Grid.h, <tt>dimLength->length</tt>\f$=M\f$. Th
(which will contain exactly the same data as the \c dimLength e
input parameter). When calling the <tt>LAL\<typecode\>CreateGrid()</tt> * parameter \c dimension gives the dimension \f$m\f$ of the physical
routines, or on returning from the <tt>LAL\<typecode\>DestroyGrid()</tt> * grid space; if \f$M>m\f$, then the remaining dimensions refer to a tange
routines, \c grid should be a non-\c NULL handle to a nt
\c NULL-valued pointer. * space at each grid point. When creating a grid, the routines allocate
* space for all the internal vectors and arrays, but no data are filled
For each of these prototype templates there are in fact 10 separate * in, with the exception of the <tt>(*grid)->data->dimLength</tt> vector
routines corresponding to all the numerical atomic datatypes * (which will contain exactly the same data as the \c dimLength
<tt>\<datatype\></tt> referred to by <tt>\<typecode\></tt>: * input parameter). When calling the <tt>LAL\<typecode\>CreateGrid()</tt>
* routines, or on returning from the <tt>LAL\<typecode\>DestroyGrid()</tt>
<table> * routines, \c grid should be a non-\c NULL handle to a
<tr><th>\<typecode\></th><th>\<datatype\></th><th>\<typecode\></th><th>\<da * \c NULL-valued pointer.
tatype\></th></tr> *
<tr><td>I2</td><td> INT2</td><td> U2</td><td> UINT2</td></tr> * For each of these prototype templates there are in fact 10 separate
<tr><td>I4</td><td> INT4</td><td> U4</td><td> UINT4</td></tr> * routines corresponding to all the numerical atomic datatypes
<tr><td>I8</td><td> INT8</td><td> U8</td><td> UINT8</td></tr> * <tt>\<datatype\></tt> referred to by <tt>\<typecode\></tt>:
<tr><td> S</td><td> REAL4</td><td> C</td><td> COMPLEX8</td></tr> *
<tr><td> D</td><td> REAL8</td><td> Z</td><td> COMPLEX16</td></tr> * <table>
</table> * <tr><th>\<typecode\></th><th>\<datatype\></th><th>\<typecode\></th><th>\
<datatype\></th></tr>
*/ * <tr><td>I2</td><td> INT2</td><td> U2</td><td> UINT2</td></tr>
* <tr><td>I4</td><td> INT4</td><td> U4</td><td> UINT4</td></tr>
* <tr><td>I8</td><td> INT8</td><td> U8</td><td> UINT8</td></tr>
* <tr><td> S</td><td> REAL4</td><td> C</td><td> COMPLEX8</td></tr>
* <tr><td> D</td><td> REAL8</td><td> Z</td><td> COMPLEX16</td></tr>
* </table>
*
*/
/*@{*/ /*@{*/
/** \name Error Codes *//*@{ */ /** \name Error Codes */ /*@{ */
#define GRIDH_ENUL 1 /**< Unexpected null pointer in arguments */ #define GRIDH_ENUL 1 /**< Unexpected null pointer in arguments */
#define GRIDH_EOUT 2 /**< Output handle points to a non-null pointer */ #define GRIDH_EOUT 2 /**< Output handle points to a non-null pointer */
#define GRIDH_EMEM 3 /**< Memory allocation error */ #define GRIDH_EMEM 3 /**< Memory allocation error */
/*@}*/ /*@}*/
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define GRIDH_MSGENUL "Unexpected null pointer in arguments" #define GRIDH_MSGENUL "Unexpected null pointer in arguments"
#define GRIDH_MSGEOUT "Output handle points to a non-null pointer" #define GRIDH_MSGEOUT "Output handle points to a non-null pointer"
#define GRIDH_MSGEMEM "Memory allocation error" #define GRIDH_MSGEMEM "Memory allocation error"
 End of changes. 2 change blocks. 
118 lines changed or deleted 125 lines changed or added


 IIRFilter.h   IIRFilter.h 
skipping to change at line 33 skipping to change at line 33
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/ZPGFilter.h> #include <lal/ZPGFilter.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup IIRFilter_h * \addtogroup IIRFilter_h
\author Creighton, T. D. * \author Creighton, T. D.
*
\brief Provides routines to make and apply IIR filters. * \brief Provides routines to make and apply IIR filters.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/IIRFilter.h> * \code
\endcode * #include <lal/IIRFilter.h>
* \endcode
This header covers routines that create, destroy, and apply *
generic time-domain filters, given by objects of type * This header covers routines that create, destroy, and apply
<tt>\<datatype\>IIRFilter</tt>, where <tt>\<datatype\></tt> is either * generic time-domain filters, given by objects of type
\c REAL4 or \c REAL8. * <tt>\<datatype\>IIRFilter</tt>, where <tt>\<datatype\></tt> is either
* \c REAL4 or \c REAL8.
An IIR (Infinite Impulse Response) filter is a generalized linear *
causal time-domain filter, in which the filter output \f$y_n=y(t_n)\f$ at * An IIR (Infinite Impulse Response) filter is a generalized linear
any sampled time \f$t_n=t_0+n\Delta t\f$ is a linear combination of the * causal time-domain filter, in which the filter output \f$y_n=y(t_n)\f$ a
input \f$x\f$ \e and output \f$y\f$ at previous sampled times: t
\f[ * any sampled time \f$t_n=t_0+n\Delta t\f$ is a linear combination of the
y_n = \sum_{k=0}^M c_k x_{n-k} + \sum_{l=1}^N d_l y_{n-l} \; . * input \f$x\f$ \e and output \f$y\f$ at previous sampled times:
\f] * \f[
The coefficients \f$c_k\f$ are called the direct filter coefficients, and * y_n = \sum_{k=0}^M c_k x_{n-k} + \sum_{l=1}^N d_l y_{n-l} \; .
the coefficients \f$d_l\f$ are the recursive filter coefficients. The * \f]
filter order is the larger of \f$M\f$ or \f$N\f$, and determines how far ba * The coefficients \f$c_k\f$ are called the direct filter coefficients, an
ck d
in time the filter must look to determine its next output. However, * the coefficients \f$d_l\f$ are the recursive filter coefficients. The
the recursive nature of the filter means that the output can depend on * filter order is the larger of \f$M\f$ or \f$N\f$, and determines how far
input arbitrarily far in the past; hence the name "infinite impulse back
response". Nonetheless, for a well-designed, stable filter, the * in time the filter must look to determine its next output. However,
actual filter response to an impulse should diminish rapidly beyond * the recursive nature of the filter means that the output can depend on
some characteristic timescale. * input arbitrarily far in the past; hence the name "infinite impulse
* response". Nonetheless, for a well-designed, stable filter, the
Note that nonrecursive FIR (Finite Impulse Response) filters are * actual filter response to an impulse should diminish rapidly beyond
considered a subset of IIR filters, having \f$N=0\f$. * some characteristic timescale.
*
For practical implementation, it is convenient to express the bilinear * Note that nonrecursive FIR (Finite Impulse Response) filters are
equation above as two linear equations involving an auxiliary sequence * considered a subset of IIR filters, having \f$N=0\f$.
\f$w\f$: *
\f[ * For practical implementation, it is convenient to express the bilinear
w_n = x_n + \sum_{l=1}^N d_l w_{n-l} \; , * equation above as two linear equations involving an auxiliary sequence
\f] * \f$w\f$:
\f[ * \f[
y_n = \sum_{k=0}^M c_k w_{n-k} \; . * w_n = x_n + \sum_{l=1}^N d_l w_{n-l} \; ,
\f] * \f]
The equivalence of this to the first expression is not obvious, but * \f[
can be proven by mathematical induction. The advantage of the * y_n = \sum_{k=0}^M c_k w_{n-k} \; .
auxiliary variable representation is twofold. First, when one is * \f]
feeding data point by point to the filter, the filter needs only * The equivalence of this to the first expression is not obvious, but
"remember" the previous \f$M\f$ or \f$N\f$ (whichever is larger) values of * can be proven by mathematical induction. The advantage of the
\f$w\f$, rather than remembering the previous \f$M\f$ values of \f$x\f$ \e * auxiliary variable representation is twofold. First, when one is
and * feeding data point by point to the filter, the filter needs only
the previous \f$N\f$ values of \f$y\f$. Second, when filtering a large sto * "remember" the previous \f$M\f$ or \f$N\f$ (whichever is larger) values
red of
data vector, the filter response can be computed in place: one first * \f$w\f$, rather than remembering the previous \f$M\f$ values of \f$x\f$
runs forward through the vector replacing \f$x\f$ with \f$w\f$, and then \e and
backward replacing \f$w\f$ with \f$y\f$. * the previous \f$N\f$ values of \f$y\f$. Second, when filtering a large
stored
Although the IIR filters in these routines are explicitly real, one * data vector, the filter response can be computed in place: one first
can consider formally their complex response. A sinusoidal input can * runs forward through the vector replacing \f$x\f$ with \f$w\f$, and then
thus be written as \f$x_n=X\exp(2\pi ifn\Delta t)=Xz^n\f$, where \f$X\f$ is * backward replacing \f$w\f$ with \f$y\f$.
a *
complex amplitude and \f$z=\exp(2\pi if\Delta t)\f$ is a complex * Although the IIR filters in these routines are explicitly real, one
parametrization of the frequency. By linearity, the output must also * can consider formally their complex response. A sinusoidal input can
be sinusoidal: \f$y_m=Y\exp(2\pi ifm\Delta t)=Yz^m\f$. Putting these into * thus be written as \f$x_n=X\exp(2\pi ifn\Delta t)=Xz^n\f$, where \f$X\f$
the bilinear equation, one can easily compute the filter's complex is a
transfer function: * complex amplitude and \f$z=\exp(2\pi if\Delta t)\f$ is a complex
\f[ * parametrization of the frequency. By linearity, the output must also
T(z) = \frac{Y}{X} = \frac{\sum_{k=0}^M c_k z^{-k}} * be sinusoidal: \f$y_m=Y\exp(2\pi ifm\Delta t)=Yz^m\f$. Putting these in
{1 - \sum_{l=1}^N d_l z^{-l}} to
\f] * the bilinear equation, one can easily compute the filter's complex
This can be readily converted to and from the "zeros, poles, gain" * transfer function:
representation of a filter, which expresses \f$T(z)\f$ as a factored * \f[
rational function of \f$z\f$. * T(z) = \frac{Y}{X} = \frac{\sum_{k=0}^M c_k z^{-k}}
* {1 - \sum_{l=1}^N d_l z^{-l}}
It should also be noted that, in the routines covered by this header, * \f]
I have adopted the convention of including a redundant recursive * This can be readily converted to and from the "zeros, poles, gain"
coefficient \f$d_0\f$, in order to make the indexing more intuitive. For * representation of a filter, which expresses \f$T(z)\f$ as a factored
formal correctness \f$d_0\f$ should be set to \f$-1\f$, although the filter * rational function of \f$z\f$.
ing *
routines never actually use this coefficient. * It should also be noted that, in the routines covered by this header,
* I have adopted the convention of including a redundant recursive
*/ * coefficient \f$d_0\f$, in order to make the indexing more intuitive. Fo
r
* formal correctness \f$d_0\f$ should be set to \f$-1\f$, although the fil
tering
* routines never actually use this coefficient.
*
*/
/*@{*/ /*@{*/
/** /**
@{ * @{
\defgroup CreateIIRFilter_c Module CreateIIRFilter.c * \defgroup CreateIIRFilter_c Module CreateIIRFilter.c
\defgroup DestroyIIRFilter_c Module DestroyIIRFilter.c * \defgroup DestroyIIRFilter_c Module DestroyIIRFilter.c
\defgroup IIRFilter_c Module IIRFilter.c * \defgroup IIRFilter_c Module IIRFilter.c
\defgroup IIRFilterVector_c Module IIRFilterVector.c * \defgroup IIRFilterVector_c Module IIRFilterVector.c
\defgroup IIRFilterVectorR_c Module IIRFilterVectorR.c * \defgroup IIRFilterVectorR_c Module IIRFilterVectorR.c
@} * @}
*/ */
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define IIRFILTERH_ENUL 1 /**< Unexpected null pointer in arguments */ #define IIRFILTERH_ENUL 1 /**< Unexpected null pointer in arguments */
#define IIRFILTERH_EOUT 2 /**< Output handle points to a non-null poin ter */ #define IIRFILTERH_EOUT 2 /**< Output handle points to a non-null poin ter */
#define IIRFILTERH_EMEM 3 /**< Memory allocation error */ #define IIRFILTERH_EMEM 3 /**< Memory allocation error */
#define IIRFILTERH_EPAIR 4 /**< Input has unpaired nonreal poles or zer os */ #define IIRFILTERH_EPAIR 4 /**< Input has unpaired nonreal poles or zer os */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define IIRFILTERH_MSGENUL "Unexpected null pointer in arguments" #define IIRFILTERH_MSGENUL "Unexpected null pointer in arguments"
#define IIRFILTERH_MSGEOUT "Output handle points to a non-null pointer" #define IIRFILTERH_MSGEOUT "Output handle points to a non-null pointer"
#define IIRFILTERH_MSGEMEM "Memory allocation error" #define IIRFILTERH_MSGEMEM "Memory allocation error"
#define IIRFILTERH_MSGEPAIR "Input has unpaired nonreal poles or zeros" #define IIRFILTERH_MSGEPAIR "Input has unpaired nonreal poles or zeros"
/** \endcond */ /** \endcond */
/** This structure stores the direct and recursive REAL4 filter coefficient /**
s, as * This structure stores the direct and recursive REAL4 filter coefficients
, as
* well as the history of the auxiliary sequence \f$w\f$. * well as the history of the auxiliary sequence \f$w\f$.
* The length of the history vector gives the order of the filter * The length of the history vector gives the order of the filter
*/ */
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
SWIGLAL(IMMUTABLE_MEMBERS(tagREAL4IIRFilter, name)); SWIGLAL(IMMUTABLE_MEMBERS(tagREAL4IIRFilter, name));
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagREAL4IIRFilter{ typedef struct tagREAL4IIRFilter{
const CHAR *name; /**< User assigned name. */ const CHAR *name; /**< User assigned name. */
REAL8 deltaT; /**< Sampling time interval of the filter; If \f $\leq0\f$, it will be ignored (ie it will be taken from the data stream) */ REAL8 deltaT; /**< Sampling time interval of the filter; If \f $\leq0\f$, it will be ignored (ie it will be taken from the data stream) */
REAL4Vector *directCoef; /**< The direct filter coefficients. */ REAL4Vector *directCoef; /**< The direct filter coefficients. */
REAL4Vector *recursCoef; /**< The recursive filter coefficients. */ REAL4Vector *recursCoef; /**< The recursive filter coefficients. */
REAL4Vector *history; /**< The previous values of w. */ REAL4Vector *history; /**< The previous values of w. */
} REAL4IIRFilter; } REAL4IIRFilter;
/** This structure stores the direct and recursive REAL8 filter coefficient /**
s, as * This structure stores the direct and recursive REAL8 filter coefficients
, as
* well as the history of the auxiliary sequence \f$w\f$. * well as the history of the auxiliary sequence \f$w\f$.
* The length of the history vector gives the order of the filter * The length of the history vector gives the order of the filter
*/ */
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
SWIGLAL(IMMUTABLE_MEMBERS(tagREAL8IIRFilter, name)); SWIGLAL(IMMUTABLE_MEMBERS(tagREAL8IIRFilter, name));
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagREAL8IIRFilter{ typedef struct tagREAL8IIRFilter{
const CHAR *name; /**< User assigned name. */ const CHAR *name; /**< User assigned name. */
REAL8 deltaT; /**< Sampling time interval of the filter; If \f $\leq0\f$, it will be ignored (ie it will be taken from the data stream). * / REAL8 deltaT; /**< Sampling time interval of the filter; If \f $\leq0\f$, it will be ignored (ie it will be taken from the data stream). * /
REAL8Vector *directCoef; /**< The direct filter coefficients. */ REAL8Vector *directCoef; /**< The direct filter coefficients. */
 End of changes. 4 change blocks. 
95 lines changed or deleted 103 lines changed or added


 Inject.h   Inject.h 
skipping to change at line 33 skipping to change at line 33
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/Random.h> #include <lal/Random.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup Inject_h * \addtogroup Inject_h
\author Creighton, T. D. * \author Creighton, T. D.
*
\brief Provides routines to inject a signal into detector output. * \brief Provides routines to inject a signal into detector output.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/Inject.h> * \code
\endcode * #include <lal/Inject.h>
* \endcode
This header provides simple routines to inject a signal, stored as a *
floating-point time series, into an integer time series that * This header provides simple routines to inject a signal, stored as a
represents the ADC output of a detector channel. * floating-point time series, into an integer time series that
* represents the ADC output of a detector channel.
The basic concept at work here is that of \e dithering. That is, *
to add a real signal \f$x(t_k)\f$ to the integer output \f$n(t_k)\f$ of an * The basic concept at work here is that of \e dithering. That is,
ADC, we cannot simply compute \f$x+n\f$ at each time \f$t_k\f$ and round to * to add a real signal \f$x(t_k)\f$ to the integer output \f$n(t_k)\f$ of
the nearest integer. To see this, consider injecting a sinusoid with an
an amplitude less than half the ADC resolution, \f$|x|<0.5\f$. Then * ADC, we cannot simply compute \f$x+n\f$ at each time \f$t_k\f$ and round
adding \f$x+n\f$ and rounding will always give back \f$n\f$, and the signal to
injection will have no effect on the output. * the nearest integer. To see this, consider injecting a sinusoid with
* an amplitude less than half the ADC resolution, \f$|x|<0.5\f$. Then
Instead, what we would like to do is to add \f$x\f$ to the ADC * adding \f$x+n\f$ and rounding will always give back \f$n\f$, and the sig
\e input before rounding occurs, and then round to an integer. nal
That is, the ADC input was actually \f$n+d\f$, where \f$d\in[-0.5,0.5)\f$; * injection will have no effect on the output.
we *
want to compute the rounded value of \f$n+d+x\f$, which may occasionally * Instead, what we would like to do is to add \f$x\f$ to the ADC
be different from \f$n\f$. In principle, a Fourier transforms can detect * \e input before rounding occurs, and then round to an integer.
a sinusoidal signal with an output much smaller than the ADC * That is, the ADC input was actually \f$n+d\f$, where \f$d\in[-0.5,0.5)\f
resolution: by integrating enough data, one can eventually detect a $; we
statistically significant phase correlation between the occasional * want to compute the rounded value of \f$n+d+x\f$, which may occasionally
increments and decrements in \f$n\f$. * be different from \f$n\f$. In principle, a Fourier transforms can detec
t
Of course given the output time series \f$n(t_k)\f$ we can only guess at * a sinusoidal signal with an output much smaller than the ADC
the input series \f$n(t_k)+d(t_k)\f$ that produced it. The simplest guess * resolution: by integrating enough data, one can eventually detect a
is to assume that each \f$d(t_k)\f$ is an independent random variable with * statistically significant phase correlation between the occasional
a flat distribution over the range \f$[-0.5,0.5)\f$. This is a reasonable * increments and decrements in \f$n\f$.
guess to make if the root mean square variation between succesive *
output values \f$n\f$ is a few or more ADC counts; i.e. if the * Of course given the output time series \f$n(t_k)\f$ we can only guess at
dimensionless power spectral density \f$\sqrt{fS(f)}\f$ has a value of a * the input series \f$n(t_k)+d(t_k)\f$ that produced it. The simplest gue
few or more around the sampling freqeuncy \f$f\f$. This is almost always ss
true of any detector designed to work at or near its noise limit: the * is to assume that each \f$d(t_k)\f$ is an independent random variable wi
input to the ADC will first be whitened so that \f$\sqrt{fS(f)}\f$ is th
nearly flat, and then amplified so that \f$\sqrt{fS(f)}\f$ is on the order * a flat distribution over the range \f$[-0.5,0.5)\f$. This is a reasonab
of several (or more) ADC counts. le
* guess to make if the root mean square variation between succesive
In the routines covered by this header we will take it for granted * output values \f$n\f$ is a few or more ADC counts; i.e. if the
that the above is a reasonable approximation, and will not check for * dimensionless power spectral density \f$\sqrt{fS(f)}\f$ has a value of a
it. We will further assume that the signal to be injected has already * few or more around the sampling freqeuncy \f$f\f$. This is almost alway
been subjected to the same whitening and amplification, so that the s
units of \f$x(t_k)\f$ are normalized ADC counts (although it is still a * true of any detector designed to work at or near its noise limit: the
real number, not an integer). * input to the ADC will first be whitened so that \f$\sqrt{fS(f)}\f$ is
* nearly flat, and then amplified so that \f$\sqrt{fS(f)}\f$ is on the ord
The dithering routines should be used whenever one is injecting a er
signal into a time series representing raw digitized data. In some * of several (or more) ADC counts.
data storage specifications, ADC output is not stored as an integer, *
but as a floating-point number representing an integer value. Such * In the routines covered by this header we will take it for granted
data must be cast to integers before being passed to the digitizing * that the above is a reasonable approximation, and will not check for
routines. * it. We will further assume that the signal to be injected has already
* been subjected to the same whitening and amplification, so that the
This header also provides even simpler routines for injecting a signal * units of \f$x(t_k)\f$ are normalized ADC counts (although it is still a
into floating-point data, without dithering. These should only be * real number, not an integer).
used when the data is genuinely continuous in character. This can *
include data derived by applying floating-point operations on ADC * The dithering routines should be used whenever one is injecting a
channels (e.g.\ digital filters, linear combinations of channels, * signal into a time series representing raw digitized data. In some
etc.), but not data that simply represents ADC output in * data storage specifications, ADC output is not stored as an integer,
floating-point format. The assumption here is that the numerical * but as a floating-point number representing an integer value. Such
post-processing of the ADC data completely masks any statistical * data must be cast to integers before being passed to the digitizing
signiatures of the digitization. * routines.
*
@{ * This header also provides even simpler routines for injecting a signal
\defgroup InjectVector_c Module InjectVector.c * into floating-point data, without dithering. These should only be
\defgroup InjectTimeSeries_c Module InjectTimeSeries.c * used when the data is genuinely continuous in character. This can
@} * include data derived by applying floating-point operations on ADC
*/ * channels (e.g.\ digital filters, linear combinations of channels,
* etc.), but not data that simply represents ADC output in
* floating-point format. The assumption here is that the numerical
* post-processing of the ADC data completely masks any statistical
* signiatures of the digitization.
*
* @{
* \defgroup InjectVector_c Module InjectVector.c
* \defgroup InjectTimeSeries_c Module InjectTimeSeries.c
* @}
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define INJECTH_ENUL 1 /**< Unexpected null pointer in arguments. * / #define INJECTH_ENUL 1 /**< Unexpected null pointer in arguments. * /
#define INJECTH_EBAD 2 /**< A sampling interval is (effectively) zero */ #define INJECTH_EBAD 2 /**< A sampling interval is (effectively) zero */
#define INJECTH_EUNIT 3 /**< Input or output is not in units of ADC counts */ #define INJECTH_EUNIT 3 /**< Input or output is not in units of ADC counts */
/*@}*/ /*@}*/
/*@}*/ /*@}*/
 End of changes. 1 change blocks. 
75 lines changed or deleted 85 lines changed or added


 Integrate.h   Integrate.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _INTEGRATE_H #ifndef _INTEGRATE_H
#define _INTEGRATE_H #define _INTEGRATE_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup Integrate_h * \addtogroup Integrate_h
*
\brief Integrates a function. * \brief Integrates a function.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/Integrate.h> * \code
\endcode * #include <lal/Integrate.h>
* \endcode
This header covers the routines for integrating a function. *
* This header covers the routines for integrating a function.
\heading{Description} *
* ### Description ###
The routine \c LALSRombergIntegrate() performs the integral specified by th *
e * The routine \c LALSRombergIntegrate() performs the integral specified by
structure \c input and the result is returned as \c result. Any the
additional parameters (other than the integration variable \f$x\f$) can be * structure \c input and the result is returned as \c result. Any
passed * additional parameters (other than the integration variable \f$x\f$) can
as \c params. The routine \c LALSRombergIntegrate() does not use be passed
\c params but just passes it to the integrand. The routine * as \c params. The routine \c LALSRombergIntegrate() does not use
\c LALDRombergIntegrate() is the same but for double precision. * \c params but just passes it to the integrand. The routine
* \c LALDRombergIntegrate() is the same but for double precision.
\heading{Operating Instructions} *
* ### Operating Instructions ###
The following program performs the integral \f$\int_0^2F(x)dx\f$ where *
\f$F(x)=x^4\log(x+\sqrt{x^2+1})\f$. * The following program performs the integral \f$\int_0^2F(x)dx\f$ where
* \f$F(x)=x^4\log(x+\sqrt{x^2+1})\f$.
\code *
#include <math.h> * \code
#include <lal/LALStdlib.h> * #include <math.h>
#include <lal/Integrate.h> * #include <lal/LALStdlib.h>
* #include <lal/Integrate.h>
static void F( LALStatus *s, REAL4 *y, REAL4 x, void *p ) *
{ * static void F( LALStatus *s, REAL4 *y, REAL4 x, void *p )
REAL4 x2 = x*x; * {
REAL4 x4 = x2*x2; * REAL4 x2 = x*x;
INITSTATUS(s); * REAL4 x4 = x2*x2;
ASSERT( !p, s, 1, "Non-null pointer" ); * INITSTATUS(s);
*y = x4 * log( x + sqrt( x2 + 1 ) ); * ASSERT( !p, s, 1, "Non-null pointer" );
RETURN( s ); * y = x4 * log( x + sqrt( x2 + 1 ) );
} * RETURN( s );
* }
int main () *
{ * int main ()
const REAL4 epsilon = 1e-6; * {
const long double expect = 8.153364119811650205L; * const REAL4 epsilon = 1e-6;
static LALStatus status; * const long double expect = 8.153364119811650205L;
SIntegrateIn intinp; * static LALStatus status;
REAL4 result; * SIntegrateIn intinp;
* REAL4 result;
intinp.function = F; *
intinp.xmin = 0; * intinp.function = F;
intinp.xmax = 2; * intinp.xmin = 0;
intinp.type = ClosedInterval; * intinp.xmax = 2;
* intinp.type = ClosedInterval;
LALSRombergIntegrate( &status, &result, &intinp, NULL ); *
if ( fabs( result - expect ) > epsilon * fabs( expect ) ) * LALSRombergIntegrate( &status, &result, &intinp, NULL );
{ * if ( fabs( result - expect ) > epsilon * fabs( expect ) )
// integration did not achieve desired accuracy --- exit failure * {
return 1; * // integration did not achieve desired accuracy --- exit failure
} * return 1;
* }
return 0; *
} * return 0;
\endcode * }
* \endcode
\heading{Algorithm} *
* ### Algorithm ###
This is an implementation of the Romberg integrating function \c qromb in *
Numerical Recipes [\ref ptvf1992]. * This is an implementation of the Romberg integrating function \c qromb i
n
*/ * Numerical Recipes \cite ptvf1992.
*
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define INTEGRATEH_ENULL 1 /**< Null pointer */ #define INTEGRATEH_ENULL 1 /**< Null pointer */
#define INTEGRATEH_ETYPE 2 /**< Unknown integral type */ #define INTEGRATEH_ETYPE 2 /**< Unknown integral type */
#define INTEGRATEH_EIDOM 4 /**< Invalid domain */ #define INTEGRATEH_EIDOM 4 /**< Invalid domain */
#define INTEGRATEH_EMXIT 8 /**< Maximum iterations exceeded */ #define INTEGRATEH_EMXIT 8 /**< Maximum iterations exceeded */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
#define INTEGRATEH_MSGENULL "Null pointer" #define INTEGRATEH_MSGENULL "Null pointer"
#define INTEGRATEH_MSGETYPE "Unknown integral type" #define INTEGRATEH_MSGETYPE "Unknown integral type"
#define INTEGRATEH_MSGEIDOM "Invalid domain" #define INTEGRATEH_MSGEIDOM "Invalid domain"
#define INTEGRATEH_MSGEMXIT "Maximum iterations exceeded" #define INTEGRATEH_MSGEMXIT "Maximum iterations exceeded"
/** \endcond */ /** \endcond */
/** Type of integral. /**
The types of integration are the following: * Type of integral.
* The types of integration are the following:
I. \c #ClosedInterval *
indicates that the integral should be computed on equal-spaced domain * I. \c #ClosedInterval
intervals including the boundary. * indicates that the integral should be computed on equal-spaced domain
* intervals including the boundary.
II. \c #OpenInterval indicates that *
the integral should be computed on intervals of the domain not including * II. \c #OpenInterval indicates that
the * the integral should be computed on intervals of the domain not including
boundary. the
* boundary.
III. \c #SingularLowerLimit indicates that the integral *
should be evaluated on an open interval with a transformation so that a * III. \c #SingularLowerLimit indicates that the integral
inverse-square-root singularity at the lower limit can be integrated. * should be evaluated on an open interval with a transformation so that a
* inverse-square-root singularity at the lower limit can be integrated.
IV. \c #SingularUpperLimit is the same as above but for a singularity at *
the * IV. \c #SingularUpperLimit is the same as above but for a singularity at
upper limit. the
* upper limit.
V. \c #InfiniteDomainPow indicates that the integral *
should be evaluated over an semi-infinite domain---appropriate when both * V. \c #InfiniteDomainPow indicates that the integral
limits have the same sign (though one is very large) and when the integra * should be evaluated over an semi-infinite domain---appropriate when both
nd * limits have the same sign (though one is very large) and when the integr
vanishes faster than \f$x^{-1}\f$ at infinity. and
* vanishes faster than \f$x^{-1}\f$ at infinity.
VI. \c #InfiniteDomainExp *
indicates that the integral should be evaluated over an infinite domain * VI. \c #InfiniteDomainExp
starting at \c xmin and going to infinity (\c xmax is ignored)---the * indicates that the integral should be evaluated over an infinite domain
integrand should vanish exponentially for large \f$x\f$. * starting at \c xmin and going to infinity (\c xmax is ignored)---the
*/ * integrand should vanish exponentially for large \f$x\f$.
*/
typedef enum typedef enum
{ {
ClosedInterval, /**< evaluate integral on a closed interval */ ClosedInterval, /**< evaluate integral on a closed interval */
OpenInterval, /**< evaluate integral on an open interval */ OpenInterval, /**< evaluate integral on an open interval */
SingularLowerLimit, /**< integrate an inv sqrt singularity at lower limit */ SingularLowerLimit, /**< integrate an inv sqrt singularity at lower limit */
SingularUpperLimit, /**< integrate an inv sqrt singularity at upper limit */ SingularUpperLimit, /**< integrate an inv sqrt singularity at upper limit */
InfiniteDomainPow, /**< integrate infinite domain with power-law falloff */ InfiniteDomainPow, /**< integrate infinite domain with power-law falloff */
InfiniteDomainExp /**< integrate infinite domain with exponential fallo ff */ InfiniteDomainExp /**< integrate infinite domain with exponential fallo ff */
} }
IntegralType; IntegralType;
 End of changes. 2 change blocks. 
103 lines changed or deleted 106 lines changed or added


 Interpolate.h   Interpolate.h 
skipping to change at line 23 skipping to change at line 23
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
#ifndef _INTERPOLATE_H #ifndef _INTERPOLATE_H
#define _INTERPOLATE_H #define _INTERPOLATE_H
#include <lal/Date.h>
#include <lal/Sequence.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/XLALGSL.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_spline.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup Interpolate_h * \addtogroup Interpolate_h
*
\brief This header covers the routines for interpolation. * \brief This header covers the routines for interpolation.
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/Interpolate.h> * \code
\endcode * #include <lal/Interpolate.h>
* \endcode
\heading{Description} *
* ### Description ###
The routine <tt>LALSPolynomialInterpolation()</tt> computes the interpolate *
d \f$y\f$ * The routine <tt>LALSPolynomialInterpolation()</tt> computes the interpol
value \c output at the \f$x\f$ value \c target by fitting a polynomial of ated \f$y\f$
order <tt>params.n-1</tt> to the data. The result \c output is of type * value \c output at the \f$x\f$ value \c target by fitting a polynomial o
\c SInterpolateOut, which contains the value <tt>output.y</tt> as well as f
an estimate of the error <tt>output.dy</tt>. The routine * order <tt>params.n-1</tt> to the data. The result \c output is of type
<tt>LALDPolynomialInterpolation()</tt> is the same but for double precision * \c SInterpolateOut, which contains the value <tt>output.y</tt> as well a
. s
* an estimate of the error <tt>output.dy</tt>. The routine
\heading{Operating Instructions} * <tt>LALDPolynomialInterpolation()</tt> is the same but for double precis
ion.
The following program fits a fourth-order polynomial to the five data point *
s * ### Operating Instructions ###
\f$\{(0,0),(1,1),(2,3),(3,4),(4,3)\}\f$, and interpolates the value at \f$x *
=2.4\f$. * The following program fits a fourth-order polynomial to the five data po
ints
\code * \f$\{(0,0),(1,1),(2,3),(3,4),(4,3)\}\f$, and interpolates the value at \
#include <lal/LALStdlib.h> f$x=2.4\f$.
#include <lal/Interpolate.h> *
* \code
int main () * #include <lal/LALStdlib.h>
{ * #include <lal/Interpolate.h>
enum { ArraySize = 5 }; *
static LALStatus status; * int main ()
REAL4 x[ArraySize] = {0,1,2,3,4}; * {
REAL4 y[ArraySize] = {0,1,3,4,3}; * enum { ArraySize = 5 };
REAL4 target = 2.4; * static LALStatus status;
SInterpolatePar intpar = {ArraySize, x, y}; * REAL4 x[ArraySize] = {0,1,2,3,4};
SInterpolateOut intout; * REAL4 y[ArraySize] = {0,1,3,4,3};
* REAL4 target = 2.4;
LALSPolynomialInterpolation( &status, &intout, target, &intpar ); * SInterpolatePar intpar = {ArraySize, x, y};
* SInterpolateOut intout;
return 0; *
} * LALSPolynomialInterpolation( &status, &intout, target, &intpar );
\endcode *
* return 0;
\heading{Algorithm} * }
* \endcode
This is an implementation of the Neville algroithm, see \c polint in *
Numerical Recipes [\ref ptvf1992]. * ### Algorithm ###
*
*/ * This is an implementation of the Neville algroithm, see \c polint in
* Numerical Recipes \cite ptvf1992.
*
*/
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define INTERPOLATEH_ENULL 1 /**< Null pointer */ #define INTERPOLATEH_ENULL 1 /**< Null pointer */
#define INTERPOLATEH_ESIZE 2 /**< Invalid size */ #define INTERPOLATEH_ESIZE 2 /**< Invalid size */
#define INTERPOLATEH_EZERO 4 /**< Zero divide */ #define INTERPOLATEH_EZERO 4 /**< Zero divide */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
skipping to change at line 112 skipping to change at line 119
/** These structures contain the output of the interpolation */ /** These structures contain the output of the interpolation */
typedef struct typedef struct
tagDInterpolateOut tagDInterpolateOut
{ {
REAL8 y; /**< The interpolated value */ REAL8 y; /**< The interpolated value */
REAL8 dy; /**< The estimated error in the interpolated value */ REAL8 dy; /**< The estimated error in the interpolated value */
} }
DInterpolateOut; DInterpolateOut;
/** These structures contain the interpolation parameters; These are the ar /**
rays * These structures contain the interpolation parameters; These are the arr
ays
* of \c n domain values \f$x[0] \ldots x[n-1]\f$ and their * of \c n domain values \f$x[0] \ldots x[n-1]\f$ and their
* corresponding values \f$y[0] \ldots y[n-1]\f$ * corresponding values \f$y[0] \ldots y[n-1]\f$
*/ */
typedef struct typedef struct
tagSInterpolatePar tagSInterpolatePar
{ {
UINT4 n; /**< The number of points in the arrays to use in the interp olation */ UINT4 n; /**< The number of points in the arrays to use in the interp olation */
REAL4 *x; /**< The array of domain values */ REAL4 *x; /**< The array of domain values */
REAL4 *y; /**< The array of values to interpolate */ REAL4 *y; /**< The array of values to interpolate */
} }
SInterpolatePar; SInterpolatePar;
/** These structures contain the interpolation parameters; These are the ar /**
rays * These structures contain the interpolation parameters; These are the arr
ays
* of \c n domain values \f$x[0]\ldots x[n-1]\f$ and their * of \c n domain values \f$x[0]\ldots x[n-1]\f$ and their
* corresponding values \f$y[0]\ldots y[n-1]\f$ * corresponding values \f$y[0]\ldots y[n-1]\f$
*/ */
typedef struct typedef struct
tagDInterpolatePar tagDInterpolatePar
{ {
UINT4 n; /**< The number of points in the arrays to use in the interp olation */ UINT4 n; /**< The number of points in the arrays to use in the interp olation */
REAL8 *x; /**< The array of domain values */ REAL8 *x; /**< The array of domain values */
REAL8 *y; /**< The array of values to interpolate */ REAL8 *y; /**< The array of values to interpolate */
} }
skipping to change at line 167 skipping to change at line 176
/** \see See \ref Interpolate_h for documentation */ /** \see See \ref Interpolate_h for documentation */
REAL8 REAL8
XLALREAL8PolynomialInterpolation ( XLALREAL8PolynomialInterpolation (
REAL8 *yout, REAL8 *yout,
REAL8 xtarget, REAL8 xtarget,
REAL8 *y, REAL8 *y,
REAL8 *x, REAL8 *x,
UINT4 n UINT4 n
); );
int
XLALREAL8Interpolation (
REAL8Sequence *x_in, /* Assumed to be in ascending order */
REAL8Sequence *y_in,
REAL8Sequence *x_out,
REAL8Sequence *y_out, /* Modified in place */
UINT4 n_data_points,
const gsl_interp_type *itrp_type /* Can be NULL -- default it to cubic
spline */
);
int
XLALREAL8TimeSeriesInterpolation (
REAL8TimeSeries *ts_in,
REAL8Sequence *y_in,
REAL8Sequence *t_in,
REAL8Sequence *t_out, /* If NULL, interpolate from dt and epoch of ts_i
n */
UINT4 n_data_points,
const gsl_interp_type *itrp_type
);
/*@}*/ /*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _INTERPOLATE_H */ #endif /* _INTERPOLATE_H */
 End of changes. 6 change blocks. 
57 lines changed or deleted 90 lines changed or added


 LALAdaptiveRungeKutta4.h   LALAdaptiveRungeKutta4.h 
skipping to change at line 17 skipping to change at line 17
#include <lal/LALGSL.h> #include <lal/LALGSL.h>
#include <lal/SeqFactories.h> #include <lal/SeqFactories.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** /**
\addtogroup LALAdaptiveRungeKutta4_h * \addtogroup LALAdaptiveRungeKutta4_h
\author Vallisneri, M. * \author Vallisneri, M.
\brief Adaptive Runge-Kutta4 * \brief Adaptive Runge-Kutta4
*
<ul> * <ul>
<li> \c integrator Integration structure (quasi-class). Created using <tt>X * <li> \c integrator Integration structure (quasi-class). Created using <t
LALAdaptiveRungeKutta4Init()</tt>. t>XLALAdaptiveRungeKutta4Init()</tt>.
...</li> * ...</li>
</ul> * </ul>
*
\heading{Description} * ### Description ###
The code \ref LALAdaptiveRungeKutta4.c evolves a system of \f$n\f$ coupled *
first--order differential equations. * The code \ref LALAdaptiveRungeKutta4.c evolves a system of \f$n\f$ coupl
Internally, it uses GSL routines to perform adaptive-step evolution, and th ed first--order differential equations.
en interpolates the resulting * Internally, it uses GSL routines to perform adaptive-step evolution, and
trajectories to a fixed step size. then interpolates the resulting
* trajectories to a fixed step size.
Prior to evolving a system using <tt>XLALAdaptiveRungeKutta4()</tt>, it is *
necessary to create an integrator structure using * Prior to evolving a system using <tt>XLALAdaptiveRungeKutta4()</tt>, it
<tt>XLALAdaptiveRungeKutta4Init()</tt>. Once you are done with the integrat is necessary to create an integrator structure using
or, free it with <tt>XLALAdaptiveRungeKutta4Free()</tt>. * <tt>XLALAdaptiveRungeKutta4Init()</tt>. Once you are done with the integ
\heading{Algorithm} rator, free it with <tt>XLALAdaptiveRungeKutta4Free()</tt>.
TBF. *
* ### Algorithm ###
\heading{Uses} *
For updated SpinTaylor waveforms. * TBF.
*
\heading{Notes} * ### Uses ###
None so far... *
* For updated SpinTaylor waveforms.
*/ *
* ### Notes ###
*
* None so far...
*
*/
/*@{*/ /*@{*/
#define XLAL_BEGINGSL \ #define XLAL_BEGINGSL \
{ \ { \
gsl_error_handler_t *saveGSLErrorHandler_; \ gsl_error_handler_t *saveGSLErrorHandler_; \
XLALGSL_PTHREAD_MUTEX_LOCK; \ XLALGSL_PTHREAD_MUTEX_LOCK; \
saveGSLErrorHandler_ = gsl_set_error_handler_off(); saveGSLErrorHandler_ = gsl_set_error_handler_off();
#define XLAL_ENDGSL \ #define XLAL_ENDGSL \
gsl_set_error_handler( saveGSLErrorHandler_ ); \ gsl_set_error_handler( saveGSLErrorHandler_ ); \
 End of changes. 1 change blocks. 
31 lines changed or deleted 36 lines changed or added


 LALAtomicDatatypes.h   LALAtomicDatatypes.h 
skipping to change at line 20 skipping to change at line 20
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
// ---------- SEE LALDatatypes.dox for doxygen documentation ---------- /* ---------- SEE LALDatatypes.dox for doxygen documentation ---------- */
#ifndef _LALATOMICDATATYPES_H #ifndef _LALATOMICDATATYPES_H
#define _LALATOMICDATATYPES_H #define _LALATOMICDATATYPES_H
#include <stdint.h> #include <stdint.h>
#include <lal/LALConfig.h>
#ifndef LAL_USE_OLD_COMPLEX_STRUCTS /* macros for certain keywords */
#if defined(__cplusplus) #if __STDC_VERSION__ >= 199901L
#include <complex> # define _LAL_RESTRICT_ restrict
# define _LAL_INLINE_ inline
#elif defined __GNUC__
# define _LAL_RESTRICT_ __restrict__
# define _LAL_INLINE_ __inline__
#else #else
#include <complex.h> # define _LAL_RESTRICT_
# define _LAL_INLINE_
#endif #endif
#endif /* LAL_USE_OLD_COMPLEX_STRUCTS */
#include <lal/LALConfig.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#elif 0 #elif 0
} /* so that editors will match preceding brace */ } /* so that editors will match preceding brace */
#endif #endif
/** \addtogroup LALDatatypes */ /*@{*/ /** \addtogroup LALDatatypes */ /*@{*/
typedef char CHAR; /**< One-byte signed integer, see \ref LALDa tatypes for more details */ typedef char CHAR; /**< One-byte signed integer, see \ref LALDa tatypes for more details */
skipping to change at line 72 skipping to change at line 75
/* Integer types */ /* Integer types */
typedef int16_t INT2; /**< Two-byte signed integer */ typedef int16_t INT2; /**< Two-byte signed integer */
typedef int32_t INT4; /**< Four-byte signed integer. */ typedef int32_t INT4; /**< Four-byte signed integer. */
typedef int64_t INT8; /**< Eight-byte signed integer; on some plat forms this is equivalent to <tt>long int</tt> instead. */ typedef int64_t INT8; /**< Eight-byte signed integer; on some plat forms this is equivalent to <tt>long int</tt> instead. */
typedef uint16_t UINT2; /**< Two-byte unsigned integer. */ typedef uint16_t UINT2; /**< Two-byte unsigned integer. */
typedef uint32_t UINT4; /**< Four-byte unsigned integer. */ typedef uint32_t UINT4; /**< Four-byte unsigned integer. */
typedef uint64_t UINT8; /**< Eight-byte unsigned integer; on some platforms this is equivalent to <tt>unsigned long int</tt> instead. * / typedef uint64_t UINT8; /**< Eight-byte unsigned integer; on some platforms this is equivalent to <tt>unsigned long int</tt> instead. * /
/* Macros for integer constants */ /* Macros for integer constants */
/** \def LAL_INT8_C(v) (v ## LL) /**
* \def LAL_INT8_C(v) (v ## LL)
* \brief Macro for use in defining \a v as an INT8 constant. * \brief Macro for use in defining \a v as an INT8 constant.
* *
* This macro affixes the appropriate qualifier to form an INT8 constant. * This macro affixes the appropriate qualifier to form an INT8 constant.
* For example: * For example:
* \code * \code
* const INT8 jan_1_2000_gps_nanosec = LAL_INT8_C(63072001300000000) * const INT8 jan_1_2000_gps_nanosec = LAL_INT8_C(63072001300000000)
* \endcode * \endcode
*/ */
#define LAL_INT8_C INT64_C #define LAL_INT8_C INT64_C
/** \def LAL_UINT8_C(v) (v ## ULL) /**
* \def LAL_UINT8_C(v) (v ## ULL)
* \brief Macro for use in defining \a v as an UINT8 constant. * \brief Macro for use in defining \a v as an UINT8 constant.
* *
* This macro affixes the appropriate qualifier to form an UINT8 constant. * This macro affixes the appropriate qualifier to form an UINT8 constant.
* For example: * For example:
* \code * \code
* const UINT8 jan_1_2000_gps_nanosec = LAL_UINT8_C(63072001300000000) * const UINT8 jan_1_2000_gps_nanosec = LAL_UINT8_C(63072001300000000)
* \endcode * \endcode
*/ */
#define LAL_UINT8_C UINT64_C #define LAL_UINT8_C UINT64_C
/* Real types */ /* Real types */
typedef float REAL4; /**< Single precision real floating-point number (4 bytes). */ typedef float REAL4; /**< Single precision real floating-point number (4 bytes). */
typedef double REAL8; /**< Double precision real floating-point number (8 bytes). */ typedef double REAL8; /**< Double precision real floating-point number (8 bytes). */
/* Complex types */
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
#ifndef LAL_USE_OLD_COMPLEX_STRUCTS /* Use C99 complex numbers where available: C99, gcc with non-ANSI extensio
ns */
/* Complex types */ #if !defined(__cplusplus)
#if defined(__cplusplus) # if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && !defined(__STRICT
typedef std::complex<float> COMPLEX8; _ANSI__))
typedef std::complex<double> COMPLEX16; # define _LAL_C99_COMPLEX_NUMBERS_
#else # endif
typedef float complex COMPLEX8; /**< Single-precision floating-point co
mplex number (8 bytes total) */
typedef double complex COMPLEX16; /**< Double-precision floating-point co
mplex number (16 bytes total) */
#endif #endif
/* Complex type constructors */ #ifdef _LAL_C99_COMPLEX_NUMBERS_
#if !defined(__cplusplus)
#include <complex.h>
typedef float complex COMPLEX8; /**< Single-precision floating-point
complex number (8 bytes total) */
typedef double complex COMPLEX16; /**< Double-precision floating-point
complex number (16 bytes total) */
#define crectf(re, im) (((REAL4)(re)) + _Complex_I*((REAL4)(im))) /**< Construct a COMPLEX8 from real and imaginary parts */ #define crectf(re, im) (((REAL4)(re)) + _Complex_I*((REAL4)(im))) /**< Construct a COMPLEX8 from real and imaginary parts */
#define crect(re, im) (((REAL8)(re)) + _Complex_I*((REAL8)(im))) /**< Construct a COMPLEX16 from real and imaginary parts */ #define crect(re, im) (((REAL8)(re)) + _Complex_I*((REAL8)(im))) /**< Construct a COMPLEX16 from real and imaginary parts */
#define cpolarf(r, th) (((REAL4)(r)) * cexpf(crectf(0, th))) /**< Construct a COMPLEX8 from polar modulus and argument */ #define cpolarf(r, th) (((REAL4)(r)) * cexpf(crectf(0, th))) /**< Construct a COMPLEX8 from polar modulus and argument */
#define cpolar(r, th) (((REAL8)(r)) * cexp(crect(0, th))) /**< Construct a COMPLEX16 from polar modulus and argument */ #define cpolar(r, th) (((REAL8)(r)) * cexp(crect(0, th))) /**< Construct a COMPLEX16 from polar modulus and argument */
#endif
#else /* LAL_USE_OLD_COMPLEX_STRUCTS */
#else /* !_LAL_C99_COMPLEX_NUMBERS_ */
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
/* Old LAL complex structs, being phased out ... */
typedef struct tagCOMPLEX8 { REAL4 realf_FIXME; REAL4 imagf_FIXME; } COMPLE
X8;
#define crealf(z) ((z).realf_FIXME)
#define cimagf(z) ((z).imagf_FIXME)
typedef struct tagCOMPLEX16 { REAL8 real_FIXME; REAL8 imag_FIXME; } COMPLEX
16;
#define creal(z) ((z).real_FIXME)
#define cimag(z) ((z).imag_FIXME)
/** \endcond */
#endif /* LAL_USE_OLD_COMPLEX_STRUCTS */ /**************************************************************************
**/
/* Fall back to GSL complex number types if C99 complex numbers are not
*/
/* available. GSL complex numbers are implemented as a struct containing
*/
/* an array of 2 elements of the corresponding real type. The C99 standard
*/
/* should guarantee that GSL complex numbers are binary-compatible with C99
*/
/* complex numbers; 6.2.5 point 13 of the standard states that C99 complex
*/
/* numbers are equivalent to an array of 2 elements of the corresponding
*/
/* real type, and 6.7.2.1 point 13 states that padding is never added to
*/
/* the beginning of a struct.
*/
/**************************************************************************
**/
#include <math.h>
#include <gsl/gsl_complex.h>
typedef gsl_complex_float COMPLEX8;
typedef gsl_complex COMPLEX16;
static _LAL_INLINE_ COMPLEX8 crectf(const REAL4 re, const REAL4 im);
static _LAL_INLINE_ COMPLEX8 crectf(const REAL4 re, const REAL4 im) {
COMPLEX8 z; GSL_SET_COMPLEX(&z, re, im); return z;
}
static _LAL_INLINE_ COMPLEX16 crect(const REAL8 re, const REAL8 im);
static _LAL_INLINE_ COMPLEX16 crect(const REAL8 re, const REAL8 im) {
COMPLEX16 z; GSL_SET_COMPLEX(&z, re, im); return z;
}
static _LAL_INLINE_ COMPLEX8 cpolarf(const REAL4 r, const REAL4 th);
static _LAL_INLINE_ COMPLEX8 cpolarf(const REAL4 r, const REAL4 th) {
COMPLEX8 z; GSL_SET_COMPLEX(&z, r*cos(th), r*sin(th)); return z;
}
static _LAL_INLINE_ COMPLEX16 cpolar(const REAL8 r, const REAL8 th);
static _LAL_INLINE_ COMPLEX16 cpolar(const REAL8 r, const REAL8 th) {
COMPLEX16 z; GSL_SET_COMPLEX(&z, r*cos(th), r*sin(th)); return z;
}
#define crealf(z) GSL_REAL(z)
#define cimagf(z) GSL_IMAG(z)
#define creal(z) GSL_REAL(z)
#define cimag(z) GSL_IMAG(z)
/*@}*/ /** \endcond */
#endif /* _LAL_C99_COMPLEX_NUMBERS_ */
#endif /* SWIG */ #endif /* SWIG */
/*@}*/
#if 0 #if 0
{ /* so that editors will match succeeding brace */ { /* so that editors will match succeeding brace */
#elif defined(__cplusplus) #elif defined(__cplusplus)
} }
#endif #endif
#endif /* _LALATOMICDATATYPES_H */ #endif /* _LALATOMICDATATYPES_H */
 End of changes. 16 change blocks. 
38 lines changed or deleted 85 lines changed or added


 LALCache.h   LALCache.h 
skipping to change at line 20 skipping to change at line 20
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
/** \file /**
* \file
* \ingroup support * \ingroup support
* \author Creighton, J. D. E. * \author Creighton, J. D. E.
* \date 2007 * \date 2007
* \brief This header covers routines to create and manipulate LALCache * \brief This header covers routines to create and manipulate LALCache
* structures and to read LAL cache files. * structures and to read LAL cache files.
* *
*/ */
#ifndef _LALCACHE_H_ #ifndef _LALCACHE_H_
#define _LALCACHE_H_ #define _LALCACHE_H_
skipping to change at line 77 skipping to change at line 78
/** Returns a new LALCache structure that is the merge of two. */ /** Returns a new LALCache structure that is the merge of two. */
LALCache *XLALCacheMerge(const LALCache * cache1, const LALCache * cache2); LALCache *XLALCacheMerge(const LALCache * cache1, const LALCache * cache2);
/** Reads a LAL cache file and produces a LALCache structure. */ /** Reads a LAL cache file and produces a LALCache structure. */
LALCache *XLALCacheFileRead(LALFILE * fp); LALCache *XLALCacheFileRead(LALFILE * fp);
/** Reads a LAL cache file and produces a LALCache structure. */ /** Reads a LAL cache file and produces a LALCache structure. */
LALCache *XLALCacheImport(const char *fname); LALCache *XLALCacheImport(const char *fname);
/** Globs a directory and construct LALCache from matching entries. /**
* Globs a directory and construct LALCache from matching entries.
* \param [in] dirstr Colon-delimited list of directories. * \param [in] dirstr Colon-delimited list of directories.
* \param [in] fnptrn Glob pattern for matching files. * \param [in] fnptrn Glob pattern for matching files.
* \returns LALCache structure. * \returns LALCache structure.
*/ */
LALCache *XLALCacheGlob(const char *dirstr, const char *fnptrn); LALCache *XLALCacheGlob(const char *dirstr, const char *fnptrn);
/** Writes a LALCache structure to output LALFILE. */ /** Writes a LALCache structure to output LALFILE. */
int XLALCacheFileWrite(LALFILE * fp, const LALCache * cache); int XLALCacheFileWrite(LALFILE * fp, const LALCache * cache);
/** Exports a LALCache structure to an output LAL cache file. */ /** Exports a LALCache structure to an output LAL cache file. */
int XLALCacheExport(const LALCache * cache, const char *filename); int XLALCacheExport(const LALCache * cache, const char *filename);
/** Sorts entries in a LALCache structure. */ /** Sorts entries in a LALCache structure. */
int XLALCacheSort(LALCache * cache); int XLALCacheSort(LALCache * cache);
/** Prunes duplicate entries keeping the second one; cache is reduced in /**
* Prunes duplicate entries keeping the second one; cache is reduced in
* length if there are. Entries are duplicates if their metadata are * length if there are. Entries are duplicates if their metadata are
* the same (even if the urls are different */ * the same (even if the urls are different
*/
int XLALCacheUniq(LALCache * cache); int XLALCacheUniq(LALCache * cache);
/** Selects only matching entries in a LALCache structure -- other entries /**
* Selects only matching entries in a LALCache structure -- other entries
* are deleted from the LALCache structure. * are deleted from the LALCache structure.
* \param cache *UNDOCUMENTED* * \param cache *UNDOCUMENTED*
* \param t0 Remove entries ending before t0 (0 to disable). * \param t0 Remove entries ending before t0 (0 to disable).
* \param t1 Remove entries ending after t1 (0 to disable). * \param t1 Remove entries ending after t1 (0 to disable).
* \param srcregex Regular expression to match src field (NULL to disable). * \param srcregex Regular expression to match src field (NULL to disable).
* \param dscregex Regular expression to match dsc field (NULL to disable). * \param dscregex Regular expression to match dsc field (NULL to disable).
* \param urlregex Regular expression to match url field (NULL to disable). * \param urlregex Regular expression to match url field (NULL to disable).
*/ */
int XLALCacheSieve(LALCache * cache, INT4 t0, INT4 t1, int XLALCacheSieve(LALCache * cache, INT4 t0, INT4 t1,
const char *srcregex, const char *dscregex, const char *srcregex, const char *dscregex,
const char *urlregex); const char *urlregex);
/** Finds the first entry that contains the requested time, or the first en /**
try * Finds the first entry that contains the requested time, or the first ent
ry
* after the time if the time is in a gap or before the first entry. Retur ns * after the time if the time is in a gap or before the first entry. Retur ns
* NULL if the time is after the last entry. * NULL if the time is after the last entry.
*/ */
LALCacheEntry *XLALCacheEntrySeek(const LALCache * cache, double t); LALCacheEntry *XLALCacheEntrySeek(const LALCache * cache, double t);
/** Open a file identified by an entry in a LALCache structure. */ /** Open a file identified by an entry in a LALCache structure. */
LALFILE *XLALCacheEntryOpen(const LALCacheEntry * entry); LALFILE *XLALCacheEntryOpen(const LALCacheEntry * entry);
#if 0 #if 0
{ /* to match succeding brace */ { /* to match succeding brace */
 End of changes. 6 change blocks. 
7 lines changed or deleted 13 lines changed or added


 LALConfig.h   LALConfig.h 
/* include/lal/LALConfig.h. Generated from LALConfig.h.in by configure. * / /* include/lal/LALConfig.h. Generated from LALConfig.h.in by configure. * /
/* only include this file if LAL's config.h has not been included */ /* only include this file if LAL's config.h has not been included */
#ifndef CONFIG_H__LAL #ifndef LAL_VERSION
#ifndef _LALCONFIG_H
#define _LALCONFIG_H
/* LAL Version */ /* LAL Version */
#define LAL_VERSION "6.11.0" #define LAL_VERSION "6.12.0"
/* LAL Version Major Number */ /* LAL Version Major Number */
#define LAL_VERSION_MAJOR 6 #define LAL_VERSION_MAJOR 6
/* LAL Version Minor Number */ /* LAL Version Minor Number */
#define LAL_VERSION_MINOR 11 #define LAL_VERSION_MINOR 12
/* LAL Version Micro Number */ /* LAL Version Micro Number */
#define LAL_VERSION_MICRO 0 #define LAL_VERSION_MICRO 0
/* LAL Version Devel Number */ /* LAL Version Devel Number */
#define LAL_VERSION_DEVEL 0 #define LAL_VERSION_DEVEL 0
/* LAL Configure Arguments */ /* LAL Configure Arguments */
#define LAL_CONFIGURE_ARGS " '--enable-shared' '--prefix=/home/ut/testing/l al/6.11.0' '--exec-prefix=/home/ut/testing/lal/6.11.0' '--sysconfdir=/home/ ut/testing/lal/6.11.0' '--datadir=/home/ut/testing/lal/6.11.0/share' 'CFLAG S=-w -fpermissive' 'CXXFLAGS=-w -fpermissive'" #define LAL_CONFIGURE_ARGS " '--enable-shared' '--prefix=/home/ut/testing/l al/6.12.0' '--exec-prefix=/home/ut/testing/lal/6.12.0' '--sysconfdir=/home/ ut/testing/lal/6.12.0' '--datadir=/home/ut/testing/lal/6.12.0/share' 'CFLAG S=-w -fpermissive' 'CXXFLAGS=-w -fpermissive'"
/* LAL Configure Date */ /* LAL Configure Date */
#define LAL_CONFIGURE_DATE "2013-06-28T04:11:52+0400" #define LAL_CONFIGURE_DATE "2014-01-10T03:03:47+0400"
/* Suppress debugging code */ /* Suppress debugging code */
/* #undef LAL_NDEBUG */ /* #undef LAL_NDEBUG */
/* Use functions rather than macros */ /* Use functions rather than macros */
/* #undef NOLALMACROS */ /* #undef NOLALMACROS */
/* Use pthread mutex lock for threadsafety */ /* Use pthread mutex lock for threadsafety */
/* #undef LAL_PTHREAD_LOCK */ /* #undef LAL_PTHREAD_LOCK */
skipping to change at line 50 skipping to change at line 47
/* Define if using boinc library */ /* Define if using boinc library */
/* #undef LAL_BOINC_ENABLED */ /* #undef LAL_BOINC_ENABLED */
/* Define if using CUDA library */ /* Define if using CUDA library */
/* #undef LAL_CUDA_ENABLED */ /* #undef LAL_CUDA_ENABLED */
/* Define if using qthread library */ /* Define if using qthread library */
/* #undef LAL_QTHREAD */ /* #undef LAL_QTHREAD */
#endif /* _LALCONFIG_H */ #endif /* LAL_VERSION */
#endif /* CONFIG_H__LAL */
 End of changes. 6 change blocks. 
8 lines changed or deleted 5 lines changed or added


 LALConstants.h   LALConstants.h 
skipping to change at line 44 skipping to change at line 44
*/ */
/*@{*/ /*@{*/
#ifndef _LALCONSTANTS_H #ifndef _LALCONSTANTS_H
#define _LALCONSTANTS_H #define _LALCONSTANTS_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** \name Floating-point constants /**
* \name Floating-point constants
* The following constants define the precision and range of * The following constants define the precision and range of
* floating-point arithmetic in LAL. They are taken from the IEEE * floating-point arithmetic in LAL. They are taken from the IEEE
* standard 754 for binary arithmetic. All numbers are dimensionless. */ * standard 754 for binary arithmetic. All numbers are dimensionless.
*/
/*@{*/ /*@{*/
#define LAL_REAL4_MANT 24 /**< Bits of precision in the mantissa of a REAL4 */ #define LAL_REAL4_MANT 24 /**< Bits of precision in the mantissa of a REAL4 */
#define LAL_REAL4_MAX 3.40282347e+38 /**< Largest REAL4 */ #define LAL_REAL4_MAX 3.40282347e+38 /**< Largest REAL4 */
#define LAL_REAL4_MIN 1.17549435e-38 /**< Smallest nonzero REAL4 */ #define LAL_REAL4_MIN 1.17549435e-38 /**< Smallest nonzero REAL4 */
#define LAL_REAL4_EPS 1.19209290e-07 /**< 0.5^(LAL_REAL4_MANT-1), ie the di fference between 1 and the next resolveable REAL4 */ #define LAL_REAL4_EPS 1.19209290e-07 /**< 0.5^(LAL_REAL4_MANT-1), ie the di fference between 1 and the next resolveable REAL4 */
#define LAL_REAL8_MANT 53 /**< Bits of precision in the mantissa of a REAL8 */ #define LAL_REAL8_MANT 53 /**< Bits of precision in the mantissa of a REAL8 */
#define LAL_REAL8_MAX 1.7976931348623157e+308 /**< Largest REAL8 */ #define LAL_REAL8_MAX 1.7976931348623157e+308 /**< Largest REAL8 */
#define LAL_REAL8_MIN 2.2250738585072014e-308 /**< Smallest nonzero REAL8 * / #define LAL_REAL8_MIN 2.2250738585072014e-308 /**< Smallest nonzero REAL8 * /
#define LAL_REAL8_EPS 2.2204460492503131e-16 /**< 0.5^(LAL_REAL8_MANT-1), ie the difference between 1 and the next resolveable REAL8 */ #define LAL_REAL8_EPS 2.2204460492503131e-16 /**< 0.5^(LAL_REAL8_MANT-1), ie the difference between 1 and the next resolveable REAL8 */
/*@}*/ /*@}*/
/** \name Mathematical constants /**
* \name Mathematical constants
* The following are fundamental mathematical constants. They are mostly * The following are fundamental mathematical constants. They are mostly
* taken from the GNU C <tt>math.h</tt> header (with the exception of * taken from the GNU C <tt>math.h</tt> header (with the exception of
* <tt>LAL_TWOPI</tt>, which was computed using Maple). All numbers are * <tt>LAL_TWOPI</tt>, which was computed using Maple). All numbers are
* dimensionless. The value of exp(gamma) is taken from * dimensionless. The value of exp(gamma) is taken from
* http://www.research.att.com/~njas/sequences/A073004 */ * http://www.research.att.com/~njas/sequences/A073004
*/
/*@{*/ /*@{*/
#define LAL_E 2.7182818284590452353602874713526625 /**< e */ #define LAL_E 2.7182818284590452353602874713526625 /**< e */
#define LAL_LOG2E 1.4426950408889634073599246810018922 /**< log_2 e */ #define LAL_LOG2E 1.4426950408889634073599246810018922 /**< log_2 e */
#define LAL_LOG10E 0.4342944819032518276511289189166051 /**< log_10 e * / #define LAL_LOG10E 0.4342944819032518276511289189166051 /**< log_10 e * /
#define LAL_LN2 0.6931471805599453094172321214581766 /**< log_e 2 */ #define LAL_LN2 0.6931471805599453094172321214581766 /**< log_e 2 */
#define LAL_LN10 2.3025850929940456840179914546843642 /**< log_e 10 * / #define LAL_LN10 2.3025850929940456840179914546843642 /**< log_e 10 * /
#define LAL_SQRT2 1.4142135623730950488016887242096981 /**< sqrt(2) */ #define LAL_SQRT2 1.4142135623730950488016887242096981 /**< sqrt(2) */
#define LAL_SQRT1_2 0.7071067811865475244008443621048490 /**< 1/sqrt(2) */ #define LAL_SQRT1_2 0.7071067811865475244008443621048490 /**< 1/sqrt(2) */
#define LAL_GAMMA 0.5772156649015328606065120900824024 /**< gamma */ #define LAL_GAMMA 0.5772156649015328606065120900824024 /**< gamma */
#define LAL_EXPGAMMA 1.7810724179901979852365041031071795 /**< exp(gamma) */ #define LAL_EXPGAMMA 1.7810724179901979852365041031071795 /**< exp(gamma) */
skipping to change at line 87 skipping to change at line 91
#define LAL_TWOPI 6.2831853071795864769252867665590058 /**< 2*pi */ #define LAL_TWOPI 6.2831853071795864769252867665590058 /**< 2*pi */
#define LAL_PI_2 1.5707963267948966192313216916397514 /**< pi/2 */ #define LAL_PI_2 1.5707963267948966192313216916397514 /**< pi/2 */
#define LAL_PI_4 0.7853981633974483096156608458198757 /**< pi/4 */ #define LAL_PI_4 0.7853981633974483096156608458198757 /**< pi/4 */
#define LAL_1_PI 0.3183098861837906715377675267450287 /**< 1/pi */ #define LAL_1_PI 0.3183098861837906715377675267450287 /**< 1/pi */
#define LAL_2_PI 0.6366197723675813430755350534900574 /**< 2/pi */ #define LAL_2_PI 0.6366197723675813430755350534900574 /**< 2/pi */
#define LAL_2_SQRTPI 1.1283791670955125738961589031215452 /**< 2/sqrt(pi) */ #define LAL_2_SQRTPI 1.1283791670955125738961589031215452 /**< 2/sqrt(pi) */
#define LAL_PI_180 1.7453292519943295769236907684886127e-2 /**< pi/180 * / #define LAL_PI_180 1.7453292519943295769236907684886127e-2 /**< pi/180 * /
#define LAL_180_PI 57.295779513082320876798154814105170 /**< 180/pi */ #define LAL_180_PI 57.295779513082320876798154814105170 /**< 180/pi */
/*@}*/ /*@}*/
/** \name Exact physical constants /**
* \name Exact physical constants
* The following physical constants are defined to have exact values. * The following physical constants are defined to have exact values.
* The values of \f$c\f$ and \f$g\f$ are taken from \ref Barnet_1996, * The values of \f$c\f$ and \f$g\f$ are taken from \cite Barnet_1996,
* \f$p_\mathrm{atm}\f$ is from \ref Lang_1992, while \f$\epsilon_0\f$ and * \f$p_\mathrm{atm}\f$ is from \cite Lang_1992, while \f$\epsilon_0\f$ and
* \f$\mu_0\f$ are computed from \f$c\f$ using exact formulae. The use * \f$\mu_0\f$ are computed from \f$c\f$ using exact formulae. The use
* of a Julian year (365.25 days) as standard is specified by the IAU. * of a Julian year (365.25 days) as standard is specified by the IAU.
* They are given in the SI units shown. */ * They are given in the SI units shown.
*/
/*@{*/ /*@{*/
#define LAL_C_SI 299792458 /**< Speed of light in vacuo, m s^-1 */ #define LAL_C_SI 299792458 /**< Speed of light in vacuo, m s^-1 */
#define LAL_EPSILON0_SI 8.8541878176203898505365630317107503e-12 /**< Perm ittivity of free space, C^2 N^-1 m^-2 */ #define LAL_EPSILON0_SI 8.8541878176203898505365630317107503e-12 /**< Perm ittivity of free space, C^2 N^-1 m^-2 */
#define LAL_MU0_SI 1.2566370614359172953850573533118012e-6 /**< Permeabi lity of free space, N A^-2 */ #define LAL_MU0_SI 1.2566370614359172953850573533118012e-6 /**< Permeabi lity of free space, N A^-2 */
#define LAL_GEARTH_SI 9.80665 /**< Standard gravity, m s^-2 */ #define LAL_GEARTH_SI 9.80665 /**< Standard gravity, m s^-2 */
#define LAL_PATM_SI 101325 /**< Standard atmosphere, Pa */ #define LAL_PATM_SI 101325 /**< Standard atmosphere, Pa */
#define LAL_YRJUL_SI 31557600 /**< Julian year, s */ #define LAL_YRJUL_SI 31557600 /**< Julian year, s */
#define LAL_LYR_SI 9.4607304725808e15 /**< (Julian) Lightyear, m */ #define LAL_LYR_SI 9.4607304725808e15 /**< (Julian) Lightyear, m */
/*@}*/ /*@}*/
/** \name Physical constants /**
* \name Physical constants
* The following are measured fundamental physical constants, with values * The following are measured fundamental physical constants, with values
* given in \ref Barnet_1996. When not dimensionless, they are given * given in \cite Barnet_1996. When not dimensionless, they are given
* in the SI units shown. */ * in the SI units shown.
*/
/*@{*/ /*@{*/
#define LAL_G_SI 6.67259e-11 /**< Gravitational constant, N m^2 kg^ -2 */ #define LAL_G_SI 6.67259e-11 /**< Gravitational constant, N m^2 kg^ -2 */
#define LAL_H_SI 6.6260755e-34 /**< Planck constant, J s */ #define LAL_H_SI 6.6260755e-34 /**< Planck constant, J s */
#define LAL_HBAR_SI 1.0545726691251019773669079307477023e-34 /**< Reduced Planck constant, J s. = LAL_H_SI / LAL_TWOPI */ #define LAL_HBAR_SI 1.0545726691251019773669079307477023e-34 /**< Reduced Planck constant, J s. = LAL_H_SI / LAL_TWOPI */
#define LAL_MPL_SI 2.1767140835297016797409334934257335e-8 /**< Planck mass, kg. = sqrt{LAL_HBAR_SI * LAL_C_SI / LAL_G_SI} */ #define LAL_MPL_SI 2.1767140835297016797409334934257335e-8 /**< Planck mass, kg. = sqrt{LAL_HBAR_SI * LAL_C_SI / LAL_G_SI} */
#define LAL_LPL_SI 1.6160486159348859434398861412879278e-35 /**< Planck length, m. = sqrt{LAL_HBAR_SI * LAL_G_SI / LAL_C_SI^3} */ #define LAL_LPL_SI 1.6160486159348859434398861412879278e-35 /**< Planck length, m. = sqrt{LAL_HBAR_SI * LAL_G_SI / LAL_C_SI^3} */
#define LAL_TPL_SI 5.3905579437054615411301846068720240e-44 /**< Planck time, s. = sqrt{LAL_HBAR_SI * LAL_G_SI / LAL_C_SI^5} */ #define LAL_TPL_SI 5.3905579437054615411301846068720240e-44 /**< Planck time, s. = sqrt{LAL_HBAR_SI * LAL_G_SI / LAL_C_SI^5} */
#define LAL_K_SI 1.380658e-23 /**< Boltzmann constant, J K^-1 */ #define LAL_K_SI 1.380658e-23 /**< Boltzmann constant, J K^-1 */
#define LAL_R_SI 8.314511 /**< Ideal gas constant, J K^-1 */ #define LAL_R_SI 8.314511 /**< Ideal gas constant, J K^-1 */
#define LAL_MOL 6.0221367e23 /**< Avogadro constant, dimensionless */ #define LAL_MOL 6.0221367e23 /**< Avogadro constant, dimensionless */
skipping to change at line 132 skipping to change at line 140
#define LAL_ME_SI 9.1093897e-31 /**< Electron mass, kg */ #define LAL_ME_SI 9.1093897e-31 /**< Electron mass, kg */
#define LAL_QE_SI 1.60217733e-19 /**< Electron charge, C */ #define LAL_QE_SI 1.60217733e-19 /**< Electron charge, C */
#define LAL_ALPHA 7.297354677e-3 /**< Fine structure constant, dimensionle ss */ #define LAL_ALPHA 7.297354677e-3 /**< Fine structure constant, dimensionle ss */
#define LAL_RE_SI 2.81794092e-15 /**< Classical electron radius, m */ #define LAL_RE_SI 2.81794092e-15 /**< Classical electron radius, m */
#define LAL_LAMBDAE_SI 3.86159323e-13 /**< Electron Compton wavelength, m * / #define LAL_LAMBDAE_SI 3.86159323e-13 /**< Electron Compton wavelength, m * /
#define LAL_AB_SI 5.29177249e-11 /**< Bohr radius, m */ #define LAL_AB_SI 5.29177249e-11 /**< Bohr radius, m */
#define LAL_MUB_SI 9.27401543e-24 /**< Bohr magneton, J T^-1 */ #define LAL_MUB_SI 9.27401543e-24 /**< Bohr magneton, J T^-1 */
#define LAL_MUN_SI 5.05078658e-27 /**< Nuclear magneton, J T^-1 */ #define LAL_MUN_SI 5.05078658e-27 /**< Nuclear magneton, J T^-1 */
/*@}*/ /*@}*/
/** \name Astrophysical parameters /**
* \name Astrophysical parameters
* The following parameters are derived from measured properties of the * The following parameters are derived from measured properties of the
* Earth and Sun. The values are taken from \ref Barnet_1996, except * Earth and Sun. The values are taken from \cite Barnet_1996, except
* for the obliquity of the ecliptic plane and the eccentricity of * for the obliquity of the ecliptic plane and the eccentricity of
* Earth's orbit, which are taken from \ref Lang_1992. All values are * Earth's orbit, which are taken from \cite Lang_1992. All values are
* given in the SI units shown. Note that the ``year'' and * given in the SI units shown. Note that the ``year'' and
* ``light-year'' have exactly defined values, and appear under * ``light-year'' have exactly defined values, and appear under
* ``Exact physical constants''. * ``Exact physical constants''.
*/ */
/*@{*/ /*@{*/
#define LAL_REARTH_SI 6.378140e6 /**< Earth equatorial radius, m */ #define LAL_REARTH_SI 6.378140e6 /**< Earth equatorial radius, m */
#define LAL_AWGS84_SI 6.378137e6 /**< Semimajor axis of WGS-84 Referen ce Ellipsoid, m */ #define LAL_AWGS84_SI 6.378137e6 /**< Semimajor axis of WGS-84 Referen ce Ellipsoid, m */
#define LAL_BWGS84_SI 6.356752314e6 /**< Semiminor axis of WGS-84 Referen ce Ellipsoid, m */ #define LAL_BWGS84_SI 6.356752314e6 /**< Semiminor axis of WGS-84 Referen ce Ellipsoid, m */
#define LAL_MEARTH_SI 5.97370e24 /**< Earth mass, kg */ #define LAL_MEARTH_SI 5.97370e24 /**< Earth mass, kg */
#define LAL_IEARTH 0.409092804 /**< Earth inclination (2000), radian s */ #define LAL_IEARTH 0.409092804 /**< Earth inclination (2000), radian s */
skipping to change at line 162 skipping to change at line 171
#define LAL_MRSUN_SI 1.4766254500421874513093320107664308e3 /**< Geometri zed solar mass, m. = LAL_MSUN_SI / LAL_MPL_SI * LAL_LPL_SI */ #define LAL_MRSUN_SI 1.4766254500421874513093320107664308e3 /**< Geometri zed solar mass, m. = LAL_MSUN_SI / LAL_MPL_SI * LAL_LPL_SI */
#define LAL_MTSUN_SI 4.9254923218988636432342917247829673e-6 /**< Geometri zed solar mass, s. = LAL_MSUN_SI / LAL_MPL_SI * LAL_TPL_SI */ #define LAL_MTSUN_SI 4.9254923218988636432342917247829673e-6 /**< Geometri zed solar mass, s. = LAL_MSUN_SI / LAL_MPL_SI * LAL_TPL_SI */
#define LAL_LSUN_SI 3.846e26 /**< Solar luminosity, W */ #define LAL_LSUN_SI 3.846e26 /**< Solar luminosity, W */
#define LAL_AU_SI 1.4959787066e11 /**< Astronomical unit, m */ #define LAL_AU_SI 1.4959787066e11 /**< Astronomical unit, m */
#define LAL_PC_SI 3.0856775807e16 /**< Parsec, m */ #define LAL_PC_SI 3.0856775807e16 /**< Parsec, m */
#define LAL_YRTROP_SI 31556925.2 /**< Tropical year (1994), s */ #define LAL_YRTROP_SI 31556925.2 /**< Tropical year (1994), s */
#define LAL_YRSID_SI 31558149.8 /**< Sidereal year (1994), s */ #define LAL_YRSID_SI 31558149.8 /**< Sidereal year (1994), s */
#define LAL_DAYSID_SI 86164.09053 /**< Mean sidereal day, s */ #define LAL_DAYSID_SI 86164.09053 /**< Mean sidereal day, s */
/*@}*/ /*@}*/
/** \name Cosmological parameters /**
* \name Cosmological parameters
* The following cosmological parameters are derived from measurements of * The following cosmological parameters are derived from measurements of
* the Hubble expansion rate and of the cosmic background radiation * the Hubble expansion rate and of the cosmic background radiation
* (CBR). Data are taken from \ref Barnet_1996. In what follows, the * (CBR). Data are taken from \cite Barnet_1996. In what follows, the
* normalized Hubble constant \f$h_0\f$ is equal to the actual Hubble * normalized Hubble constant \f$h_0\f$ is equal to the actual Hubble
* constant \f$H_0\f$ divided by \f$\langle H * constant \f$H_0\f$ divided by \f$\langle H
* \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}\f$. Thus the * \rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}\f$. Thus the
* Hubble constant can be written as: * Hubble constant can be written as:
* \f$H_0 = \langle H \rangle h_0\f$. * \f$H_0 = \langle H \rangle h_0\f$.
* Similarly, the critical energy density \f$\rho_c\f$ required for spatial * Similarly, the critical energy density \f$\rho_c\f$ required for spatial
* flatness is given by: \f$\rho_c = \langle\rho\rangle h_0^2\f$. * flatness is given by: \f$\rho_c = \langle\rho\rangle h_0^2\f$.
* Current estimates give \f$h_0\f$ a value of around 0.65, which is what i s * Current estimates give \f$h_0\f$ a value of around 0.65, which is what i s
* assumed below. All values are in the SI units shown. */ * assumed below. All values are in the SI units shown.
*/
/*@{*/ /*@{*/
#define LAL_H0FAC_SI 3.2407792903e-18 /**< Hubble constant prefactor, s^-1 */ #define LAL_H0FAC_SI 3.2407792903e-18 /**< Hubble constant prefactor, s^-1 */
#define LAL_H0_SI 2e-18 /**< Approximate Hubble constant, s^ -1 */ #define LAL_H0_SI 2e-18 /**< Approximate Hubble constant, s^ -1 */
/* Hubble constant H0 = h0*HOFAC, where h0 is around 0.65 */ /* Hubble constant H0 = h0*HOFAC, where h0 is around 0.65 */
#define LAL_RHOCFAC_SI 1.68860e-9 /**< Critical density prefactor, J m^-3 */ #define LAL_RHOCFAC_SI 1.68860e-9 /**< Critical density prefactor, J m^-3 */
#define LAL_RHOC_SI 7e-10 /**< Approximate critical density, J m^ -3 */ #define LAL_RHOC_SI 7e-10 /**< Approximate critical density, J m^ -3 */
/* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */ /* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */
#define LAL_TCBR_SI 2.726 /**< Cosmic background radiation temperature, K */ #define LAL_TCBR_SI 2.726 /**< Cosmic background radiation temperature, K */
#define LAL_VCBR_SI 3.695e5 /**< Solar velocity with respect to CBR, m s^ -1 */ #define LAL_VCBR_SI 3.695e5 /**< Solar velocity with respect to CBR, m s^ -1 */
#define LAL_RHOCBR_SI 4.177e-14 /**< Energy density of CBR, J m^-3 */ #define LAL_RHOCBR_SI 4.177e-14 /**< Energy density of CBR, J m^-3 */
 End of changes. 15 change blocks. 
17 lines changed or deleted 28 lines changed or added


 LALCorrelation.h   LALCorrelation.h 
skipping to change at line 31 skipping to change at line 31
#define _LALCORRELATION_H #define _LALCORRELATION_H
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
/* ****** INCLUDE ANY OTHER LAL HEADERS needed for header (NOT module) **** / /* ****** INCLUDE ANY OTHER LAL HEADERS needed for header (NOT module) **** /
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
\addtogroup LALCorrelation_h * \addtogroup LALCorrelation_h
\author Yakushin, Igor * \author Yakushin, Igor
*
\brief [One sentence briefly defining scope of the header] * \brief [One sentence briefly defining scope of the header]
*
\heading{Synopsis} * ### Synopsis ###
\code *
#include <lal/LALCorrelation.h> * \code
\endcode * #include <lal/LALCorrelation.h>
* \endcode
[Generic documentation on the header; this is the main place to *
document any stuff not specific to the module] * [Generic documentation on the header; this is the main place to
* document any stuff not specific to the module]
*/ *
*/
/*@{*/ /*@{*/
/**\name Error Codes */ /**\name Error Codes */
/*@{*/ /*@{*/
#define LALCORRELATIONH_ENULLP 1 /**< Null pointer */ #define LALCORRELATIONH_ENULLP 1 /**< Null pointer */
#define LALCORRELATIONH_ESTART 2 /**< Time series do not start simultaneously */ #define LALCORRELATIONH_ESTART 2 /**< Time series do not start simultaneously */
#define LALCORRELATIONH_ESAMPLING 3 /**< Time series are not sampled with the same rate */ #define LALCORRELATIONH_ESAMPLING 3 /**< Time series are not sampled with the same rate */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
 End of changes. 1 change blocks. 
14 lines changed or deleted 15 lines changed or added


 LALDatatypes.h   LALDatatypes.h 
skipping to change at line 20 skipping to change at line 20
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with with program; see the file COPYING. If not, write to the * along with with program; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
*/ */
// ---------- SEE LALDatatypes.dox for doxygen documentation ---------- /* ---------- SEE LALDatatypes.dox for doxygen documentation ---------- */
#ifndef _LALDATATYPES_H #ifndef _LALDATATYPES_H
#define _LALDATATYPES_H #define _LALDATATYPES_H
#include <lal/LALAtomicDatatypes.h> #include <lal/LALAtomicDatatypes.h>
/** \addtogroup LALDatatypes *//*@{ */ /** \addtogroup LALDatatypes */ /*@{ */
/* ---------- constants ---------- */ /* ---------- constants ---------- */
/** Type size constants, see \ref LALDatatypes for more details. */ /** Type size constants, see \ref LALDatatypes for more details. */
enum { enum {
LAL_1_BYTE_TYPE_SIZE = 000, /**< One byte size 00 = 0 */ LAL_1_BYTE_TYPE_SIZE = 000, /**< One byte size 00 = 0 */
LAL_2_BYTE_TYPE_SIZE = 001, /**< Two byte size 01 = 1 */ LAL_2_BYTE_TYPE_SIZE = 001, /**< Two byte size 01 = 1 */
LAL_4_BYTE_TYPE_SIZE = 002, /**< Four byte size 010 = 2 */ LAL_4_BYTE_TYPE_SIZE = 002, /**< Four byte size 010 = 2 */
LAL_8_BYTE_TYPE_SIZE = 003, /**< Eight byte size 011 = 3 */ LAL_8_BYTE_TYPE_SIZE = 003, /**< Eight byte size 011 = 3 */
LAL_16_BYTE_TYPE_SIZE = 004, /**< Sixteen byte size 0100 = 4 */ LAL_16_BYTE_TYPE_SIZE = 004, /**< Sixteen byte size 0100 = 4 */
skipping to change at line 467 skipping to change at line 467
/** Zero-initializer for LIGOTimeGPS structs */ /** Zero-initializer for LIGOTimeGPS structs */
#define LIGOTIMEGPSZERO { 0, 0 } #define LIGOTIMEGPSZERO { 0, 0 }
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
/* *INDENT-OFF* */ /* *INDENT-OFF* */
%include <lal/lalswig_ligotimegps.i> %include <lal/lalswig_ligotimegps.i>
/* *INDENT-ON* */ /* *INDENT-ON* */
#endif /* SWIG */ #endif /* SWIG */
/** Indices of arrays corresponding to particular units. /**
* * Indices of arrays corresponding to particular units.
* The ::LALUnit structure has arrays giving the numerators * The ::LALUnit structure has arrays giving the numerators
* and denominators-minus-one of the powers of various units. * and denominators-minus-one of the powers of various units.
* These are the indices for the particular units. * These are the indices for the particular units.
*/ */
enum { enum {
LALUnitIndexMeter, /**< The meter index. */ LALUnitIndexMeter, /**< The meter index. */
LALUnitIndexKiloGram, /**< The kilogram index. */ LALUnitIndexKiloGram, /**< The kilogram index. */
LALUnitIndexSecond, /**< The second index. */ LALUnitIndexSecond, /**< The second index. */
LALUnitIndexAmpere, /**< The ampere index. */ LALUnitIndexAmpere, /**< The ampere index. */
LALUnitIndexKelvin, /**< The kelvin index. */ LALUnitIndexKelvin, /**< The kelvin index. */
LALUnitIndexStrain, /**< The strain index. */ LALUnitIndexStrain, /**< The strain index. */
LALUnitIndexADCCount, /**< The ADC counts index. */ LALUnitIndexADCCount, /**< The ADC counts index. */
LALNumUnits /**< The number of units. */ LALNumUnits /**< The number of units. */
}; };
/** This structure stores units in the mksA system (plus Kelvin, Strain, /**
* This structure stores units in the mksA system (plus Kelvin, Strain,
* and ADC Count). It also stores an overall power-of-ten scaling factor. * and ADC Count). It also stores an overall power-of-ten scaling factor.
* Thus, the units are given by * Thus, the units are given by
* \f{equation}{ * \f{equation}{
* 10^p\times\textrm{m}^{N_0/(1+D_0)}\times\textrm{kg}^{N_1/(1+D_1)} * 10^p\times\textrm{m}^{N_0/(1+D_0)}\times\textrm{kg}^{N_1/(1+D_1)}
* \times\textrm{s}^{N_2/(1+D_2)}\times\textrm{A}^{N_3/(1+D_3)} * \times\textrm{s}^{N_2/(1+D_2)}\times\textrm{A}^{N_3/(1+D_3)}
* \times\textrm{K}^{N_4/(1+D_4)}\times\textrm{strain}^{N_5/(1+D_5)} * \times\textrm{K}^{N_4/(1+D_4)}\times\textrm{strain}^{N_5/(1+D_5)}
* \times\textrm{count}^{N_6/(1+D_6)} * \times\textrm{count}^{N_6/(1+D_6)}
* \f} * \f}
* *
*/ */
skipping to change at line 931 skipping to change at line 932
/** See \ref ss_ZPGFilter for details */ /** See \ref ss_ZPGFilter for details */
typedef struct tagCOMPLEX16ZPGFilter { typedef struct tagCOMPLEX16ZPGFilter {
CHAR name[LALNameLength]; CHAR name[LALNameLength];
REAL8 deltaT; REAL8 deltaT;
COMPLEX16Vector *zeros; COMPLEX16Vector *zeros;
COMPLEX16Vector *poles; COMPLEX16Vector *poles;
COMPLEX16 gain; COMPLEX16 gain;
} COMPLEX16ZPGFilter; } COMPLEX16ZPGFilter;
/*@} */// end of LALDatatypes documentation group /*@} */ /* end of LALDatatypes documentation group */
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
/** \ingroup LALStatusMacros_h /**
* \ingroup LALStatusMacros_h
* \brief LAL status structure, see \ref ss_LALStatus for more details. * \brief LAL status structure, see \ref ss_LALStatus for more details.
*/ */
typedef struct tagLALStatus { typedef struct tagLALStatus {
INT4 statusCode; /**< A numerical code ident ifying the type of error, or 0 for nominal status; Negative values are rese rved for certain standard error types */ INT4 statusCode; /**< A numerical code ident ifying the type of error, or 0 for nominal status; Negative values are rese rved for certain standard error types */
const CHAR *statusDescription; /**< An explanatory string corresponding to the numerical status code */ const CHAR *statusDescription; /**< An explanatory string corresponding to the numerical status code */
volatile const CHAR *Id; /**< A character string ide ntifying the source file and version number of the function being reported on */ volatile const CHAR *Id; /**< A character string ide ntifying the source file and version number of the function being reported on */
const CHAR *function; /**< The name of the functi on */ const CHAR *function; /**< The name of the functi on */
const CHAR *file; /**< The name of the source file containing the function code */ const CHAR *file; /**< The name of the source file containing the function code */
INT4 line; /**< The line number in the source file where the current \c statusCode was set */ INT4 line; /**< The line number in the source file where the current \c statusCode was set */
struct tagLALStatus *statusPtr; /**< Pointer to the next no de in the list; \c NULL if this function is not reporting a subroutine erro r */ struct tagLALStatus *statusPtr; /**< Pointer to the next no de in the list; \c NULL if this function is not reporting a subroutine erro r */
 End of changes. 6 change blocks. 
7 lines changed or deleted 9 lines changed or added


 LALDetectors.h   LALDetectors.h 
skipping to change at line 29 skipping to change at line 29
#ifndef _LALDETECTORS_H #ifndef _LALDETECTORS_H
#define _LALDETECTORS_H #define _LALDETECTORS_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** \addtogroup LALDetectors_h /**
\author J. T. Whelan and J. D. E. Creighton * \addtogroup LALDetectors_h
* \author J. T. Whelan and J. D. E. Creighton
\brief This header defines structures to hold the basic data describing *
a gravitational wave detector. * \brief This header defines structures to hold the basic data describing
a gravitational wave detector.
\heading{Synopsis} *
\code * ### Synopsis ###
#include <lal/LALDetectors.h> *
\endcode * \code
* #include <lal/LALDetectors.h>
According to the common frame format specification * \endcode
[\ref LIGOVIRGO_2000] the geometry of an interferometric *
detector will be stored in a \c FrDetector structure, specifying * According to the common frame format specification
the location of the detector vertex and the orientation of its arms in * \cite LIGOVIRGO_2000 the geometry of an interferometric
geodetic coördinates suited to geographical surveying. Resonant * detector will be stored in a \c FrDetector structure, specifying
bars and other sorts of detectors, if they write their data to frames, * the location of the detector vertex and the orientation of its arms in
are expected to fill this structure with their location and * geodetic coördinates suited to geographical surveying. Resonant
orientation in some way suited to the detector type. * bars and other sorts of detectors, if they write their data to frames,
* are expected to fill this structure with their location and
For most data analysis tasks, however, any gravitational wave detector * orientation in some way suited to the detector type.
can be described by its location in an Earth-fixed rotating reference *
frame, as well as a <em>response tensor</em> \f$d^{ab}\f$, constant in the * For most data analysis tasks, however, any gravitational wave detector
same frame, which defines the "strain" \f$h\f$ measured by the detector in * can be described by its location in an Earth-fixed rotating reference
terms of the metric perturbation \f$h_{ab}\f$ as * frame, as well as a <em>response tensor</em> \f$d^{ab}\f$, constant in t
\f{equation}{ he
h = h_{ab} \, d^{ab} * same frame, which defines the "strain" \f$h\f$ measured by the detector
\ . in
\f} * terms of the metric perturbation \f$h_{ab}\f$ as
* \f{equation}{
This header defines a \c ::LALFrDetector structure which contains * h = h_{ab} \, d^{ab}
essentially the same information as the \c FrDetector structure, * \ .
as well as a \c LALDetector structure which contains the * \f}
Cartesian coördinates of the detector along with the components of *
the response tensor \f$d^{ab}\f$ in the same coördinate system. * This header defines a \c ::LALFrDetector structure which contains
* essentially the same information as the \c FrDetector structure,
\heading{The Geodetic Coördinate System} * as well as a \c LALDetector structure which contains the
* Cartesian coördinates of the detector along with the components of
Geodetic coördinates are spheroidal coördinates * the response tensor \f$d^{ab}\f$ in the same coördinate system.
based on the WGS-84 Earth Model, which is an *
oblate spheroid with equatorial radius \f$a=6.378137\times * ### The Geodetic Coördinate System ###
10^6\,\textrm{m}\f$ and polar radius \f$b=6.356752314\times *
10^6\,\textrm{m}\f$. Any point in space can be located according to its * Geodetic coördinates are spheroidal coördinates
longitude, latitude, and elevation. The \e longitude \f$\lambda\f$ * based on the WGS-84 Earth Model, which is an
is the angle between the half-plane bounded by the symmetry axis of * oblate spheroid with equatorial radius \f$a=6.378137\times
the reference ellipsoid containing the point in question and the * 10^6\,\textrm{m}\f$ and polar radius \f$b=6.356752314\times
half-plane plane containing the Prime Meridian; it is measured in * 10^6\,\textrm{m}\f$. Any point in space can be located according to its
radians, increases to the East, and ranges from * longitude, latitude, and elevation. The \e longitude \f$\lambda\f$
\f$-\pi\f$ to \f$\pi\f$. The \e latitude \f$\beta\f$ is the * is the angle between the half-plane bounded by the symmetry axis of
angle between the ray which is normal to the ellipsoid and passes * the reference ellipsoid containing the point in question and the
through the point in question and the equatorial plane; it is measured * half-plane plane containing the Prime Meridian; it is measured in
in radians, increases to the North, and ranges * radians, increases to the East, and ranges from
from \f$-\pi/2\f$ to \f$\pi/2\f$. The \e elevation \f$h\f$ is the * \f$-\pi\f$ to \f$\pi\f$. The \e latitude \f$\beta\f$ is the
signed distance along this ray from the reference ellipsoid to the * angle between the ray which is normal to the ellipsoid and passes
point in question. This coördinate system is described in more * through the point in question and the equatorial plane; it is measured
detail in [\ref Althouse_1999]. * in radians, increases to the North, and ranges
* from \f$-\pi/2\f$ to \f$\pi/2\f$. The \e elevation \f$h\f$ is the
\heading{Altitude and Azimuth Angles} * signed distance along this ray from the reference ellipsoid to the
* point in question. This coördinate system is described in more
The \c LALFrDetector structure stores the directions along the * detail in \cite Althouse_1999.
two arms of an interferometer in an altitude/azimuth representation *
with respect to the local tangent plane to the reference ellipsoid, * ### Altitude and Azimuth Angles ###
known as the local horizontal. The altitude \f${\mathcal{A}}\f$ is the ang *
le the * The \c LALFrDetector structure stores the directions along the
direction vector makes with the horizontal, \f${\mathcal{A}} > 0\f$ meaning * two arms of an interferometer in an altitude/azimuth representation
above * with respect to the local tangent plane to the reference ellipsoid,
horizontal, \f${\mathcal{A}} < 0\f$ below. The azimuth angle \f$\zeta\f$ i * known as the local horizontal. The altitude \f${\mathcal{A}}\f$ is the
s found by angle the
projecting the direction onto the local horizontal plane, then * direction vector makes with the horizontal, \f${\mathcal{A}} > 0\f$ mean
measuring the angle clockwise from North to this projected direction. ing above
* horizontal, \f${\mathcal{A}} < 0\f$ below. The azimuth angle \f$\zeta\f
\heading{The Cartesian Coördinate System} $ is found by
* projecting the direction onto the local horizontal plane, then
The position vector and response tensor contained in the * measuring the angle clockwise from North to this projected direction.
\c LALDetector structure are defined in *
a simple orthonormal coördinate system with its origin at * ### The Cartesian Coördinate System ###
the center of the earth, an \f$x^1\f$ axis which pierces the Earth's *
surface at the intersection of the equator and the prime meridian, an * The position vector and response tensor contained in the
\f$x^2\f$ axis which pierces the earth's surface at \f$\pi/2\f$ radians Eas * \c LALDetector structure are defined in
t * a simple orthonormal coördinate system with its origin at
longitude on the equator, and an \f$x^3\f$ axis which pierces the Earth's * the center of the earth, an \f$x^1\f$ axis which pierces the Earth's
surface at the North Pole. The coördinates \f$x^1\f$, \f$x^2\f$, \f$x^3\f * surface at the intersection of the equator and the prime meridian, an
$ * \f$x^2\f$ axis which pierces the earth's surface at \f$\pi/2\f$ radians
correspond to the Earth-fixed coördinates \f$X_E\f$, \f$Y_E\f$, \f$Z_E\f$ East
defined in [\ref Althouse_1999], respectively. * longitude on the equator, and an \f$x^3\f$ axis which pierces the Earth'
s
The relationship between geodetic and Cartesian coördinates is * surface at the North Pole. The coördinates \f$x^1\f$, \f$x^2\f$, \f$x^
given by 3\f$
\anchor tools_e_cart1 * correspond to the Earth-fixed coördinates \f$X_E\f$, \f$Y_E\f$, \f$Z_E\
\anchor tools_e_cart2 f$
\anchor tools_e_cart3 * defined in \cite Althouse_1999, respectively.
\f{align}{ *
x^1 &=\left( * The relationship between geodetic and Cartesian coördinates is
\frac{a^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}} * given by
+ h * \f{align}{
\right) \cos\beta\cos\lambda \label{tools_e_cart1}\\ * \label{tools_e_cart1}
x^2 &=\left( * x^1 &=\left(
\frac{a^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}} * \frac{a^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}}
+ h * + h
\right) \cos\beta\sin\lambda \label{tools_e_cart2}\\ * \right) \cos\beta\cos\lambda \\
x^3 &=\left( * \label{tools_e_cart2}
\frac{b^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}} * x^2 &=\left(
+ h * \frac{a^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}}
\right) \sin\beta \label{tools_e_cart3} \\ * + h
\f} * \right) \cos\beta\sin\lambda \\
* \label{tools_e_cart3}
* \heading{Cached Detectors} * x^3 &=\left(
* \frac{b^2}{\sqrt{a^2\cos^2\beta+b^2\sin^2\beta}}
* + h
* \right) \sin\beta \\
* \f}
*
* ### Cached Detectors ###
* *
* In practice, we will often be * In practice, we will often be
* working with fixed unchanging site geometry, e.g., for the LIGO * working with fixed unchanging site geometry, e.g., for the LIGO
* interferometers; to avoid constantly reconstructing the corresponding * interferometers; to avoid constantly reconstructing the corresponding
* \c LALDetectors, we should define some constant * \c LALDetectors, we should define some constant
* \c LALDetectors describing them. Those are stored in a constant * \c LALDetectors describing them. Those are stored in a constant
* array of \c LALDetector structures known as * array of \c LALDetector structures known as
* \c lalCachedDetectors, which is declared \c extern in this * \c lalCachedDetectors, which is declared \c extern in this
* header and defined in \ref CreateDetector_c. * header and defined in \ref CreateDetector_c.
* *
* The <tt>LALCreateDetector()</tt> routine will first look through the * The <tt>LALCreateDetector()</tt> routine will first look through the
* \c lalCachedDetectors array for a \c LALDetector structure * \c lalCachedDetectors array for a \c LALDetector structure
* with matching \c type and <tt>frDetector.name</tt> fields; if it * with matching \c type and <tt>frDetector.name</tt> fields; if it
* finds one, it returns a copy of that; if not, it creates one. * finds one, it returns a copy of that; if not, it creates one.
* *
* For example, the \c LALDetector representing LIGO Hanford 4km (H1) in * For example, the \c LALDetector representing LIGO Hanford 4km (H1) in
* differential mode is <tt>lalCachedDetectors[LAL_LHO_4K_DETECTOR]</tt>. * differential mode is <tt>lalCachedDetectors[LAL_LHO_4K_DETECTOR]</tt>.
* *
*
*/ */
/*@{*/ /*@{*/
/** \name Error Codes */ /** \name Error Codes */
/*@{*/ /*@{*/
#define LALDETECTORSH_ENULLP 1 /**< Null pointer */ #define LALDETECTORSH_ENULLP 1 /**< Null pointer */
#define LALDETECTORSH_ETYPE 2 /**< Unsupported detector type */ #define LALDETECTORSH_ETYPE 2 /**< Unsupported detector type */
/*@}*/ /*@}*/
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
skipping to change at line 197 skipping to change at line 198
LAL_LHO_2K_DETECTOR_BIT = 1 << 2 * LAL_LHO_2K_DETECTOR , LAL_LHO_2K_DETECTOR_BIT = 1 << 2 * LAL_LHO_2K_DETECTOR ,
LAL_LHO_4K_DETECTOR_BIT = 1 << 2 * LAL_LHO_4K_DETECTOR , LAL_LHO_4K_DETECTOR_BIT = 1 << 2 * LAL_LHO_4K_DETECTOR ,
LAL_LLO_4K_DETECTOR_BIT = 1 << 2 * LAL_LLO_4K_DETECTOR , LAL_LLO_4K_DETECTOR_BIT = 1 << 2 * LAL_LLO_4K_DETECTOR ,
LAL_CIT_40_DETECTOR_BIT = 1 << 2 * LAL_CIT_40_DETECTOR , LAL_CIT_40_DETECTOR_BIT = 1 << 2 * LAL_CIT_40_DETECTOR ,
LAL_ALLEGRO_DETECTOR_BIT = 1 << 2 * LAL_ALLEGRO_DETECTO R, LAL_ALLEGRO_DETECTOR_BIT = 1 << 2 * LAL_ALLEGRO_DETECTO R,
LAL_AURIGA_DETECTOR_BIT = 1 << 2 * LAL_AURIGA_DETECTOR , LAL_AURIGA_DETECTOR_BIT = 1 << 2 * LAL_AURIGA_DETECTOR ,
LAL_NIOBE_DETECTOR_BIT = 1 << 2 * LAL_NIOBE_DETECTOR, LAL_NIOBE_DETECTOR_BIT = 1 << 2 * LAL_NIOBE_DETECTOR,
LAL_NAUTILUS_DETECTOR_BIT = 1 << 2 * LAL_NAUTILUS_DETECT OR LAL_NAUTILUS_DETECTOR_BIT = 1 << 2 * LAL_NAUTILUS_DETECT OR
}; };
/** Detector type, which determines how the detector response is determined /**
. * Detector type, which determines how the detector response is determined.
*
* Since data from bars as well as interferometers can be written to * Since data from bars as well as interferometers can be written to
* frames, we need an additional piece of information to interpret the * frames, we need an additional piece of information to interpret the
* site geometry data specified in the \c LALFrDetector * site geometry data specified in the \c LALFrDetector
* structure; for instance, is the x arm really the x arm or is it the * structure; for instance, is the x arm really the x arm or is it the
* long axis of a bar? The \c LALDetectorType enumeration * long axis of a bar? The \c LALDetectorType enumeration
* provides a way to keep track of that. * provides a way to keep track of that.
* *
*/ */
typedef enum { typedef enum {
LALDETECTORTYPE_ABSENT, /**< No FrDetector associated with t his detector */ LALDETECTORTYPE_ABSENT, /**< No FrDetector associated with t his detector */
LALDETECTORTYPE_IFODIFF, /**< IFO in differential mode */ LALDETECTORTYPE_IFODIFF, /**< IFO in differential mode */
LALDETECTORTYPE_IFOXARM, /**< IFO in one-armed mode (X arm) * / LALDETECTORTYPE_IFOXARM, /**< IFO in one-armed mode (X arm) * /
LALDETECTORTYPE_IFOYARM, /**< IFO in one-armed mode (Y arm) * / LALDETECTORTYPE_IFOYARM, /**< IFO in one-armed mode (Y arm) * /
LALDETECTORTYPE_IFOCOMM, /**< IFO in common mode */ LALDETECTORTYPE_IFOCOMM, /**< IFO in common mode */
LALDETECTORTYPE_CYLBAR /**< Cylindrical bar */ LALDETECTORTYPE_CYLBAR /**< Cylindrical bar */
} }
LALDetectorType; LALDetectorType;
/** Detector frame data structure /**
* * Detector frame data structure
* Structure to contain the data that appears in a FrDetector structure * Structure to contain the data that appears in a FrDetector structure
* in frame data. * in frame data.
*/ */
typedef struct tagLALFrDetector typedef struct tagLALFrDetector
{ {
CHAR name[LALNameLength]; /**< A unique identifying string */ CHAR name[LALNameLength]; /**< A unique identifying string */
CHAR prefix[3]; /**< Two-letter prefix for detector' s channel names */ CHAR prefix[3]; /**< Two-letter prefix for detector' s channel names */
REAL8 vertexLongitudeRadians; /**< The geodetic longitude \f$\lamb da\f$ of the vertex in radians */ REAL8 vertexLongitudeRadians; /**< The geodetic longitude \f$\lamb da\f$ of the vertex in radians */
REAL8 vertexLatitudeRadians; /**< The geodetic latitude \f$\beta\ f$ of the vertex in radians */ REAL8 vertexLatitudeRadians; /**< The geodetic latitude \f$\beta\ f$ of the vertex in radians */
REAL4 vertexElevation; /**< The height of the vertex above the reference ellipsoid in meters */ REAL4 vertexElevation; /**< The height of the vertex above the reference ellipsoid in meters */
REAL4 xArmAltitudeRadians; /**< The angle \f${\mathcal{A}}_X\f$ up from the local tangent plane of the reference ellipsoid to the X arm (o r bar's cylidrical axis) in radians */ REAL4 xArmAltitudeRadians; /**< The angle \f${\mathcal{A}}_X\f$ up from the local tangent plane of the reference ellipsoid to the X arm (o r bar's cylidrical axis) in radians */
REAL4 xArmAzimuthRadians; /**< The angle \f$\zeta_X\f$ clockwi se from North to the projection of the X arm (or bar's cylidrical axis) int o the local tangent plane of the reference ellipsoid in radians */ REAL4 xArmAzimuthRadians; /**< The angle \f$\zeta_X\f$ clockwi se from North to the projection of the X arm (or bar's cylidrical axis) int o the local tangent plane of the reference ellipsoid in radians */
REAL4 yArmAltitudeRadians; /**< The angle \f${\mathcal{A}}_Y\f$ up from the local tangent plane of the reference ellipsoid to the Y arm in radians (unused for bars: set it to zero) */ REAL4 yArmAltitudeRadians; /**< The angle \f${\mathcal{A}}_Y\f$ up from the local tangent plane of the reference ellipsoid to the Y arm in radians (unused for bars: set it to zero) */
REAL4 yArmAzimuthRadians; /**< The angle \f$\zeta_Y\f$ clockwi se from North to the projection of the Y arm into the local tangent plane o f the reference ellipsoid in radians (unused for bars: set it to zero) */ REAL4 yArmAzimuthRadians; /**< The angle \f$\zeta_Y\f$ clockwi se from North to the projection of the Y arm into the local tangent plane o f the reference ellipsoid in radians (unused for bars: set it to zero) */
REAL4 xArmMidpoint; /**< The distance to the midpoint of the X arm in meters (unused for bars: set it to zero) */ REAL4 xArmMidpoint; /**< The distance to the midpoint of the X arm in meters (unused for bars: set it to zero) */
REAL4 yArmMidpoint; /**< The distance to the midpoint of the Y arm in meters (unused for bars: set it to zero) */ REAL4 yArmMidpoint; /**< The distance to the midpoint of the Y arm in meters (unused for bars: set it to zero) */
} }
LALFrDetector; LALFrDetector;
/** Detector structure /**
* Detector structure
* *
* Structure to contain detector data in the format most easily used * Structure to contain detector data in the format most easily used
* by the LAL routines. * by the LAL routines.
*/ */
typedef struct tagLALDetector typedef struct tagLALDetector
{ {
REAL8 location[3]; /**< The three components, in an Ear th-fixed Cartesian coordinate system, of the position vector from the cente r of the Earth to the detector in meters */ REAL8 location[3]; /**< The three components, in an Ear th-fixed Cartesian coordinate system, of the position vector from the cente r of the Earth to the detector in meters */
REAL4 response[3][3]; /**< The Earth-fixed Cartesian compo nents of the detector's response tensor \f$d^{ab}\f$ */ REAL4 response[3][3]; /**< The Earth-fixed Cartesian compo nents of the detector's response tensor \f$d^{ab}\f$ */
LALDetectorType type; /**< The type of the detector (e.g., IFO in differential mode, cylindrical bar, etc.) */ LALDetectorType type; /**< The type of the detector (e.g., IFO in differential mode, cylindrical bar, etc.) */
LALFrDetector frDetector; /**< The original LALFrDetector stru cture from which this was created */ LALFrDetector frDetector; /**< The original LALFrDetector stru cture from which this was created */
skipping to change at line 263 skipping to change at line 265
extern const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS]; extern const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS];
/*@}*/ /*@}*/
/* Routine to create a LALDetector. */ /* Routine to create a LALDetector. */
LALDetector * XLALCreateDetector( LALDetector *detector, const LALFrDetecto r *frDetector, LALDetectorType type ); LALDetector * XLALCreateDetector( LALDetector *detector, const LALFrDetecto r *frDetector, LALDetectorType type );
void LALCreateDetector( LALStatus *status, LALDetector *output, const LALFr Detector *input, const LALDetectorType type ); void LALCreateDetector( LALStatus *status, LALDetector *output, const LALFr Detector *input, const LALDetectorType type );
/* Interferometric Detectors */ /* Interferometric Detectors */
/** \defgroup DetectorConstants Detector Constants /**
* \defgroup DetectorConstants Detector Constants
* \ingroup LALDetectors_h * \ingroup LALDetectors_h
* \brief Constants describing various gravitational wave detectors * \brief Constants describing various gravitational wave detectors
* *
* The \ref LALDetectors_h also defines numerical constants that describe t he location and * The \ref LALDetectors_h also defines numerical constants that describe t he location and
* geometry of several operating gravitational wave detectors. * geometry of several operating gravitational wave detectors.
* These detectors are both resonant mass (bar) detectors and interferometr ic * These detectors are both resonant mass (bar) detectors and interferometr ic
* detectors. * detectors.
* <ul> * <ul>
* <li> Data for the resonant mass detectors is taken from: * <li> Data for the resonant mass detectors is taken from:
* http://igec.lnl.infn.it/cgi-bin/browser.pl?Level=0,3,1 * http://igec.lnl.infn.it/cgi-bin/browser.pl?Level=0,3,1
* and [\ref FinnLazzarini_2001] * and \cite FinnLazzarini_2001
* *
* <li> Data for LIGO detectors is taken from [\ref Althouse_1999] * <li> Data for LIGO detectors is taken from \cite Althouse_1999
* *
* <li> Data for the VIRGO detector is provided by Benoit Mours. * <li> Data for the VIRGO detector is provided by Benoit Mours.
* *
* <li> Data for the GEO detector is taken from: * <li> Data for the GEO detector is taken from:
* *
* http://www.geo600.uni-hannover.de/geo600/project/location.html * http://www.geo600.uni-hannover.de/geo600/project/location.html
* *
* <li> Data for the TAMA detector is provided by Masa-Katsu Fujimoto * <li> Data for the TAMA detector is provided by Masa-Katsu Fujimoto
* *
* <li> Data for the Caltech detector is taken from [\ref Allen_1996] * <li> Data for the Caltech detector is taken from \cite Allen_1996
* </ul> * </ul>
* *
* See the technical document [\ref ABCCRW_2001] for details. * See the technical document \cite ABCCRW_2001 for details.
* *
* Data in this file (e.g., angle conventions etc.) is intended * Data in this file (e.g., angle conventions etc.) is intended
* to conform to the conventions of the Frame format specification [\ref LI GOVIRGO_2000] * to conform to the conventions of the Frame format specification \cite LI GOVIRGO_2000
* *
*/ */
/*@{*/ /*@{*/
/** \name TAMA 300m Interferometric Detector constants /**
* \name TAMA 300m Interferometric Detector constants
* The following constants describe the location and geometry of the * The following constants describe the location and geometry of the
* TAMA 300m Interferometric Detector. */ * TAMA 300m Interferometric Detector.
*/
/*@{*/ /*@{*/
#define LAL_TAMA_300_DETECTOR_NAME "TAMA_300" /**< TAMA_300 detector name string */ #define LAL_TAMA_300_DETECTOR_NAME "TAMA_300" /**< TAMA_300 detector name string */
#define LAL_TAMA_300_DETECTOR_PREFIX "T1" /**< TAMA_30 0 detector prefix string */ #define LAL_TAMA_300_DETECTOR_PREFIX "T1" /**< TAMA_30 0 detector prefix string */
#define LAL_TAMA_300_DETECTOR_LONGITUDE_RAD 2.43536359469 /**< TAMA_300 vertex longitude (rad) */ #define LAL_TAMA_300_DETECTOR_LONGITUDE_RAD 2.43536359469 /**< TAMA_300 vertex longitude (rad) */
#define LAL_TAMA_300_DETECTOR_LATITUDE_RAD 0.62267336022 /**< TAMA_300 vertex latitude (rad) */ #define LAL_TAMA_300_DETECTOR_LATITUDE_RAD 0.62267336022 /**< TAMA_300 vertex latitude (rad) */
#define LAL_TAMA_300_DETECTOR_ELEVATION_SI 90 /**< TAMA_30 0 vertex elevation (m) */ #define LAL_TAMA_300_DETECTOR_ELEVATION_SI 90 /**< TAMA_30 0 vertex elevation (m) */
#define LAL_TAMA_300_DETECTOR_ARM_X_AZIMUTH_RAD 4.71238898038 /**< TAMA_300 x arm azimuth (rad) */ #define LAL_TAMA_300_DETECTOR_ARM_X_AZIMUTH_RAD 4.71238898038 /**< TAMA_300 x arm azimuth (rad) */
#define LAL_TAMA_300_DETECTOR_ARM_Y_AZIMUTH_RAD 3.14159265359 /**< TAMA_300 y arm azimuth (rad) */ #define LAL_TAMA_300_DETECTOR_ARM_Y_AZIMUTH_RAD 3.14159265359 /**< TAMA_300 y arm azimuth (rad) */
#define LAL_TAMA_300_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< TAMA_300 x arm altitude (rad) */ #define LAL_TAMA_300_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< TAMA_300 x arm altitude (rad) */
#define LAL_TAMA_300_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< TAMA_300 y arm altitude (rad) */ #define LAL_TAMA_300_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< TAMA_300 y arm altitude (rad) */
skipping to change at line 323 skipping to change at line 328
#define LAL_TAMA_300_VERTEX_LOCATION_Y_SI 3.36625902802e+06 /**< TAMA_300 y-component of vertex location in Earth-centered frame (m ) */ #define LAL_TAMA_300_VERTEX_LOCATION_Y_SI 3.36625902802e+06 /**< TAMA_300 y-component of vertex location in Earth-centered frame (m ) */
#define LAL_TAMA_300_VERTEX_LOCATION_Z_SI 3.69915069233e+06 /**< TAMA_300 z-component of vertex location in Earth-centered frame (m ) */ #define LAL_TAMA_300_VERTEX_LOCATION_Z_SI 3.69915069233e+06 /**< TAMA_300 z-component of vertex location in Earth-centered frame (m ) */
#define LAL_TAMA_300_ARM_X_DIRECTION_X 0.64896940530 /**< TAMA_300 x-component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_X_DIRECTION_X 0.64896940530 /**< TAMA_300 x-component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_TAMA_300_ARM_X_DIRECTION_Y 0.76081450498 /**< TAMA_300 y-component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_X_DIRECTION_Y 0.76081450498 /**< TAMA_300 y-component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_TAMA_300_ARM_X_DIRECTION_Z -0.00000000000 /**< TAMA_300 z-component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_X_DIRECTION_Z -0.00000000000 /**< TAMA_300 z-component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_TAMA_300_ARM_Y_DIRECTION_X -0.44371376921 /**< TAMA_300 x-component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_Y_DIRECTION_X -0.44371376921 /**< TAMA_300 x-component of unit vector pointing along y arm in Earth-centered frame */
#define LAL_TAMA_300_ARM_Y_DIRECTION_Y 0.37848471479 /**< TAMA_300 y-component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_Y_DIRECTION_Y 0.37848471479 /**< TAMA_300 y-component of unit vector pointing along y arm in Earth-centered frame */
#define LAL_TAMA_300_ARM_Y_DIRECTION_Z -0.81232223390 /**< TAMA_300 z-component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_TAMA_300_ARM_Y_DIRECTION_Z -0.81232223390 /**< TAMA_300 z-component of unit vector pointing along y arm in Earth-centered frame */
/*@}*/ /*@}*/
/** \name VIRGO 3km Interferometric Detector constants /**
* \name VIRGO 3km Interferometric Detector constants
* The following constants describe the location and geometry of the * The following constants describe the location and geometry of the
* VIRGO 3km Interferometric Detector. */ * VIRGO 3km Interferometric Detector.
*/
/*@{*/ /*@{*/
#define LAL_VIRGO_DETECTOR_NAME "VIRGO" /**< VIRGO detector name string */ #define LAL_VIRGO_DETECTOR_NAME "VIRGO" /**< VIRGO detector name string */
#define LAL_VIRGO_DETECTOR_PREFIX "V1" /**< VIRGO detector prefix string */ #define LAL_VIRGO_DETECTOR_PREFIX "V1" /**< VIRGO detector prefix string */
#define LAL_VIRGO_DETECTOR_LONGITUDE_RAD 0.18333805213 /**< VIRGO v ertex longitude (rad) */ #define LAL_VIRGO_DETECTOR_LONGITUDE_RAD 0.18333805213 /**< VIRGO v ertex longitude (rad) */
#define LAL_VIRGO_DETECTOR_LATITUDE_RAD 0.76151183984 /**< VIRGO v ertex latitude (rad) */ #define LAL_VIRGO_DETECTOR_LATITUDE_RAD 0.76151183984 /**< VIRGO v ertex latitude (rad) */
#define LAL_VIRGO_DETECTOR_ELEVATION_SI 51.884 /**< VIRGO vertex el evation (m) */ #define LAL_VIRGO_DETECTOR_ELEVATION_SI 51.884 /**< VIRGO vertex el evation (m) */
#define LAL_VIRGO_DETECTOR_ARM_X_AZIMUTH_RAD 0.33916285222 /**< VIRGO x arm azimuth (rad) */ #define LAL_VIRGO_DETECTOR_ARM_X_AZIMUTH_RAD 0.33916285222 /**< VIRGO x arm azimuth (rad) */
#define LAL_VIRGO_DETECTOR_ARM_Y_AZIMUTH_RAD 5.05155183261 /**< VIRGO y arm azimuth (rad) */ #define LAL_VIRGO_DETECTOR_ARM_Y_AZIMUTH_RAD 5.05155183261 /**< VIRGO y arm azimuth (rad) */
#define LAL_VIRGO_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< VIRGO x arm altitude (rad) */ #define LAL_VIRGO_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< VIRGO x arm altitude (rad) */
#define LAL_VIRGO_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< VIRGO y arm altitude (rad) */ #define LAL_VIRGO_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< VIRGO y arm altitude (rad) */
skipping to change at line 349 skipping to change at line 356
#define LAL_VIRGO_VERTEX_LOCATION_Y_SI 8.42989697626e+05 /**< VIRGO y-component of vertex location in Earth-centered frame (m) */ #define LAL_VIRGO_VERTEX_LOCATION_Y_SI 8.42989697626e+05 /**< VIRGO y-component of vertex location in Earth-centered frame (m) */
#define LAL_VIRGO_VERTEX_LOCATION_Z_SI 4.37857696241e+06 /**< VIRGO z-component of vertex location in Earth-centered frame (m) */ #define LAL_VIRGO_VERTEX_LOCATION_Z_SI 4.37857696241e+06 /**< VIRGO z-component of vertex location in Earth-centered frame (m) */
#define LAL_VIRGO_ARM_X_DIRECTION_X -0.70045821479 /**< VIRGO x -component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_VIRGO_ARM_X_DIRECTION_X -0.70045821479 /**< VIRGO x -component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_VIRGO_ARM_X_DIRECTION_Y 0.20848948619 /**< VIRGO y -component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_VIRGO_ARM_X_DIRECTION_Y 0.20848948619 /**< VIRGO y -component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_VIRGO_ARM_X_DIRECTION_Z 0.68256166277 /**< VIRGO z -component of unit vector pointing along x arm in Earth-centered frame */ #define LAL_VIRGO_ARM_X_DIRECTION_Z 0.68256166277 /**< VIRGO z -component of unit vector pointing along x arm in Earth-centered frame */
#define LAL_VIRGO_ARM_Y_DIRECTION_X -0.05379255368 /**< VIRGO x -component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_VIRGO_ARM_Y_DIRECTION_X -0.05379255368 /**< VIRGO x -component of unit vector pointing along y arm in Earth-centered frame */
#define LAL_VIRGO_ARM_Y_DIRECTION_Y -0.96908180549 /**< VIRGO y -component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_VIRGO_ARM_Y_DIRECTION_Y -0.96908180549 /**< VIRGO y -component of unit vector pointing along y arm in Earth-centered frame */
#define LAL_VIRGO_ARM_Y_DIRECTION_Z 0.24080451708 /**< VIRGO z -component of unit vector pointing along y arm in Earth-centered frame */ #define LAL_VIRGO_ARM_Y_DIRECTION_Z 0.24080451708 /**< VIRGO z -component of unit vector pointing along y arm in Earth-centered frame */
/*@}*/ /*@}*/
/** \name GEO 600m Interferometric Detector constants /**
* \name GEO 600m Interferometric Detector constants
* The following constants describe the location and geometry of the * The following constants describe the location and geometry of the
* GEO 600m Interferometric Detector. */ * GEO 600m Interferometric Detector.
*/
/*@{*/ /*@{*/
#define LAL_GEO_600_DETECTOR_NAME "GEO_600" /**< GEO_600 detector name string */ #define LAL_GEO_600_DETECTOR_NAME "GEO_600" /**< GEO_600 detector name string */
#define LAL_GEO_600_DETECTOR_PREFIX "G1" /**< GEO_600 detector prefix string */ #define LAL_GEO_600_DETECTOR_PREFIX "G1" /**< GEO_600 detector prefix string */
#define LAL_GEO_600_DETECTOR_LONGITUDE_RAD 0.17116780435 /**< GEO_600 vertex longitude (rad) */ #define LAL_GEO_600_DETECTOR_LONGITUDE_RAD 0.17116780435 /**< GEO_600 vertex longitude (rad) */
#define LAL_GEO_600_DETECTOR_LATITUDE_RAD 0.91184982752 /**< GEO_600 vertex latitude (rad) */ #define LAL_GEO_600_DETECTOR_LATITUDE_RAD 0.91184982752 /**< GEO_600 vertex latitude (rad) */
#define LAL_GEO_600_DETECTOR_ELEVATION_SI 114.425 /**< GEO_600 vertex elevation (m) */ #define LAL_GEO_600_DETECTOR_ELEVATION_SI 114.425 /**< GEO_600 vertex elevation (m) */
#define LAL_GEO_600_DETECTOR_ARM_X_AZIMUTH_RAD 1.19360100484 /**< GEO_600 x arm azimuth (rad) */ #define LAL_GEO_600_DETECTOR_ARM_X_AZIMUTH_RAD 1.19360100484 /**< GEO_600 x arm azimuth (rad) */
#define LAL_GEO_600_DETECTOR_ARM_Y_AZIMUTH_RAD 5.83039279401 /**< GEO_600 y arm azimuth (rad) */ #define LAL_GEO_600_DETECTOR_ARM_Y_AZIMUTH_RAD 5.83039279401 /**< GEO_600 y arm azimuth (rad) */
#define LAL_GEO_600_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< GEO_600 x arm altitude (rad) */ #define LAL_GEO_600_DETECTOR_ARM_X_ALTITUDE_RAD 0.00000000000 /**< GEO_600 x arm altitude (rad) */
#define LAL_GEO_600_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< GEO_600 y arm altitude (rad) */ #define LAL_GEO_600_DETECTOR_ARM_Y_ALTITUDE_RAD 0.00000000000 /**< GEO_600 y arm altitude (rad) */
skipping to change at line 375 skipping to change at line 384
#define LAL_GEO_600_VERTEX_LOCATION_Y_SI