AVFactories.h   AVFactories.h 
skipping to change at line 17 skipping to change at line 17
#ifndef _AVFACTORIES_H #ifndef _AVFACTORIES_H
#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
NRCSID (AVFACTORIESH, "$Id$");
/** /**
\defgroup AVFactories_h AVFactories_h \defgroup AVFactories_h AVFactories_h
\ingroup factories \ingroup factories
\brief Provides prototype and status code information for use of CreateVect or, \brief Provides prototype and status code information for use of CreateVect or,
CreateArray, ResizeVector, ResizeArray, DestroyVector and DestroyArray CreateArray, ResizeVector, ResizeArray, DestroyVector and DestroyArray
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Audio.h   Audio.h 
skipping to change at line 24 skipping to change at line 24
* 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.
* \date $Date$
* \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/
* *
*/ */
#ifndef AUDIO_H #ifndef AUDIO_H
#define AUDIO_H #define AUDIO_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
NRCSID( AUDIOH, "$Id$" );
#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
/** Records a time series as a .wav audio file */ /** Records a time series as a .wav audio file */
int XLALAudioWAVRecordREAL4TimeSeries( FILE *fp, REAL4TimeSeries *series ); int XLALAudioWAVRecordREAL4TimeSeries( FILE *fp, REAL4TimeSeries *series );
/** Records a time series as a .wav audio file */ /** Records a time series as a .wav audio file */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 BandPassTimeSeries.h   BandPassTimeSeries.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
*/ */
/*************************** <lalVerbatim file="BandPassTimeSeriesHV">
Author: Creighton, T. D.
$Id$
**************************************************** </lalVerbatim> */
/********************************************************** <lalLaTeX>
\section{Header \texttt{BandPassTimeSeries.h}}
\label{s:BandPassTimeSeries.h}
Provides routines to low- or high-pass filter a time series.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/BandPassTimeSeries.h>
\end{verbatim}
\noindent This header covers routines that apply a time-domain low- or
high-pass filter to a data series of type \verb@<datatype>TimeSeries@.
Further documentation is given in the individual routines' modules.
******************************************************* </lalLaTeX> */
#ifndef _BANDPASSTIMESERIES_H #ifndef _BANDPASSTIMESERIES_H
#define _BANDPASSTIMESERIES_H #define _BANDPASSTIMESERIES_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#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
NRCSID(BANDPASSTIMESERIESH,"$Id$"); /**
\author Creighton, T. D.
/********************************************************** <lalLaTeX> \addtogroup BandPassTimeSeries_h
\subsection*{Error conditions}
****************************************** </lalLaTeX><lalErrTable> */
#define BANDPASSTIMESERIESH_ENUL 1
#define BANDPASSTIMESERIESH_EBAD 2
#define BANDPASSTIMESERIESH_MSGENUL "Unexpected null pointer in arguments"
#define BANDPASSTIMESERIESH_MSGEBAD "Bad filter parameters"
/******************************************** </lalErrTable><lalLaTeX>
\subsection*{Types}
\subsubsection*{Structure \texttt{PassBandParamStruc}}
\idx[Type]{PassBandParamStruc}
This structure stores data used for constructing a low- or high-pass \brief Provides routines to low- or high-pass filter a time series.
filter: either the order and characteristic frequency of the filter,
or the frequencies and desired attenuations at the ends of some
transition band. In the latter case, a nonzero filter order parameter
\verb@n@ indicates a maximum allowed order. The fields are:
\begin{description} \heading{Synopsis}
\item[\texttt{CHAR *name}] A user-assigned name. \code
#include <lal/BandPassTimeSeries.h>
\endcode
\item[\texttt{INT4 n}] The maximum desired filter order (actual order This header covers routines that apply a time-domain low- or
may be less if specified attenuations do not require a high order). high-pass filter to a data series of type <tt>\<datatype\>TimeSeries</tt>.
Further documentation is given in the individual routines' modules.
\item[\texttt{REAL8 f1}, \texttt{f2}] The reference frequencies of the */
transition band. /*@{*/
\item[\texttt{REAL8 a1}, \texttt{a2}] The minimal desired attenuation /** \name Error Codes */
factors at the reference frequencies. /*@{*/
\end{description} #define BANDPASSTIMESERIESH_ENUL 1 /**< Unexpected null pointer in argu
ments */
#define BANDPASSTIMESERIESH_EBAD 2 /**< Bad filter parameters */
/*@}*/
******************************************************* </lalLaTeX> */ /** \cond DONT_DOXYGEN */
#define BANDPASSTIMESERIESH_MSGENUL "Unexpected null pointer in arguments"
#define BANDPASSTIMESERIESH_MSGEBAD "Bad filter parameters"
/** \endcond */
/** This structure stores data used for constructing a low- or high-pass
* filter: either the order and characteristic frequency of the filter,
* or the frequencies and desired attenuations at the ends of some
* transition band. In the latter case, a nonzero filter order parameter
* \c n indicates a maximum allowed order
*/
typedef struct tagPassBandParamStruc{ typedef struct tagPassBandParamStruc{
SWIGLAL_STRUCT(PassBandParamStruc); SWIGLAL_STRUCT(PassBandParamStruc);
CHAR *name; CHAR *name; /**< A user-assigned name */
INT4 nMax; INT4 nMax; /**< The maximum desired filter order (actual order may be l
REAL8 f1; ess if specified attenuations do not require a high order) */
REAL8 f2; REAL8 f1; /**< The reference frequencies of the transition band */
REAL8 a1; REAL8 f2; /**< The reference frequencies of the transition band */
REAL8 a2; REAL8 a1; /**< The minimal desired attenuation factors at the referenc
e frequencies */
REAL8 a2; /**< The minimal desired attenuation factors at the referenc
e frequencies */
} PassBandParamStruc; } PassBandParamStruc;
/* <lalLaTeX> /*@}*/
\vfill{\footnotesize\input{BandPassTimeSeriesHV}}
</lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX>
\newpage\input{ButterworthTimeSeriesC}
</lalLaTeX> */
int XLALButterworthREAL4TimeSeries( REAL4TimeSeries *series, PassBandParamS truc *params ); int XLALButterworthREAL4TimeSeries( REAL4TimeSeries *series, PassBandParamS truc *params );
int XLALButterworthREAL8TimeSeries( REAL8TimeSeries *series, PassBandParamS truc *params ); int XLALButterworthREAL8TimeSeries( REAL8TimeSeries *series, PassBandParamS truc *params );
int XLALLowPassREAL4TimeSeries( REAL4TimeSeries *series, int XLALLowPassREAL4TimeSeries( REAL4TimeSeries *series,
REAL8 frequency, REAL8 amplitude, INT4 filtorder ); REAL8 frequency, REAL8 amplitude, INT4 filtorder );
int XLALLowPassREAL8TimeSeries( REAL8TimeSeries *series, int XLALLowPassREAL8TimeSeries( REAL8TimeSeries *series,
REAL8 frequency, REAL8 amplitude, INT4 filtorder ); REAL8 frequency, REAL8 amplitude, INT4 filtorder );
int XLALHighPassREAL4TimeSeries( REAL4TimeSeries *series, int XLALHighPassREAL4TimeSeries( REAL4TimeSeries *series,
REAL8 frequency, REAL8 amplitude, INT4 filtorder ); REAL8 frequency, REAL8 amplitude, INT4 filtorder );
int XLALHighPassREAL8TimeSeries( REAL8TimeSeries *series, int XLALHighPassREAL8TimeSeries( REAL8TimeSeries *series,
REAL8 frequency, REAL8 amplitude, INT4 filtorder ); REAL8 frequency, REAL8 amplitude, INT4 filtorder );
skipping to change at line 148 skipping to change at line 115
PassBandParamStruc *params ); PassBandParamStruc *params );
void void
LALDButterworthREAL4TimeSeries( LALStatus *status, LALDButterworthREAL4TimeSeries( LALStatus *status,
REAL4TimeSeries *series, REAL4TimeSeries *series,
PassBandParamStruc *params ); PassBandParamStruc *params );
/* Chebyshev filters should also be added, but I'm too busy to write /* Chebyshev filters should also be added, but I'm too busy to write
the routines now. */ the routines now. */
/* Test program. */
/* <lalLaTeX>
\newpage\input{BandPassTestC}
</lalLaTeX> */
#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 /* _BANDPASSTIMESERIES_H */ #endif /* _BANDPASSTIMESERIES_H */
 End of changes. 13 change blocks. 
74 lines changed or deleted 39 lines changed or added


 BitField.h   BitField.h 
skipping to change at line 31 skipping to change at line 31
* \author Karl Wette * \author Karl Wette
* \file * \file
* \brief Macros for manipulating integers as bit fields * \brief Macros for manipulating integers as bit fields
*/ */
#ifndef _BITFIELD_H #ifndef _BITFIELD_H
#define _BITFIELD_H #define _BITFIELD_H
#include <lal/LALAtomicDatatypes.h> #include <lal/LALAtomicDatatypes.h>
NRCSID(BITFIELDH, "$Id$");
/** /**
* Return a mask where the (zero-based) ith bit is set * Return a mask where the (zero-based) ith bit is set
*/ */
#define ONE_BIT(T, i) (((T)1) << (i)) #define ONE_BIT(T, i) (((T)1) << (i))
/** /**
* Return a mask where all bits from 0 to n-1 are set * Return a mask where all bits from 0 to n-1 are set
*/ */
#define ALL_BITS(T, n) ((((T)1) << (n)) - ((T)1)) #define ALL_BITS(T, n) ((((T)1) << (n)) - ((T)1))
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Calibration.h   Calibration.h 
skipping to change at line 31 skipping to change at line 31
#define _CALIBRATION_H #define _CALIBRATION_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/BandPassTimeSeries.h> #include <lal/BandPassTimeSeries.h>
NRCSID (CALIBRATIONH,"$Id$");
#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
/** /**
* \author P. R. Brady, J. D. E. Creighton * \author P. R. Brady, J. D. E. Creighton
* \addtogroup Calibration_h * \addtogroup Calibration_h
* *
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 CoarseGrainFrequencySeries.h   CoarseGrainFrequencySeries.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
*/ */
/*********************** <lalVerbatim file="CoarseGrainFrequencySeriesHV">
Author: UTB Relativity Group; contact whelan@phys.utb.edu (original by S. D
rasco)
$Id$
*********************************************************** </lalVerbatim>
*/
/********************************************************** <lalLaTeX>
\section{Header \texttt{CoarseGrainFrequencySeries.h}}
\label{utilities:s:CoarseGrainFrequencySeries.h}
Provides prototype, structure and error code information for routines
which coarse-grain a frequency series.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/CoarseGrainFrequencySeries.h>
\end{verbatim}
\noindent
\subsection*{Error conditions}
\input{CoarseGrainFrequencySeriesHE}
\subsection*{Structures}
*********************************************************** </lalLaTeX> */
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifndef _COARSEGRAINFREQUENCYSERIES_H #ifndef _COARSEGRAINFREQUENCYSERIES_H
#define _COARSEGRAINFREQUENCYSERIES_H #define _COARSEGRAINFREQUENCYSERIES_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( COARSEGRAINFREQUENCYSERIESH, /**
"$Id$" ); \addtogroup CoarseGrainFrequencySeries_h
\author UTB Relativity Group; contact whelan@phys.utb.edu (original by S
. Drasco)
/****************** <lalErrTable file="CoarseGrainFrequencySeriesHE"> */ \brief Provides prototype, structure and error code information for rout ines which coarse-grain a frequency series.
#define COARSEGRAINFREQUENCYSERIESH_ENULLPTR 1 \heading{Synopsis}
#define COARSEGRAINFREQUENCYSERIESH_ESAMEPTR 2 \code
#define COARSEGRAINFREQUENCYSERIESH_EZEROLEN 3 #include <lal/CoarseGrainFrequencySeries.h>
#define COARSEGRAINFREQUENCYSERIESH_ENONPOSDELTAF 4 \endcode
#define COARSEGRAINFREQUENCYSERIESH_ENEGFMIN 5
#define COARSEGRAINFREQUENCYSERIESH_EMMHETERO 7 \heading{Description}
#define COARSEGRAINFREQUENCYSERIESH_EMMFMIN 8
#define COARSEGRAINFREQUENCYSERIESH_EMMDELTAF 9
#define COARSEGRAINFREQUENCYSERIESH_EMMLEN 10
#define COARSEGRAINFREQUENCYSERIESH_EOORCOARSE 16
These functions are designed to facilitate approximation of integrals
such as
\f[
\int g(f)\,h(f)\,df
\f]
when \f$g(f)\f$ and \f$h(f)\f$ are sampled with different frequency
resolutions. If the frequency resolution were the same for both
functions, e.g., a frequency spacing of \f$\delta f\f$ and a start
frequency of \f$f_0\f$, so that the \f$k\f$th element corresponded to a
frequency \f$f_k = f_0 + k\delta f\f$, the approximation would be defined
as
\f[
\int g(f)\,h(f)\,df \approx \delta f \sum_k g_k h_k
\f]
whose contribution from the \f$k\f$th element is [It is
important to make the limits of integration symmetric about \f$f_k\f$ to
maintain reality conditions when dealing with Fourier transforms of
real quantities.]
\f[
\int_{f_k-\delta f/2}^{f_k+\delta f/2} g(f)\,h(f)\,df \approx
\delta f g_k h_k
\ .
\f]
The central idea in our definitions of coarse graining will thus be
the correspondence
\anchor utilities_e_coarse \f{equation}{
\label{utilities_e_coarse}
h_k \approx \frac{1}{\delta f}
\int_{f_k-\delta f/2}^{f_k+\delta f/2} h(f)\,df
\f}
The purpose of this function is to obtain a frequency series \f$\{h_k\}\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
\f$f'_0\f$ and frequency spacing \f$\delta f'\f$. Focussing on the \f$k\f$
th
element of the coarse-grained series, which represents a frequency
range from \f$f_k-\delta f/2\f$ to \f$f_k+\delta f/2\f$, we consider the
elements of the fine-grained series whose frequency ranges overlap
with this. (Fig.\figref{utilities_f_coarse}
\floatfig{htbp,utilities_f_coarse}
\image html utilitiesCoarseGrain.png "Fig. [utilities_f_coarse]: Coarse gr
aining a frequency series"
\image latex utilitiesCoarseGrain.pdf "Coarse graining a frequency series"
We define \f$\ell^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptstyle
{\rm min}}_k\f$
to be the indices of the first and last elements of
\f$h'_\ell\f$ which overlap \e completely with the frequency range
corresponding to \f$h_k\f$. These are most easily defined in terms of
non-integer indices \f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and
\f$\lambda^{\scriptstyle\textrm{max}}_k\f$ which correspond to the location
s
of fine-grained elements which would exactly reach the edges of the
coarse-grained element with index \f$k\f$. These are defined by
\f{eqnarray*}{
f_0 + \left(k-\frac{1}{2}\right) \delta f
&=& f'_0 + \left(\lambda^{\scriptstyle\textrm{min}}_k-\frac{1}{2}\right)
\delta f' \\
f_0 + \left(k+\frac{1}{2}\right) \delta f
&=& f'_0 + \left(\lambda^{\scriptstyle\textrm{max}}_k+\frac{1}{2}\right)
\delta f'
\f}
or, defining the offset \f$\Omega=(f_0-f'_0)/\delta f'\f$ and the coarse
graining ratio \f$\rho = \delta f / \delta f'\f$,
\f{eqnarray*}{
\lambda^{\scriptstyle\textrm{min}}_k &=&
\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$\ell^{\scriptstyle\textrm{min}}_k\f$ is the smallest integer not less th
an
\f$\lambda^{\scriptstyle\textrm{min}}_k\f$ and \f$\ell^{\scriptstyle{\rm
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
\anchor utilities_e_coarseapprox \f{equation}{\label{utilities_e_coarseappr
ox}
h_k = \frac{1}{\rho}
\left(
(\ell^{\scriptstyle\textrm{min}}_k - \lambda^{\scriptstyle\textrm{min}}_k
)
h'_{\ell^{\scriptscriptstyle\textrm{min}}_k-1}
+ \sum_{\ell=\ell^{\scriptscriptstyle\textrm{min}}_k}
^{\ell^{\scriptscriptstyle\textrm{max}}_k}
h'_\ell
+ (\lambda^{\scriptstyle\textrm{max}}_k - \ell^{\scriptstyle\textrm{max}}
_k)
h'_{\ell^{\scriptscriptstyle\textrm{max}}_k+1}
\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
\f$\{h_k|k=-(N-1)\ldots(N-1)\}\f$ and \f$\{h'_\ell|\ell=-(N-1)\ldots(N-1)\}
\f$
which obey \f$h_{-k}=h_k^*\f$ and \f$h'_{-\ell}{}=h'_\ell{}^*\f$ (e.g.,
fourier transforms of real data). In that case, the DC element of the
coarse-grained series can be built out of both positive- and implied
negative-frequency elements in the fine-grained series.
\f{equation}{
h_0 = \frac{1}{\rho}
\left[
h'_0
+ 2\ \mathrm{Re}
\left(
\sum_{\ell=1}^{\ell^{\scriptscriptstyle\textrm{max}}_0}
h'_\ell
+ (\lambda^{\scriptstyle\textrm{max}}_0 - \ell^{\scriptstyle\textrm{m
ax}}_0)
h'_{\ell^{\scriptscriptstyle\textrm{max}}_0+1}
\right)
\right]
\f}
\heading{Algorithm}
These routines move through the output series, using
\eqref{utilities_e_coarseapprox} to add up the contributions from the
bins in the fine-grained series.
\heading{Notes}
<ul>
<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
one). Additionally, the bins in the fine-grained frequency series
must \e completely overlap those in the coarse-grained frequency
series. In particular, since the lowest frequency in the first bin
of the coarse-grained series is \f$f_{\scriptstyle{\rm min}}=f_0-\delta f
/2\f$
and the last is \f$f_{\scriptstyle{\rm max}}=f_0 + (N-1) \delta f +\delta
f/2\f$
(taking into account the width of the bins), the conitions are
\f{eqnarray*}{
f_0 - \frac{\delta f}{2} &\ge& f'_0 - \frac{\delta f'}{2}\\
f_0 + \left(N-\frac{1}{2}\right)\,\delta f &\le&
f'_0 + \left(N'-\frac{1}{2}\right)\,\delta f'
\f}
(The special case \f$f_0=f'_0=0\f$ is an
exception to the condition on the minimum frequency.)</li>
<li> The routines return an error if either minimum frequency
(\f$f_{\scriptstyle\textrm{min}}\f$ or \f$f'_{\scriptstyle\textrm{min}}\f
$) is
negative (unless \f$f_0=0\f$ or \f$f'_0=0\f$, respectively).</li>
</ul>
*/
/*@{*/
/**\name Error Codes */ /*@{*/
#define COARSEGRAINFREQUENCYSERIESH_ENULLPTR 1 /**< Null po
inter */
#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_ENONPOSDELTAF 4 /**< Negativ
e or zero frequency spacing */
#define COARSEGRAINFREQUENCYSERIESH_ENEGFMIN 5 /**< Negativ
e start frequency */
#define COARSEGRAINFREQUENCYSERIESH_EMMHETERO 7 /**< Mismatc
h in heterodyning frequencies */
#define COARSEGRAINFREQUENCYSERIESH_EMMFMIN 8 /**< Mismatc
h in start frequencies */
#define COARSEGRAINFREQUENCYSERIESH_EMMDELTAF 9 /**< Mismatc
h in frequency spacings */
#define COARSEGRAINFREQUENCYSERIESH_EMMLEN 10 /**< Mismatc
h in sequence lengths */
#define COARSEGRAINFREQUENCYSERIESH_EOORCOARSE 16 /**< Coarse-
graining paramaters out of range */
/*@}*/
/** \cond DONT_DOXYGEN */
#define COARSEGRAINFREQUENCYSERIESH_MSGENULLPTR "Null pointer" #define COARSEGRAINFREQUENCYSERIESH_MSGENULLPTR "Null pointer"
#define COARSEGRAINFREQUENCYSERIESH_MSGESAMEPTR "Input and Output pointe rs the same" #define COARSEGRAINFREQUENCYSERIESH_MSGESAMEPTR "Input and Output pointe rs the same"
#define COARSEGRAINFREQUENCYSERIESH_MSGEZEROLEN "Zero length for data me mber of series" #define COARSEGRAINFREQUENCYSERIESH_MSGEZEROLEN "Zero length for data me mber of series"
#define COARSEGRAINFREQUENCYSERIESH_MSGENONPOSDELTAF "Negative or zero freq uency spacing" #define COARSEGRAINFREQUENCYSERIESH_MSGENONPOSDELTAF "Negative or zero freq uency spacing"
#define COARSEGRAINFREQUENCYSERIESH_MSGENEGFMIN "Negative start frequency" #define COARSEGRAINFREQUENCYSERIESH_MSGENEGFMIN "Negative start frequency"
#define COARSEGRAINFREQUENCYSERIESH_MSGEMMHETERO "Mismatch in heterodynin g frequencies" #define COARSEGRAINFREQUENCYSERIESH_MSGEMMHETERO "Mismatch in heterodynin g frequencies"
#define COARSEGRAINFREQUENCYSERIESH_MSGEMMFMIN "Mismatch in start frequ encies" #define COARSEGRAINFREQUENCYSERIESH_MSGEMMFMIN "Mismatch in start frequ encies"
#define COARSEGRAINFREQUENCYSERIESH_MSGEMMDELTAF "Mismatch in frequency s pacings" #define COARSEGRAINFREQUENCYSERIESH_MSGEMMDELTAF "Mismatch in frequency s pacings"
#define COARSEGRAINFREQUENCYSERIESH_MSGEMMLEN "Mismatch in sequence le ngths" #define COARSEGRAINFREQUENCYSERIESH_MSGEMMLEN "Mismatch in sequence le ngths"
#define COARSEGRAINFREQUENCYSERIESH_MSGEOORCOARSE "Coarse-graining paramat ers out of range" #define COARSEGRAINFREQUENCYSERIESH_MSGEOORCOARSE "Coarse-graining paramat ers out of range"
/** \endcond */
/************************************ </lalErrTable> */ /* ***********************************************************
/*************************************************************
* * * *
* Structures and prototypes associated with * * Structures and prototypes associated with *
* CoarseGrainFrequencySeries.c * * CoarseGrainFrequencySeries.c *
* * * *
*************************************************************/ *************************************************************/
/********************************************************** <lalLaTeX> /** Contains the parameters needed to specify the sampling of a frequency s
eries */
\subsubsection*{\texttt{struct FrequencySamplingParams}}
\idx[Type]{FrequencySamplingParams}
\noindent
Contains the parameters needed to specify the sampling of a
frequency series:
\begin{description}
\item[\texttt{UINT4 length}]
The number of points in the frequency series.
\item[\texttt{REAL8 f0}]
The start frequency of the frequency series.
\item[\texttt{REAL8 deltaF}]
The frequency spacing of the frequency series.
\end{description}
*********************************************************** </lalLaTeX> */
typedef struct typedef struct
tagFrequencySamplingParams tagFrequencySamplingParams
{ {
SWIGLAL_STRUCT(FrequencySamplingParams); SWIGLAL_STRUCT(FrequencySamplingParams);
REAL8 f0; REAL8 f0; /**< The start frequency of the frequency se
REAL8 deltaF; ries */
UINT4 length; REAL8 deltaF; /**< The frequency spacing of the fr
equency series */
UINT4 length; /**< The number of points in the fre
quency series */
} }
FrequencySamplingParams; FrequencySamplingParams;
/** \see See \ref CoarseGrainFrequencySeries_h for documetation */
void void
LALSCoarseGrainFrequencySeries(LALStatus *status, LALSCoarseGrainFrequencySeries(LALStatus *status,
REAL4FrequencySeries *output, REAL4FrequencySeries *output,
const REAL4FrequencySeries *input, const REAL4FrequencySeries *input,
const FrequencySamplingParams *params); const FrequencySamplingParams *params);
/** \see See \ref CoarseGrainFrequencySeries_h for documetation */
void void
LALDCoarseGrainFrequencySeries(LALStatus *status, LALDCoarseGrainFrequencySeries(LALStatus *status,
REAL8FrequencySeries *output, REAL8FrequencySeries *output,
const REAL8FrequencySeries *input, const REAL8FrequencySeries *input,
const FrequencySamplingParams *params); const FrequencySamplingParams *params);
/** \see See \ref CoarseGrainFrequencySeries_h for documetation */
void void
LALCCoarseGrainFrequencySeries(LALStatus *status, LALCCoarseGrainFrequencySeries(LALStatus *status,
COMPLEX8FrequencySeries *output, COMPLEX8FrequencySeries *output,
const COMPLEX8FrequencySeries *input, const COMPLEX8FrequencySeries *input,
const FrequencySamplingParams *params); const FrequencySamplingParams *params);
/** \see See \ref CoarseGrainFrequencySeries_h for documetation */
void void
LALZCoarseGrainFrequencySeries(LALStatus *status, LALZCoarseGrainFrequencySeries(LALStatus *status,
COMPLEX16FrequencySeries *output, COMPLEX16FrequencySeries *output,
const COMPLEX16FrequencySeries *input, const COMPLEX16FrequencySeries *input,
const FrequencySamplingParams *params); const FrequencySamplingParams *params);
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* C++ protection */ #endif /* C++ protection */
/********************************************************** <lalLaTeX>
\vfill{\footnotesize\input{CoarseGrainFrequencySeriesHV}}
\newpage\input{CoarseGrainFrequencySeriesC}
\newpage\input{SCoarseGrainFrequencySeriesTestC}
\newpage\input{DCoarseGrainFrequencySeriesTestC}
\newpage\input{CCoarseGrainFrequencySeriesTestC}
\newpage\input{ZCoarseGrainFrequencySeriesTestC}
*********************************************************** </lalLaTeX> */
#endif /* _COARSEGRAINFREQUENCYSERIES_H */ #endif /* _COARSEGRAINFREQUENCYSERIES_H */
 End of changes. 15 change blocks. 
81 lines changed or deleted 206 lines changed or added


 CoherentEstimation.h   CoherentEstimation.h 
skipping to change at line 39 skipping to change at line 39
#include <lal/DetectorSite.h> #include <lal/DetectorSite.h>
#include <lal/SkyCoordinates.h> #include <lal/SkyCoordinates.h>
#include <lal/IIRFilter.h> #include <lal/IIRFilter.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
NRCSID( COHERENTESTIMATION, "$Id$" );
#define COHERENTESTIMATIONH_EMEM 1 #define COHERENTESTIMATIONH_EMEM 1
#define COHERENTESTIMATIONH_ENULL 2 #define COHERENTESTIMATIONH_ENULL 2
#define COHERENTESTIMATIONH_E0DEC 3 #define COHERENTESTIMATIONH_E0DEC 3
#define COHERENTESTIMATIONH_EDST 4 #define COHERENTESTIMATIONH_EDST 4
#define COHERENTESTIMATIONH_EICE 5 #define COHERENTESTIMATIONH_EICE 5
#define COHERENTESTIMATIONH_ENUM 6 #define COHERENTESTIMATIONH_ENUM 6
#define COHERENTESTIMATIONH_EUIMP 7 #define COHERENTESTIMATIONH_EUIMP 7
#define COHERENTESTIMATIONH_MSGEMEM "Memory allocation error" #define COHERENTESTIMATIONH_MSGEMEM "Memory allocation error"
#define COHERENTESTIMATIONH_MSGENULL "NULL pointer" #define COHERENTESTIMATIONH_MSGENULL "NULL pointer"
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ComplexFFT.h   ComplexFFT.h 
skipping to change at line 41 skipping to change at line 41
#ifdef __cplusplus #ifdef __cplusplus
#ifdef __GNUC__ #ifdef __GNUC__
#define RESTRICT __restrict__ #define RESTRICT __restrict__
#else #else
#define RESTRICT #define RESTRICT
#endif #endif
#else #else
#define RESTRICT restrict #define RESTRICT restrict
#endif #endif
NRCSID( COMPLEXFFTH, "$Id$" );
/** /**
* \addtogroup ComplexFFT_h * \addtogroup ComplexFFT_h
* *
* \brief Performs complex-to-complex FFTs. * \brief Performs complex-to-complex FFTs.
* *
* \heading{Synopsis} * \heading{Synopsis}
* \code * \code
* #include <lal/ComplexFFT.h> * #include <lal/ComplexFFT.h>
* \endcode * \endcode
* *
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ComputeDataQualityVector.h   ComputeDataQualityVector.h 
skipping to change at line 26 skipping to change at line 26
* 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 _COMPUTE_DATA_QUALITY_VECTOR_H #ifndef _COMPUTE_DATA_QUALITY_VECTOR_H
#define _COMPUTE_DATA_QUALITY_VECTOR_H #define _COMPUTE_DATA_QUALITY_VECTOR_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/BandPassTimeSeries.h> #include <lal/BandPassTimeSeries.h>
NRCSID (COMPUTE_DATA_QUALITY_VECTORH,"$Id$");
#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
int XLALComputeDQ(REAL4* sv_data, int r_sv, int XLALComputeDQ(REAL4* sv_data, int r_sv,
REAL4* lax_data, REAL4* lay_data, int r_light, REAL4* lax_data, REAL4* lay_data, int r_light,
COMPLEX16* gamma_data, int r_gamma, COMPLEX16* gamma_data, int r_gamma,
int t_bad_left, int t_bad_right, int wings, int t_bad_left, int t_bad_right, int wings,
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ConfigFile.h   ConfigFile.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
*/ */
/** \defgroup ConfigFile Config-File reading module
* \ingroup support
* \author Reinhard Prix
* \date $Date$
* \brief Module for general parsing of simple ASCII-based config-files.
*
*/
/** \file
* \ingroup ConfigFile
* \author Reinhard Prix
* \date $Date$
* \brief Header file defining the API for ConfigFile.c.
*/
#ifndef _CONFIGFILE_H /* Double-include protection. */ #ifndef _CONFIGFILE_H /* Double-include protection. */
#define _CONFIGFILE_H #define _CONFIGFILE_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#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
NRCSID( CONFIGFILEH, "$Id$"); /** \addtogroup ConfigFile_h
* \author Reinhard Prix
* \brief Module for general parsing of simple ASCII-based config-files.
\heading{Description}
This module provides routines for reading formatted
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.
http://www.python.org/doc/current/lib/module-ConfigParser.html)
Comments are allowed using either '<tt>\#</tt>', '<tt>;</tt>' or <tt>\%</tt
>.
You can also use line-continuation using a '<tt>\\</tt>' at the end of the
line.
Also note that comment-signs '<tt>\#;\%</tt>' within double-quotes &quot;..
.&quot;
are <em>not</em> treated as comment-characters. The general syntax is best
illustrated
using a simple example:
\code
# comment line
var1 = 1.0 ; you can also comment using semi-colons
somevar = some text.\
You can also use\
line-continuation
var3 = 4 # whatever that means
note = "this is also possible, and # here does nothing"
a_switch = true #possible values: 0,1,true,false,yes,no, case insensitive
...
\endcode
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
trailing spaces in are ignore (except within double-quotes).
The general approach of reading from such a config-file, is to first
call XLALParseDataFile() which loads and pre-parses the contents of the
config-file into the structure LALParsedDataFile. Then one can read in
config-variables either using one of the type-strict custom-wrappers
<tt>XLALReadConfig<TYPE>Variable()</tt> or the general-purpose reading func
tion
XLALReadConfigVariable().
A boolean variable read by XLALReadConfigBOOLVariable() can have any of the
values
<tt>{1, 0, yes, no, true, false}</tt>, where the comparison is done
<em>case-insensitively</em>, i.e. you can also use 'True' or 'FALSE'....
If one wishes a tight sytnax for the config-file, one can check
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
successfully parsed, using:
XLALCheckConfigReadComplete(), where \a strictness is either
CONFIGFILE_WARN or CONFIGFILE_ERROR.
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
read-in. (The use of this function is optional).
The configfile-data should be freed at the end using
XLALDestroyParsedDataFile().
\par Notes
XLALReadConfigSTRINGVariable() and XLALReadConfigSTRINGVariable() are not
the same as using <tt>%quot;\%s&quot;</tt> as a format string, as they read
the
<em>rest</em> of the logical line (excluding comments) as a string.
In the case of XLALReadConfigSTRINGVariable(), the required
memory is allocated and has to be freed by the caller, while for
XLALReadConfigSTRINGVariable() the caller has to provide a
CHARVector of length N, which defines the maximum length of
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 /** This structure defines a config-variable to be read in using the
skipping to change at line 77 skipping to change at line 135
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagLALConfigVar { typedef struct tagLALConfigVar {
SWIGLAL_STRUCT(LALConfigVar); SWIGLAL_STRUCT(LALConfigVar);
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 {
SWIGLAL_STRUCT(LALParsedDataFile); SWIGLAL_STRUCT(LALParsedDataFile);
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);
skipping to change at line 143 skipping to change at line 201
int XLALCheckConfigReadComplete (const LALParsedDataFile *cfgdata, ConfigSt rictness strict); int XLALCheckConfigReadComplete (const LALParsedDataFile *cfgdata, ConfigSt rictness strict);
int XLALLowerCaseString (CHAR *string); int XLALLowerCaseString (CHAR *string);
/* ========== DEPRECATED LAL INTERFACE FUNCTIONS, which have been replaced by XLAL functions, /* ========== DEPRECATED LAL INTERFACE FUNCTIONS, which have been replaced by XLAL functions,
* These functions are just wrappers around the XLAL functions * These functions are just wrappers around the XLAL functions
*/ */
/** \name Error codes */ /** \name Error codes */
/*@{*/ /*@{*/
#define CONFIGFILEH_ENULL 1 #define CONFIGFILEH_ENULL 1 /**< Arguments contained an
#define CONFIGFILEH_EFILE 2 unexpected null pointer. */
#define CONFIGFILEH_EVAR 3 #define CONFIGFILEH_EFILE 2 /**< File error. */
#define CONFIGFILEH_EFMT 4 #define CONFIGFILEH_EVAR 3 /**< Config variable not fo
#define CONFIGFILEH_ETOKENS 5 und. */
#define CONFIGFILEH_ENONULL 6 #define CONFIGFILEH_EFMT 4 /**< Config variable not re
#define CONFIGFILEH_EUNKNOWN 8 adable using given format-string. */
#define CONFIGFILEH_EMEM 9 #define CONFIGFILEH_ETOKENS 5 /**< The input ConfigData s
#define CONFIGFILEH_EBOOL 10 eems corrupted. */
#define CONFIGFILEH_ESTRING 11 #define CONFIGFILEH_ENONULL 6 /**< Output pointer is not
#define CONFIGFILEH_EXLAL 12 NULL */
#define CONFIGFILEH_EUNKNOWN 8 /**< Unknown config-file en
try found */
#define CONFIGFILEH_EMEM 9 /**< Out of memory */
#define CONFIGFILEH_EBOOL 10 /**< Illegal BOOLEAN entry
*/
#define CONFIGFILEH_ESTRING 11 /**< Malformed quoted strin
g */
#define CONFIGFILEH_EXLAL 12 /**< Failure in XLAL functi
on */
/*@}*/
/** \cond DONT_DOXYGEN */
#define CONFIGFILEH_MSGENULL "Arguments contained an unexpected n ull pointer." #define CONFIGFILEH_MSGENULL "Arguments contained an unexpected n ull pointer."
#define CONFIGFILEH_MSGEFILE "File error." #define CONFIGFILEH_MSGEFILE "File error."
#define CONFIGFILEH_MSGEVAR "Config variable not found." #define CONFIGFILEH_MSGEVAR "Config variable not found."
#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 */
/* Function prototypes */ /** \name Deprecated LAL-interface
* 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 void LALReadConfigBOOLVariable (LALStatus *, BOOLEAN *varp, const LALParsed
LALReadConfigBOOLVariable (LALStatus *, DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
BOOLEAN *varp, void LALReadConfigINT4Variable (LALStatus *, INT4 *varp, const LALParsedDat
const LALParsedDataFile *cfgdata, aFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
const CHAR *varName, void LALReadConfigREAL8Variable (LALStatus *, REAL8 *varp, const LALParsedD
BOOLEAN *wasRead); ataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
void LALReadConfigSTRINGVariable (LALStatus *, CHAR **varp, const LALParsed
void DataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
LALReadConfigINT4Variable (LALStatus *, void LALReadConfigSTRINGNVariable (LALStatus *, CHARVector *varp, const LAL
INT4 *varp, ParsedDataFile *cfgdata, const CHAR *varName, BOOLEAN *wasRead);
const LALParsedDataFile *cfgdata, void LALReadConfigVariable (LALStatus *, void *varp, const LALParsedDataFil
const CHAR *varName, e *cfgdata, const LALConfigVar *param, BOOLEAN *wasRead);
BOOLEAN *wasRead);
void
LALReadConfigREAL8Variable (LALStatus *,
REAL8 *varp,
const LALParsedDataFile *cfgdata,
const CHAR *varName,
BOOLEAN *wasRead);
void
LALReadConfigSTRINGVariable (LALStatus *,
CHAR **varp,
const LALParsedDataFile *cfgdata,
const CHAR *varName,
BOOLEAN *wasRead);
void
LALReadConfigSTRINGNVariable (LALStatus *,
CHARVector *varp,
const LALParsedDataFile *cfgdata,
const CHAR *varName,
BOOLEAN *wasRead);
void
LALReadConfigVariable (LALStatus *,
void *varp,
const LALParsedDataFile *cfgdata,
const LALConfigVar *param,
BOOLEAN *wasRead);
void LALCheckConfigReadComplete (LALStatus *, const LALParsedDataFile *cfgd ata, ConfigStrictness strict); void LALCheckConfigReadComplete (LALStatus *, const LALParsedDataFile *cfgd ata, ConfigStrictness strict);
/*@}*/
/*@}*/
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* Double-include protection. */ #endif /* Double-include protection. */
 End of changes. 10 change blocks. 
73 lines changed or deleted 125 lines changed or added


 Date.h   Date.h 
/* /*
* Copyright (C) 2012 Karl Wette
* Copyright (C) 2007 Duncan Brown, David Chin, Jolien Creighton, Kipp Cann on, Reinhard Prix, Stephen Fairhurst * Copyright (C) 2007 Duncan Brown, David Chin, Jolien Creighton, Kipp Cann on, Reinhard Prix, Stephen Fairhurst
* *
* 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
skipping to change at line 123 skipping to change at line 124
#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. */
/*@}*/ /*@}*/
/* 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, INT4 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 );
/* Adds dt to a GPS time. */ /* Adds dt to a GPS time. */
LIGOTimeGPS * XLALGPSAdd( LIGOTimeGPS *epoch, REAL8 dt ); LIGOTimeGPS * XLALGPSAdd( LIGOTimeGPS *epoch, REAL8 dt );
skipping to change at line 175 skipping to change at line 176
INT4 gpssec /**< [In] Seconds since the GPS epoch. */ INT4 gpssec /**< [In] Seconds since the GPS epoch. */
); );
/* 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 /**< [In] UTC time in a broken do wn time structure. */ ); REAL8 XLALJulianDay( const struct tm *utc /**< [In] UTC time in a broken do wn time structure. */ );
/* Returns the Modified Julian Day (MJD) corresponding to the date given in a broken down time structure.*/ /* Returns the Modified Julian Day (MJD) corresponding to the date given in a broken down time structure.*/
INT4 XLALModifiedJulianDay( const struct tm *utc /**< [In] UTC time in a br oken down time structure. */ ); INT4 XLALModifiedJulianDay( const struct tm *utc /**< [In] UTC time in a br oken down time structure. */ );
/** Fill in missing fields of a C 'tm' broken-down time struct. */
int XLALFillBrokenDownTime(struct tm *tm);
/* Returns the Greenwich mean or aparent sideral time in radians. */ /* Returns the Greenwich mean or aparent sideral time in radians. */
REAL8 XLALGreenwichSiderealTime( REAL8 XLALGreenwichSiderealTime(
const LIGOTimeGPS *gpstime, const LIGOTimeGPS *gpstime,
REAL8 equation_of_equinoxes REAL8 equation_of_equinoxes
); );
/* Returns the Greenwich Mean Sidereal Time in RADIANS for a specified GPS time. */ /* Returns the Greenwich Mean Sidereal Time in RADIANS for a specified GPS time. */
REAL8 XLALGreenwichMeanSiderealTime( REAL8 XLALGreenwichMeanSiderealTime(
const LIGOTimeGPS *gpstime const LIGOTimeGPS *gpstime
); );
skipping to change at line 200 skipping to change at line 204
); );
/* Returns the GPS time for the given Greenwich sidereal time (in radians). */ /* Returns the GPS time for the given Greenwich sidereal time (in radians). */
LIGOTimeGPS *XLALGreenwichSiderealTimeToGPS( LIGOTimeGPS *XLALGreenwichSiderealTimeToGPS(
REAL8 gmst, REAL8 gmst,
REAL8 equation_of_equinoxes, REAL8 equation_of_equinoxes,
LIGOTimeGPS *gps LIGOTimeGPS *gps
); );
/** \ingroup Date_h /** \ingroup Date_h
* This structure is just the standard Unix \c tm structure, described
* in the man page for <tt>ctime(3)</tt>. We shall
* {\em always} ignore the daylight savings time field, \c tm_isdst.
*/
typedef struct
tm
LALUnixDate;
/** \ingroup Date_h
* 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
{ {
SWIGLAL_STRUCT(LALPlaceAndGPS); SWIGLAL_STRUCT(LALPlaceAndGPS);
LALDetector *p_detector; /**< pointer to a detector */ 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 */
 End of changes. 4 change blocks. 
10 lines changed or deleted 5 lines changed or added


 DetResponse.h   DetResponse.h 
skipping to change at line 40 skipping to change at line 40
#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
NRCSID( DETRESPONSEH, "$Id$" );
/** /**
\author David Chin <dwchin@umich.edu>, Kipp Cannon <kipp@gravity.phys.uwm.e du> \author David Chin <dwchin@umich.edu>, Kipp Cannon <kipp@gravity.phys.uwm.e du>
\addtogroup DetResponse_h \addtogroup DetResponse_h
\brief Provides routines to compute gravitational wave detector response to \brief Provides routines to compute gravitational wave detector response to
polarized planar gravitational wave originating from a given source, polarized planar gravitational wave originating from a given source,
detected at a given time. detected at a given time.
\heading{Synopsis} \heading{Synopsis}
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 DetectorSite.h   DetectorSite.h 
skipping to change at line 37 skipping to change at line 37
#ifndef _DETECTORSITE_H #ifndef _DETECTORSITE_H
#define _DETECTORSITE_H #define _DETECTORSITE_H
#include <lal/LALDetectors.h> #include <lal/LALDetectors.h>
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (DETECTORSITEH, "$Id$");
/** Legacy code: should now use data in LALDetectors.h */ /** Legacy code: should now use data in LALDetectors.h */
enum enum
{ {
LALDetectorIndexLHODIFF = LAL_LHO_4K_DETECTOR, LALDetectorIndexLHODIFF = LAL_LHO_4K_DETECTOR,
LALDetectorIndexLLODIFF = LAL_LLO_4K_DETECTOR, LALDetectorIndexLLODIFF = LAL_LLO_4K_DETECTOR,
LALDetectorIndexVIRGODIFF = LAL_VIRGO_DETECTOR, LALDetectorIndexVIRGODIFF = LAL_VIRGO_DETECTOR,
LALDetectorIndexGEO600DIFF = LAL_GEO_600_DETECTOR, LALDetectorIndexGEO600DIFF = LAL_GEO_600_DETECTOR,
LALDetectorIndexTAMA300DIFF = LAL_TAMA_300_DETECTOR, LALDetectorIndexTAMA300DIFF = LAL_TAMA_300_DETECTOR,
LALDetectorIndexCIT40DIFF = LAL_CIT_40_DETECTOR, LALDetectorIndexCIT40DIFF = LAL_CIT_40_DETECTOR,
LALNumCachedDetectors = LAL_NUM_DETECTORS LALNumCachedDetectors = LAL_NUM_DETECTORS
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Dirichlet.h   Dirichlet.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
*/ */
/************************************ <lalVerbatim file="DirichletHV">
Author: UTB Relativity Group; contact whelan@phys.utb.edu
$Id$
*********************************************************** </lalVerbatim>
*/
/********************************************************** <lalLaTeX>
\section{Header \texttt{Dirichlet.h}}
\label{utilities:s:Dirichlet.h}
Provides prototype and error code information for \texttt{LALDirichlet()},
a routine which calculates the values of the Dirichlet kernel
${\cal D}_N(x)$.
\subsection*{Synopsis}
\begin{verbatim}
#include "Dirichlet.h"
\end{verbatim}
\noindent
% Add more information here, if necessary.
\subsection*{Error conditions}
\input{DirichletHErrTable}
\subsection*{Structures}
\begin{verbatim}
struct DirichletParameters
\end{verbatim}
\idx[Type]{DirichletParameters}
\noindent
Contains parameters that specify the Dirichlet kernel $\mathcal{D}_N(x)$.
The fields are:
\begin{description}
\item[\texttt{UINT4 n}] Dirichlet parameter $N$.
\item[\texttt{UINT4 length}] Specified length of output vector.
\item[\texttt{REAL8 deltaX}] Spacing of $x$ values.
\end{description}
\vfill{\footnotesize\input{DirichletHV}}
\newpage\input{DirichletC}
\newpage\input{DirichletTestC}
*********************************************************** </lalLaTeX> */
#ifndef _DIRICHLET_H #ifndef _DIRICHLET_H
#define _DIRICHLET_H #define _DIRICHLET_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (DIRICHLETH, "$Id$"); /**
\addtogroup Dirichlet_h
\author UTB Relativity Group; contact whelan@phys.utb.edu
/******************************** <lalErrTable file="DirichletHErrTable"> * \brief Provides prototype and error code information for <tt>LALDirichle
/ t()</tt>,
a routine which calculates the values of the Dirichlet kernel
\f${\cal D}_N(x)\f$.
#define DIRICHLETH_ENULLPIN 1 \heading{Synopsis}
#define DIRICHLETH_ENVALUE 2 \code
#define DIRICHLETH_ESIZE 3 #include "Dirichlet.h"
#define DIRICHLETH_EDELTAX 4 \endcode
#define DIRICHLETH_ENULLPOUT 5
#define DIRICHLETH_ESIZEMM 6 */
#define DIRICHLETH_ENULLPDOUT 7 /*@{*/
/**\name Error Codes */
/*@{*/
#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_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_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_ENULLPDOUT 7 /**< Null pointer to data me
mber of output vector */
/*@}*/
/** \cond DONT_DOXYGEN */
#define DIRICHLETH_MSGENULLPIN "Null pointer to input parameters" #define DIRICHLETH_MSGENULLPIN "Null pointer to input parameters"
#define DIRICHLETH_MSGENVALUE "Dirichlet parameter N less than or equal to zero" #define DIRICHLETH_MSGENVALUE "Dirichlet parameter N less than or equal to zero"
#define DIRICHLETH_MSGESIZE "Length parameter less than or equal to ze ro" #define DIRICHLETH_MSGESIZE "Length parameter less than or equal to ze ro"
#define DIRICHLETH_MSGEDELTAX "Spacing of x values less than or equal to zero" #define DIRICHLETH_MSGEDELTAX "Spacing of x values less than or equal to zero"
#define DIRICHLETH_MSGENULLPOUT "Null pointer to ouput vector" #define DIRICHLETH_MSGENULLPOUT "Null pointer to ouput vector"
#define DIRICHLETH_MSGESIZEMM "Length of data member of output vector do es not equal length specified in input parameters" #define DIRICHLETH_MSGESIZEMM "Length of data member of output vector do es not equal length specified in input parameters"
#define DIRICHLETH_MSGENULLPDOUT "Null pointer to data member of output vec tor" #define DIRICHLETH_MSGENULLPDOUT "Null pointer to data member of output vec tor"
/** \endcond */
/************************************ </lalErrTable> */ /** Contains parameters that specify the Dirichlet kernel \f$\mathcal{D}_N(
x)\f$ */
typedef struct tagDirichletParameters{ typedef struct tagDirichletParameters{
SWIGLAL_STRUCT(DirichletParameters); SWIGLAL_STRUCT(DirichletParameters);
UINT4 n; /* LALDirichlet parameter N */ UINT4 n; /**< Dirichlet parameter \f$N\f$ */
UINT4 length; /* specified length of output vector */ UINT4 length; /**< Specified length of output vector */
REAL8 deltaX; /* spacing of x values */ REAL8 deltaX; /**< Spacing of \f$x\f$ values */
} DirichletParameters; } DirichletParameters;
void void
LALDirichlet(LALStatus*, LALDirichlet(LALStatus*,
REAL4Vector*, REAL4Vector*,
const DirichletParameters*); const DirichletParameters*);
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* C++ protection */ #endif /* C++ protection */
#endif /* _DIRICHLET_H */ #endif /* _DIRICHLET_H */
 End of changes. 9 change blocks. 
65 lines changed or deleted 41 lines changed or added


 EllipsoidOverlapTools.h   EllipsoidOverlapTools.h 
skipping to change at line 26 skipping to change at line 26
* 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 Name: EllipsoidOverlapTools.h * File Name: EllipsoidOverlapTools.h
* *
* Author: Robinson, C. A., and Sengupta, A. * Author: Robinson, C. A., and Sengupta, A.
* *
* Revision: $Id$
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
#if 0 #if 0
Author: Robinson, C. A. and Sengupta, A. S. Author: Robinson, C. A. and Sengupta, A. S.
#endif #endif
#ifndef _ELLIPSOIDOVERLAPTOOLS_H #ifndef _ELLIPSOIDOVERLAPTOOLS_H
#define _ELLIPSOIDOVERLAPTOOLS_H #define _ELLIPSOIDOVERLAPTOOLS_H
skipping to change at line 60 skipping to change at line 59
#include <gsl/gsl_min.h> #include <gsl/gsl_min.h>
#include <gsl/gsl_vector.h> #include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h> #include <gsl/gsl_matrix.h>
#include <gsl/gsl_blas.h> #include <gsl/gsl_blas.h>
#include <gsl/gsl_linalg.h> #include <gsl/gsl_linalg.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( ELLIPSOIDOVERLAPTOOLSH, "$Id$" );
typedef struct tagfContactWorkSpace typedef struct tagfContactWorkSpace
{ {
SWIGLAL_STRUCT(fContactWorkSpace); SWIGLAL_STRUCT(fContactWorkSpace);
/* Dimension of the matrices & vectors */ /* Dimension of the matrices & vectors */
UINT4 n; UINT4 n;
/* Vector r_AB = r_B - r_A and */ /* Vector r_AB = r_B - r_A and */
/* shape matrices for ellipsoid centered */ /* shape matrices for ellipsoid centered */
/* at points A and B */ /* at points A and B */
gsl_vector *r_AB; gsl_vector *r_AB;
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 FFTWMutex.h   FFTWMutex.h 
skipping to change at line 24 skipping to change at line 24
* 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 _FFTWMUTEX_H #ifndef _FFTWMUTEX_H
#define _FFTWMUTEX_H #define _FFTWMUTEX_H
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( FFTWMUTEXH, "$Id$" );
#ifdef LAL_PTHREAD_LOCK #ifdef LAL_PTHREAD_LOCK
# include <pthread.h> # include <pthread.h>
extern pthread_mutex_t lalFFTWMutex; extern pthread_mutex_t lalFFTWMutex;
# define LAL_FFTW_PTHREAD_MUTEX_LOCK pthread_mutex_lock( &lalFFTWMutex ) # define LAL_FFTW_PTHREAD_MUTEX_LOCK pthread_mutex_lock( &lalFFTWMutex )
# define LAL_FFTW_PTHREAD_MUTEX_UNLOCK pthread_mutex_unlock( &lalFFTWMutex ) # define LAL_FFTW_PTHREAD_MUTEX_UNLOCK pthread_mutex_unlock( &lalFFTWMutex )
#else #else
# define LAL_FFTW_PTHREAD_MUTEX_LOCK # define LAL_FFTW_PTHREAD_MUTEX_LOCK
# define LAL_FFTW_PTHREAD_MUTEX_UNLOCK # define LAL_FFTW_PTHREAD_MUTEX_UNLOCK
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 FileIO.h   FileIO.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
*/ */
/* <lalVerbatim file="FileIOHV">
$Id$
</lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{FileIO.h}}
\label{s:FileIO.h}
Provides standard LAL support IO functions.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALStdio.h>
#include <lal/FileIO.h>
\end{verbatim}
\noindent Only use \texttt{FileIO.h} in test code that links to
the \texttt{lalsupport} library.
\vfill{\footnotesize\input{FileIOHV}}
\newpage\input{FileIOC}
</lalLaTeX> */
#ifndef _FILEIO_H #ifndef _FILEIO_H
#define _FILEIO_H #define _FILEIO_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <lal/LALRCSID.h>
#include <lal/LALStdio.h> #include <lal/LALStdio.h>
NRCSID( FILEIOH, "$Id$" );
/* maximum string size to print with LAL Printf routines */ /* maximum string size to print with LAL Printf routines */
#define LAL_PRINTF_BUFSIZE 4096 #define LAL_PRINTF_BUFSIZE 4096
/**
\addtogroup FileIO_h
\brief Provides standard LAL support IO functions.
\heading{Synopsis}
\code
#include <lal/LALStdio.h>
#include <lal/FileIO.h>
\endcode
Only use \ref FileIO.h in test code that links to the \c lalsupport libr
ary.
*/
/*@{*/
FILE * FILE *
LALOpenDataFile( const char * ); LALOpenDataFile( const char * );
typedef struct tagLALFILE { typedef struct tagLALFILE {
SWIGLAL_STRUCT(LALFILE); SWIGLAL_STRUCT(LALFILE);
int compression; int compression;
void *fp; void *fp;
} LALFILE; } LALFILE;
LALFILE *lalstdin(void); LALFILE *lalstdin(void);
LALFILE *lalstdout(void); LALFILE *lalstdout(void);
skipping to change at line 101 skipping to change at line 91
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
int XLALFileVPrintf( LALFILE *file, const char *fmt, va_list ap ); int XLALFileVPrintf( LALFILE *file, const char *fmt, va_list ap );
#endif /* SWIG */ #endif /* SWIG */
int XLALFilePrintf( LALFILE *file, const char *fmt, ... ); int XLALFilePrintf( LALFILE *file, const char *fmt, ... );
int XLALFileFlush( LALFILE *file ); int XLALFileFlush( LALFILE *file );
int XLALFileSeek( LALFILE *file, long offset, int whence ); int XLALFileSeek( LALFILE *file, long offset, int whence );
long XLALFileTell( LALFILE *file ); long XLALFileTell( LALFILE *file );
void XLALFileRewind( LALFILE *file ); void XLALFileRewind( LALFILE *file );
int XLALFileEOF( LALFILE *file ); int XLALFileEOF( LALFILE *file );
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FILEIO_H */ #endif /* _FILEIO_H */
 End of changes. 5 change blocks. 
25 lines changed or deleted 18 lines changed or added


 FindRoot.h   FindRoot.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
*/ */
#if 0 /* autodoc block */
<lalVerbatim file="FindRootHV">
$Id$
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{FindRoot.h}}
\label{s:FindRoot.h}
Root finding routines.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/FindRoot.h>
\end{verbatim}
\noindent This header covers the routines for root finding.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _FINDROOT_H #ifndef _FINDROOT_H
#define _FINDROOT_H #define _FINDROOT_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (FINDROOTH, "$Id$"); /**
\addtogroup FindRoot_h
#if 0 /* autodoc block */
<lalLaTeX> \brief Root finding routines.
\subsection*{Error conditions}
\input{FindRootHErrTab}
</lalLaTeX>
<lalErrTable file="FindRootHErrTab"> \heading{Synopsis}
\code
#include <lal/FindRoot.h>
\endcode
#endif /* autodoc block */ This header covers the routines for root finding.
#define FINDROOTH_ENULL 1 \heading{Description}
#define FINDROOTH_EIDOM 2
#define FINDROOTH_EMXIT 4
#define FINDROOTH_EBRKT 8
#define FINDROOTH_MSGENULL "Null pointer" The routine <tt>LALSBracketRoot()</tt> expands the specified domain until a
#define FINDROOTH_MSGEIDOM "Invalid initial domain" root
#define FINDROOTH_MSGEMXIT "Maximum iterations exceeded" is contained. The routine <tt>LALDBracketRoot()</tt> is the same but for a
#define FINDROOTH_MSGEBRKT "Root not bracketed" double-precision function.
#if 0 /* autodoc block */ The routine <tt>LALSBisectionFindRoot()</tt> bisects the domain (which must
contain one
root) until the root is found with the desired accuracy. The routine
<tt>LALDBisectionFindRoot()</tt> is the same but for a double-precision fun
ction.
</lalErrTable> \heading{Operating Instructions}
<lalLaTeX> Suppose we want to find the root of the function \f$y = F(x;y_0) = y_0 + x^
2\f$.
Define the function:
\code
static void F( LALStatus *status, REAL4 *y, REAL4 x, void *y0 )
{
INITSTATUS(status);
ASSERT( y0, status, 1, "Null pointer" );
*y = *(REAL4 *)y0 + x*x;
RETURN( status );
}
\endcode
\subsection*{Structures} Then use the following code to bracket and find the root \f$x_0=1\f$ where
\f$F(x_0;y_0=-1)=0\f$:
\code
static LALStatus status;
SFindRootIn input;
REAL4 y0;
REAL4 x0;
\begin{verbatim} y0 = -1;
typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p); input.function = F;
typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p); input.xmin = 0.1;
\end{verbatim} input.xmax = 0.2;
input.xacc = 1e-5;
These are function pointers to functions that map real numbers to real numb /\* expand domain until a root is bracketed *\/
ers. LALSBracketRoot( &status, &input, &y0 );
\begin{verbatim} /\* bisect domain until root is found *\/
typedef struct LALSBisectionFindRoot( &status, &x0, &input, &y0 );
tagSFindRootIn \endcode
{
void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p);
REAL4 xmax;
REAL4 xmin;
REAL4 xacc;
}
SFindRootIn;
typedef struct \heading{Algorithm}
tagDFindRootIn
{
void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p);
REAL8 xmax;
REAL8 xmin;
REAL8 xacc;
}
DFindRootIn;
\end{verbatim}
These are the input structures to the root finding routines. The fields ar This is an implementation of the root bracketing and bisection finding
e: routines \c zbrac and \c rtbis in Numerical Recipes [\ref ptvf1992].
\begin{description} */
\item[\texttt{function}] The function to find the root of. /*@{*/
\item[\texttt{xmax}] The maximum value of the domain interval to look for t
he root.
\item[\texttt{xmax}] The minimum value of the domain interval to look for t
he root.
\item[\texttt{xacc}] The accuracy desired for the root.
\end{description}
</lalLaTeX> /** \name Error Codes */
/*@{*/
#define FINDROOTH_ENULL 1 /**< Null pointer */
#define FINDROOTH_EIDOM 2 /**< Invalid initial domain */
#define FINDROOTH_EMXIT 4 /**< Maximum iterations exceeded */
#define FINDROOTH_EBRKT 8 /**< Root not bracketed */
/*@}*/
#endif /* autodoc block */ /** \cond DONT_DOXYGEN */
#define FINDROOTH_MSGENULL "Null pointer"
#define FINDROOTH_MSGEIDOM "Invalid initial domain"
#define FINDROOTH_MSGEMXIT "Maximum iterations exceeded"
#define FINDROOTH_MSGEBRKT "Root not bracketed"
/** \endcond */
/** These are function pointers to functions that map REAL4 numbers to REAL
4 numbers.
*/
typedef struct typedef struct
tagSFindRootIn tagSFindRootIn
{ {
SWIGLAL_STRUCT(SFindRootIn); SWIGLAL_STRUCT(SFindRootIn);
void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); /**< The fun
REAL4 xmax; ction to find the root of */
REAL4 xmin; REAL4 xmax; /**< The maximum value of the domain interval to look for th
REAL4 xacc; 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 */
} }
SFindRootIn; SFindRootIn;
/** These are function pointers to functions that map REAL8 numbers to REAL
8 numbers.
*/
typedef struct typedef struct
tagDFindRootIn tagDFindRootIn
{ {
SWIGLAL_STRUCT(DFindRootIn); SWIGLAL_STRUCT(DFindRootIn);
void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); /**< The fun
REAL8 xmax; ction to find the root of */
REAL8 xmin; REAL8 xmax; /**< The maximum value of the domain interval to look for th
REAL8 xacc; 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 */
} }
DFindRootIn; DFindRootIn;
#if 0 /* autodoc block */ /* ----- FindRoot.c ----- */
<lalLaTeX>
\newpage\input{FindRootC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALSBracketRoot ( LALSBracketRoot (
LALStatus *status, LALStatus *status,
SFindRootIn *inout, SFindRootIn *inout,
void *params void *params
); );
int int
XLALDBracketRoot( XLALDBracketRoot(
REAL8 (*y)(REAL8, void *), REAL8 (*y)(REAL8, void *),
skipping to change at line 208 skipping to change at line 188
); );
void void
LALDBisectionFindRoot ( LALDBisectionFindRoot (
LALStatus *status, LALStatus *status,
REAL8 *root, REAL8 *root,
DFindRootIn *input, DFindRootIn *input,
void *params void *params
); );
#if 0 /* autodoc block */ /*@}*/
<lalLaTeX>
\newpage\input{FindRootTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FINDROOT_H */ #endif /* _FINDROOT_H */
 End of changes. 25 change blocks. 
106 lines changed or deleted 88 lines changed or added


 FlatLatticeTiling.h   FlatLatticeTiling.h 
skipping to change at line 37 skipping to change at line 37
#define _FLATLATTICETILING_H #define _FLATLATTICETILING_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <gsl/gsl_vector.h> #include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h> #include <gsl/gsl_matrix.h>
#include <lal/LALRCSID.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>
#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
NRCSID(FLATLATTICETILINGH, "$Id$");
/** /**
* Flat lattice tiling bound * Flat lattice tiling bound
*/ */
typedef BOOLEAN (*FlatLatticeTilingBoundFunc)( typedef BOOLEAN (*FlatLatticeTilingBoundFunc)(
void *data, /**< Arbit rary data describing parameter space */ void *data, /**< Arbit rary data describing parameter space */
INT4 dimension, /**< Dimen sion on which bound applies */ INT4 dimension, /**< Dimen sion on which bound applies */
gsl_vector *point, /**< Point on which to find bounds */ gsl_vector *point, /**< Point on which to find bounds */
REAL8 *lower, /**< Lower bound on point in dimension */ REAL8 *lower, /**< Lower bound on point in dimension */
REAL8 *upper /**< Upper bound on point in dimension */ REAL8 *upper /**< Upper bound on point in dimension */
); );
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 FrequencySeries.h   FrequencySeries.h 
/* /*
* $Id$
* *
* Copyright (C) 2007 Kipp Cannon * Copyright (C) 2007 Kipp Cannon
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 26 skipping to change at line 25
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef _FREQUENCYSERIES_H #ifndef _FREQUENCYSERIES_H
#define _FREQUENCYSERIES_H #define _FREQUENCYSERIES_H
#include <stddef.h> #include <stddef.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALRCSID.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
NRCSID(FREQUENCYSERIESH, "$Id:");
/* COMPLEX8 prototypes */ /* COMPLEX8 prototypes */
void XLALDestroyCOMPLEX8FrequencySeries ( void XLALDestroyCOMPLEX8FrequencySeries (
COMPLEX8FrequencySeries *series COMPLEX8FrequencySeries *series
); );
COMPLEX8FrequencySeries *XLALCreateCOMPLEX8FrequencySeries ( COMPLEX8FrequencySeries *XLALCreateCOMPLEX8FrequencySeries (
const CHAR *name, const CHAR *name,
const LIGOTimeGPS *epoch, const LIGOTimeGPS *epoch,
REAL8 f0, REAL8 f0,
 End of changes. 3 change blocks. 
4 lines changed or deleted 0 lines changed or added


 GSLSupport.h   GSLSupport.h 
skipping to change at line 32 skipping to change at line 32
* \file * \file
* \brief Support routines for GSL * \brief Support routines for GSL
*/ */
#ifndef _GSLSUPPORT_H #ifndef _GSLSUPPORT_H
#define _GSLSUPPORT_H #define _GSLSUPPORT_H
#include <gsl/gsl_vector.h> #include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h> #include <gsl/gsl_matrix.h>
#include <lal/LALRCSID.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID(GSLSUPPORTH, "$Id$");
/** /**
* Functions * Functions
*/ */
gsl_vector *XLALGSLVectorFromVAList(INT4, REAL8, ...); gsl_vector *XLALGSLVectorFromVAList(INT4, REAL8, ...);
gsl_vector *XLALGSLVectorFromLALStringVector(LALStringVector*); gsl_vector *XLALGSLVectorFromLALStringVector(LALStringVector*);
gsl_matrix *XLALResizeGSLMatrix(gsl_matrix*, size_t, size_t, double); gsl_matrix *XLALResizeGSLMatrix(gsl_matrix*, size_t, size_t, double);
gsl_vector *XLALResizeGSLVector(gsl_vector*, size_t, double); gsl_vector *XLALResizeGSLVector(gsl_vector*, size_t, double);
gsl_vector_int *XLALResizeGSLVectorInt(gsl_vector_int*, size_t, int); gsl_vector_int *XLALResizeGSLVectorInt(gsl_vector_int*, size_t, int);
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 Grid.h   Grid.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
*/ */
/**
\author Creighton, T. D.
\file
\brief Provides a structured datatype for a multidimensional rectilinear gr
id.
\heading{Synopsis}
\code
#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
generalization of the series datatypes (frequency series, time series,
etc.), representing evenly-sampled data over some physical parameter
space.
*/
#ifndef _GRID_H #ifndef _GRID_H
#define _GRID_H #define _GRID_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( GRIDH, "$Id$" );
/** /**
\heading{Error conditions} \addtogroup Grid_h
\name Error Codes */ /*@{*/ \author Creighton, T. D.
#define GRIDH_ENUL 1
#define GRIDH_EOUT 2
#define GRIDH_EMEM 3
#define GRIDH_MSGENUL "Unexpected null pointer in arguments" \brief Provides a structured datatype for a multidimensional rectilinear
#define GRIDH_MSGEOUT "Output handle points to a non-null pointer" grid.
#define GRIDH_MSGEMEM "Memory allocation error"
/*@}*//**
\heading{Types} \heading{Synopsis}
\code
#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
generalization of the series datatypes (frequency series, time series,
etc.), representing evenly-sampled data over some physical parameter
space.
\heading{Structure <tt>\<datatype\>Grid</tt>} \heading{Structure <tt>\<datatype\>Grid</tt>}
This structure is a generalization of the LAL series types, This structure is a generalization of the LAL series types,
storing data on an \f$m\f$-dimensional rectangular grid on a physical storing data on an \f$m\f$-dimensional rectangular grid on a physical
parameter space. The values on the grid are of type <tt>\<datatype\></tt> parameter space. The values on the grid are of type <tt>\<datatype\></tt>
which can be any LAL primitive \e numerical datatype (\c INT2, which can be any LAL primitive \e numerical datatype (#INT2,
\c INT4, \c INT8, \c UINT2, \c UINT4, \c UINT8, #INT4, #INT8, #UINT2, #UINT4, #UINT8,
\c REAL4, \c REAL8, \c COMPLEX8, \c COMPLEX16). The #REAL4, #REAL8, #COMPLEX8, #COMPLEX16). The
data are stored in an array of dimension \f$M\geq m\f$: if \f$M=m\f$, then the data are stored in an array of dimension \f$M\geq m\f$: if \f$M=m\f$, then the
structure stores a single value for each grid point; if \f$M>m\f$, then structure stores a single value for each grid point; if \f$M>m\f$, then
the structure stores a vector or array of values on the ``tangent the structure stores a vector or array of values on the ``tangent
space'' of each grid point. We refer to \f$m\f$ as the \e grid 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 dimension and \f$M\f$ as the \e data dimension. The fields of the
structure are: structure are:
<dl> <dl>
<dt><tt>CHAR name[LALNameLength]</tt></dt><dd> A name identifying the grid <dt><tt>CHAR name[LALNameLength]</tt></dt><dd> A name identifying the grid
and/or the data being sampled.</dd> and/or the data being sampled.</dd>
skipping to change at line 115 skipping to change at line 97
the grid dimension \f$m=\f$<tt>offset->length</tt>=<tt>interval->length</tt >. the grid dimension \f$m=\f$<tt>offset->length</tt>=<tt>interval->length</tt >.
An index \f$\mathbf{i}=(i_0,\ldots,i_{M-1})\f$, where \f$i_k\f$ are integer s An index \f$\mathbf{i}=(i_0,\ldots,i_{M-1})\f$, where \f$i_k\f$ are integer s
from 0 to <tt>data->dimLength->data</tt>\f${}_k\f$, specifies a grid point from 0 to <tt>data->dimLength->data</tt>\f${}_k\f$, specifies a grid point
located at \f$\mathbf{p}=\mathbf{p}_0+\sum_{k=0}^{n-1}\hat{\mathbf{e}}_k located at \f$\mathbf{p}=\mathbf{p}_0+\sum_{k=0}^{n-1}\hat{\mathbf{e}}_k
i_k \Delta p_k\f$ if \f$M=m\f$, or an array element \f$\mathsf{A}_{i_m\cdot s i_k \Delta p_k\f$ if \f$M=m\f$, or an array element \f$\mathsf{A}_{i_m\cdot s
i_{M-1}}\f$ at that grid point if \f$M>m\f$. The values in i_{M-1}}\f$ at that grid point if \f$M>m\f$. The values in
<tt>data->data</tt> are the value stored at each grid point (or array <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 element at each grid point), arranged in the manner discussed in
\ref LALDatatypes.h.</dd> \ref LALDatatypes.h.</dd>
</dl> </dl>
\heading{Prototypes}
\code
void
LAL<typecode>CreateGrid( LALStatus *stat,
<datatype>Grid **grid,
UINT4Vector *dimLength,
UINT4 dimension )
void
LAL<typecode>DestroyGrid( LALStatus *stat,
<datatype>Grid **grid )
\endcode
\heading{Description}
These routines create or destroy a <tt>\<datatype\>Grid</tt> structure.
The input vector \c dimLength stores the lengths of each dimension
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
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
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
in, with the exception of the <tt>(*grid)->data->dimLength</tt> vector
(which will contain exactly the same data as the \c dimLength
input parameter). When calling the <tt>LAL\<typecode\>CreateGrid()</tt>
routines, or on returning from the <tt>LAL\<typecode\>DestroyGrid()</tt>
routines, \c grid should be a non-\c NULL handle to a
\c NULL-valued pointer.
For each of these prototype templates there are in fact 10 separate
routines corresponding to all the numerical atomic datatypes
<tt>\<datatype\></tt> referred to by <tt>\<typecode\></tt>:
<table>
<tr><th>\<typecode\></th><th>\<datatype\></th><th>\<typecode\></th><th>\<da
tatype\></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 */ /*@{*/
#define GRIDH_ENUL 1 /**< Unexpected null pointer in arguments */
#define GRIDH_EOUT 2 /**< Output handle points to a non-null pointer */
#define GRIDH_EMEM 3 /**< Memory allocation error */
/*@}*/
/*@}*/
/** \cond DONT_DOXYGEN */
#define GRIDH_MSGENUL "Unexpected null pointer in arguments"
#define GRIDH_MSGEOUT "Output handle points to a non-null pointer"
#define GRIDH_MSGEMEM "Memory allocation error"
/** \endcond */
typedef struct tagINT2Grid { typedef struct tagINT2Grid {
SWIGLAL_STRUCT(INT2Grid); SWIGLAL_STRUCT(INT2Grid);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LALUnit sampleUnits; LALUnit sampleUnits;
LALUnit *dimUnits; LALUnit *dimUnits;
REAL8Vector *offset; REAL8Vector *offset;
REAL8Vector *interval; REAL8Vector *interval;
INT2Array *data; INT2Array *data;
} INT2Grid; } INT2Grid;
skipping to change at line 279 skipping to change at line 320
void void
LALDDestroyGrid( LALStatus *status, REAL8Grid **grid ); LALDDestroyGrid( LALStatus *status, REAL8Grid **grid );
void void
LALCDestroyGrid( LALStatus *status, COMPLEX8Grid **grid ); LALCDestroyGrid( LALStatus *status, COMPLEX8Grid **grid );
void void
LALZDestroyGrid( LALStatus *status, COMPLEX16Grid **grid ); LALZDestroyGrid( LALStatus *status, COMPLEX16Grid **grid );
/**
%
*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GRID_H */ #endif /* _GRID_H */
 End of changes. 9 change blocks. 
39 lines changed or deleted 77 lines changed or added


 IIRFilter.h   IIRFilter.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
*/ */
/************************************ <lalVerbatim file="IIRFilterHV"> #ifndef _IIRFILTER_H
Author: Creighton, T. D. #define _IIRFILTER_H
$Id$
**************************************************** </lalVerbatim> */
/********************************************************** <lalLaTeX> /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...)
#endif
\section{Header \texttt{IIRFilter.h}} #include <lal/LALStdlib.h>
\label{s:IIRFilter.h} #include <lal/ZPGFilter.h>
Provides routines to make and apply IIR filters. #if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
\subsection*{Synopsis} /**
\begin{verbatim} \author Creighton, T. D.
#include <lal/IIRFilter.h> \addtogroup IIRFilter_h
\end{verbatim}
\noindent This header covers routines that create, destroy, and apply \brief Provides routines to make and apply IIR filters.
\heading{Synopsis}
\code
#include <lal/IIRFilter.h>
\endcode
This header covers routines that create, destroy, and apply
generic time-domain filters, given by objects of type generic time-domain filters, given by objects of type
\verb@<datatype>IIRFilter@, where \verb@<datatype>@ is either <tt>\<datatype\>IIRFilter</tt>, where <tt>\<datatype\></tt> is either
\verb@REAL4@ or \verb@REAL8@. \c REAL4 or \c REAL8.
An IIR (Infinite Impulse Response) filter is a generalized linear An IIR (Infinite Impulse Response) filter is a generalized linear
causal time-domain filter, in which the filter output $y_n=y(t_n)$ at causal time-domain filter, in which the filter output \f$y_n=y(t_n)\f$ at
any sampled time $t_n=t_0+n\Delta t$ is a linear combination of the any sampled time \f$t_n=t_0+n\Delta t\f$ is a linear combination of the
input $x$ \emph{and} output $y$ at previous sampled times: input \f$x\f$ \e and output \f$y\f$ at previous sampled times:
$$ \f[
y_n = \sum_{k=0}^M c_k x_{n-k} + \sum_{l=1}^N d_l y_{n-l} \; . y_n = \sum_{k=0}^M c_k x_{n-k} + \sum_{l=1}^N d_l y_{n-l} \; .
$$ \f]
The coefficients $c_k$ are called the direct filter coefficients, and The coefficients \f$c_k\f$ are called the direct filter coefficients, and
the coefficients $d_l$ are the recursive filter coefficients. The the coefficients \f$d_l\f$ are the recursive filter coefficients. The
filter order is the larger of $M$ or $N$, and determines how far back filter order is the larger of \f$M\f$ or \f$N\f$, and determines how far ba
ck
in time the filter must look to determine its next output. However, in time the filter must look to determine its next output. However,
the recursive nature of the filter means that the output can depend on the recursive nature of the filter means that the output can depend on
input arbitrarily far in the past; hence the name ``infinite impulse input arbitrarily far in the past; hence the name "infinite impulse
response''. Nonetheless, for a well-designed, stable filter, the response". Nonetheless, for a well-designed, stable filter, the
actual filter response to an impulse should diminish rapidly beyond actual filter response to an impulse should diminish rapidly beyond
some characteristic timescale. some characteristic timescale.
Note that nonrecursive FIR (Finite Impulse Response) filters are Note that nonrecursive FIR (Finite Impulse Response) filters are
considered a subset of IIR filters, having $N=0$. considered a subset of IIR filters, having \f$N=0\f$.
For practical implementation, it is convenient to express the bilinear For practical implementation, it is convenient to express the bilinear
equation above as two linear equations involving an auxiliary sequence equation above as two linear equations involving an auxiliary sequence
$w$: \f$w\f$:
$$ \f[
w_n = x_n + \sum_{l=1}^N d_l w_{n-l} \; , w_n = x_n + \sum_{l=1}^N d_l w_{n-l} \; ,
$$ \f]
$$ \f[
y_n = \sum_{k=0}^M c_k w_{n-k} \; . y_n = \sum_{k=0}^M c_k w_{n-k} \; .
$$ \f]
The equivalence of this to the first expression is not obvious, but The equivalence of this to the first expression is not obvious, but
can be proven by mathematical induction. The advantage of the can be proven by mathematical induction. The advantage of the
auxiliary variable representation is twofold. First, when one is auxiliary variable representation is twofold. First, when one is
feeding data point by point to the filter, the filter needs only feeding data point by point to the filter, the filter needs only
``remember'' the previous $M$ or $N$ (whichever is larger) values of "remember" the previous \f$M\f$ or \f$N\f$ (whichever is larger) values of
$w$, rather than remembering the previous $M$ values of $x$ \emph{and} \f$w\f$, rather than remembering the previous \f$M\f$ values of \f$x\f$ \e
the previous $N$ values of $y$. Second, when filtering a large stored and
the previous \f$N\f$ values of \f$y\f$. Second, when filtering a large sto
red
data vector, the filter response can be computed in place: one first data vector, the filter response can be computed in place: one first
runs forward through the vector replacing $x$ with $w$, and then runs forward through the vector replacing \f$x\f$ with \f$w\f$, and then
backward replacing $w$ with $y$. backward replacing \f$w\f$ with \f$y\f$.
Although the IIR filters in these routines are explicitly real, one Although the IIR filters in these routines are explicitly real, one
can consider formally their complex response. A sinusoidal input can can consider formally their complex response. A sinusoidal input can
thus be written as $x_n=X\exp(2\pi ifn\Delta t)=Xz^n$, where $X$ is a thus be written as \f$x_n=X\exp(2\pi ifn\Delta t)=Xz^n\f$, where \f$X\f$ is
complex amplitude and $z=\exp(2\pi if\Delta t)$ is a complex a
complex amplitude and \f$z=\exp(2\pi if\Delta t)\f$ is a complex
parametrization of the frequency. By linearity, the output must also parametrization of the frequency. By linearity, the output must also
be sinusoidal: $y_m=Y\exp(2\pi ifm\Delta t)=Yz^m$. Putting these into be sinusoidal: \f$y_m=Y\exp(2\pi ifm\Delta t)=Yz^m\f$. Putting these into
the bilinear equation, one can easily compute the filter's complex the bilinear equation, one can easily compute the filter's complex
transfer function: transfer function:
$$ \f[
T(z) = \frac{Y}{X} = \frac{\sum_{k=0}^M c_k z^{-k}} T(z) = \frac{Y}{X} = \frac{\sum_{k=0}^M c_k z^{-k}}
{1 - \sum_{l=1}^N d_l z^{-l}} {1 - \sum_{l=1}^N d_l z^{-l}}
$$ \f]
This can be readily converted to and from the ``zeros, poles, gain'' This can be readily converted to and from the "zeros, poles, gain"
representation of a filter, which expresses $T(z)$ as a factored representation of a filter, which expresses \f$T(z)\f$ as a factored
rational function of $z$. rational function of \f$z\f$.
It should also be noted that, in the routines covered by this header, It should also be noted that, in the routines covered by this header,
I have adopted the convention of including a redundant recursive I have adopted the convention of including a redundant recursive
coefficient $d_0$, in order to make the indexing more intuitive. For coefficient \f$d_0\f$, in order to make the indexing more intuitive. For
formal correctness $d_0$ should be set to $-1$, although the filtering formal correctness \f$d_0\f$ should be set to \f$-1\f$, although the filter
ing
routines never actually use this coefficient. routines never actually use this coefficient.
******************************************************* </lalLaTeX> */ */
/*@{*/
#ifndef _IIRFILTER_H
#define _IIRFILTER_H
/* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...)
#endif
#include <lal/LALStdlib.h>
#include <lal/ZPGFilter.h>
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
NRCSID(IIRFILTERH,"$Id$"); /**
@{
\defgroup CreateIIRFilter_c Module CreateIIRFilter.c
\defgroup DestroyIIRFilter_c Module DestroyIIRFilter.c
\defgroup IIRFilter_c Module IIRFilter.c
\defgroup IIRFilterVector_c Module IIRFilterVector.c
\defgroup IIRFilterVectorR_c Module IIRFilterVectorR.c
@}
*/
/********************************************************** <lalLaTeX> /** \name Error Codes */ /*@{*/
\subsection*{Error conditions} #define IIRFILTERH_ENUL 1 /**< Unexpected null pointer in arguments */
****************************************** </lalLaTeX><lalErrTable> */ #define IIRFILTERH_EOUT 2 /**< Output handle points to a non-null poin
#define IIRFILTERH_ENUL 1 ter */
#define IIRFILTERH_EOUT 2 #define IIRFILTERH_EMEM 3 /**< Memory allocation error */
#define IIRFILTERH_EMEM 3 #define IIRFILTERH_EPAIR 4 /**< Input has unpaired nonreal poles or zer
#define IIRFILTERH_EPAIR 4 os */
/*@}*/
/** \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"
/******************************************** </lalErrTable><lalLaTeX> /** \endcond */
\subsection*{Types}
\subsubsection*{Structure \texttt{<datatype>IIRFilter}}
\idx[Type]{REAL4IIRFilter}
\idx[Type]{REAL8IIRFilter}
This structure stores the direct and recursive filter coefficients, as
well as the history of the auxiliary sequence $w$. \verb@<datatype>@
may be \verb@REAL4@ or \verb@REAL8@. The length of the history vector
gives the order of the filter. The fields are:
\begin{description}
\item[\texttt{const CHAR *name}] A user-assigned name.
\item[\texttt{REAL8 deltaT}] The sampling time interval of the filter.
If $\leq0$, it will be ignored (i.e.\ it will be taken from the data
stream).
\item[\texttt{<datatype>Vector *directCoef}] The direct filter
coefficients.
\item[\texttt{<datatype>Vector *recursCoef}] The recursive filter
coefficients.
\item[\texttt{<datatype>Vector *history}] The previous values of $w$.
\end{description}
******************************************************* </lalLaTeX> */
/** This structure stores the direct and recursive REAL4 filter coefficient
s, as
* well as the history of the auxiliary sequence \f$w\f$.
* The length of the history vector gives the order of the filter
*/
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK) tagREAL4IIRFilter::name; %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK) tagREAL4IIRFilter::name;
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagREAL4IIRFilter{ typedef struct tagREAL4IIRFilter{
SWIGLAL_STRUCT(REAL4IIRFilter); SWIGLAL_STRUCT(REAL4IIRFilter);
const CHAR *name; /* User assigned name. */ const CHAR *name; /**< User assigned name. */
REAL8 deltaT; /* Sampling time interval. */ REAL8 deltaT; /**< Sampling time interval of the filter; If \f
REAL4Vector *directCoef; /* The direct filter coefficients. */ $\leq0\f$, it will be ignored (ie it will be taken from the data stream) */
REAL4Vector *recursCoef; /* The recursive filter coefficients. */ REAL4Vector *directCoef; /**< The direct filter coefficients. */
REAL4Vector *history; /* The previous values of w. */ REAL4Vector *recursCoef; /**< The recursive filter coefficients. */
REAL4Vector *history; /**< The previous values of w. */
} REAL4IIRFilter; } REAL4IIRFilter;
/** This structure stores the direct and recursive REAL8 filter coefficient
s, as
* well as the history of the auxiliary sequence \f$w\f$.
* The length of the history vector gives the order of the filter
*/
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK) tagREAL8IIRFilter::name; %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK) tagREAL8IIRFilter::name;
#endif /* SWIG */ #endif /* SWIG */
typedef struct tagREAL8IIRFilter{ typedef struct tagREAL8IIRFilter{
SWIGLAL_STRUCT(REAL8IIRFilter); SWIGLAL_STRUCT(REAL8IIRFilter);
const CHAR *name; /* User assigned name. */ const CHAR *name; /**< User assigned name. */
REAL8 deltaT; /* Sampling time interval. */ REAL8 deltaT; /**< Sampling time interval of the filter; If \f
REAL8Vector *directCoef; /* The direct filter coefficients. */ $\leq0\f$, it will be ignored (ie it will be taken from the data stream). *
REAL8Vector *recursCoef; /* The recursive filter coefficients. */ /
REAL8Vector *history; /* The previous values of w. */ REAL8Vector *directCoef; /**< The direct filter coefficients. */
REAL8Vector *recursCoef; /**< The recursive filter coefficients. */
REAL8Vector *history; /**< The previous values of w. */
} REAL8IIRFilter; } REAL8IIRFilter;
/* <lalLaTeX> /*@}*/
\vfill{\footnotesize\input{IIRFilterHV}}
</lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
REAL4IIRFilter *XLALCreateREAL4IIRFilter( COMPLEX8ZPGFilter *input ); REAL4IIRFilter *XLALCreateREAL4IIRFilter( COMPLEX8ZPGFilter *input );
REAL8IIRFilter *XLALCreateREAL8IIRFilter( COMPLEX16ZPGFilter *input ); REAL8IIRFilter *XLALCreateREAL8IIRFilter( COMPLEX16ZPGFilter *input );
void XLALDestroyREAL4IIRFilter( REAL4IIRFilter *filter ); void XLALDestroyREAL4IIRFilter( REAL4IIRFilter *filter );
void XLALDestroyREAL8IIRFilter( REAL8IIRFilter *filter ); void XLALDestroyREAL8IIRFilter( REAL8IIRFilter *filter );
int XLALIIRFilterREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *filter ) ; int XLALIIRFilterREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *filter ) ;
int XLALIIRFilterREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *filter ) ; int XLALIIRFilterREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *filter ) ;
int XLALIIRFilterReverseREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *f ilter ); int XLALIIRFilterReverseREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *f ilter );
int XLALIIRFilterReverseREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *f ilter ); int XLALIIRFilterReverseREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *f ilter );
skipping to change at line 215 skipping to change at line 194
int XLALIIRFilterReverseREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *f ilter ); int XLALIIRFilterReverseREAL4Vector( REAL4Vector *vector, REAL8IIRFilter *f ilter );
int XLALIIRFilterReverseREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *f ilter ); int XLALIIRFilterReverseREAL8Vector( REAL8Vector *vector, REAL8IIRFilter *f ilter );
REAL4 XLALIIRFilterREAL4( REAL4 x, REAL8IIRFilter *filter ); REAL4 XLALIIRFilterREAL4( REAL4 x, REAL8IIRFilter *filter );
REAL8 XLALIIRFilterREAL8( REAL8 x, REAL8IIRFilter *filter ); REAL8 XLALIIRFilterREAL8( REAL8 x, REAL8IIRFilter *filter );
/* WARNING: THIS FUNCTION IS OBSOLETE */ /* WARNING: THIS FUNCTION IS OBSOLETE */
REAL4 LALSIIRFilter( REAL4 x, REAL4IIRFilter *filter ); REAL4 LALSIIRFilter( REAL4 x, REAL4IIRFilter *filter );
/* REAL8 LALDIIRFilter( REAL8 x, REAL8IIRFilter *filter ); */ /* REAL8 LALDIIRFilter( REAL8 x, REAL8IIRFilter *filter ); */
#define LALDIIRFilter(x,f) XLALIIRFilterREAL8(x,f) #define LALDIIRFilter(x,f) XLALIIRFilterREAL8(x,f)
/* <lalLaTeX> /* ----- CreateIIRFilter.c ---------- */
\newpage\input{CreateIIRFilterC}
</lalLaTeX> */
void void
LALCreateREAL4IIRFilter( LALStatus *status, LALCreateREAL4IIRFilter( LALStatus *status,
REAL4IIRFilter **output, REAL4IIRFilter **output,
COMPLEX8ZPGFilter *input ); COMPLEX8ZPGFilter *input );
void void
LALCreateREAL8IIRFilter( LALStatus *status, LALCreateREAL8IIRFilter( LALStatus *status,
REAL8IIRFilter **output, REAL8IIRFilter **output,
COMPLEX16ZPGFilter *input ); COMPLEX16ZPGFilter *input );
/* <lalLaTeX> /* ----- DestroyIIRFilter.c ---------- */
\newpage\input{DestroyIIRFilterC}
</lalLaTeX> */
void void
LALDestroyREAL4IIRFilter( LALStatus *status, LALDestroyREAL4IIRFilter( LALStatus *status,
REAL4IIRFilter **input ); REAL4IIRFilter **input );
void void
LALDestroyREAL8IIRFilter( LALStatus *status, LALDestroyREAL8IIRFilter( LALStatus *status,
REAL8IIRFilter **input ); REAL8IIRFilter **input );
/* <lalLaTeX> /* ----- IIRFilter.c ---------- */
\newpage\input{IIRFilterC}
</lalLaTeX> */
void void
LALIIRFilterREAL4( LALStatus *status, LALIIRFilterREAL4( LALStatus *status,
REAL4 *output, REAL4 *output,
REAL4 input, REAL4 input,
REAL4IIRFilter *filter ); REAL4IIRFilter *filter );
void void
LALIIRFilterREAL8( LALStatus *status, LALIIRFilterREAL8( LALStatus *status,
REAL8 *output, REAL8 *output,
REAL8 input, REAL8 input,
REAL8IIRFilter *filter ); REAL8IIRFilter *filter );
/* <lalLaTeX> /* ----- IIRFilterVector.c ---------- */
\newpage\input{IIRFilterVectorC}
</lalLaTeX> */
void void
LALIIRFilterREAL4Vector( LALStatus *status, LALIIRFilterREAL4Vector( LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
REAL4IIRFilter *filter ); REAL4IIRFilter *filter );
void void
LALIIRFilterREAL8Vector( LALStatus *status, LALIIRFilterREAL8Vector( LALStatus *status,
REAL8Vector *vector, REAL8Vector *vector,
REAL8IIRFilter *filter ); REAL8IIRFilter *filter );
void void
LALDIIRFilterREAL4Vector( LALStatus *status, LALDIIRFilterREAL4Vector( LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
REAL8IIRFilter *filter ); REAL8IIRFilter *filter );
/* <lalLaTeX> /* ----- IIRFilterVectorR.c ---------- */
\newpage\input{IIRFilterVectorRC}
</lalLaTeX> */
void void
LALIIRFilterREAL4VectorR( LALStatus *status, LALIIRFilterREAL4VectorR( LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
REAL4IIRFilter *filter ); REAL4IIRFilter *filter );
void void
LALIIRFilterREAL8VectorR( LALStatus *status, LALIIRFilterREAL8VectorR( LALStatus *status,
REAL8Vector *vector, REAL8Vector *vector,
REAL8IIRFilter *filter ); REAL8IIRFilter *filter );
void void
LALDIIRFilterREAL4VectorR( LALStatus *status, LALDIIRFilterREAL4VectorR( LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
REAL8IIRFilter *filter ); REAL8IIRFilter *filter );
/* <lalLaTeX>
\newpage\input{IIRFilterTestC}
</lalLaTeX> */
#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 /* _IIRFILTER_H */ #endif /* _IIRFILTER_H */
 End of changes. 38 change blocks. 
135 lines changed or deleted 112 lines changed or added


 Inject.h   Inject.h 
skipping to change at line 32 skipping to change at line 32
#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
NRCSID( INJECTH, "$Id$" );
/** /**
\author Creighton, T. D. \author Creighton, T. D.
\addtogroup Inject_h \addtogroup Inject_h
\brief Provides routines to inject a signal into detector output. \brief Provides routines to inject a signal into detector output.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/Inject.h> #include <lal/Inject.h>
\endcode \endcode
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Integrate.h   Integrate.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
*/ */
#if 0 /* autodoc block */
<lalVerbatim file="IntegrateHV">
$Id$
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{Integrate.h}}
\label{s:Integrate.h}
Integrates a function.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/Integrate.h>
\end{verbatim}
\noindent This header covers the routines for integrating a function.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _INTEGRATE_H #ifndef _INTEGRATE_H
#define _INTEGRATE_H #define _INTEGRATE_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (INTEGRATEH, "$Id$"); /**
\addtogroup Integrate_h
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{IntegrateHErrTab}
</lalLaTeX>
<lalErrTable file="IntegrateHErrTab"> \brief Integrates a function.
#endif /* autodoc block */ \heading{Synopsis}
\code
#include <lal/Integrate.h>
\endcode
#define INTEGRATEH_ENULL 1 This header covers the routines for integrating a function.
#define INTEGRATEH_ETYPE 2
#define INTEGRATEH_EIDOM 4
#define INTEGRATEH_EMXIT 8
#define INTEGRATEH_MSGENULL "Null pointer" \heading{Description}
#define INTEGRATEH_MSGETYPE "Unknown integral type"
#define INTEGRATEH_MSGEIDOM "Invalid domain"
#define INTEGRATEH_MSGEMXIT "Maximum iterations exceeded"
#if 0 /* autodoc block */ The routine \c LALSRombergIntegrate() performs the integral specified by th
e
structure \c input and the result is returned as \c result. Any
additional parameters (other than the integration variable \f$x\f$) can be
passed
as \c params. The routine \c LALSRombergIntegrate() does not use
\c params but just passes it to the integrand. The routine
\c LALDRombergIntegrate() is the same but for double precision.
</lalErrTable> \heading{Operating Instructions}
<lalLaTeX> 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$.
\subsection*{Structures} \code
#include <math.h>
#include <lal/LALStdlib.h>
#include <lal/Integrate.h>
\begin{verbatim} static void F( LALStatus *s, REAL4 *y, REAL4 x, void *p )
typedef enum
{ {
ClosedInterval, REAL4 x2 = x*x;
OpenInterval, REAL4 x4 = x2*x2;
SingularLowerLimit, INITSTATUS(s);
SingularUpperLimit, ASSERT( !p, s, 1, "Non-null pointer" );
InfiniteDomainPow, *y = x4 * log( x + sqrt( x2 + 1 ) );
InfiniteDomainExp RETURN( s );
} }
IntegralType;
typedef struct int main ()
tagSIntegrateIn
{ {
void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); const REAL4 epsilon = 1e-6;
REAL4 xmax; const long double expect = 8.153364119811650205L;
REAL4 xmin; static LALStatus status;
IntegralType type; SIntegrateIn intinp;
} REAL4 result;
SIntegrateIn;
typedef struct intinp.function = F;
tagDIntegrateIn intinp.xmin = 0;
{ intinp.xmax = 2;
void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); intinp.type = ClosedInterval;
REAL8 xmax;
REAL8 xmin; LALSRombergIntegrate( &status, &result, &intinp, NULL );
IntegralType type; if ( fabs( result - expect ) > epsilon * fabs( expect ) )
{
// integration did not achieve desired accuracy --- exit failure
return 1;
}
return 0;
} }
DIntegrateIn; \endcode
\end{verbatim}
These are input structures to the integration routines. The fields are: \heading{Algorithm}
\begin{description}
\item[\texttt{function}] The function to integrate.
\item[\texttt{xmax}] The maximum value of the domain of integration.
\item[\texttt{xmax}] The minimum value of the domain of integration.
\item[\texttt{type}] The type of integration. This is an enumerated type
which can take on one of the following values:
\noindent This is an implementation of the Romberg integrating function \c qromb in
\begin{tabular}{|l|l|} Numerical Recipes [\ref ptvf1992].
\hline
Enumeration constant & Meaning \\
\hline
\verb+ClosedInterval+ & Evaluate integral on a closed interval \\
\verb+OpenInterval+ & Evaluate integral on an open interval \\
\verb+SingularLowerLimit+ & Integrate an inverse square-root singularity
at lower limit \\
\verb+SingularUpperLimit+ & Integrate an inverse square-root singularity
at upper limit \\
\verb+InfiniteDomainPow+ & Integrate an infinite domain with power-law f
alloff \\
\verb+InfiniteDomainExp+ & Integrate an infinite domain with exponential
falloff \\
\hline
\end{tabular}
\noindent */
The types of integration are the following: I.\@ \verb+ClosedInterval+ /*@{*/
/** \name Error Codes */
/*@{*/
#define INTEGRATEH_ENULL 1 /**< Null pointer */
#define INTEGRATEH_ETYPE 2 /**< Unknown integral type */
#define INTEGRATEH_EIDOM 4 /**< Invalid domain */
#define INTEGRATEH_EMXIT 8 /**< Maximum iterations exceeded */
/*@}*/
/** \cond DONT_DOXYGEN */
#define INTEGRATEH_MSGENULL "Null pointer"
#define INTEGRATEH_MSGETYPE "Unknown integral type"
#define INTEGRATEH_MSGEIDOM "Invalid domain"
#define INTEGRATEH_MSGEMXIT "Maximum iterations exceeded"
/** \endcond */
/** Type of integral.
The types of integration are the following:
I. \c #ClosedInterval
indicates that the integral should be computed on equal-spaced domain indicates that the integral should be computed on equal-spaced domain
intervals including the boundary. II.\@ \verb+OpenInterval+ indicates th intervals including the boundary.
at
II. \c #OpenInterval indicates that
the integral should be computed on intervals of the domain not including the the integral should be computed on intervals of the domain not including the
boundary. III.\@ \verb+SingularLowerLimit+ indicates that the integral boundary.
III. \c #SingularLowerLimit indicates that the integral
should be evaluated on an open interval with a transformation so that a 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 inverse-square-root singularity at the lower limit can be integrated.
.\@
\verb+SingularUpperLimit+ is the same as above but for a singularity at t
he
upper limit. V.\@ \verb+InfiniteDomainPow+ indicates that the integral
should be evaluated over an semi-infinite domain---appropriate when both
limits have the same sign (though one is very large) and when the integra
nd
vanishes faster than $x^{-1}$ at infinity. VI.\@ \verb+InfiniteDomainExp
+
indicates that the integral should be evaluated over an infinite domain
starting at \verb+xmin+ and going to infinity (\verb+xmax+ is ignored)---
the
integrand should vanish exponentially for large $x$.
\end{description}
</lalLaTeX> IV. \c #SingularUpperLimit is the same as above but for a singularity at
the
upper limit.
#endif /* autodoc block */ V. \c #InfiniteDomainPow indicates that the integral
should be evaluated over an semi-infinite domain---appropriate when both
limits have the same sign (though one is very large) and when the integra
nd
vanishes faster than \f$x^{-1}\f$ at infinity.
VI. \c #InfiniteDomainExp
indicates that the integral should be evaluated over an infinite domain
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 falloff InfiniteDomainExp /**< integrate infinite domain with exponential fallo
*/ ff */
} }
IntegralType; IntegralType;
/** These are input structures to the integration routines. */
typedef struct typedef struct
tagSIntegrateIn tagSIntegrateIn
{ {
SWIGLAL_STRUCT(SIntegrateIn); SWIGLAL_STRUCT(SIntegrateIn);
void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); void (*function)(LALStatus *s, REAL4 *y, REAL4 x, void *p); /**< The fu
REAL4 xmax; nction to integrate */
REAL4 xmin; REAL4 xmax; /**< The maximum value of the domain of integration
IntegralType type; */
REAL4 xmin; /**< The minimum value of the domain of integration
*/
IntegralType type; /**< The type of integration */
} }
SIntegrateIn; SIntegrateIn;
/** These are input structures to the integration routines. */
typedef struct typedef struct
tagDIntegrateIn tagDIntegrateIn
{ {
SWIGLAL_STRUCT(DIntegrateIn); SWIGLAL_STRUCT(DIntegrateIn);
void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); void (*function)(LALStatus *s, REAL8 *y, REAL8 x, void *p); /**< The fu
REAL8 xmax; nction to integrate */
REAL8 xmin; REAL8 xmax; /**< The maximum value of the domain of integration
IntegralType type; */
REAL8 xmin; /**< The minimum value of the domain of integration
*/
IntegralType type; /**< The type of integration */
} }
DIntegrateIn; DIntegrateIn;
#if 0 /* autodoc block */ /* ----- Integrate.c ----- */
/** \see See \ref Integrate_h for documentation */
<lalLaTeX>
\newpage\input{IntegrateC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALSRombergIntegrate ( LALSRombergIntegrate (
LALStatus *status, LALStatus *status,
REAL4 *result, REAL4 *result,
SIntegrateIn *input, SIntegrateIn *input,
void *params void *params
); );
/** \see See \ref Integrate_h for documentation */
void void
LALDRombergIntegrate ( LALDRombergIntegrate (
LALStatus *status, LALStatus *status,
REAL8 *result, REAL8 *result,
DIntegrateIn *input, DIntegrateIn *input,
void *params void *params
); );
/** \see See \ref Integrate_h for documentation */
REAL8 REAL8
XLALREAL8RombergIntegrate ( XLALREAL8RombergIntegrate (
REAL8 (*f)(REAL8 x, void *params), REAL8 (*f)(REAL8 x, void *params),
void *params, void *params,
REAL8 xmin, REAL8 xmin,
REAL8 xmax, REAL8 xmax,
IntegralType type IntegralType type
); );
#if 0 /* autodoc block */ /*@}*/
<lalLaTeX>
\newpage\input{IntegrateTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _INTEGRATE_H */ #endif /* _INTEGRATE_H */
 End of changes. 35 change blocks. 
153 lines changed or deleted 129 lines changed or added


 Interpolate.h   Interpolate.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
*/ */
#if 0 /* autodoc block */
<lalVerbatim file="InterpolateHV">
$Id$
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{Interpolate.h}}
\label{s:Interpolate.h}
Generates random numbers.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/Interpolate.h>
\end{verbatim}
\noindent This header covers the routines for interpolation.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _INTERPOLATE_H #ifndef _INTERPOLATE_H
#define _INTERPOLATE_H #define _INTERPOLATE_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (INTERPOLATEH, "$Id: Interpolate.h"); /**
\addtogroup Interpolate_h
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{InterpolateHErrTab}
</lalLaTeX>
<lalErrTable file="InterpolateHErrTab">
#endif /* autodoc block */
#define INTERPOLATEH_ENULL 1 \brief This header covers the routines for interpolation.
#define INTERPOLATEH_ESIZE 2
#define INTERPOLATEH_EZERO 4
#define INTERPOLATEH_MSGENULL "Null pointer" \heading{Synopsis}
#define INTERPOLATEH_MSGESIZE "Invalid size" \code
#define INTERPOLATEH_MSGEZERO "Zero divide" #include <lal/Interpolate.h>
\endcode
#if 0 /* autodoc block */ \heading{Description}
</lalErrTable> The routine <tt>LALSPolynomialInterpolation()</tt> computes the interpolate
d \f$y\f$
value \c output at the \f$x\f$ value \c target by fitting a polynomial of
order <tt>params.n-1</tt> to the data. The result \c output is of type
\c SInterpolateOut, which contains the value <tt>output.y</tt> as well as
an estimate of the error <tt>output.dy</tt>. The routine
<tt>LALDPolynomialInterpolation()</tt> is the same but for double precision
.
<lalLaTeX> \heading{Operating Instructions}
\subsection*{Structures} The following program fits a fourth-order polynomial to the five data point
s
\f$\{(0,0),(1,1),(2,3),(3,4),(4,3)\}\f$, and interpolates the value at \f$x
=2.4\f$.
\begin{verbatim} \code
typedef struct #include <lal/LALStdlib.h>
tagSInterpolateOut #include <lal/Interpolate.h>
{
REAL4 y;
REAL4 dy;
}
SInterpolateOut;
typedef struct int main ()
tagDInterpolateOut
{ {
REAL8 y; enum { ArraySize = 5 };
REAL8 dy; static LALStatus status;
} REAL4 x[ArraySize] = {0,1,2,3,4};
DInterpolateOut; REAL4 y[ArraySize] = {0,1,3,4,3};
\end{verbatim} REAL4 target = 2.4;
SInterpolatePar intpar = {ArraySize, x, y};
SInterpolateOut intout;
These structures contain the output of the interpolation. The two fields a LALSPolynomialInterpolation( &status, &intout, target, &intpar );
re:
\begin{description}
\item[\texttt{y}] The interpolated value.
\item[\texttt{dy}] The estimated error in the interpolated value.
\end{description}
\begin{verbatim} return 0;
typedef struct
tagSInterpolatePar
{
UINT4 n;
REAL4 *x;
REAL4 *y;
} }
SInterpolatePar; \endcode
typedef struct \heading{Algorithm}
tagDInterpolatePar
{
UINT4 n;
REAL8 *x;
REAL8 *y;
}
DInterpolatePar;
\end{verbatim}
These structures contain the interpolation parameters. These are the array This is an implementation of the Neville algroithm, see \c polint in
s Numerical Recipes [\ref ptvf1992].
of \verb+n+ domain values \verb+x[0]+\ldots\verb+x[n-1]+ and their
corresponding values \verb+y[0]+\ldots\verb+y[n-1]+. The fields are:
\begin{description}
\item[\texttt{n}] The number of points in the arrays to use in the
interpolation.
\item[\texttt{x}] The array of domain values.
\item[\texttt{y}] The array of values to interpolate.
\end{description}
</lalLaTeX> */
/*@{*/
#endif /* autodoc block */ /** \name Error Codes */
/*@{*/
#define INTERPOLATEH_ENULL 1 /**< Null pointer */
#define INTERPOLATEH_ESIZE 2 /**< Invalid size */
#define INTERPOLATEH_EZERO 4 /**< Zero divide */
/*@}*/
/** \cond DONT_DOXYGEN */
#define INTERPOLATEH_MSGENULL "Null pointer"
#define INTERPOLATEH_MSGESIZE "Invalid size"
#define INTERPOLATEH_MSGEZERO "Zero divide"
/** \endcond */
/** These structures contain the output of the interpolation */
typedef struct typedef struct
tagSInterpolateOut tagSInterpolateOut
{ {
SWIGLAL_STRUCT(SInterpolateOut); SWIGLAL_STRUCT(SInterpolateOut);
REAL4 y; REAL4 y; /**< The interpolated value */
REAL4 dy; REAL4 dy; /**< The estimated error in the interpolated value */
} }
SInterpolateOut; SInterpolateOut;
/** These structures contain the output of the interpolation */
typedef struct typedef struct
tagDInterpolateOut tagDInterpolateOut
{ {
SWIGLAL_STRUCT(DInterpolateOut); SWIGLAL_STRUCT(DInterpolateOut);
REAL8 y; REAL8 y; /**< The interpolated value */
REAL8 dy; REAL8 dy; /**< The estimated error in the interpolated value */
} }
DInterpolateOut; DInterpolateOut;
/** These structures contain the interpolation parameters; These are the ar
rays
* 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$
*/
typedef struct typedef struct
tagSInterpolatePar tagSInterpolatePar
{ {
SWIGLAL_STRUCT(SInterpolatePar); SWIGLAL_STRUCT(SInterpolatePar);
UINT4 n; UINT4 n; /**< The number of points in the arrays to use in the interp
REAL4 *x; olation */
REAL4 *y; REAL4 *x; /**< The array of domain values */
REAL4 *y; /**< The array of values to interpolate */
} }
SInterpolatePar; SInterpolatePar;
/** These structures contain the interpolation parameters; These are the ar
rays
* of \c n domain values \f$x[0]\ldotsx[n-1]\f$ and their
* corresponding values \f$y[0]\ldotsy[n-1]\f$
*/
typedef struct typedef struct
tagDInterpolatePar tagDInterpolatePar
{ {
SWIGLAL_STRUCT(DInterpolatePar); SWIGLAL_STRUCT(DInterpolatePar);
UINT4 n; UINT4 n; /**< The number of points in the arrays to use in the interp
REAL8 *x; olation */
REAL8 *y; REAL8 *x; /**< The array of domain values */
REAL8 *y; /**< The array of values to interpolate */
} }
DInterpolatePar; DInterpolatePar;
#if 0 /* autodoc block */ /* ----- Interpolate.c ----- */
/** \see See \ref Interpolate_h for documentation */
<lalLaTeX>
\newpage\input{InterpolateC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALSPolynomialInterpolation ( LALSPolynomialInterpolation (
LALStatus *status, LALStatus *status,
SInterpolateOut *output, SInterpolateOut *output,
REAL4 target, REAL4 target,
SInterpolatePar *params SInterpolatePar *params
); );
/** \see See \ref Interpolate_h for documentation */
void void
LALDPolynomialInterpolation ( LALDPolynomialInterpolation (
LALStatus *status, LALStatus *status,
DInterpolateOut *output, DInterpolateOut *output,
REAL8 target, REAL8 target,
DInterpolatePar *params DInterpolatePar *params
); );
/** \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
); );
#if 0 /* autodoc block */ /*@}*/
<lalLaTeX>
\newpage\input{InterpolateTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _INTERPOLATE_H */ #endif /* _INTERPOLATE_H */
 End of changes. 30 change blocks. 
121 lines changed or deleted 81 lines changed or added


 LALAdaptiveRungeKutta4.h   LALAdaptiveRungeKutta4.h 
skipping to change at line 51 skipping to change at line 51
int (* dydt) (double t, const double y[], double dydt[], void * params); int (* dydt) (double t, const double y[], double dydt[], void * params);
int (* stop) (double t, const double y[], double dydt[], void * params); int (* stop) (double t, const double y[], double dydt[], void * params);
int retries; /* retries with smaller step when derivatives encoun ter singularity */ int retries; /* retries with smaller step when derivatives encoun ter singularity */
int stopontestonly; /* stop only on test, use tend to size buffers only */ int stopontestonly; /* stop only on test, use tend to size buffers only */
int returncode; int returncode;
} ark4GSLIntegrator; } ark4GSLIntegrator;
/**
\c ark4GSLIntegrator
*/
ark4GSLIntegrator *XLALAdaptiveRungeKutta4Init( int dim, ark4GSLIntegrator *XLALAdaptiveRungeKutta4Init( int dim,
int (* dydt) (double t, const double y[], doub le dydt[], void * params), int (* dydt) (double t, const double y[], doub le dydt[], void * params),
int (* stop) (double t, const double y[], doub le dydt[], void * params), int (* stop) (double t, const double y[], doub le dydt[], void * params),
double eps_abs, double eps_rel double eps_abs, double eps_rel
); );
void XLALAdaptiveRungeKutta4Free( ark4GSLIntegrator *integrator ); void XLALAdaptiveRungeKutta4Free( ark4GSLIntegrator *integrator );
int XLALAdaptiveRungeKutta4( ark4GSLIntegrator *integrator, int XLALAdaptiveRungeKutta4( ark4GSLIntegrator *integrator,
void *params, void *params,
REAL8 *yinit, REAL8 *yinit,
REAL8 tinit, REAL8 tend, REAL8 deltat, REAL8 tinit, REAL8 tend, REAL8 deltat,
REAL8Array **yout REAL8Array **yout
); );
/**
* Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF4
5)
* steps with adaptive step size control. Intended for use in various
* waveform generation routines such as SpinTaylorT4 and various EOB models
.
*
* The method is described in
*
* Abramowitz & Stegun, Handbook of Mathematical Functions, Tenth Printing,
* National Bureau of Standards, Washington, DC, 1972
* (available online at http://people.math.sfu.ca/~cbm/aands/ )
*
* This function also includes "on-the-fly" interpolation of the
* differential equations at regular intervals in-between integration
* steps. This "on-the-fly" interpolation method is derived and
* described in the Mathematica notebook "RKF_with_interpolation.nb";
* see
* https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/InspiralPipelineDev
elopment/120312111836InspiralPipelineDevelopmentImproved%20Adaptive%20Runge
-Kutta%20integrator
*
* This method is functionally equivalent to XLALAdaptiveRungeKutta4,
* but is nearly always faster due to the improved interpolation.
*/
int XLALAdaptiveRungeKutta4Hermite( ark4GSLIntegrator *integrator, /**< str
uct holding dydt, stopping test, stepper, etc. */
void *params, /**< params struct used t
o compute dydt and stopping test */
REAL8 *yinit, /**< pass in initial valu
es of all variables - overwritten to final values */
REAL8 tinit, /**< integration start tim
e */
REAL8 tend_in, /**< maximum integration
time */
REAL8 deltat, /**< step size for evenly
sampled output */
REAL8Array **yout /**< array holding th
e evenly sampled output */
);
#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 /* _LALADAPTIVERUNGEKUTTA4_H */ #endif /* _LALADAPTIVERUNGEKUTTA4_H */
 End of changes. 2 change blocks. 
3 lines changed or deleted 40 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
*/ */
/** \file // ---------- SEE LALDatatypes.dox for doxygen documentation ----------
* \ingroup std
* \author Creighton, J. D. E., and Creighton, T. D.
* \date $Id$
* \brief The primative LAL datatypes.
*
* This header defines the primative LAL datatypes. These datatypes
* are: CHAR, INT2, INT4, INT8 (signed integer types); UCHAR, UINT2
* UINT4, UINT8 (unsigned integer types); REAL4, REAL8 (single- and
* double-precision floating point types); and COMPLEX8 and COMPLEX16
* (single- and double-precision floating point complex types).
* Note that the complex types are implemented as structures. This is
* because LAL conforms to the C89 standard rather than the C99
* standard. The non-complex datatypes are known as <em>atomic</em>
* datatypes: these may be passed directly to functions or used as
* the return value of XLAL functions.
*
* The number in the name of each of these types (other than
* CHAR and UCHAR) is the number of 8-bit bytes that the datatype
* occupies. E.g., INT4 is a four-byte integer. In C99 it would be
* called <tt>int32_t</tt>. While the size of types such as <tt>int</tt> an
d
* <tt>long int</tt> are platform dependent, the sizes of INT4 and INT8
* is always 4- and 8-bytes respectively (platform independent).
* REAL4 and REAL8 are always type <tt>float</tt> and <tt>double</tt>
* but LAL is only supported on platforms in which these types conform
* to the IEEE 754 standard.
*
* This documentation shows how the datatypes are defined on today's
* most common (32-bit) platform. Be careful in particular about
* the integer type INT8. On 64-bit platforms it will usually be
* equivalent to type <tt>long int</tt> rather than type
* <tt>long long int</tt>.
*/
/*************************** <lalVerbatim file="LALAtomicDatatypesHV">
Author: J. D. E. Creighton, T. D. Creighton
$Id$
**************************** </lalVerbatim> */
/* <lalLaTeX>
\subsection{Primitive datatypes}
\label{ss:LALAtomicDatatypes.h}
The primitive datatypes are defined in a separate header
\verb@LALAtomicDatatypes.h@, which is included by
\verb@LALDatatypes.h@. This is done in order to facilitate the
interface between LAL and non-LAL modules. By including just
\verb@LALAtomicDatatypes.h@, a non-LAL module can ensure that it is
using the same arithmetic standard as LAL, without being burdened by
LAL's more specialized structures.
Primitive datatypes are those that conceptually store a single number
or quantity. They include both the \emph{atomic} datatypes and the
complex datatypes.
\subsubsection*{Atomic datatypes}
Atomic LAL datatypes are platform-independent datatypes corresponding
to the basic types in the C/C++ language. However, since the C/C++
types are not necessarily the same across platforms, the actual
mapping between LAL and C/C++ datatypes may be different on different
platforms. The following table lists the LAL atomic datatypes, their
size and range, and the C/C++ datatype to which they \emph{usually}
correspond.
\begin{center}
\begin{tabular}{|lccc|}
\hline
Type & Bytes & Range & Usual C/C++ type \\
\hline
\tt CHAR & 1 & \verb@'\0'@ to \verb@'\255'@ & \tt char \\
\tt UCHAR & 1 & \verb@'\0'@ to \verb@'\255'@ & \tt unsigned char \\
\tt BOOLEAN & 1 & 0 or positive & \tt unsigned char \\
\hline
\tt INT2 & 2 & $-2^{-15}$ to $2^{15}-1$ & \tt short \\
\tt INT4 & 4 & $-2^{-31}$ to $2^{31}-1$ & {\tt int} or
{\tt long} \\
\tt INT8 & 8 & $-2^{-63}$ to $2^{63}-1$ & \tt long long \\
\tt UINT2 & 2 & 0 to $2^{16}-1$ & \tt unsigned short \\
\tt UINT4 & 4 & 0 to $2^{32}-1$ & {\tt unsigned int} or
{\tt long} \\
\tt UINT8 & 8 & 0 to $2^{64}-1$ & \tt unsigned long long \\
\hline
\tt REAL4 & 4 & $-3.4\times10^{38}$ to $3.4\times10^{38}$ & \tt float
\\
\tt REAL8 & 8 & $-1.8\times10^{308}$ to $1.8\times10^{308}$ & \tt double
\\
\hline
\end{tabular}
\end{center}
The unsigned character and integer datatypes store their values
according to the usual binary system. For signed characters and
integers, setting the most-significant bit indicates that the number
formed from the remaining bits should be added to the lower value of
the range. The \verb@REAL4@ and \verb@REAL8@ datatypes should store
values according to the IEEE Standard 754 for Binary Floating-Point
Arithmetic, which gives them the following precisions and dynamic
ranges:
\begin{center}
\begin{tabular}{|l|cc|}
\hline
& \tt REAL4 & \tt REAL8
\\
\hline
Minimum positive subnormal & $1.4\times10^{-45}$ & $4.9\times10^{-324}$
\\
Minimum positive normal & $1.2\times10^{-38}$ & $2.2\times10^{-308}$
\\
Maximum finite normal & $3.4\times10^{38}$ & $1.8\times10^{308}$
\\
Minimum fractional difference & $6.0\times10^{-8}$ & $1.1\times10^{-16}$
\\
Significant decimal digits & 6--9 & 15--17
\\
\hline
\end{tabular}
\end{center}
The minimum positive subnormal is the smallest positive representable
number. The minimum positive normal is the smallest positive number
that can be represented with full precision; that is, one whose
mantissa lies in the range [0.5,1). The maximum finite normal is the
largest representable number other than the reserved code for
$+\infty$. The minimum fractional difference is the smallest
fractional difference between consecutive representable numbers, or
\emph{half} the difference between 1 and the next representable
number. Significant decimal digits gives the number of decimal digits
used to represent the binary number in decimal notation: the first is
the maximum number of digits that are guaranteed not to change upon
conversion to binary, the second is the number of digits required to
represent a unique binary quantity.
</lalLaTeX> */
/** \var typedef char CHAR
* \brief One-byte signed integer.
*/
/** \var typedef unsigned char UCHAR
* \brief One-byte unsigned integer.
*/
/** \var typedef short INT2
* \brief Two-byte signed integer.
*/
/** \var typedef short UINT2
* \brief Two-byte unsigned integer.
*/
/** \var typedef int INT4
* \brief Four-byte signed integer.
*/
/** \var typedef int UINT4
* \brief Four-byte unsigned integer.
*/
/** \var typedef long long INT8
* \brief Eight-byte signed integer.
*
* On some platforms this is equivalent to <tt>long int</tt> instead.
*/
/** \var typedef long long UINT8
* \brief Eight-byte unsigned integer.
*
* On some platforms this is equivalent to <tt>unsigned long int</tt> inste
ad.
*/
/** \var typedef float REAL4
* \brief Single precision real floating-point number (4 bytes).
*/
/** \var typedef double REAL8
* \brief Double precision real floating-point number (8 bytes).
*/
/** \def LAL_INT8_C(v) (v ## LL)
* \brief Macro for use in defining \a v as an INT8 constant.
*
* This macro affixes the appropriate qualifier to form an INT8 constant.
* For example:
* \code
* const INT8 jan_1_2000_gps_nanosec = LAL_INT8_C(63072001300000000)
* \endcode
*/
/** \def LAL_UINT8_C(v) (v ## ULL)
* \brief Macro for use in defining \a v as an UINT8 constant.
*
* This macro affixes the appropriate qualifier to form an UINT8 constant.
* For example:
* \code
* const UINT8 jan_1_2000_gps_nanosec = LAL_UINT8_C(63072001300000000)
* \endcode
*/
#ifndef _LALATOMICDATATYPES_H #ifndef _LALATOMICDATATYPES_H
#define _LALATOMICDATATYPES_H #define _LALATOMICDATATYPES_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef char CHAR; /** \addtogroup LALDatatypes */ /*@{*/
typedef unsigned char UCHAR;
typedef unsigned char BOOLEAN; typedef char CHAR; /**< One-byte signed integer, see \ref LALDa
tatypes for more details */
typedef unsigned char UCHAR; /**< One-byte unsigned integer, see \ref LAL
Datatypes for more details */
typedef unsigned char BOOLEAN; /**< Boolean logical type, see \ref LALDatat
ypes for more details */
#include <stdint.h> #include <stdint.h>
#ifndef LAL_USE_OLD_COMPLEX_STRUCTS
#if defined(__cplusplus)
#include <complex>
#else
#include <complex.h>
#endif
#endif /* LAL_USE_OLD_COMPLEX_STRUCTS */
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#include <lal/LALRCSID.h>
NRCSID( LALATOMICDATATYPESH, "$Id$" );
/* If INT8 etc. are already defined, undefine them */ /* If INT8 etc. are already defined, undefine them */
#undef CHAR #undef CHAR
#undef UCHAR #undef UCHAR
#undef INT2 #undef INT2
#undef INT4 #undef INT4
#undef INT8 #undef INT8
#undef UINT2 #undef UINT2
#undef UINT4 #undef UINT4
#undef UINT8 #undef UINT8
#undef REAL4 #undef REAL4
#undef REAL8 #undef REAL8
#undef COMPLEX8 #undef COMPLEX8
#undef COMPLEX16 #undef COMPLEX16
/* Integer types */ /* Integer types */
typedef int16_t INT2; typedef int16_t INT2; /**< Two-byte signed integer */
typedef int32_t INT4; typedef int32_t INT4; /**< Four-byte signed integer. */
typedef int64_t INT8; typedef int64_t INT8; /**< Eight-byte signed integer; on some plat
typedef uint16_t UINT2; forms this is equivalent to <tt>long int</tt> instead. */
typedef uint32_t UINT4; typedef uint16_t UINT2; /**< Two-byte unsigned integer. */
typedef uint64_t UINT8; 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. *
/
/* Macros for integer constants */ /* Macros for integer constants */
/** \def LAL_INT8_C(v) (v ## LL)
* \brief Macro for use in defining \a v as an INT8 constant.
*
* This macro affixes the appropriate qualifier to form an INT8 constant.
* For example:
* \code
* const INT8 jan_1_2000_gps_nanosec = LAL_INT8_C(63072001300000000)
* \endcode
*/
#define LAL_INT8_C INT64_C #define LAL_INT8_C INT64_C
/** \def LAL_UINT8_C(v) (v ## ULL)
* \brief Macro for use in defining \a v as an UINT8 constant.
*
* This macro affixes the appropriate qualifier to form an UINT8 constant.
* For example:
* \code
* const UINT8 jan_1_2000_gps_nanosec = LAL_UINT8_C(63072001300000000)
* \endcode
*/
#define LAL_UINT8_C UINT64_C #define LAL_UINT8_C UINT64_C
/* Real types */ /* Real types */
typedef float REAL4; typedef float REAL4; /**< Single precision real floating-point number (4
typedef double REAL8; bytes). */
typedef double REAL8; /**< Double precision real floating-point number (8
bytes). */
/* <lalLaTeX> #ifndef SWIG /* exclude from SWIG interface */
\subsubsection*{Complex datatypes} #ifndef LAL_USE_OLD_COMPLEX_STRUCTS
LAL represents complex numbers as structures with two floating-point /* Complex types */
fields, storing the real and imaginary parts. These are considered #if defined(__cplusplus)
primitive datatypes (rather than aggregate or structured datatypes) typedef std::complex<float> COMPLEX8;
because they conceptually represent a single number. Furthermore, typedef std::complex<double> COMPLEX16;
atomic and complex datatypes are treated equivalently by LAL aggregate #else
and structured datatypes. typedef float complex COMPLEX8;
typedef double complex COMPLEX16;
#endif
\vspace{1ex} /** \cond DONT_DOXYGEN */
\begin{verbatim} /* Complex type constructors */
COMPLEX8 #if defined(__cplusplus)
\end{verbatim} #define CX8rect( re, im) COMPLEX8( re, im )
This structure stores a single-precision complex number in 8~bytes of #define CX16rect(re, im) COMPLEX16( re, im )
memory. The fields are: #define CX8polar( r, th) ( (r) * std::exp( CX8rect( 0, th ) ) )
\begin{description} #define CX16polar(r, th) ( (r) * std::exp( CX16rect( 0, th ) ) )
\item[\texttt{REAL4 re}] The real part. #else
\item[\texttt{REAL4 im}] The imaginary part. #define CX8rect( re, im) ( (re) + _Complex_I * (im) )
\end{description} #define CX16rect(re, im) ( (re) + _Complex_I * (im) )
#define CX8polar( r, th) ( (r) * cexpf( CX8rect( 0, th ) ) )
#define CX16polar(r, th) ( (r) * cexp( CX16rect( 0, th ) ) )
#endif
\vspace{1ex} /* Real and imaginary part accessors */
\begin{verbatim} #if defined(__cplusplus)
COMPLEX16 #define CX8re( z) std::real(z)
\end{verbatim} #define CX16re(z) std::real(z)
This structure stores a double-precision complex number in 16~bytes of #define CX8im( z) std::imag(z)
memory. The fields are: #define CX16im(z) std::imag(z)
\begin{description} #else
\item[\texttt{REAL8 re}] The real part. #define CX8re( z) crealf(z)
\item[\texttt{REAL8 im}] The imaginary part. #define CX16re(z) creal( z)
\end{description} #define CX8im( z) cimagf(z)
#define CX16im(z) cimag( z)
#endif
</lalLaTeX> */ /* Real and imaginary part assignment */
#if !defined(__cplusplus) && defined(__GNUC__)
#define setCX8re( z, re) ( __real__(z) = (re) )
#define setCX16re(z, re) ( __real__(z) = (re) )
#define setCX8im( z, im) ( __imag__(z) = (im) )
#define setCX16im(z, im) ( __imag__(z) = (im) )
#else
#define setCX8re( z, re) ( (z) = CX8rect( re, CX8im( z) ) )
#define setCX16re(z, re) ( (z) = CX16rect( re, CX16im(z) ) )
#define setCX8im( z, im) ( (z) = CX8rect( CX8re( z), im ) )
#define setCX16im(z, im) ( (z) = CX16rect( CX16re(z), im ) )
#endif
/** \endcond */
#else /* LAL_USE_OLD_COMPLEX_STRUCTS */
/** Single-precision floating-point complex number (8 bytes total) */ /** Single-precision floating-point complex number (8 bytes total) */
#ifndef SWIG /* exclude from SWIG interface */
typedef struct typedef struct
tagCOMPLEX8 tagCOMPLEX8
{ {
REAL4 re; /**< The real part. */ REAL4 re; /**< The real part. */
REAL4 im; /**< The imaginary part. */ REAL4 im; /**< The imaginary part. */
} }
COMPLEX8; COMPLEX8;
#endif /* SWIG */
/** Double-precision floating-point complex number (16 bytes total) */ /** Double-precision floating-point complex number (16 bytes total) */
#ifndef SWIG /* exclude from SWIG interface */
typedef struct typedef struct
tagCOMPLEX16 tagCOMPLEX16
{ {
REAL8 re; /**< The real part. */ REAL8 re; /**< The real part. */
REAL8 im; /**< The imaginary part. */ REAL8 im; /**< The imaginary part. */
} }
COMPLEX16; COMPLEX16;
#endif /* SWIG */
/* <lalLaTeX> #endif /* LAL_USE_OLD_COMPLEX_STRUCTS */
\vfill{\footnotesize\input{LALAtomicDatatypesHV}}
</lalLaTeX> */ /*@}*/
#endif /* SWIG */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALATOMICDATATYPES_H */ #endif /* _LALATOMICDATATYPES_H */
 End of changes. 19 change blocks. 
240 lines changed or deleted 106 lines changed or added


 LALBarycenter.h   LALBarycenter.h 
skipping to change at line 39 skipping to change at line 39
#include <math.h> #include <math.h>
#include <lal/LALStdio.h> #include <lal/LALStdio.h>
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/LALConstants.h> #include <lal/LALConstants.h>
#include <lal/DetectorSite.h> #include <lal/DetectorSite.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** \cond DONT_DOXYGEN */
NRCSID (LALBARYCENTERH,"$Id$");
/** \endcond */
/** \name Error codes */ /** \name Error codes */
/*@{*/ /** \ingroup Barycenter_h */ /*@{*/ /** \ingroup Barycenter_h */
#define LALBARYCENTERH_ENULL 2 #define LALBARYCENTERH_ENULL 2
#define LALBARYCENTERH_EOUTOFRANGEE 4 #define LALBARYCENTERH_EOUTOFRANGEE 4
#define LALBARYCENTERH_EOUTOFRANGES 8 #define LALBARYCENTERH_EOUTOFRANGES 8
#define LALBARYCENTERH_EBADSOURCEPOS 16 #define LALBARYCENTERH_EBADSOURCEPOS 16
#define LALBARYCENTERH_EXLAL 32 #define LALBARYCENTERH_EXLAL 32
#define LALBARYCENTERH_MSGENULL "Null input to Barycenter routine." #define LALBARYCENTERH_MSGENULL "Null input to Barycenter routine."
#define LALBARYCENTERH_MSGEOUTOFRANGEE "tgps not in range of earth.dat fil e" #define LALBARYCENTERH_MSGEOUTOFRANGEE "tgps not in range of earth.dat fil e"
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 LALCache.h   LALCache.h 
skipping to change at line 44 skipping to change at line 44
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/FileIO.h> #include <lal/FileIO.h>
NRCSID( LALCACHEH, "$Id$" );
/** An entry in a LAL cache */ /** An entry in a LAL cache */
typedef struct tagLALCacheEntry { typedef struct tagLALCacheEntry {
SWIGLAL_STRUCT(LALCacheEntry); SWIGLAL_STRUCT(LALCacheEntry);
CHAR *src; /**< File source field */ CHAR *src; /**< File source field */
CHAR *dsc; /**< File description field */ CHAR *dsc; /**< File description field */
INT4 t0; /**< GPS time (seconds) of beginning of data in file */ INT4 t0; /**< GPS time (seconds) of beginning of data in file */
INT4 dt; /**< Duration (seconds) of data in file */ INT4 dt; /**< Duration (seconds) of data in file */
CHAR *url; /**< URL of file */ CHAR *url; /**< URL of file */
} LALCacheEntry; } LALCacheEntry;
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 LALCalibration.h   LALCalibration.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _LALCALIBRATION_H #ifndef _LALCALIBRATION_H
#define _LALCALIBRATION_H #define _LALCALIBRATION_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
NRCSID( LALCALIBRATIONH, "$Id$" );
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** Structure containing calibration information (reference spectra and /** Structure containing calibration information (reference spectra and
* factors for updating calibraiton to a particular time). */ * factors for updating calibraiton to a particular time). */
typedef struct tagLALCalData typedef struct tagLALCalData
{ {
SWIGLAL_STRUCT(LALCalData); SWIGLAL_STRUCT(LALCalData);
REAL4TimeSeries *cavityFactors; REAL4TimeSeries *cavityFactors;
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 LALComplex.h   LALComplex.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 _LALCOMPLEX_H #ifndef _LALCOMPLEX_H
#define _LALCOMPLEX_H #define _LALCOMPLEX_H
/* include only if using old LAL complex struct types */
#ifdef LAL_USE_OLD_COMPLEX_STRUCTS
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <lal/LALAtomicDatatypes.h> #include <lal/LALAtomicDatatypes.h>
NRCSID (LALCOMPLEXH,"$Id$");
#ifdef LAL_USE_COMPLEX_SHORT_MACROS #ifdef LAL_USE_COMPLEX_SHORT_MACROS
#if defined __COMPLEX__ || defined _COMPLEX_H #if defined __COMPLEX__ || defined _COMPLEX_H
#error "don't use both <complex.h> and LAL_USE_SHORT_MACROS" #error "don't use both <complex.h> and LAL_USE_SHORT_MACROS"
#endif #endif
#endif #endif
#ifdef LAL_NO_COMPLEX_MACROS #ifdef LAL_NO_COMPLEX_MACROS
#undef LAL_USE_COMPLEX_MACROS #undef LAL_USE_COMPLEX_MACROS
#undef LAL_USE_COMPLEX_SHORT_MACROS #undef LAL_USE_COMPLEX_SHORT_MACROS
#else #else
skipping to change at line 549 skipping to change at line 550
#define catanhf(a) (XLALCOMPLEX8Arctanh(a)) #define catanhf(a) (XLALCOMPLEX8Arctanh(a))
#define catanhrf(x) (XLALCOMPLEX8ArctanhReal(x)) #define catanhrf(x) (XLALCOMPLEX8ArctanhReal(x))
#define cacothf(a) (XLALCOMPLEX8Arccoth(a)) #define cacothf(a) (XLALCOMPLEX8Arccoth(a))
#endif #endif
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* LAL_USE_OLD_COMPLEX_STRUCTS */
#endif /* _LALCOMPLEX8_H */ #endif /* _LALCOMPLEX8_H */
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 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 */
/* $Id$ */
#ifndef CONFIG_H__LAL #ifndef CONFIG_H__LAL
#ifndef _LALCONFIG_H #ifndef _LALCONFIG_H
#define _LALCONFIG_H #define _LALCONFIG_H
/* LAL Version */ /* LAL Version */
#define LAL_VERSION "6.6.2" #define LAL_VERSION "6.7.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 6 #define LAL_VERSION_MINOR 7
/* LAL Version Micro Number */ /* LAL Version Micro Number */
#define LAL_VERSION_MICRO 2 #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/andrey/upstr eam-tracker/testing/lal/6.6.2' '--exec-prefix=/home/andrey/upstream-tracker /testing/lal/6.6.2' '--sysconfdir=/home/andrey/upstream-tracker/testing/lal /6.6.2' '--datadir=/home/andrey/upstream-tracker/testing/lal/6.6.2' 'CFLAGS =-w -fpermissive' 'CXXFLAGS=-w -fpermissive'" #define LAL_CONFIGURE_ARGS " '--enable-shared' '--prefix=/home/andrey/upstr eam-tracker/testing/lal/6.7.0' '--exec-prefix=/home/andrey/upstream-tracker /testing/lal/6.7.0' '--sysconfdir=/home/andrey/upstream-tracker/testing/lal /6.7.0' '--datadir=/home/andrey/upstream-tracker/testing/lal/6.7.0' 'CFLAGS =-w -fpermissive' 'CXXFLAGS=-w -fpermissive'"
/* LAL Configure Date */ /* LAL Configure Date */
#define LAL_CONFIGURE_DATE "2012-05-12T12:08:09+0400" #define LAL_CONFIGURE_DATE "2012-05-12T12:05:59+0400"
/* LAL Install Prefix */ /* LAL Install Prefix */
#define LAL_PREFIX "/usr/local" #define LAL_PREFIX "/usr/local"
/* 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 */
/* Define if using fftw3 library */ /* Define if using fftw3 library */
#define LAL_FFTW3_ENABLED 1 #define LAL_FFTW3_ENABLED 1
/* Define if using boinc library */ /* Define if using boinc library */
/* #undef LAL_BOINC_ENABLED */ /* #undef LAL_BOINC_ENABLED */
/* Define if using CUDA library */
/* #undef LAL_CUDA_ENABLED */
/* Define if using qthread library */ /* Define if using qthread library */
/* #undef LAL_QTHREAD */ /* #undef LAL_QTHREAD */
#endif /* _LALCONFIG_H */ #endif /* _LALCONFIG_H */
#endif /* CONFIG_H__LAL */ #endif /* CONFIG_H__LAL */
 End of changes. 7 change blocks. 
6 lines changed or deleted 8 lines changed or added


 LALConstants.h   LALConstants.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 /**
* \ingroup std * \addtogroup LALConstants_h
* \author Creighton, T. D. * \author Creighton, T. D.
* \date $Id$
* \brief Provides standard numerical constants for LAL. * \brief Provides standard numerical constants for LAL.
* *
* This header defines a number of useful numerical constants * This header defines a number of useful numerical constants
* for use in LAL routines. These constants come in three basic * for use in LAL routines. These constants come in three basic
* flavours: arithmetic and mathematical constants, fundamental (or * flavours: arithmetic and mathematical constants, fundamental (or
* defined) physical constants, and measured astrophysical and * defined) physical constants, and measured astrophysical and
* cosmological parameters. * cosmological parameters.
* *
* Note that this header is not included automatically by the header * Note that this header is not included automatically by the header
* <tt>LALStdlib.h</tt>. Include it explicitly if you need any of these * <tt>LALStdlib.h</tt>. Include it explicitly if you need any of these
* constants. * constants.
*/ */
/*@{*/
/********************************* <lalVerbatim file="LALConstantsHV">
Author: Creighton, T. D.
$Id$
********************************** </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALConstants.h}}
\label{s:LALConstants.h}
Provides standard numerical constants for LAL.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALConstants.h>
\end{verbatim}
\noindent This header defines a number of useful numerical constants
for use in LAL routines. These constants come in three basic
flavours: arithmetic and mathematical constants, fundamental (or
defined) physical constants, and measured astrophysical and
cosmological parameters.
Note that, unlike the other headers in the \verb@std@ package, this
header is \emph{not} included automatically by the header
\verb@LALStdlib.h@. Include it explicitly if you need any of these
constants.
</lalLaTeX> */
#ifndef _LALCONSTANTS_H #ifndef _LALCONSTANTS_H
#define _LALCONSTANTS_H #define _LALCONSTANTS_H
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALCONSTANTSH, "$Id$");
/* <lalLaTeX>
\subsection*{Mathematical constants}
\idx[Constant]{LAL\_REAL4\_MANT}
\idx[Constant]{LAL\_REAL4\_MAX}
\idx[Constant]{LAL\_REAL4\_MIN}
\idx[Constant]{LAL\_REAL4\_EPS}
\idx[Constant]{LAL\_REAL8\_MANT}
\idx[Constant]{LAL\_REAL8\_MAX}
\idx[Constant]{LAL\_REAL8\_MIN}
\idx[Constant]{LAL\_REAL8\_EPS}
\idx[Constant]{LAL\_E}
\idx[Constant]{LAL\_LOG2E}
\idx[Constant]{LAL\_LOG10E}
\idx[Constant]{LAL\_LN2}
\idx[Constant]{LAL\_LN10}
\idx[Constant]{LAL\_SQRT2}
\idx[Constant]{LAL\_SQRT1\_2}
\idx[Constant]{LAL\_GAMMA}
\idx[Constant]{LAL\_PI}
\idx[Constant]{LAL\_TWOPI}
\idx[Constant]{LAL\_PI\_2}
\idx[Constant]{LAL\_PI\_4}
\idx[Constant]{LAL\_1\_PI}
\idx[Constant]{LAL\_2\_PI}
\idx[Constant]{LAL\_2\_SQRTPI}
\idx[Constant]{LAL\_PI\_180}
\idx[Constant]{LAL\_180\_PI}
The following constants define the precision and range of
floating-point arithmetic in LAL. They are taken from the IEEE
standard~754 for binary arithmetic. All numbers are dimensionless.
\begin{center}
\begin{tabular}{|lll|}
\hline
Name & Value & Description \\
\hline
\tt LAL\_REAL4\_MANT & 24 &
Bits in {\tt REAL4} mantissa \\
\tt LAL\_REAL4\_MAX & $3.40282347\times10^{38}$ &
Largest {\tt REAL4} \\
\tt LAL\_REAL4\_MIN & $1.17549435\times10^{-38}$ &
Smallest positive {\tt REAL4} \\
\tt LAL\_REAL4\_EPS & $1.19209290\times10^{-7}$ &
$2^{-(\mathtt{LAL\_REAL4\_MANT}-1)}$ \\
\hline
\tt LAL\_REAL8\_MANT & 53 &
Bits in {\tt REAL8} mantissa \\
\tt LAL\_REAL8\_MAX & $1.7976931348623157\times10^{308}$ &
Largest {\tt REAL8} \\
\tt LAL\_REAL8\_MIN & $2.2250738585072014\times10^{-308}$ &
Smallest positive {\tt REAL8} \\
\tt LAL\_REAL8\_EPS & $2.2204460492503131\times10^{-16}$ &
$2^{-(\mathtt{LAL\_REAL8\_MANT}-1)}$ \\
\hline
\end{tabular}
\end{center}
\noindent\verb@LAL_REAL4_EPS@ and \verb@LAL_REAL8_EPS@ can be thought
of as the difference between 1 and the next representable \verb@REAL4@
or \verb@REAL8@ number.
\vspace{3ex}
</lalLaTeX> */
/** \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), i.e. the difference 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), i.e. 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 */
/*@}*/ /*@}*/
/* <lalLaTeX>
The following are fundamental mathematical constants. They are mostly
taken from the GNU C \verb@math.h@ header (with the exception of
\verb@LAL_TWOPI@, which was computed using Maple). All numbers are
dimensionless.
\begin{center}
\begin{tabular}{|llc|}
\hline
Name & Value & Expression \\
\hline
\tt LAL\_E & 2.7182818284590452353602874713526625 & $e$ \\
\tt LAL\_LOG2E & 1.4426950408889634073599246810018922 & $\log_2 e$ \\
\tt LAL\_LOG10E & 0.4342944819032518276511289189166051 & $\log_{10} e$ \
\
\tt LAL\_LN2 & 0.6931471805599453094172321214581766 & $\log_e 2$ \\
\tt LAL\_LN10 & 2.3025850929940456840179914546843642 & $\log_e 10$ \\
\tt LAL\_SQRT2 & 1.4142135623730950488016887242096981 & $\sqrt{2}$ \\
\tt LAL\_SQRT1\_2 & 0.7071067811865475244008443621048490 & $1/\sqrt{2}$ \\
\tt LAL\_GAMMA & 0.5772156649015328606065120900824024 & $\gamma$ \\
\tt LAL\_PI & 3.1415926535897932384626433832795029 & $\pi$ \\
\tt LAL\_TWOPI & 6.2831853071795864769252867665590058 & $2\pi$ \\
\tt LAL\_PI\_2 & 1.5707963267948966192313216916397514 & $\pi/2$ \\
\tt LAL\_PI\_4 & 0.7853981633974483096156608458198757 & $\pi/4$ \\
\tt LAL\_1\_PI & 0.3183098861837906715377675267450287 & $1/\pi$ \\
\tt LAL\_2\_PI & 0.6366197723675813430755350534900574 & $2/\pi$ \\
\tt LAL\_2\_SQRTPI & 1.1283791670955125738961589031215452 & $2/\sqrt{\pi}$
\\
\tt LAL\_PI\_180 & 1.7453292519943295769236907684886127$\times10^{-2}$ &
$\pi/180$ \\
\tt LAL\_180\_PI & 57.295779513082320876798154814105170 & $180/\pi$ \\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/** \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 * /
skipping to change at line 224 skipping to change at line 87
#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 */
/*@}*/ /*@}*/
/* <lalLaTeX>
\subsection*{Physical constants}
\idx[Constant]{LAL\_C\_SI}
\idx[Constant]{LAL\_EPSILON0\_SI}
\idx[Constant]{LAL\_MU0\_SI}
\idx[Constant]{LAL\_GEARTH\_SI}
\idx[Constant]{LAL\_PATM\_SI}
\idx[Constant]{LAL\_YRJUL\_SI}
\idx[Constant]{LAL\_LYR\_SI}
\idx[Constant]{LAL\_G\_SI}
\idx[Constant]{LAL\_H\_SI}
\idx[Constant]{LAL\_HBAR\_SI}
\idx[Constant]{LAL\_MPL\_SI}
\idx[Constant]{LAL\_LPL\_SI}
\idx[Constant]{LAL\_TPL\_SI}
\idx[Constant]{LAL\_K\_SI}
\idx[Constant]{LAL\_R\_SI}
\idx[Constant]{LAL\_MOL}
\idx[Constant]{LAL\_BWIEN\_SI}
\idx[Constant]{LAL\_SIGMA\_SI}
\idx[Constant]{LAL\_AMU\_SI}
\idx[Constant]{LAL\_MP\_SI}
\idx[Constant]{LAL\_ME\_SI}
\idx[Constant]{LAL\_QP\_SI}
\idx[Constant]{LAL\_ALPHA}
\idx[Constant]{LAL\_RE\_SI}
\idx[Constant]{LAL\_LAMBDAE\_SI}
\idx[Constant]{LAL\_AB\_SI}
\idx[Constant]{LAL\_MUB\_SI}
\idx[Constant]{LAL\_MUN\_SI}
The following physical constants are defined to have exact values.
The values of $c$ and $g$ are taken from~\cite{Barnet:1996},
$p_\mathrm{atm}$ is from~\cite{Lang:1992}, while $\epsilon_0$ and
$\mu_0$ are computed from $c$ using exact formulae. The use of a
Julian year (365.25 days) as standard is specified by the IAU.
They are given in the SI units shown.
\begin{center}
\begin{tabular}{|lll|}
\hline
Name & Value & Description \\
\hline
\tt LAL\_C\_SI & $299\,792\,458\,\mathrm{m}\,\mathrm{s}^{-1}$ &
Speed of light $c$ in free space \\
\tt LAL\_EPSILON0\_SI & \multicolumn{2}{l|}{
$8.8541878176203898505365630317107503\times10^{-12}\,
\mathrm{C}^2\mathrm{N}^{-1}\mathrm{m}^{-2}$} \\
& & Permittivity $\epsilon_0$ of free space \\
\tt LAL\_MU0\_SI & \multicolumn{2}{l|}{
$1.2566370614359172953850573533118012\times10^{-6}\,
\mathrm{N}\,\mathrm{A}^{-2}$} \\
& & Permeability $\mu_0$ of free space \\
\tt LAL\_GEARTH\_SI & $9.80665\,\mathrm{m}\,\mathrm{s}^{-2}$ &
Standard gravity $g$ \\
\tt LAL\_PATM\_SI & $101\,325\,\mathrm{Pa}$ &
Standard atmospheric pressure $p_\mathrm{atm}$ \\
\tt LAL\_YRJUL\_SI & $31\,557\,600\,\mathrm{s}$ &
(Julian) year \\
\tt LAL\_LYR\_SI & $9.4607304725808\times10^{15}\,\mathrm{m}$ &
$c\times$(Julian) year\\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/** \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 Barnet (1996), * The values of \f$c\f$ and \f$g\f$ are taken from \ref Barnet_1996,
* \f$p_\mathrm{atm}\f$ is from Lang (1992), while \f$\epsilon_0\f$ and * \f$p_\mathrm{atm}\f$ is from \ref 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 */
/*@}*/ /*@}*/
/* <lalLaTeX>
The following are measured fundamental physical constants, with values
given in \cite{Barnet:1996}. When not dimensionless, they are given
in the SI units shown.
\begin{center}
\begin{tabular}{|lll|}
\hline
Name & Value & Description \\
\hline
\tt LAL\_G\_SI & $6.67259\times10^{-11}\,\mathrm{N}\,\mathrm{m}^{2}
\mathrm{kg}^{-2}$ & Gravitational constant $G$ \\
\tt LAL\_H\_SI & $6.6260755\times10^{-34}\,\mathrm{J}\,\mathrm{s}$ &
Planck constant $h$ \\
\tt LAL\_HBAR\_SI & $1.05457266\times10^{-34}\,\mathrm{J}\,\mathrm{s}$ &
Reduced Planck constant $\hbar$ \\
\tt LAL\_MPL\_SI & $2.17671\times10^{-8}\,\mathrm{kg}$ & Planck mass \\
\tt LAL\_LPL\_SI & $1.61605\times10^{-35}\,\mathrm{m}$ & Planck length \\
\tt LAL\_TPL\_SI & $5.39056\times10^{-44}\,\mathrm{s}$ & Planck time \\
\tt LAL\_K\_SI & $1.380658\times10^{-23}\,\mathrm{J}\,\mathrm{K}^{-1}$
&
Boltzmann constant $k$ \\
\tt LAL\_R\_SI & $8.314511\,\mathrm{J}\,\mathrm{K}^{-1}$ &
Ideal gas constant $R$ \\
\tt LAL\_MOL & $6.0221367\times10^{23}$ & Avogadro constant \\
\tt LAL\_BWIEN\_SI & $2.897756\times10^{-3}\,\mathrm{m}\,\mathrm{K}$ &
Wien displacement law constant $b$ \\
\tt LAL\_SIGMA\_SI & $5.67051\times10^{-8}\,\mathrm{W}\,\mathrm{m}^{-2}
\mathrm{K}^{-4}$ & Stefan-Boltzmann constant $\sigma$ \\
\tt LAL\_AMU\_SI & $1.6605402\times10^{-27}\,\mathrm{kg}$ &
Atomic mass unit \\
\tt LAL\_MP\_SI & $1.6726231\times10^{-27}\,\mathrm{kg}$ & Proton mass \
\
\tt LAL\_ME\_SI & $9.1093897\times10^{-31}\,\mathrm{kg}$ & Electron mass
\\
\tt LAL\_QP\_SI & $1.60217733\times10^{-19}\,\mathrm{C}$ & Proton charge
\\
\tt LAL\_ALPHA & $7.297354677\times10^{-3}$ & Fine structure constant \
\
\tt LAL\_RE\_SI & $2.81794092\times10^{-15}\,\mathrm{m}$ &
Classical electron radius $r_e$ \\
\tt LAL\_LAMBDAE\_SI & $3.86159323\times10^{-13}\,\mathrm{m}$ &
Electron Compton wavelength $\lambda_e$ \\
\tt LAL\_AB\_SI & $5.29177249\times10^{-11}\,\mathrm{m}$ & Bohr radius $
a$\\
\tt LAL\_MUB\_SI & $9.27401543\times10^{-24}\,\mathrm{J}\,\mathrm{T}^{-1}
$ &
Bohr magneton $\mu_B$ \\
\tt LAL\_MUN\_SI & $5.05078658\times10^{-27}\,\mathrm{J}\,\mathrm{T}^{-1}
$ &
Nuclear magneton $\mu_N$ \\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/** \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 Barnet (1996). When not dimensionless, they are given * given in \ref 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.05457266e-34 /**< Reduced Planck constant, J s */ #define LAL_HBAR_SI 1.05457266e-34 /**< Reduced Planck constant, J s */
#define LAL_MPL_SI 2.17671e-8 /**< Planck mass, kg */ #define LAL_MPL_SI 2.17671e-8 /**< Planck mass, kg */
#define LAL_LPL_SI 1.61605e-35 /**< Planck length, m */ #define LAL_LPL_SI 1.61605e-35 /**< Planck length, m */
#define LAL_TPL_SI 5.39056e-44 /**< Planck time, s */ #define LAL_TPL_SI 5.39056e-44 /**< Planck time, s */
#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 */
skipping to change at line 386 skipping to change at line 132
#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 */
/*@}*/ /*@}*/
/* <lalLaTeX>
\subsection*{Astrophysical parameters}
\idx[Constant]{LAL\_REARTH\_SI}
\idx[Constant]{LAL\_AWGS84\_SI}
\idx[Constant]{LAL\_BWGS84\_SI}
\idx[Constant]{LAL\_MEARTH\_SI}
\idx[Constant]{LAL\_IEARTH}
\idx[Constant]{LAL\_EEARTH}
\idx[Constant]{LAL\_RSUN\_SI}
\idx[Constant]{LAL\_MSUN\_SI}
\idx[Constant]{LAL\_MRSUN\_SI}
\idx[Constant]{LAL\_MTSUN\_SI}
\idx[Constant]{LAL\_LSUN\_SI}
\idx[Constant]{LAL\_AU\_SI}
\idx[Constant]{LAL\_PC\_SI}
\idx[Constant]{LAL\_YRTROP\_SI}
\idx[Constant]{LAL\_YRSID\_SI}
\idx[Constant]{LAL\_DAYSID\_SI}
\idx[Constant]{LAL\_H0\_SI}
\idx[Constant]{LAL\_H0FAC\_SI}
\idx[Constant]{LAL\_RHOC\_SI}
\idx[Constant]{LAL\_RHOCFAC\_SI}
\idx[Constant]{LAL\_TCBR\_SI}
\idx[Constant]{LAL\_VCBR\_SI}
\idx[Constant]{LAL\_RHOCBR\_SI}
\idx[Constant]{LAL\_NCBR\_SI}
\idx[Constant]{LAL\_SCBR\_SI}
The following parameters are derived from measured properties of the
Earth and Sun. The values are taken from~\cite{Barnet:1996}, except
for the obliquity of the ecliptic plane and the eccentricity of
Earth's orbit, which are taken from~\cite{Lang:1992}. All values are
given in the SI units shown. Note that the ``year'' and ``light-year''
have exactly defined values, and appear under ``Exact physical constants''.
\begin{center}
\begin{tabular}{|lll|}
\hline
Name & Value & Description \\
\hline
\tt LAL\_REARTH\_SI & $6.378140\times10^6\,\mathrm{m}$ &
Earth equatorial radius \\
\tt LAL\_AWGS84\_SI & $6.378137\times10^6\,\mathrm{m}$ &
Semimajor axis of WGS-84 Reference Ellipsoid \\
\tt LAL\_BWGS84\_SI & $6.356752314\times10^6\,\mathrm{m}$ &
Semiminor axis of WGS-84 Reference Ellipsoid \\
\tt LAL\_MEARTH\_SI & $5.97370\times10^{24}\,\mathrm{kg}$ & Earth mass \\
\tt LAL\_IEARTH & $0.409092804\,\mathrm{rad}$ &
Obliquity of the ecliptic (2000) \\
\tt LAL\_EEARTH & 0.0167 & Earth orbital eccentricity \\
\tt LAL\_RSUN\_SI & $6.960\times10^8\,\mathrm{m}$ & Solar equatorial radi
us\\
\tt LAL\_MSUN\_SI & $1.98892\times10^{30}\,\mathrm{kg}$ & Solar mass \\
\tt LAL\_MRSUN\_SI & $1.47662504\times10^3\,\mathrm{m}$ &
Geometrized solar mass (length) \\
\tt LAL\_MTSUN\_SI & $4.92549095\times10^{-6}\,\mathrm{s}$ &
Geometrized solar mass (time) \\
\tt LAL\_LSUN\_SI & $3.846\times10^{26}\,\mathrm{W}$ & Solar luminosity \
\
\tt LAL\_AU\_SI & $1.4959787066\times10^{11}\,\mathrm{m}$ &
Astronomical unit \\
\tt LAL\_PC\_SI & $3.0856775807\times10^{16}\,\mathrm{m}$ & Parsec \\
\tt LAL\_YRTROP\_SI & $31\,556\,925.2\,\mathrm{s}$ & Tropical year (1994) \
\
\tt LAL\_YRSID\_SI & $31\,558\,149.8\,\mathrm{s}$ & Sidereal year (1994) \
\
\tt LAL\_DAYSID\_SI & $86\,164.09053\,\mathrm{s}$ & Mean sidereal day \\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/** \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 Barnet (1996), except * Earth and Sun. The values are taken from \ref 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 Lang (1992). All values are * Earth's orbit, which are taken from \ref 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 484 skipping to change at line 160
#define LAL_MRSUN_SI 1.47662504e3 /**< Geometrized solar mass, m */ #define LAL_MRSUN_SI 1.47662504e3 /**< Geometrized solar mass, m */
#define LAL_MTSUN_SI 4.92549095e-6 /**< Geometrized solar mass, s */ #define LAL_MTSUN_SI 4.92549095e-6 /**< Geometrized solar mass, s */
#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 */
/*@}*/ /*@}*/
/* <lalLaTeX>
The following cosmological parameters are derived from measurements of
the Hubble expansion rate and of the cosmic background radiation
(CBR). Data are taken from~\cite{Barnet:1996}. In what follows, the
normalized Hubble constant $h_0$ is equal to the actual Hubble
constant $H_0$ divided by $\langle H
\rangle=100\,\mathrm{km}\,\mathrm{s}^{-1}\mathrm{Mpc}^{-1}$. Thus the
Hubble constant can be written as:
$$
H_0 = \langle H \rangle h_0 \; .
$$
Similarly, the critical energy density $\rho_c$ required for spatial
flatness is given by:
$$
\rho_c = \langle\rho\rangle h_0^2 \; .
$$
Current estimates give $h_0$ a value of around 0.65, which is what is
assumed below. All values are in the SI units shown.
\begin{center}
\begin{tabular}{|lll|}
\hline
Name & Value & Description \\
\hline
\tt LAL\_H0\_SI & $2\times10^{-18}\,\mathrm{s}^{-1}$ &
Approx.\ Hubble constant $H_0$ \\
\tt LAL\_H0FAC\_SI & $3.2407792903\times10^{-18}\,\mathrm{s}^{-1}$ &
$H_0/h_0$ \\
\tt LAL\_RHOC\_SI & $7\times10^{-10}\,\mathrm{J}\,\mathrm{m}^{-3}$ &
Approx.\ critical energy density $\rho_c$ \\
\tt LAL\_RHOCFAC\_SI & $1.68860\times10^{-9}\,\mathrm{J}\,\mathrm{m}^{-3}$
&
$\rho_c/h_0^2$ \\
\tt LAL\_TCBR\_SI & $2.726 \mathrm{K}$ &
CBR temperature \\
\tt LAL\_VCBR\_SI & $3.695\times10^5\,\mathrm{m}\,\mathrm{s}^{-1}$ &
Solar velocity with respect to CBR \\
\tt LAL\_RHOCBR\_SI & $4.177\times10^{-14}\,\mathrm{J}\,\mathrm{m}^{-3}$ &
Energy density of CBR \\
\tt LAL\_NCBR\_SI & $4.109\times10^8\,\mathrm{m}^{-3}$ &
Number density of CBR photons \\
\tt LAL\_SCBR\_SI & $3.993\times10^{-14}\,\mathrm{J}\,\mathrm{K}^{-1}
\mathrm{m}^{-3}$ & Entropy density of CBR \\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/** \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 Barnet (1996). In what follows, the * (CBR). Data are taken from \ref 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. */
/*@{*/ /*@{*/
skipping to change at line 560 skipping to change at line 187
#define LAL_RHOCFAC_SI 1.68860e-9 /**< Critical density prefactor, J m^-3 */ #define LAL_RHOCFAC_SI 1.68860e-9 /**< Critical density prefactor, J m^-3 */
#define LAL_RHOC_SI 7e-10 /**< Approximate critical density, J m^ -3 */ #define LAL_RHOC_SI 7e-10 /**< Approximate critical density, J m^ -3 */
/* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */ /* Critical density RHOC = h0*h0*RHOCFAC, where h0 is around 0.65 */
#define LAL_TCBR_SI 2.726 /**< Cosmic background radiation temperature, K */ #define LAL_TCBR_SI 2.726 /**< Cosmic background radiation temperature, K */
#define LAL_VCBR_SI 3.695e5 /**< Solar velocity with respect to CBR, m s^ -1 */ #define LAL_VCBR_SI 3.695e5 /**< Solar velocity with respect to CBR, m s^ -1 */
#define LAL_RHOCBR_SI 4.177e-14 /**< Energy density of CBR, J m^-3 */ #define LAL_RHOCBR_SI 4.177e-14 /**< Energy density of CBR, J m^-3 */
#define LAL_NCBR_SI 4.109e8 /**< Number density of CBR photons, m^-3 */ #define LAL_NCBR_SI 4.109e8 /**< Number density of CBR photons, m^-3 */
#define LAL_SCBR_SI 3.993e-14 /**< Entropy density of CBR, J K^-1 m^-3 */ #define LAL_SCBR_SI 3.993e-14 /**< Entropy density of CBR, J K^-1 m^-3 */
/*@}*/ /*@}*/
/* <lalLaTeX> /*@}*/
\vfill{\footnotesize\input{LALConstantsHV}}
</lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALCONSTANTS_H */ #endif /* _LALCONSTANTS_H */
 End of changes. 18 change blocks. 
405 lines changed or deleted 12 lines changed or added


 LALCorrelation.h   LALCorrelation.h 
skipping to change at line 35 skipping to change at line 35
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#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
NRCSID (LALCORRELATIONH, "$Id$");
/** /**
\author Yakushin, Igor \author Yakushin, Igor
\addtogroup LALCorrelation_h \addtogroup LALCorrelation_h
\brief [One sentence briefly defining scope of the header] \brief [One sentence briefly defining scope of the header]
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/LALCorrelation.h> #include <lal/LALCorrelation.h>
\endcode \endcode
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 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
*/ */
/** \file // ---------- SEE LALDatatypes.dox for doxygen documentation ----------
* \ingroup std
* \author Creighton, J. D. E., and Creighton, T. D.
* \date $Id$
* \brief Provides the basic LAL datatypes.
*
* This header defines the standard data types and data
* structures that are used throughout LAL. They fall into three general
* categories: primitive datatypes, aggregates of primitive
* datatypes, and structured datatypes. The LAL status structure
* is a special case of a structured datatype that is used in every
* standard LAL function.
*
* This header file is automatically included by the header
* <tt>LALStdlib.h</tt>. In turn, this header file starts by including the
* header <tt>LALAtomicDatatypes.h</tt>.
*
*/
/********************************* <lalVerbatim file="LALDatatypesHV">
Author: J. D. E. Creighton, T. D. Creighton
$Id$
********************************** </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALDatatypes.h}}
\label{s:LALDatatypes.h}
Provides the basic LAL datatypes.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALDatatypes.h>
\end{verbatim}
\noindent This header defines the standard data types and data
structures that are used throughout LAL. They fall into three general
categories: \emph{primitive} datatypes, \emph{aggregates} of primitive
datatypes, and \emph{structured} datatypes. The LAL status structure
is a special case of a structured datatype that is used in every
standard LAL function.
This header file is automatically included by the header
\verb@LALStdlib.h@. In turn, this header file starts by including the
header \verb@LALAtomicDatatypes.h@, which is discussed in the
following section.
</lalLaTeX> */
#ifndef _LALDATATYPES_H #ifndef _LALDATATYPES_H
#define _LALDATATYPES_H #define _LALDATATYPES_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#if !defined(SWIG) && !defined(SWIGLAL_DYNAMIC_1DARRAY) #if !defined(SWIG) && !defined(SWIGLAL_DYNAMIC_1DARRAY)
#define SWIGLAL_DYNAMIC_1DARRAY(...) #define SWIGLAL_DYNAMIC_1DARRAY(...)
#endif #endif
#if !defined(SWIG) && !defined(SWIGLAL_DYNAMIC_2DARRAY) #if !defined(SWIG) && !defined(SWIGLAL_DYNAMIC_2DARRAY)
#define SWIGLAL_DYNAMIC_2DARRAY(...) #define SWIGLAL_DYNAMIC_2DARRAY(...)
#endif #endif
/* <lalLaTeX>
\newpage\input{LALAtomicDatatypesH}
</lalLaTeX> */
#include <lal/LALAtomicDatatypes.h> #include <lal/LALAtomicDatatypes.h>
/**** <lalLaTeX> /** \addtogroup LALDatatypes */ /*@{*/
* \newpage
* \subsection{Atomic datatypes codes}
* \label{ss:atomic-datatype-codes}
* \idx[Constant]{LAL\_1\_BYTE\_TYPE\_SIZE}
* \idx[Constant]{LAL\_2\_BYTE\_TYPE\_SIZE}
* \idx[Constant]{LAL\_4\_BYTE\_TYPE\_SIZE}
* \idx[Constant]{LAL\_8\_BYTE\_TYPE\_SIZE}
* \idx[Constant]{LAL\_16\_BYTE\_TYPE\_SIZE}
* \idx[Constant]{LAL\_TYPE\_SIZE\_MASK}
* \idx[Constant]{LAL\_FLTPT\_TYPE\_FLAG}
* \idx[Constant]{LAL\_CMPLX\_TYPE\_FLAG}
* \idx[Constant]{LAL\_UNSGN\_TYPE\_FLAG}
* \idx[Constant]{LAL\_CHAR\_TYPE\_CODE}
* \idx[Constant]{LAL\_I2\_TYPE\_CODE}
* \idx[Constant]{LAL\_I4\_TYPE\_CODE}
* \idx[Constant]{LAL\_I8\_TYPE\_CODE}
* \idx[Constant]{LAL\_UCHAR\_TYPE\_CODE}
* \idx[Constant]{LAL\_U2\_TYPE\_CODE}
* \idx[Constant]{LAL\_U4\_TYPE\_CODE}
* \idx[Constant]{LAL\_U8\_TYPE\_CODE}
* \idx[Constant]{LAL\_S\_TYPE\_CODE}
* \idx[Constant]{LAL\_D\_TYPE\_CODE}
* \idx[Constant]{LAL\_C\_TYPE\_CODE}
* \idx[Constant]{LAL\_Z\_TYPE\_CODE}
* \idx[Type]{LALTYPECODE}
*
* The following constants specify the size, in bytes, of the atomic dataty
pe.
*
* \begin{center}
* \begin{tabular}{|lcl|}
* \hline
* Name & Octal Value & Description \\
* \hline
* \tt LAL\_1\_BYTE\_TYPE\_SIZE & 000 & 1 byte type \\
* \tt LAL\_2\_BYTE\_TYPE\_SIZE & 001 & 2 byte type \\
* \tt LAL\_4\_BYTE\_TYPE\_SIZE & 002 & 4 byte type \\
* \tt LAL\_8\_BYTE\_TYPE\_SIZE & 003 & 8 byte type \\
* \tt LAL\_16\_BYTE\_TYPE\_SIZE & 004 & 16 byte type \\
* \tt LAL\_TYPE\_SIZE\_MASK & 007 & Mask for byte type size fields \\
* \hline
* \end{tabular}
* \end{center}
*
* \noindent
* The constant \verb+LAL_TYPE_SIZE_MASK+ is useful in extracting the size
* information from other type attributes. For example, the size, in bytes
,
* of an atomic datatype can be found using something like the following:
* \begin{verbatim}
* UINT4 code = LAL_S_TYPE_CODE;
* UINT4 size = 1U << ( code & LAL_TYPE_SIZE_MASK );
* \end{verbatim}
*
* \vspace{3ex}
*
* The following constants are flags describing the type attributes. A typ
e
* is either an integer or a floating-point, either purely real or complex,
* and, if integer, is either signed or unsigned.
*
* \begin{center}
* \begin{tabular}{|lcl|}
* \hline
* Name & Octal Value & Description \\
* \hline
* \tt LAL\_FLTPT\_TYPE\_FLAG & 010 & Floating-point (not integer) type \\
* \tt LAL\_CMPLX\_TYPE\_FLAG & 020 & Complex (not purely real) type \\
* \tt LAL\_UNSGN\_TYPE\_FLAG & 040 & Unsigned (no sign info) type \\
* \hline
* \end{tabular}
* \end{center}
*
* To get the actual type, these flags are combined together and with the
* type size constants using the bitwise-or operator (\verb+|+). For examp
le,
* an eight-byte floating point number would be
* \verb+LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG+.
* Conceivably you could have a complex type made from a pair of unsigned
* one-byte integers that would be specified as
* \verb+LAL_1_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_UNSGN_TYPE_FLAG+.
* Fortunately, there are none of these in LAL. Attribues of a particular
* type can be extracted using the bitwise-and operator. For example:
* \begin{verbatim}
* UINT4 code = LAL_S_TYPE_CODE;
* UINT4 isfloat = ( code & LAL_FLTPT_TYPE_FLAG );
* UINT4 iscmplx = ( code & LAL_CMPLX_TYPE_FLAG );
* \end{verbatim}
*
* \vspace{3ex}
*
* The following constants correspond to the types that actually exist in L
AL.
* Their enumeration is the type \verb+LALTYPECODE+.
* \begin{center}
* \begin{tabular}{|lcl|}
* \hline
* Name & Octal Value & Corresponding Type \\
* \hline
* \tt LAL\_CHAR\_TYPE\_CODE & 000 & \tt CHAR \\
* \tt LAL\_I2\_TYPE\_CODE & 001 & \tt INT2 \\
* \tt LAL\_I4\_TYPE\_CODE & 002 & \tt INT4 \\
* \tt LAL\_I8\_TYPE\_CODE & 003 & \tt INT8 \\
* \tt LAL\_UCHAR\_TYPE\_CODE & 040 & \tt UCHAR \\
* \tt LAL\_U2\_TYPE\_CODE & 041 & \tt UINT2 \\
* \tt LAL\_U4\_TYPE\_CODE & 042 & \tt UINT4 \\
* \tt LAL\_U8\_TYPE\_CODE & 043 & \tt UINT8 \\
* \tt LAL\_S\_TYPE\_CODE & 012 & \tt REAL4 \\
* \tt LAL\_D\_TYPE\_CODE & 013 & \tt REAL8 \\
* \tt LAL\_C\_TYPE\_CODE & 033 & \tt COMPLEX8 \\
* \tt LAL\_Z\_TYPE\_CODE & 034 & \tt COMPLEX16 \\
* \hline
* \end{tabular}
* \end{center}
*
**** </lalLaTeX> */
/* constants */ /* ---------- constants ---------- */
/** Type size constants. */ /** 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 */
LAL_TYPE_SIZE_MASK = 007 /**< Type size mask 0111 = 7 */ LAL_TYPE_SIZE_MASK = 007 /**< Type size mask 0111 = 7 */
}; };
/** Type flag constants. */ /** Type flag constants, see \ref LALDatatypes for more details. */
enum enum
{ {
LAL_FLTPT_TYPE_FLAG = 010, /**< Floating-point (vs integer) type 0100 0 = 8 */ LAL_FLTPT_TYPE_FLAG = 010, /**< Floating-point (vs integer) type 0100 0 = 8 */
LAL_CMPLX_TYPE_FLAG = 020, /**< Complex (vs real) type 010000 = 16 * / LAL_CMPLX_TYPE_FLAG = 020, /**< Complex (vs real) type 010000 = 16 * /
LAL_UNSGN_TYPE_FLAG = 040 /**< Unsigned (vs signed) type 0100000 = 3 2 */ LAL_UNSGN_TYPE_FLAG = 040 /**< Unsigned (vs signed) type 0100000 = 3 2 */
}; };
/** Type codes: use these type codes to identify a LAL atomic data type. /** Type codes: use these type codes to identify a LAL atomic data type, se
*/ e \ref LALDatatypes for more details. */
typedef enum typedef enum
{ {
LAL_CHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE, /**< CHAR type code (0) */ LAL_CHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE, /**< CHAR type code (0) */
LAL_I2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE, /**< INT2 type code (1) */ LAL_I2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE, /**< INT2 type code (1) */
LAL_I4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE, /**< INT4 type code (2) */ LAL_I4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE, /**< INT4 type code (2) */
LAL_I8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE, /**< INT8 type code (3) */ LAL_I8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE, /**< INT8 type code (3) */
LAL_UCHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UCHAR type code (32) */ LAL_UCHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UCHAR type code (32) */
LAL_U2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT2 type code (33) */ LAL_U2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT2 type code (33) */
LAL_U4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT4 type code (34) */ LAL_U4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT4 type code (34) */
LAL_U8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT8 type code (35) */ LAL_U8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /** < UINT8 type code (35) */
LAL_S_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** < REAL4 type code (18) */ LAL_S_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** < REAL4 type code (18) */
LAL_D_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** < REAL8 type code (19) */ LAL_D_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /** < REAL8 type code (19) */
LAL_C_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_ FLTPT_TYPE_FLAG, /**< COMPLEX8 type code (27) */ LAL_C_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_ FLTPT_TYPE_FLAG, /**< COMPLEX8 type code (27) */
LAL_Z_TYPE_CODE = LAL_16_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL _FLTPT_TYPE_FLAG /**< COMPLEX16 type code (28) */ LAL_Z_TYPE_CODE = LAL_16_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL _FLTPT_TYPE_FLAG /**< COMPLEX16 type code (28) */
} }
LALTYPECODE; LALTYPECODE;
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALDATATYPESH, "$Id$"); /* ---------- Vector types ---------- */
/* <lalLaTeX>
\newpage
\subsection{Aggregate datatypes}
\label{ss:aggregate-datatypes}
These datatypes store arbitrarily large sets or collections of
primitive datatypes. At this level there is no physical
interpretation assigned to the objects (such as names or units); the
aggregate datatypes simply collect and arrange the primitive
datatypes. The following types of aggregate datatypes are defines:
vectors, arrays, sequences, vector sequences, and array sequences.
\vspace{2ex}
\begin{verbatim}
<datatype>Vector
\end{verbatim}
This structure stores an ordered set of $n$ elements of type
\verb@<datatype>@, which can be any primitive datatype. The data are
to be interpreted as being a point in an $n$-dimensional vector space.
The fields are:
\begin{description}
\item[\texttt{UINT4 length}] The number of data $n$.
\item[\texttt{<datatype> *data}] Pointer to the data array. The data
are stored sequentially as \verb@data[@$0,\ldots,n-1$\verb@]@.
\end{description}
</lalLaTeX> */
/** \name Aggregate datatypes. /** Vector of type CHAR, see \ref ss_Vector for more details. */
*
* These datatypes store arbitrarily large sets or collections of
* primitive datatypes. At this level there is no physical
* interpretation assigned to the objects (such as names or units); the
* aggregate datatypes simply collect and arrange the primitive
* datatypes. The following types of aggregate datatypes are defines:
* vectors, arrays, sequences, vector sequences, and array sequences.
*
* \b Vector structures store an ordered set of \a n elements of any
* primative datatype.
*
* \b Sequence structures are synonyms for Vector structures.
*
* \b Array structures store a set of elements of any primative
* datatype, arranged as an \a m dimensional
* array. That is, each element can be thought of as having \a m
* indecies, \f$A_{i_0\cdots i_{m-1}}\f$, where each index \f$i_k\f$
* runs over its own range \f$0,\ldots,n_k-1\f$. The total number of
* elements is then \f$N=n_0\times\cdots\times n_{m-1}\f$. In memory the
* array is flattened so that the elements are stored sequentially in
* a contiguous block. That is, the array of memory is packed so that
* element \f$A_{i_0\cdots i_{m-1}}\f$ is stored as
* \f$\mathtt{data[}i_{m-1} + n_{m-2}\times(i_{m-2} +
* n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))\mathtt{]}\f$.
*
* \b VectorSequence structures store an ordered set of \a l elements of ty
pe
* \c \<datatype\>Vector, where \c \<datatype\> can be any primitive
* datatype. Mathematically the sequence can be written as
* \f$\{\vec{v}^{(0)},\ldots,\vec{v}^{(l-1)}\}\f$, where each element
* \f$\vec{v}^{(j)}=(v^{(j)}_0,\ldots,v^{(i)}_{n-1})\f$ is a vector of leng
th
* \f$n\f$. In memory the elements are flattened; that is, they are
* stored sequentially in a contiguous block of memory such that
* element \f$v^{(j)}_i\f$ is stored as
* \f$\mathtt{data[}j\times n + i\mathtt{]}\f$.
*
* \b ArraySequence structures stores an ordered set of \a l elements of ty
pe
* \c \<datatype\>Array where \c \<datatype\> can be any primitive
* datatype. The indexing of an array sequence can get quite
* complicated; it helps to read first the documentation for data arrays,
* above. Mathematically the data can be written as a set
* \f$\{A^{(j)}_{i_0\cdots i_{m-1}}\f$, where the sequence number
* \f$j\f$ runs from 0 to \f$l-1\f$, and each array index \f$i_k\f$ runs ov
er its own
* range \f$0,\ldots,n_k-1\f$. The total number of data in a given array
* element is then \f$N=n_0\times\cdots\times n_{m-1}\f$, and the total
* number of data in the sequence is \f$N\times l\f$. In memory the array
is
* flattened so that the elements are stored sequentially in a
* contiguous block.
* The element
* \f$A^{(j)}_{i_0\cdots i_{m-1}}\f$ is stored as
* \f$\mathtt{data[}j\times N + i_{m-1} + n_{m-2}\times(i_{m-2} +
* n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))\mathtt{]}\f$; that is,
* the index of \c data[] runs over the internal indecies of each
* array element before incrementing to the next array element.
*
*/
/*@{*/
/** Vector of type CHAR. */
typedef struct typedef struct
tagCHARVector tagCHARVector
{ {
SWIGLAL_STRUCT(CHARVector); SWIGLAL_STRUCT(CHARVector);
SWIGLAL_DYNAMIC_1DARRAY(CHAR, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(CHAR, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
CHAR *data; /**< Pointer to the data array. */ CHAR *data; /**< Pointer to the data array. */
} }
CHARVector; CHARVector;
/** Vector of type CHAR*, ie 'strings' */ /** Vector of type CHAR*, ie 'strings', see \ref ss_Vector for more details . */
typedef struct tagLALStringVector { typedef struct tagLALStringVector {
SWIGLAL_STRUCT(LALStringVector); SWIGLAL_STRUCT(LALStringVector);
SWIGLAL_DYNAMIC_1DARRAY(CHAR*, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(CHAR*, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
CHAR **data; /**< Pointer to the data array. */ CHAR **data; /**< Pointer to the data array. */
} LALStringVector; } LALStringVector;
/** Vector of type INT2. */ /** Vector of type INT2, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagINT2Vector tagINT2Vector
{ {
SWIGLAL_STRUCT(INT2Vector); SWIGLAL_STRUCT(INT2Vector);
SWIGLAL_DYNAMIC_1DARRAY(INT2, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(INT2, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
INT2 *data; /**< Pointer to the data array. */ INT2 *data; /**< Pointer to the data array. */
} }
INT2Vector; INT2Vector;
/** Vector of type UINT2. */ /** Vector of type UINT2, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagUINT2Vector tagUINT2Vector
{ {
SWIGLAL_STRUCT(UINT2Vector); SWIGLAL_STRUCT(UINT2Vector);
SWIGLAL_DYNAMIC_1DARRAY(UINT2, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(UINT2, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
UINT2 *data; /**< Pointer to the data array. */ UINT2 *data; /**< Pointer to the data array. */
} }
UINT2Vector; UINT2Vector;
/** Vector of type INT4. */ /** Vector of type INT4, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagINT4Vector tagINT4Vector
{ {
SWIGLAL_STRUCT(INT4Vector); SWIGLAL_STRUCT(INT4Vector);
SWIGLAL_DYNAMIC_1DARRAY(INT4, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(INT4, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
INT4 *data; /**< Pointer to the data array. */ INT4 *data; /**< Pointer to the data array. */
} }
INT4Vector; INT4Vector;
/** Vector of type UINT4. */ /** Vector of type UINT4, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagUINT4Vector tagUINT4Vector
{ {
SWIGLAL_STRUCT(UINT4Vector); SWIGLAL_STRUCT(UINT4Vector);
SWIGLAL_DYNAMIC_1DARRAY(UINT4, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(UINT4, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
UINT4 *data; /**< Pointer to the data array. */ UINT4 *data; /**< Pointer to the data array. */
} }
UINT4Vector; UINT4Vector;
/** Vector of type INT8. */ /** Vector of type INT8, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagINT8Vector tagINT8Vector
{ {
SWIGLAL_STRUCT(INT8Vector); SWIGLAL_STRUCT(INT8Vector);
SWIGLAL_DYNAMIC_1DARRAY(INT8, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(INT8, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
INT8 *data; /**< Pointer to the data array. */ INT8 *data; /**< Pointer to the data array. */
} }
INT8Vector; INT8Vector;
/** Vector of type UINT8. */ /** Vector of type UINT8, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagUINT8Vector tagUINT8Vector
{ {
SWIGLAL_STRUCT(UINT8Vector); SWIGLAL_STRUCT(UINT8Vector);
SWIGLAL_DYNAMIC_1DARRAY(UINT8, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(UINT8, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
UINT8 *data; /**< Pointer to the data array. */ UINT8 *data; /**< Pointer to the data array. */
} }
UINT8Vector; UINT8Vector;
/** Vector of type REAL4. */ /** Vector of type REAL4, see \ref ss_Vector for more details. */
typedef struct typedef struct
tagREAL4Vector tagREAL4Vector
{ {
SWIGLAL_STRUCT(REAL4Vector); SWIGLAL_STRUCT(REAL4Vector);
SWIGLAL_DYNAMIC_1DARRAY(REAL4, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(REAL4, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
REAL4 *data; /**< Pointer to the data array. */ REAL4 *data; /**< Pointer to the data array. */
} }
REAL4Vector; REAL4Vector;
/** Vector of type REAL8. */ /** Vector of type REAL8, see \ref ss_Vector for more details. */
typedef struct tagREAL8Vector typedef struct tagREAL8Vector
{ {
SWIGLAL_STRUCT(REAL8Vector); SWIGLAL_STRUCT(REAL8Vector);
SWIGLAL_DYNAMIC_1DARRAY(REAL8, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(REAL8, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
REAL8 *data; /**< Pointer to the data array. */ REAL8 *data; /**< Pointer to the data array. */
} }
REAL8Vector; REAL8Vector;
/** Vector of type COMPLEX8. */ /** Vector of type COMPLEX8, see \ref ss_Vector for more details. */
typedef struct tagCOMPLEX8Vector typedef struct tagCOMPLEX8Vector
{ {
SWIGLAL_STRUCT(COMPLEX8Vector); SWIGLAL_STRUCT(COMPLEX8Vector);
SWIGLAL_DYNAMIC_1DARRAY(COMPLEX8, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(COMPLEX8, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
COMPLEX8 *data; /**< Pointer to the data array. */ COMPLEX8 *data; /**< Pointer to the data array. */
} }
COMPLEX8Vector; COMPLEX8Vector;
/** Vector of type COMPLEX16. */ /** Vector of type COMPLEX16, see \ref ss_Vector for more details. */
typedef struct tagCOMPLEX16Vector typedef struct tagCOMPLEX16Vector
{ {
SWIGLAL_STRUCT(COMPLEX16Vector); SWIGLAL_STRUCT(COMPLEX16Vector);
SWIGLAL_DYNAMIC_1DARRAY(COMPLEX16, data, UINT4, length); SWIGLAL_DYNAMIC_1DARRAY(COMPLEX16, data, UINT4, length);
UINT4 length; /**< Number of elements in array. */ UINT4 length; /**< Number of elements in array. */
COMPLEX16 *data; /**< Pointer to the data array. */ COMPLEX16 *data; /**< Pointer to the data array. */
} }
COMPLEX16Vector; COMPLEX16Vector;
/* <lalLaTeX> /* ---------- Array types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>Array
\end{verbatim}
This structure stores a set of elements of type \verb@<datatype>@,
which can be any primitive datatype, arranged as an $m$-dimensional
array. That is, each element can be thought of as having $m$
indecies, $\mathsf{A}_{i_0\cdots i_{m-1}}$, where each index $i_k$
runs over its own range $0,\ldots,n_k-1$. The total number of
elements is then $N=n_0\times\cdots\times n_{m-1}$. In memory the
array is ``flattened'' so that the elements are stored sequentially in
a contiguous block. The fields are:
\begin{description}
\item[\texttt{UINT4Vector *dimLength}] Pointer to a vector of length
$m$, storing the index ranges $(n_0,\ldots,n_{m-1})$.
\item[\texttt{<datatype> *data}] Pointer to the data array. The data
element $\mathsf{A}_{i_0\cdots i_{m-1}}$ is stored as
\verb@data[@$i_{m-1} + n_{m-2}\times(i_{m-2} +
n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is,
the index of \verb@data[]@ runs over the entire range of an index
$i_{k+1}$ before incrementing $i_k$.
\end{description}
</lalLaTeX> */
/** Multidimentional array of INT2. */ /** Multidimentional array of INT2, see \ref ss_Array for more details. */
typedef struct typedef struct
tagINT2Array tagINT2Array
{ {
SWIGLAL_STRUCT(INT2Array); SWIGLAL_STRUCT(INT2Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
INT2 *data; /**< Pointer to the data array. */ INT2 *data; /**< Pointer to the data array. */
} }
INT2Array; INT2Array;
/** Multidimentional array of UINT2. */ /** Multidimentional array of UINT2, see \ref ss_Array for more details. */
typedef struct typedef struct
tagUINT2Array tagUINT2Array
{ {
SWIGLAL_STRUCT(UINT2Array); SWIGLAL_STRUCT(UINT2Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
UINT2 *data; /**< Pointer to the data array. */ UINT2 *data; /**< Pointer to the data array. */
} }
UINT2Array; UINT2Array;
/** Multidimentional array of INT4. */ /** Multidimentional array of INT4, see \ref ss_Array for more details. */
typedef struct typedef struct
tagINT4Array tagINT4Array
{ {
SWIGLAL_STRUCT(INT4Array); SWIGLAL_STRUCT(INT4Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
INT4 *data; /**< Pointer to the data array. */ INT4 *data; /**< Pointer to the data array. */
} }
INT4Array; INT4Array;
/** Multidimentional array of UINT4. */ /** Multidimentional array of UINT4, see \ref ss_Array for more details. */
typedef struct typedef struct
tagUINT4Array tagUINT4Array
{ {
SWIGLAL_STRUCT(UINT4Array); SWIGLAL_STRUCT(UINT4Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
UINT4 *data; /**< Pointer to the data array. */ UINT4 *data; /**< Pointer to the data array. */
} }
UINT4Array; UINT4Array;
/** Multidimentional array of INT8. */ /** Multidimentional array of INT8, see \ref ss_Array for more details. */
typedef struct typedef struct
tagINT8Array tagINT8Array
{ {
SWIGLAL_STRUCT(INT8Array); SWIGLAL_STRUCT(INT8Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
INT8 *data; /**< Pointer to the data array. */ INT8 *data; /**< Pointer to the data array. */
} }
INT8Array; INT8Array;
/** Multidimentional array of UINT8. */ /** Multidimentional array of UINT8, see \ref ss_Array for more details. */
typedef struct typedef struct
tagUINT8Array tagUINT8Array
{ {
SWIGLAL_STRUCT(UINT8Array); SWIGLAL_STRUCT(UINT8Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
UINT8 *data; /**< Pointer to the data array. */ UINT8 *data; /**< Pointer to the data array. */
} }
UINT8Array; UINT8Array;
/** Multidimentional array of REAL4. */ /** Multidimentional array of REAL4, see \ref ss_Array for more details. */
typedef struct typedef struct
tagREAL4Array tagREAL4Array
{ {
SWIGLAL_STRUCT(REAL4Array); SWIGLAL_STRUCT(REAL4Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
REAL4 *data; /**< Pointer to the data array. */ REAL4 *data; /**< Pointer to the data array. */
} }
REAL4Array; REAL4Array;
/** Multidimentional array of REAL8. */ /** Multidimentional array of REAL8, see \ref ss_Array for more details. */
typedef struct typedef struct
tagREAL8Array tagREAL8Array
{ {
SWIGLAL_STRUCT(REAL8Array); SWIGLAL_STRUCT(REAL8Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
REAL8 *data; /**< Pointer to the data array. */ REAL8 *data; /**< Pointer to the data array. */
} }
REAL8Array; REAL8Array;
/** Multidimentional array of COMPLEX8. */ /** Multidimentional array of COMPLEX8, see \ref ss_Array for more details. */
typedef struct typedef struct
tagCOMPLEX8Array tagCOMPLEX8Array
{ {
SWIGLAL_STRUCT(COMPLEX8Array); SWIGLAL_STRUCT(COMPLEX8Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
COMPLEX8 *data; /**< Pointer to the data array. */ COMPLEX8 *data; /**< Pointer to the data array. */
} }
COMPLEX8Array; COMPLEX8Array;
/** Multidimentional array of COMPLEX16. */ /** Multidimentional array of COMPLEX16, see \ref ss_Array for more details . */
typedef struct typedef struct
tagCOMPLEX16Array tagCOMPLEX16Array
{ {
SWIGLAL_STRUCT(COMPLEX16Array); SWIGLAL_STRUCT(COMPLEX16Array);
UINT4Vector *dimLength; /**< Vector of array dimensions. */ UINT4Vector *dimLength; /**< Vector of array dimensions. */
COMPLEX16 *data; /**< Pointer to the data array. */ COMPLEX16 *data; /**< Pointer to the data array. */
} }
COMPLEX16Array; COMPLEX16Array;
/* <lalLaTeX> /* ---------- Sequence types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>Sequence
\end{verbatim}
This structure stores an ordered set of $l$ elements of type
\verb@<datatype>@, which can be any primitive datatype. It is
identical to \verb@<datatype>Vector@, except that the elements are to
be interpreted as $l$ consecutive elements rather than the components
of an $l$-dimensional vector. The fields are:
\begin{description}
\item[\texttt{UINT4 length}] The number of data $l$.
\item[\texttt{<datatype> *data}] Pointer to the data array. The data
are stored sequentially as \verb@data[@$0,\ldots,l-1$\verb@]@.
\end{description}
</lalLaTeX> */
typedef CHARVector CHARSequence;
typedef INT2Vector INT2Sequence;
typedef UINT2Vector UINT2Sequence;
typedef INT4Vector INT4Sequence;
typedef UINT4Vector UINT4Sequence;
typedef INT8Vector INT8Sequence;
typedef UINT8Vector UINT8Sequence;
typedef REAL4Vector REAL4Sequence;
typedef REAL8Vector REAL8Sequence;
typedef COMPLEX8Vector COMPLEX8Sequence;
typedef COMPLEX16Vector COMPLEX16Sequence;
/* <lalLaTeX>
\vspace{2ex} typedef CHARVector CHARSequence; /**< See \ref ss_Sequence for docume
\begin{verbatim} ntation */
<datatype>VectorSequence typedef INT2Vector INT2Sequence; /**< See \ref ss_Sequence for docume
\end{verbatim} ntation */
This structure stores an ordered set of $l$ elements of type typedef UINT2Vector UINT2Sequence; /**< See \ref ss_Sequence for docume
\verb@<datatype>Vector@, where \verb@<datatype>@ can be any primitive ntation */
datatype. Mathematically the sequence can be written as typedef INT4Vector INT4Sequence; /**< See \ref ss_Sequence for docume
$\{\vec{v}^{(0)},\ldots,\vec{v}^{(l-1)}\}$, where each element ntation */
$\vec{v}^{(j)}=(v^{(j)}_0,\ldots,v^{(i)}_{n-1})$ is a vector of length typedef UINT4Vector UINT4Sequence; /**< See \ref ss_Sequence for docume
$n$. In memory the elements are ``flattened''; that is, they are ntation */
stored sequentially in a contiguous block of memory. The fields are: typedef INT8Vector INT8Sequence; /**< See \ref ss_Sequence for docume
\begin{description} ntation */
\item[\texttt{UINT4 length}] The number of vectors $l$. typedef UINT8Vector UINT8Sequence; /**< See \ref ss_Sequence for docume
\item[\texttt{UINT4 vectorLength}] The length $n$ of each vector. ntation */
\item[\texttt{<datatype> *data}] Pointer to the data array. The data typedef REAL4Vector REAL4Sequence; /**< See \ref ss_Sequence for docume
element $v^{(j)}_i$ is stored as \verb@data[@$j\times n + i$\verb@]@; ntation */
that is, the index of \verb@data[]@ runs over the internal index of typedef REAL8Vector REAL8Sequence; /**< See \ref ss_Sequence for docume
each vector element before incrementing to the next vector element. ntation */
\end{description} typedef COMPLEX8Vector COMPLEX8Sequence;/**< See \ref ss_Sequence for docu
mentation */
typedef COMPLEX16Vector COMPLEX16Sequence;/**< See \ref ss_Sequence for doc
umentation */
</lalLaTeX> */ /* ---------- VectorSequence types ---------- */
/** Sequence of CHAR Vectors. */ /** Sequence of CHAR Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagCHARVectorSequence tagCHARVectorSequence
{ {
SWIGLAL_STRUCT(CHARVectorSequence); SWIGLAL_STRUCT(CHARVectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(CHAR, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(CHAR, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
CHAR *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ CHAR *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
CHARVectorSequence; CHARVectorSequence;
/** Sequence of INT2 Vectors. */ /** Sequence of INT2 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagINT2VectorSequence tagINT2VectorSequence
{ {
SWIGLAL_STRUCT(INT2VectorSequence); SWIGLAL_STRUCT(INT2VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(INT2, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(INT2, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
INT2 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ INT2 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
INT2VectorSequence; INT2VectorSequence;
/** Sequence of UINT2 Vectors. */ /** Sequence of UINT2 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagUINT2VectorSequence tagUINT2VectorSequence
{ {
SWIGLAL_STRUCT(UINT2VectorSequence); SWIGLAL_STRUCT(UINT2VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(UINT2, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(UINT2, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
UINT2 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ UINT2 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
UINT2VectorSequence; UINT2VectorSequence;
/** Sequence of INT4 Vectors. */ /** Sequence of INT4 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagINT4VectorSequence tagINT4VectorSequence
{ {
SWIGLAL_STRUCT(INT4VectorSequence); SWIGLAL_STRUCT(INT4VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(INT4, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(INT4, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
INT4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ INT4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
INT4VectorSequence; INT4VectorSequence;
/** Sequence of UINT4 Vectors. */ /** Sequence of UINT4 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagUINT4VectorSequence tagUINT4VectorSequence
{ {
SWIGLAL_STRUCT(UINT4VectorSequence); SWIGLAL_STRUCT(UINT4VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(UINT4, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(UINT4, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
UINT4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ UINT4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
UINT4VectorSequence; UINT4VectorSequence;
/** Sequence of INT8 Vectors. */ /** Sequence of INT8 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagINT8VectorSequence tagINT8VectorSequence
{ {
SWIGLAL_STRUCT(INT8VectorSequence); SWIGLAL_STRUCT(INT8VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(INT8, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(INT8, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
INT8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ INT8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
INT8VectorSequence; INT8VectorSequence;
/** Sequence of UINT8 Vectors. */ /** Sequence of UINT8 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagUINT8VectorSequence tagUINT8VectorSequence
{ {
SWIGLAL_STRUCT(UINT8VectorSequence); SWIGLAL_STRUCT(UINT8VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(UINT8, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(UINT8, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
UINT8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ UINT8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
UINT8VectorSequence; UINT8VectorSequence;
/** Sequence of REAL4 Vectors. */ /** Sequence of REAL4 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagREAL4VectorSequence tagREAL4VectorSequence
{ {
SWIGLAL_STRUCT(REAL4VectorSequence); SWIGLAL_STRUCT(REAL4VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(REAL4, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(REAL4, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
REAL4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ REAL4 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
REAL4VectorSequence; REAL4VectorSequence;
/** Sequence of REAL8 Vectors. */ /** Sequence of REAL8 Vectors, see \ref ss_VectorSequence for more details. */
typedef struct typedef struct
tagREAL8VectorSequence tagREAL8VectorSequence
{ {
SWIGLAL_STRUCT(REAL8VectorSequence); SWIGLAL_STRUCT(REAL8VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(REAL8, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(REAL8, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
REAL8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ REAL8 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
REAL8VectorSequence; REAL8VectorSequence;
/** Sequence of COMPLEX8 Vectors. */ /** Sequence of COMPLEX8 Vectors, see \ref ss_VectorSequence for more detai ls. */
typedef struct typedef struct
tagCOMPLEX8VectorSequence tagCOMPLEX8VectorSequence
{ {
SWIGLAL_STRUCT(COMPLEX8VectorSequence); SWIGLAL_STRUCT(COMPLEX8VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(COMPLEX8, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(COMPLEX8, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
COMPLEX8 *data; /**< Pointer to the data array. Element \a i of vector \ a j is \c data[ \a jn + \a i \c ]. */ COMPLEX8 *data; /**< Pointer to the data array. Element \a i of vector \ a j is \c data[ \a jn + \a i \c ]. */
} }
COMPLEX8VectorSequence; COMPLEX8VectorSequence;
/** Sequence of COMPLEX16 Vectors. */ /** Sequence of COMPLEX16 Vectors, see \ref ss_VectorSequence for more deta ils. */
typedef struct typedef struct
tagCOMPLEX16VectorSequence tagCOMPLEX16VectorSequence
{ {
SWIGLAL_STRUCT(COMPLEX16VectorSequence); SWIGLAL_STRUCT(COMPLEX16VectorSequence);
SWIGLAL_DYNAMIC_2DARRAY(COMPLEX16, data, UINT4, length, vectorLength); SWIGLAL_DYNAMIC_2DARRAY(COMPLEX16, data, UINT4, length, vectorLength);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 vectorLength; /**< The length \a n of each vector. */ UINT4 vectorLength; /**< The length \a n of each vector. */
COMPLEX16 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */ COMPLEX16 *data; /**< Pointer to the data array. Element \a i of vector \a j is \c data[ \a jn + \a i \c ]. */
} }
COMPLEX16VectorSequence; COMPLEX16VectorSequence;
/* <lalLaTeX> /* ---------- ArraySequence types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>ArraySequence
\end{verbatim}
This structure stores an ordered set of $l$ elements of type
\verb@<datatype>Array@, where \verb@<datatype>@ can be any primitive
datatype. The indexing of an array sequence can get quite
complicated; it helps to read first the documentation for data arrays,
above. Mathematically the data can be written as a set
$\{\mathsf{A}^{(j)}_{i_0\cdots i_{m-1}}$, where the sequence number
$j$ runs from 0 to $l-1$, and each array index $i_k$ runs over its own
range $0,\ldots,n_k-1$. The total number of data in a given array
element is then $N=n_0\times\cdots\times n_{m-1}$, and the total
number of data in the sequence is $N\times l$. In memory the array is
``flattened'' so that the elements are stored sequentially in a
contiguous block. The fields are:
\begin{description}
\item[\texttt{UINT4 length}] The number $l$ of array elements in the
sequence.
\item[\texttt{UINT4 arrayDim}] The number of data $N$ (\emph{not} the
number of indecies $m$) in each array element of the sequence.
\item[\texttt{UINT4Vector *dimLength}] Pointer to a vector of length
$m$, storing the index ranges $(n_0,\ldots,n_{m-1})$.
\item[\texttt{<datatype> *data}] Pointer to the data. The element
$\mathsf{A}^{(j)}_{i_0\cdots i_{m-1}}$ is stored as
\verb@data[@$j\times N + i_{m-1} + n_{m-2}\times(i_{m-2} +
n_{m-3}\times(\cdots(i_1 + n_0\times i_0)\cdots))$\verb@]@; that is,
the index of \verb@data[]@ runs over the internal indecies of each
array element before incrementing to the next array element.
\end{description}
</lalLaTeX> */
/** Sequency of INT2 multidimensional arrays. */ /** Sequence of INT2 multidimensional arrays, see \ref ss_ArraySequence for more details. */
typedef struct typedef struct
tagINT2ArraySequence tagINT2ArraySequence
{ {
SWIGLAL_STRUCT(INT2ArraySequence); SWIGLAL_STRUCT(INT2ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
INT2 *data; /**< Pointer to the data array. */ INT2 *data; /**< Pointer to the data array. */
} }
INT2ArraySequence; INT2ArraySequence;
/** Sequency of UINT2 multidimensional arrays. */ /** Sequence of UINT2 multidimensional arrays, see \ref ss_ArraySequence fo r more details. */
typedef struct typedef struct
tagUINT2ArraySequence tagUINT2ArraySequence
{ {
SWIGLAL_STRUCT(UINT2ArraySequence); SWIGLAL_STRUCT(UINT2ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
UINT2 *data; /**< Pointer to the data array. */ UINT2 *data; /**< Pointer to the data array. */
} }
UINT2ArraySequence; UINT2ArraySequence;
/** Sequency of INT4 multidimensional arrays. */ /** Sequence of INT4 multidimensional arrays, see \ref ss_ArraySequence for more details. */
typedef struct typedef struct
tagINT4ArraySequence tagINT4ArraySequence
{ {
SWIGLAL_STRUCT(INT4ArraySequence); SWIGLAL_STRUCT(INT4ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
INT4 *data; /**< Pointer to the data array. */ INT4 *data; /**< Pointer to the data array. */
} }
INT4ArraySequence; INT4ArraySequence;
/** Sequency of UINT4 multidimensional arrays. */ /** Sequence of UINT4 multidimensional arrays, see \ref ss_ArraySequence fo r more details. */
typedef struct typedef struct
tagUINT4ArraySequence tagUINT4ArraySequence
{ {
SWIGLAL_STRUCT(UINT4ArraySequence); SWIGLAL_STRUCT(UINT4ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
UINT4 *data; /**< Pointer to the data array. */ UINT4 *data; /**< Pointer to the data array. */
} }
UINT4ArraySequence; UINT4ArraySequence;
/** Sequency of INT8 multidimensional arrays. */ /** Sequence of INT8 multidimensional arrays, see \ref ss_ArraySequence for more details. */
typedef struct typedef struct
tagINT8ArraySequence tagINT8ArraySequence
{ {
SWIGLAL_STRUCT(INT8ArraySequence); SWIGLAL_STRUCT(INT8ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
INT8 *data; /**< Pointer to the data array. */ INT8 *data; /**< Pointer to the data array. */
} }
INT8ArraySequence; INT8ArraySequence;
/** Sequency of UINT8 multidimensional arrays. */ /** Sequence of UINT8 multidimensional arrays, see \ref ss_ArraySequence fo r more details. */
typedef struct typedef struct
tagUINT8ArraySequence tagUINT8ArraySequence
{ {
SWIGLAL_STRUCT(UINT8ArraySequence); SWIGLAL_STRUCT(UINT8ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
UINT8 *data; /**< Pointer to the data array. */ UINT8 *data; /**< Pointer to the data array. */
} }
UINT8ArraySequence; UINT8ArraySequence;
/** Sequency of REAL4 multidimensional arrays. */ /** Sequence of REAL4 multidimensional arrays, see \ref ss_ArraySequence fo r more details. */
typedef struct typedef struct
tagREAL4ArraySequence tagREAL4ArraySequence
{ {
SWIGLAL_STRUCT(REAL4ArraySequence); SWIGLAL_STRUCT(REAL4ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
REAL4 *data; /**< Pointer to the data array. */ REAL4 *data; /**< Pointer to the data array. */
} }
REAL4ArraySequence; REAL4ArraySequence;
/** Sequency of REAL8 multidimensional arrays. */ /** Sequence of REAL8 multidimensional arrays, see \ref ss_ArraySequence fo r more details. */
typedef struct typedef struct
tagREAL8ArraySequence tagREAL8ArraySequence
{ {
SWIGLAL_STRUCT(REAL8ArraySequence); SWIGLAL_STRUCT(REAL8ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
REAL8 *data; /**< Pointer to the data array. */ REAL8 *data; /**< Pointer to the data array. */
} }
REAL8ArraySequence; REAL8ArraySequence;
/** Sequency of COMPLEX8 multidimensional arrays. */ /** Sequence of COMPLEX8 multidimensional arrays, see \ref ss_ArraySequence for more details. */
typedef struct typedef struct
tagCOMPLEX8ArraySequence tagCOMPLEX8ArraySequence
{ {
SWIGLAL_STRUCT(COMPLEX8ArraySequence); SWIGLAL_STRUCT(COMPLEX8ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
COMPLEX8 *data; /**< Pointer to the data array. */ COMPLEX8 *data; /**< Pointer to the data array. */
} }
COMPLEX8ArraySequence; COMPLEX8ArraySequence;
/** Sequency of COMPLEX16 multidimensional arrays. */ /** Sequence of COMPLEX16 multidimensional arrays, see \ref ss_ArraySequenc e for more details. */
typedef struct typedef struct
tagCOMPLEX16ArraySequence tagCOMPLEX16ArraySequence
{ {
SWIGLAL_STRUCT(COMPLEX16ArraySequence); SWIGLAL_STRUCT(COMPLEX16ArraySequence);
UINT4 length; /**< The number \a l of vectors. */ UINT4 length; /**< The number \a l of vectors. */
UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */ UINT4 arrayDim; /**< The number of data \a N in each array element (this is not the number \a m of indices). */
UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */ UINT4Vector *dimLength; /**< Pointer to a vector of length \a m storing t he array dimensions */
COMPLEX16 *data; /**< Pointer to the data array. */ COMPLEX16 *data; /**< Pointer to the data array. */
} }
COMPLEX16ArraySequence; COMPLEX16ArraySequence;
/*@}*/
/* <lalLaTeX> /* ---------- Structured datatypes ---------- */
\newpage
\subsection{Structured datatypes}
\label{ss:structured-datatypes}
These datatypes embed primitive and aggregate datatypes inside
structures that define their physical meaning. Most of these
structures are wrappers for aggregate datatypes that store a physical
quantity as a function of time or frequency. Other structures store
specific physical information, such as the GPS time, or the factored
response function of a filter.
\vspace{2ex}
\begin{verbatim}
LIGOTimeGPS
\end{verbatim}
This structure stores the time, to nanosecond precision, synchronized
to the Global Positioning System time reference. The zero time for
the GPS standard is the moment of midnight beginning January~6, 1980,
UTC. The \verb@LIGOTimeGPS@ structure can represent times up to
68~years on either side of this epoch. (Note that this is better than
an equivalently-sized \verb@REAL8@ representation of time, which can
maintain nanosecond precision only for times within 104~days of its
reference point. However, the \verb@REAL8@ representation does allow
one to cover arbitrarily long timescales at correspondingly lower
precision.) The fields are:
\begin{description}
\item[\texttt{INT4 gpsSeconds}] The number of seconds since the GPS
reference time.
\item[\texttt{INT4 gpsNanoSeconds}] The number of nanoseconds since
the last GPS second.
\end{description}
The macro \verb@LIGOTIMEGPSZERO@ can be used to statically initialize a
\verb@LIGOTimeGPS@ object, for example:
\begin{quote}
\verb@LIGOTimeGPS epoch = LIGOTIMEGPSZERO;@
\end{quote}
</lalLaTeX> */
/** \name Structured datatypes.
*
* These datatypes embed primitive and aggregate datatypes inside
* structures that define their physical meaning. Most of these
* structures are wrappers for aggregate datatypes that store a physical
* quantity as a function of time or frequency. Other structures store
* specific physical information, such as the GPS time, or the factored
* response function of a filter.
*
*/
/*@{*/
/** Epoch relative to GPS epoch */ /** Epoch relative to GPS epoch, see \ref ss_LIGOTimeGPS for more details * /
typedef struct typedef struct
tagLIGOTimeGPS tagLIGOTimeGPS
{ {
SWIGLAL_STRUCT(LIGOTimeGPS); SWIGLAL_STRUCT(LIGOTimeGPS);
INT4 gpsSeconds; /**< Seconds since 0h UTC 6 Jan 1980. */ INT4 gpsSeconds; /**< Seconds since 0h UTC 6 Jan 1980. */
INT4 gpsNanoSeconds; /**< Residual nanoseconds. */ INT4 gpsNanoSeconds; /**< Residual nanoseconds. */
} }
LIGOTimeGPS; LIGOTimeGPS;
/** Zero-initializer for LIGOTimeGPS structs */
#define LIGOTIMEGPSZERO { 0, 0 } #define LIGOTIMEGPSZERO { 0, 0 }
/* <lalLaTeX>
\vspace{2ex}
\begin{verbatim}
LALUnit
\end{verbatim}
This structure stores units in the mksA system (plus Kelvin, Strain,
and ADC Count). It also stores an overall power-of-ten scaling factor.
The fields are:
\begin{description}
\item[\texttt{INT2 powerOfTen}] The power $p$ of ten scaling factor.
\item[\texttt{INT2 unitNumerator[LALNumUnits]}] Array of unit numerators,
$N_i$, $i=0\ldots\textrm{LALNumUnits}-1$.
\item[\texttt{INT2 unitDenominatorMinusOne[LALNumUnits]}] Array of unit
denominators-minus-one, $D_i$, $i=0\ldots\textrm{LALNumUnits}-1$.
\end{description}
Thus, the units are given by
\begin{equation}
10^p\times\textrm{m}^{N_0/(1+D_0)}\times\textrm{kg}^{N_1/(1+D_1)}
\times\textrm{s}^{N_2/(1+D_2)}\times\textrm{A}^{N_3/(1+D_3)}
\times\textrm{K}^{N_4/(1+D_4)}\times\textrm{strain}^{N_5/(1+D_5)}
\times\textrm{count}^{N_6/(1+D_6)}
\end{equation}
The indexes of the units can be specified using the constants
\texttt{LALUnitIndexMeter},
\texttt{LALUnitIndexKiloGram},
\texttt{LALUnitIndexSecond},
\texttt{LALUnitIndexAmpere},
\texttt{LALUnitIndexKelvin},
\texttt{LALUnitIndexStrain},
\texttt{LALUnitIndexADCCount},
while \texttt{LALNumUnits} is the total number of units.
</lalLaTeX> */
/** 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. */
}; };
/** Unit in the mksA system. /** This structure stores units in the mksA system (plus Kelvin, Strain,
* * and ADC Count). It also stores an overall power-of-ten scaling factor.
* This structure stores units in the mksA system (plus Kelvin, Strain, * Thus, the units are given by
* and ADC Count). It also stores an overall power-of-ten \a p scaling fac * \f{equation}{
tor.
* The units are represented by an array of integer numerators \a N
* and denominators-minus-one \a D representing the powers of the various
* units. The units are given by
* \f[
* 10^p\times\textrm{m}^{N_0/(1+D_0)}\times\textrm{kg}^{N_1/(1+D_1)} * 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}
* The indexes of the units can be specified using the constants
* LALUnitIndexMeter, LALUnitIndexKiloGram,
* LALUnitIndexSecond, LALUnitIndexAmpere,
* LALUnitIndexKelvin, LALUnitIndexStrain,
* LALUnitIndexADCCount, while LALNumUnits is the total number of units.
* *
*/ */
typedef struct typedef struct
tagLALUnit tagLALUnit
{ {
SWIGLAL_STRUCT(LALUnit); SWIGLAL_STRUCT(LALUnit);
INT2 powerOfTen; /**< Overall power-of-ten scaling is 10^\c powerOfTen. */ INT2 powerOfTen; /**< Overall power-of-ten scaling is 10^\c powerOfTen. */
INT2 unitNumerator[LALNumUnits]; /**< Array of unit power numerators. */ INT2 unitNumerator[LALNumUnits]; /**< Array of unit power numerators. */
UINT2 unitDenominatorMinusOne[LALNumUnits]; /**< Array of unit power deno minators-minus-one. */ UINT2 unitDenominatorMinusOne[LALNumUnits]; /**< Array of unit power deno minators-minus-one. */
} }
LALUnit; LALUnit;
/* <lalLaTeX> /* ---------- TimeSeries types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>TimeSeries
\end{verbatim}
This structure represents a sequence of data of type \verb@<datatype>@
(where \verb@<datatype>@ can be any primitive datatype), sampled over
uniform time intervals $t_0, t_0+\Delta t, \ldots , t_0+l\Delta t$.
Essentially this is a \verb@<datatype>Sequence@ with extra fields
defining the sample times and the type of data being sampled. The raw
data may also have been \emph{heterodyned}; that is, multiplied by a
sinusoid of some frequency $f_0$, low-pass filtered, and resampled, in
order to extract the behaviour in a small bandwidth about $f_0$. The
fields are:
\begin{description}
\item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time $t_0$ of the data
series.
\item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$, in
seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency $f_0$, in hertz.
\item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled.
\item[\texttt{<datatype>Sequence *data}] The sequence of sampled data.
\end{description}
</lalLaTeX> */
/** Length of name fields of LAL structured data types. */ /** Length of name fields of LAL structured data types. */
enum enumLALNameLength { LALNameLength = 64 }; enum enumLALNameLength { LALNameLength = 64 };
/** Time series of INT2 data. */ /** Time series of INT2 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagINT2TimeSeries tagINT2TimeSeries
{ {
SWIGLAL_STRUCT(INT2TimeSeries); SWIGLAL_STRUCT(INT2TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */ REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT2Sequence *data; /**< The sequence of sampled data. */ INT2Sequence *data; /**< The sequence of sampled data. */
} }
INT2TimeSeries; INT2TimeSeries;
/** Time series of UINT2 data. */ /** Time series of UINT2 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagUINT2TimeSeries tagUINT2TimeSeries
{ {
SWIGLAL_STRUCT(UINT2TimeSeries); SWIGLAL_STRUCT(UINT2TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */ REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT2Sequence *data; /**< The sequence of sampled data. */ UINT2Sequence *data; /**< The sequence of sampled data. */
} }
UINT2TimeSeries; UINT2TimeSeries;
/** Time series of INT4 data. */ /** Time series of INT4 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagINT4TimeSeries tagINT4TimeSeries
{ {
SWIGLAL_STRUCT(INT4TimeSeries); SWIGLAL_STRUCT(INT4TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */ REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT4Sequence *data; /**< The sequence of sampled data. */ INT4Sequence *data; /**< The sequence of sampled data. */
} }
INT4TimeSeries; INT4TimeSeries;
/** Time series of UINT4 data. */ /** Time series of UINT4 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagUINT4TimeSeries tagUINT4TimeSeries
{ {
SWIGLAL_STRUCT(UINT4TimeSeries); SWIGLAL_STRUCT(UINT4TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */ REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT4Sequence *data; /**< The sequence of sampled data. */ UINT4Sequence *data; /**< The sequence of sampled data. */
} }
UINT4TimeSeries; UINT4TimeSeries;
/** Time series of INT8 data. */ /** Time series of INT8 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagINT8TimeSeries tagINT8TimeSeries
{ {
SWIGLAL_STRUCT(INT8TimeSeries); SWIGLAL_STRUCT(INT8TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */ REAL8 deltaT; /**< The time step between samples of the time seri es in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT8Sequence *data; /**< The sequence of sampled data. */ INT8Sequence *data; /**< The sequence of sampled data. */
} }
INT8TimeSeries; INT8TimeSeries;
/** Time series of UINT8 data. */ /** Time series of UINT8 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagUINT8TimeSeries tagUINT8TimeSeries
{ {
SWIGLAL_STRUCT(UINT8TimeSeries); SWIGLAL_STRUCT(UINT8TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */ REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT8Sequence *data; /**< The sequence of sampled data. */ UINT8Sequence *data; /**< The sequence of sampled data. */
} }
UINT8TimeSeries; UINT8TimeSeries;
/** Time series of REAL4 data. */ /** Time series of REAL4 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagREAL4TimeSeries tagREAL4TimeSeries
{ {
SWIGLAL_STRUCT(REAL4TimeSeries); SWIGLAL_STRUCT(REAL4TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */ REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
REAL4Sequence *data; /**< The sequence of sampled data. */ REAL4Sequence *data; /**< The sequence of sampled data. */
} }
REAL4TimeSeries; REAL4TimeSeries;
/** Time series of REAL8 data. */ /** Time series of REAL8 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagREAL8TimeSeries tagREAL8TimeSeries
{ {
SWIGLAL_STRUCT(REAL8TimeSeries); SWIGLAL_STRUCT(REAL8TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */ REAL8 deltaT; /**< The time step between samples of the time ser ies in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
REAL8Sequence *data; /**< The sequence of sampled data. */ REAL8Sequence *data; /**< The sequence of sampled data. */
} }
REAL8TimeSeries; REAL8TimeSeries;
/** Time series of COMPLEX8 data. */ /** Time series of COMPLEX8 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagCOMPLEX8TimeSeries tagCOMPLEX8TimeSeries
{ {
SWIGLAL_STRUCT(COMPLEX8TimeSeries); SWIGLAL_STRUCT(COMPLEX8TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time series in seconds. */ REAL8 deltaT; /**< The time step between samples of the time series in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity be ing sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity be ing sampled. */
COMPLEX8Sequence *data; /**< The sequence of sampled data. */ COMPLEX8Sequence *data; /**< The sequence of sampled data. */
} }
COMPLEX8TimeSeries; COMPLEX8TimeSeries;
/** Time series of COMPLEX16 data. */ /** Time series of COMPLEX16 data, see \ref ss_TimeSeries for more details. */
typedef struct typedef struct
tagCOMPLEX16TimeSeries tagCOMPLEX16TimeSeries
{ {
SWIGLAL_STRUCT(COMPLEX16TimeSeries); SWIGLAL_STRUCT(COMPLEX16TimeSeries);
CHAR name[LALNameLength]; /**< The name of the time series. */ CHAR name[LALNameLength]; /**< The name of the time series. */
LIGOTimeGPS epoch; /**< The start time of the time series. */ LIGOTimeGPS epoch; /**< The start time of the time series. */
REAL8 deltaT; /**< The time step between samples of the time series in seconds. */ REAL8 deltaT; /**< The time step between samples of the time series in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity b eing sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity b eing sampled. */
COMPLEX16Sequence *data; /**< The sequence of sampled data. */ COMPLEX16Sequence *data; /**< The sequence of sampled data. */
} }
COMPLEX16TimeSeries; COMPLEX16TimeSeries;
/* <lalLaTeX> /* ---------- TimeVectorSeries types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>TimeVectorSeries
\end{verbatim}
Like \verb@<datatype>TimeSeries@, above, except that the sampled data
are of type type \verb@<datatype>Vector@ (where \verb@<datatype>@ can
be any primitive datatype). The fields are:
\begin{description}
\item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the data series.
\item[\texttt{REAL8 deltaT}] The sampling interval, in seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz.
\item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled.
\item[\texttt{<datatype>VectorSequence *data}] The sequence of sampled
data.
\end{description}
</lalLaTeX> */
/** Time series of INT2 vectors. */ /** Time series of INT2 vectors, see \ref ss_TimeVectorSeries for more deta ils. */
typedef struct typedef struct
tagINT2TimeVectorSeries tagINT2TimeVectorSeries
{ {
SWIGLAL_STRUCT(INT2TimeVectorSeries); SWIGLAL_STRUCT(INT2TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT2VectorSequence *data; /**< The sequence of sampled data vectors. */ INT2VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
INT2TimeVectorSeries; INT2TimeVectorSeries;
/** Time series of UINT2 vectors. */ /** Time series of UINT2 vectors, see \ref ss_TimeVectorSeries for more det ails. */
typedef struct typedef struct
tagUINT2TimeVectorSeries tagUINT2TimeVectorSeries
{ {
SWIGLAL_STRUCT(UINT2TimeVectorSeries); SWIGLAL_STRUCT(UINT2TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT2VectorSequence *data; /**< The sequence of sampled data vectors. */ UINT2VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
UINT2TimeVectorSeries; UINT2TimeVectorSeries;
/** Time series of INT4 vectors. */ /** Time series of INT4 vectors, see \ref ss_TimeVectorSeries for more deta ils. */
typedef struct typedef struct
tagINT4TimeVectorSeries tagINT4TimeVectorSeries
{ {
SWIGLAL_STRUCT(INT4TimeVectorSeries); SWIGLAL_STRUCT(INT4TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT4VectorSequence *data; /**< The sequence of sampled data vectors. */ INT4VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
INT4TimeVectorSeries; INT4TimeVectorSeries;
/** Time series of UINT4 vectors. */ /** Time series of UINT4 vectors, see \ref ss_TimeVectorSeries for more det ails. */
typedef struct typedef struct
tagUINT4TimeVectorSeries tagUINT4TimeVectorSeries
{ {
SWIGLAL_STRUCT(UINT4TimeVectorSeries); SWIGLAL_STRUCT(UINT4TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT4VectorSequence *data; /**< The sequence of sampled data vectors. */ UINT4VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
UINT4TimeVectorSeries; UINT4TimeVectorSeries;
/** Time series of INT8 vectors. */ /** Time series of INT8 vectors, see \ref ss_TimeVectorSeries for more deta ils. */
typedef struct typedef struct
tagINT8TimeVectorSeries tagINT8TimeVectorSeries
{ {
SWIGLAL_STRUCT(INT8TimeVectorSeries); SWIGLAL_STRUCT(INT8TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
INT8VectorSequence *data; /**< The sequence of sampled data vectors. */ INT8VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
INT8TimeVectorSeries; INT8TimeVectorSeries;
/** Time series of UINT8 vectors. */ /** Time series of UINT8 vectors, see \ref ss_TimeVectorSeries for more det ails. */
typedef struct typedef struct
tagUINT8TimeVectorSeries tagUINT8TimeVectorSeries
{ {
SWIGLAL_STRUCT(UINT8TimeVectorSeries); SWIGLAL_STRUCT(UINT8TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
UINT8VectorSequence *data; /**< The sequence of sampled data vectors. */ UINT8VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
UINT8TimeVectorSeries; UINT8TimeVectorSeries;
/** Time series of REAL4 vectors. */ /** Time series of REAL4 vectors, see \ref ss_TimeVectorSeries for more det ails. */
typedef struct typedef struct
tagREAL4TimeVectorSeries tagREAL4TimeVectorSeries
{ {
SWIGLAL_STRUCT(REAL4TimeVectorSeries); SWIGLAL_STRUCT(REAL4TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
REAL4VectorSequence *data; /**< The sequence of sampled data vectors. */ REAL4VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
REAL4TimeVectorSeries; REAL4TimeVectorSeries;
/** Time series of REAL8 vectors. */ /** Time series of REAL8 vectors, see \ref ss_TimeVectorSeries for more det ails. */
typedef struct typedef struct
tagREAL8TimeVectorSeries tagREAL8TimeVectorSeries
{ {
SWIGLAL_STRUCT(REAL8TimeVectorSeries); SWIGLAL_STRUCT(REAL8TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */ CHAR name[LALNameLength]; /**< The name of the time serie s of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vec tors. */
REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of the ti me series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quantity being sampled. */
REAL8VectorSequence *data; /**< The sequence of sampled data vectors. */ REAL8VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
REAL8TimeVectorSeries; REAL8TimeVectorSeries;
/** Time series of COMPLEX8 vectors. */ /** Time series of COMPLEX8 vectors, see \ref ss_TimeVectorSeries for more details. */
typedef struct typedef struct
tagCOMPLEX8TimeVectorSeries tagCOMPLEX8TimeVectorSeries
{ {
SWIGLAL_STRUCT(COMPLEX8TimeVectorSeries); SWIGLAL_STRUCT(COMPLEX8TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time s eries of vectors. */ CHAR name[LALNameLength]; /**< The name of the time s eries of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series of vectors. */ LIGOTimeGPS epoch; /**< The start time of the time series of vectors. */
REAL8 deltaT; /**< The time step between samples of th e time series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of th e time series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz (z ero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz (z ero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the quan tity being sampled. */ LALUnit sampleUnits; /**< The physical units of the quan tity being sampled. */
COMPLEX8VectorSequence *data; /**< The sequence of sampled data vectors. */ COMPLEX8VectorSequence *data; /**< The sequence of sampled data vectors. */
} }
COMPLEX8TimeVectorSeries; COMPLEX8TimeVectorSeries;
/** Time series of COMPLEX16 vectors. */ /** Time series of COMPLEX16 vectors, see \ref ss_TimeVectorSeries for more details. */
typedef struct typedef struct
tagCOMPLEX16TimeVectorSeries tagCOMPLEX16TimeVectorSeries
{ {
SWIGLAL_STRUCT(COMPLEX16TimeVectorSeries); SWIGLAL_STRUCT(COMPLEX16TimeVectorSeries);
CHAR name[LALNameLength]; /**< The name of the time series of vectors. */ CHAR name[LALNameLength]; /**< The name of the time series of vectors. */
LIGOTimeGPS epoch; /**< The start time of the time series o f vectors. */ LIGOTimeGPS epoch; /**< The start time of the time series o f vectors. */
REAL8 deltaT; /**< The time step between samples of t he time series of vectors in seconds. */ REAL8 deltaT; /**< The time step between samples of t he time series of vectors in seconds. */
REAL8 f0; /**< The heterodyning frequency, in Hertz ( zero if not heterodyned). */ REAL8 f0; /**< The heterodyning frequency, in Hertz ( zero if not heterodyned). */
LALUnit sampleUnits; /**< The physical units of the qua ntity being sampled. */ LALUnit sampleUnits; /**< The physical units of the qua ntity being sampled. */
COMPLEX16VectorSequence *data; /**< The sequence of sampled data vectors . */ COMPLEX16VectorSequence *data; /**< The sequence of sampled data vectors . */
} }
COMPLEX16TimeVectorSeries; COMPLEX16TimeVectorSeries;
/* <lalLaTeX> /* ---------- TimeArraySeries ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>TimeArraySeries
\end{verbatim}
Like \verb@<datatype>TimeSeries@, above, except that the sampled data
are of type type \verb@<datatype>Array@ (where \verb@<datatype>@ can
be any primitive datatype). The fields are:
\begin{description}
\item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the data series.
\item[\texttt{REAL8 deltaT}] The sampling interval, in seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz.
\item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled.
\item[\texttt{<datatype>ArraySequence *data}] The sequence of sampled
data.
\end{description}
</lalLaTeX> */
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagINT2TimeArraySeries tagINT2TimeArraySeries
{ {
SWIGLAL_STRUCT(INT2TimeArraySeries); SWIGLAL_STRUCT(INT2TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
INT2ArraySequence *data; INT2ArraySequence *data;
} }
INT2TimeArraySeries; INT2TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagUINT2TimeArraySeries tagUINT2TimeArraySeries
{ {
SWIGLAL_STRUCT(UINT2TimeArraySeries); SWIGLAL_STRUCT(UINT2TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT2ArraySequence *data; UINT2ArraySequence *data;
} }
UINT2TimeArraySeries; UINT2TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagINT4TimeArraySeries tagINT4TimeArraySeries
{ {
SWIGLAL_STRUCT(INT4TimeArraySeries); SWIGLAL_STRUCT(INT4TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
INT4ArraySequence *data; INT4ArraySequence *data;
} }
INT4TimeArraySeries; INT4TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagUINT4TimeArraySeries tagUINT4TimeArraySeries
{ {
SWIGLAL_STRUCT(UINT4TimeArraySeries); SWIGLAL_STRUCT(UINT4TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT4ArraySequence *data; UINT4ArraySequence *data;
} }
UINT4TimeArraySeries; UINT4TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagINT8TimeArraySeries tagINT8TimeArraySeries
{ {
SWIGLAL_STRUCT(INT8TimeArraySeries); SWIGLAL_STRUCT(INT8TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
INT8ArraySequence *data; INT8ArraySequence *data;
} }
INT8TimeArraySeries; INT8TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagUINT8TimeArraySeries tagUINT8TimeArraySeries
{ {
SWIGLAL_STRUCT(UINT8TimeArraySeries); SWIGLAL_STRUCT(UINT8TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT8ArraySequence *data; UINT8ArraySequence *data;
} }
UINT8TimeArraySeries; UINT8TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagREAL4TimeArraySeries tagREAL4TimeArraySeries
{ {
SWIGLAL_STRUCT(REAL4TimeArraySeries); SWIGLAL_STRUCT(REAL4TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
REAL4ArraySequence *data; REAL4ArraySequence *data;
} }
REAL4TimeArraySeries; REAL4TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagREAL8TimeArraySeries tagREAL8TimeArraySeries
{ {
SWIGLAL_STRUCT(REAL8TimeArraySeries); SWIGLAL_STRUCT(REAL8TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
REAL8ArraySequence *data; REAL8ArraySequence *data;
} }
REAL8TimeArraySeries; REAL8TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagCOMPLEX8TimeArraySeries tagCOMPLEX8TimeArraySeries
{ {
SWIGLAL_STRUCT(COMPLEX8TimeArraySeries); SWIGLAL_STRUCT(COMPLEX8TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
COMPLEX8ArraySequence *data; COMPLEX8ArraySequence *data;
} }
COMPLEX8TimeArraySeries; COMPLEX8TimeArraySeries;
/** See \ref ss_TimeArraySeries for documentation */
typedef struct typedef struct
tagCOMPLEX16TimeArraySeries tagCOMPLEX16TimeArraySeries
{ {
SWIGLAL_STRUCT(COMPLEX16TimeArraySeries); SWIGLAL_STRUCT(COMPLEX16TimeArraySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
LALUnit sampleUnits; LALUnit sampleUnits;
COMPLEX16ArraySequence *data; COMPLEX16ArraySequence *data;
} }
COMPLEX16TimeArraySeries; COMPLEX16TimeArraySeries;
/* <lalLaTeX> /* ---------- FrequencySeries types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>FrequencySeries
\end{verbatim}
This structure represents a frequency spectrum of data of type
\verb@<datatype>@ (where \verb@<datatype>@ can be any primitive
datatype), sampled over uniform frequency intervals $f_0, f_0+\Delta
f, \ldots , f_0+l\Delta f$. Essentially this is a
\verb@<datatype>Sequence@ with extra fields defining the sample
frequencies, the timestamp of the spectrum, and the type of data being
sampled. The fields are:
\begin{description}
\item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the \emph{time}
series from which the spectrum was calculated.
\item[\texttt{REAL8 f0}] The lowest frequency $f_0$ being sampled, in
hertz.
\item[\texttt{REAL8 deltaF}] The frequency sampling interval $\Delta
f$, in hertz.
\item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled.
\item[\texttt{<datatype>Sequence *data}] The sequence of sampled data.
\end{description}
</lalLaTeX> */
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagINT2FrequencySeries tagINT2FrequencySeries
{ {
SWIGLAL_STRUCT(INT2FrequencySeries); SWIGLAL_STRUCT(INT2FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
INT2Sequence *data; INT2Sequence *data;
} }
INT2FrequencySeries; INT2FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagUINT2FrequencySeries tagUINT2FrequencySeries
{ {
SWIGLAL_STRUCT(UINT2FrequencySeries); SWIGLAL_STRUCT(UINT2FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT2Sequence *data; UINT2Sequence *data;
} }
UINT2FrequencySeries; UINT2FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagINT4FrequencySeries tagINT4FrequencySeries
{ {
SWIGLAL_STRUCT(INT4FrequencySeries); SWIGLAL_STRUCT(INT4FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
INT4Sequence *data; INT4Sequence *data;
} }
INT4FrequencySeries; INT4FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagUINT4FrequencySeries tagUINT4FrequencySeries
{ {
SWIGLAL_STRUCT(UINT4FrequencySeries); SWIGLAL_STRUCT(UINT4FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT4Sequence *data; UINT4Sequence *data;
} }
UINT4FrequencySeries; UINT4FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagINT8FrequencySeries tagINT8FrequencySeries
{ {
SWIGLAL_STRUCT(INT8FrequencySeries); SWIGLAL_STRUCT(INT8FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
INT8Sequence *data; INT8Sequence *data;
} }
INT8FrequencySeries; INT8FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagUINT8FrequencySeries tagUINT8FrequencySeries
{ {
SWIGLAL_STRUCT(UINT8FrequencySeries); SWIGLAL_STRUCT(UINT8FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
UINT8Sequence *data; UINT8Sequence *data;
} }
UINT8FrequencySeries; UINT8FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagREAL4FrequencySeries tagREAL4FrequencySeries
{ {
SWIGLAL_STRUCT(REAL4FrequencySeries); SWIGLAL_STRUCT(REAL4FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
REAL4Sequence *data; REAL4Sequence *data;
} }
REAL4FrequencySeries; REAL4FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagREAL8FrequencySeries tagREAL8FrequencySeries
{ {
SWIGLAL_STRUCT(REAL8FrequencySeries); SWIGLAL_STRUCT(REAL8FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
REAL8Sequence *data; REAL8Sequence *data;
} }
REAL8FrequencySeries; REAL8FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagCOMPLEX8FrequencySeries tagCOMPLEX8FrequencySeries
{ {
SWIGLAL_STRUCT(COMPLEX8FrequencySeries); SWIGLAL_STRUCT(COMPLEX8FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
COMPLEX8Sequence *data; COMPLEX8Sequence *data;
} }
COMPLEX8FrequencySeries; COMPLEX8FrequencySeries;
/** See \ref ss_FrequencySeries for documentation */
typedef struct typedef struct
tagCOMPLEX16FrequencySeries tagCOMPLEX16FrequencySeries
{ {
SWIGLAL_STRUCT(COMPLEX16FrequencySeries); SWIGLAL_STRUCT(COMPLEX16FrequencySeries);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
LALUnit sampleUnits; LALUnit sampleUnits;
COMPLEX16Sequence *data; COMPLEX16Sequence *data;
} }
COMPLEX16FrequencySeries; COMPLEX16FrequencySeries;
/* <lalLaTeX> /* ---------- ZPGFilter types ---------- */
\vspace{2ex}
\begin{verbatim}
<datatype>ZPGFilter
\end{verbatim}
This structure stores the complex frequency response of a filter or
transfer function in a factored form, where \verb@<datatype>@ can be
either \verb@COMPLEX8@ or \verb@COMPLEX16@. One defines a
(dimensionless) complex frequency variable $\zeta(f\Delta t)$, where
$\Delta t$ is the time sampling interval of the data to which the
filter will be applied (in the case of a digital filter), or some
other reference timescale (in the case of an analog filter). The
complex response function can then be given (or approximated) as
$H(f)=g\times\prod_k(\zeta-z_k)/\prod_l(\zeta-p_l)$, where $z_k$ are
the complex \emph{zeros}, $p_l$ are the complex \emph{poles}, and $g$
is the complex \emph{gain} of the response function. Some common
complex frequency representations are the $z$-plane representation
$\zeta(f\Delta t)=\exp(2\pi if\Delta t)$, which maps the Nyquist
interval $f\in[0,1/2\Delta t)$ onto the upper-half unit circle in
$\zeta$, and the $w$-plane representation $\zeta(f\Delta t)=\tan(\pi
f\Delta t)$, which maps the Nyquist interval onto the positive real
axis in $\zeta$. The fields of \verb@<datatype>ZPGFilter@ are:
\begin{description}
\item[\texttt{CHAR name[LALNameLength]}] The name of the filter or transfer
function. This should also mention its complex frequency
representation.
\item[\texttt{REAL8 deltaT}] The sampling time or reference timescale
$\Delta t$ for the filter, in seconds. If zero, it will be treated as
being equal to the sampling interval of the data being filtered.
\item[\texttt{<datatype>Vector *zeros}] Pointer to a vector storing
the zeros $z_k$ of the filter.
\item[\texttt{<datatype>Vector *poles}] Pointer to a vector storing
the poles $p_k$ of the filter.
\item[\texttt{<datatype> gain}] The gain $g$ of the filter.
\end{description}
</lalLaTeX> */
/** See \ref ss_ZPGFilter for details */
typedef struct typedef struct
tagCOMPLEX8ZPGFilter tagCOMPLEX8ZPGFilter
{ {
SWIGLAL_STRUCT(COMPLEX8ZPGFilter); SWIGLAL_STRUCT(COMPLEX8ZPGFilter);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
REAL8 deltaT; REAL8 deltaT;
COMPLEX8Vector *zeros; COMPLEX8Vector *zeros;
COMPLEX8Vector *poles; COMPLEX8Vector *poles;
COMPLEX8 gain; COMPLEX8 gain;
} }
COMPLEX8ZPGFilter; COMPLEX8ZPGFilter;
/** See \ref ss_ZPGFilter for details */
typedef struct typedef struct
tagCOMPLEX16ZPGFilter tagCOMPLEX16ZPGFilter
{ {
SWIGLAL_STRUCT(COMPLEX16ZPGFilter); SWIGLAL_STRUCT(COMPLEX16ZPGFilter);
CHAR name[LALNameLength]; CHAR name[LALNameLength];
REAL8 deltaT; REAL8 deltaT;
COMPLEX16Vector *zeros; COMPLEX16Vector *zeros;
COMPLEX16Vector *poles; COMPLEX16Vector *poles;
COMPLEX16 gain; COMPLEX16 gain;
} }
COMPLEX16ZPGFilter; COMPLEX16ZPGFilter;
/*@}*/
/* <lalLaTeX>
\newpage
\subsection{The LAL universal status structure \texttt{LALStatus}}
\label{ss:status-structure}
This structure is the means by which LAL functions report their /*@}*/ // end of LALDatatypes documentation group
success or failure; it provides a useful mechanism for tracking
progress and errors through nested function calls. The error
reporting structure is a linked list of \verb@LALStatus@ structures, with
each node corresponding to a given function in the current calling
sequence. When a function terminates successfully, its node is
dropped from the list. If a function encounters an error, it must
still return control to the calling routine, reporting the error
through its \verb@LALStatus@. The calling routine must either deal with
the error (pruning the linked list if it succeeds), or else return an
error itself. A fatal error will thus return a linked list of
\verb@LALStatus@ structures to the top-level routine, where the tail of
the list identifies the source of the error, and the intermediate
nodes identify the sequence of nested function calls that led to the
error. The fields of the \verb@LALStatus@ are as follows:
\begin{description}
\item[\texttt{INT4 statusCode}] A numerical code identifying the type
of error, or 0 for nominal status.
\item[\texttt{const CHAR *statusDescription}] A description of the
current status or error.
\item[\texttt{volatile const CHAR *Id}] The RCS ID string of the
source file of the current function.
\item[\texttt{const CHAR *function}] The name of the current function.
\item[\texttt{const CHAR *file}] The name of the source file of the
current function.
\item[\texttt{INT4 line}] The line number in the source file where the
current \verb@statusCode@ was set.
\item[\texttt{LALStatus *statusPtr}] Pointer to the next node in the
list; \verb@NULL@ if this function is not reporting a subroutine
error.
\item[\texttt{INT4 level}] The current level in the nested calling
sequence.
\end{description}
</lalLaTeX> */
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
/** \ingroup LALStatusMacros_h
* \brief LAL status structure, see \ref ss_LALStatus for more details.
*/
typedef struct typedef struct
tagLALStatus tagLALStatus
{ {
INT4 statusCode; INT4 statusCode; /**< A numerical code identi
const CHAR *statusDescription; fying the type of error, or 0 for nominal status; Negative values are reser
volatile const CHAR *Id; ved for certain standard error types */
const CHAR *function; const CHAR *statusDescription; /**< An explanatory string c
const CHAR *file; orresponding to the numerical status code */
INT4 line; volatile const CHAR *Id; /**< A character string iden
struct tagLALStatus *statusPtr; tifying the source file and version number of the function being reported o
INT4 level; n */
const CHAR *function; /**< The name of the functio
n */
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 */
struct tagLALStatus *statusPtr; /**< Pointer to the next nod
e in the list; \c NULL if this function is not reporting a subroutine error
*/
INT4 level; /**< The nested-function lev
el where any error was reported */
} }
LALStatus; LALStatus;
#endif /* SWIG */ #endif /* SWIG */
/* <lalLaTeX>
\vfill{\footnotesize\input{LALDatatypesHV}}
</lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALDATATYPES_H */ #endif /* _LALDATATYPES_H */
 End of changes. 120 change blocks. 
744 lines changed or deleted 163 lines changed or added


 LALDetectors.h   LALDetectors.h 
skipping to change at line 34 skipping to change at line 34
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALDETECTORSH, "$Id$" );
/** /**
\author J. T. Whelan and J. D. E. Creighton \author J. T. Whelan and J. D. E. Creighton
\addtogroup LALDetectors_h \addtogroup LALDetectors_h
\brief This header defines structures to hold the basic data describing \brief This header defines structures to hold the basic data describing
a gravitational wave detector. a gravitational wave detector.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/LALDetectors.h> #include <lal/LALDetectors.h>
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 LALErrno.h   LALErrno.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
*/ */
/* <lalVerbatim file="LALErrnoHV"> /** \author: Cannon, K. C.
Author: Cannon, K. C.
Revision: $Id$
</lalVerbatim>
*/ */
#ifndef _LALERRNO_H #ifndef _LALERRNO_H
#define _LALERRNO_H #define _LALERRNO_H
#include <lal/LALRCSID.h>
NRCSID (LALERRNOH,"$Id$");
/* /*
* Error codes and corresponding error messages. * Error codes and corresponding error messages.
*/ */
#define LAL_FAIL_ERR 1 #define LAL_FAIL_ERR 1
#define LAL_FAIL_MSG "operation failed" #define LAL_FAIL_MSG "operation failed"
#define LAL_NULL_ERR 2 #define LAL_NULL_ERR 2
#define LAL_NULL_MSG "unexpected NULL pointer" #define LAL_NULL_MSG "unexpected NULL pointer"
#define LAL_NNULL_ERR 3 #define LAL_NNULL_ERR 3
#define LAL_NNULL_MSG "unexpected non-NULL pointer" #define LAL_NNULL_MSG "unexpected non-NULL pointer"
 End of changes. 2 change blocks. 
7 lines changed or deleted 1 lines changed or added


 LALError.h   LALError.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
*/ */
/************************************ <lalVerbatim file="LALErrorHV"> // ---------- SEE LALError.dox for doxygen documentation ----------
$Id$
************************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALError.h}}
\label{s:LALError.h}
Provides routines to report and handle errors.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALError.h>
\end{verbatim}
\noindent This header covers routines that print status messages, and
that allow functions to abort.
\vfill{\footnotesize\input{LALErrorHV}}
\newpage\input{LALErrorC}
</lalLaTeX> */
#ifndef _LALERROR_H #ifndef _LALERROR_H
#define _LALERROR_H #define _LALERROR_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/XLALError.h> #include <lal/XLALError.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALERRORH, "$Id$" );
/* lalDebugLevel bit field values: */ /* lalDebugLevel bit field values: */
enum enum
{ {
LALNDEBUG = 0, LALNDEBUG = 0,
LALERROR = 1, LALERROR = 1,
LALWARNING = 2, LALWARNING = 2,
LALINFO = 4, LALINFO = 4,
LALTRACE = 8, LALTRACE = 8,
LALMEMINFO = 16, LALMEMINFO = 16,
LALNMEMDBG = 32, LALNMEMDBG = 32,
skipping to change at line 84 skipping to change at line 60
enum { LALMSGLVL2 = LALERROR | LALWARNING }; enum { LALMSGLVL2 = LALERROR | LALWARNING };
enum { LALMSGLVL3 = LALERROR | LALWARNING | LALINFO }; enum { LALMSGLVL3 = LALERROR | LALWARNING | LALINFO };
enum { LALMEMTRACE = LALTRACE | LALMEMINFO }; enum { LALMEMTRACE = LALTRACE | LALMEMINFO };
enum { LALALLDBG = ~( LALNMEMDBG | LALNMEMPAD | LALNMEMTRK ) }; enum { LALALLDBG = ~( LALNMEMDBG | LALNMEMPAD | LALNMEMTRK ) };
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
extern int ( *lalRaiseHook )( int, const char *, ... ); extern int ( *lalRaiseHook )( int, const char *, ... );
extern void ( *lalAbortHook )( const char *, ... ); extern void ( *lalAbortHook )( const char *, ... );
#endif /* SWIG */ #endif /* SWIG */
/** \addtogroup LALError_h */ /*@{*/
int int
LALPrintError( const char *fmt, ... ); LALPrintError( const char *fmt, ... );
int int
LALRaise( int sig, const char *fmt, ... ); LALRaise( int sig, const char *fmt, ... );
void void
LALAbort( const char *fmt, ... ); LALAbort( const char *fmt, ... );
int int
skipping to change at line 105 skipping to change at line 82
int int
LALWarning( LALStatus *status, const char *warning ); LALWarning( LALStatus *status, const char *warning );
int int
LALInfo( LALStatus *status, const char *info ); LALInfo( LALStatus *status, const char *info );
int int
LALTrace( LALStatus *status, int exitflg ); LALTrace( LALStatus *status, int exitflg );
/*@}*/
int int
LALInitStatus( LALStatus *status, const char *function, const char *id, LALInitStatus( LALStatus *status, const char *function, const char *id,
const char *file, const int line ); const char *file, const int line );
int int
LALPrepareReturn( LALStatus *status, const char *file, const int line ); LALPrepareReturn( LALStatus *status, const char *file, const int line );
int int
LALAttatchStatusPtr( LALStatus *status, const char *file, const int line ); LALAttatchStatusPtr( LALStatus *status, const char *file, const int line );
skipping to change at line 131 skipping to change at line 110
int int
LALPrepareAssertFail( LALStatus *status, const INT4 code, const char *mesg, LALPrepareAssertFail( LALStatus *status, const INT4 code, const char *mesg,
const char *statement, const char *file, const char *statement, const char *file,
const int line ); const int line );
int int
LALCheckStatusPtr( LALStatus *status, const char *statement, const char *fi le, LALCheckStatusPtr( LALStatus *status, const char *statement, const char *fi le,
const int line ); const int line );
#ifdef NOLALMACROS
void void
FREESTATUSPTR( LALStatus *status ); FREESTATUSPTR( LALStatus *status );
void void
REPORTSTATUS( LALStatus *status ); REPORTSTATUS( LALStatus *status );
#endif
#ifdef NDEBUG #ifdef NDEBUG
#define LALError( statusptr, statement ) 0 #define LALError( statusptr, statement ) 0
#define LALWarning( statusptr, warning ) 0 #define LALWarning( statusptr, warning ) 0
#define LALInfo( statusptr, info ) 0 #define LALInfo( statusptr, info ) 0
#define LALTrace( statusptr, exitflg ) 0 #define LALTrace( statusptr, exitflg ) 0
#else #else
#ifndef NOLALMACROS #ifndef NOLALMACROS
 End of changes. 6 change blocks. 
25 lines changed or deleted 8 lines changed or added


 LALGSL.h   LALGSL.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
*/ */
/****************************** <lalVerbatim file="LALGSLHV"> /**
Author: Creighton, J. D. E. \addtogroup LALGSL_h
$Id$ \author Creighton, J. D. E.
******************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALGSL.h}}
\label{s:LALGSL.h}
Provides macros for integrating the GSL error handler with \brief Provides macros for integrating the GSL error handler with the LA
the LAL status structure. L status structure.
\subsection*{Synopsis} \heading{Synopsis}
\begin{verbatim} \code
#include <lal/LALGSL.h> #include <lal/LALGSL.h>
\end{verbatim} \endcode
\noindent This header provides macros and functions for tracking and This header provides macros and functions for tracking and
reporting the runtime status of a GSL calls. The intent is reporting the runtime status of a GSL calls. The intent is
simultaneously to standardize the error reporting, and to make the simultaneously to standardize the error reporting, and to make the
reporting as transparent as possible to people coding individual reporting as transparent as possible to people coding individual
routines. routines.
\emph{Please always use these macros when making a GSL call <em>Please always use these macros when making a GSL call
within LAL. This will ensure that the LAL functions always have the within LAL. This will ensure that the LAL functions always have the
same behaviour and will also ensure that the LAL functions are reenterant same behaviour and will also ensure that the LAL functions are reenterant
and threadsafe (when LAL is configured appropriately).} and threadsafe (when LAL is configured appropriately).</em>
\subsubsection{GSL function calls} \heading{GSL function calls}
The behaviour of GSL functions depends on the error handler that has been The behaviour of GSL functions depends on the error handler that has been
assigned. In order that LAL functions always have the same behaviour, it assigned. In order that LAL functions always have the same behaviour, it
is necessary to use a LAL-specific GSL error handler. This error handler is necessary to use a LAL-specific GSL error handler. This error handler
populates a LAL status structure with the GSL error message and code so tha t populates a LAL status structure with the GSL error message and code so tha t
GSL functions behave much the same way as LAL functions. After the GSL GSL functions behave much the same way as LAL functions. After the GSL
functions are called, the error handler needs to be restored to the origina l functions are called, the error handler needs to be restored to the origina l
handler so that the program calling the LAL routine has the same error hand ler handler so that the program calling the LAL routine has the same error hand ler
after the LAL function was called as it did before the LAL function was cal led. after the LAL function was called as it did before the LAL function was cal led.
This module provides a simple set of macros and the default LAL GSL error This module provides a simple set of macros and the default LAL GSL error
handler. The macros provide a standard way to assign the LAL GSL error handler. The macros provide a standard way to assign the LAL GSL error
handler before a GSL function call and to restore the original handler afte r handler before a GSL function call and to restore the original handler afte r
the call. the call.
Note that changing the GSL error handler is \emph{not} a thread-safe Note that changing the GSL error handler is \e not a thread-safe
action. Therefore it is necessary to block other threads from performing action. Therefore it is necessary to block other threads from performing
GSL function calls while one thread has changed the handler. These macros GSL function calls while one thread has changed the handler. These macros
ensure that such blocking is done for GSL function calls ensure that such blocking is done for GSL function calls
\emph{within other LAL routines} if LAL is configured with the <em>within other LAL routines</em> if LAL is configured with the
\verb+--enable-pthread-lock+ flag. See below for instructions on how <tt>--enable-pthread-lock</tt> flag. See below for instructions on how
to make other GSL function calls outside LAL thread-safe when used with LAL . to make other GSL function calls outside LAL thread-safe when used with LAL .
\begin{verbatim} \code
ATTATCHSTATUSPTR( status ); ATTATCHSTATUSPTR( status );
CALLGSL( gsl_function( x ), status ); CALLGSL( gsl_function( x ), status );
CHECKSTATUSPTR( status ); CHECKSTATUSPTR( status );
DETATCHSTATUSPTR( status ); DETATCHSTATUSPTR( status );
\end{verbatim} \endcode
Note that the LAL function must attach (and detach) a status pointer as if Note that the LAL function must attach (and detach) a status pointer as if
a LAL routine were called. a LAL routine were called.
Note also that you need to use the \verb+CHECKSTATUSPTR+ macro to check Note also that you need to use the \c CHECKSTATUSPTR macro to check
the status of the call. The equivalent to the \verb+TRY+ macro for GSL the status of the call. The equivalent to the \c TRY macro for GSL
functions is the \verb+TRYGSL+ macro, which is used as follows: functions is the \c TRYGSL macro, which is used as follows:
\begin{verbatim} \code
ATTATCHSTATUSPTR( status ); ATTATCHSTATUSPTR( status );
TRYGSL( gsl_function( x ), status ); TRYGSL( gsl_function( x ), status );
DETATCHSTATUSPTR( status ); DETATCHSTATUSPTR( status );
\end{verbatim} \endcode
If you are using GSL functions both in LAL and in the calling program, and If you are using GSL functions both in LAL and in the calling program, and
you are worried about thread-safety, the GSL function calls outside of LAL you are worried about thread-safety, the GSL function calls outside of LAL
need to be blocked so that they do not access the GSL error handler while need to be blocked so that they do not access the GSL error handler while
it has been changed to the LAL GSL error handler in a LAL function. To do it has been changed to the LAL GSL error handler in a LAL function. To do
this, you need to do the following: this, you need to do the following:
\begin{verbatim} \code
#include<lal/LALGSL.h> #include<lal/LALGSL.h>
... ...
LALGSL_PTHREAD_MUTEX_LOCK; LALGSL_PTHREAD_MUTEX_LOCK;
gsl_function( x ); gsl_function( x );
LALGSL_PTHREAD_MUTEX_UNLOCK; LALGSL_PTHREAD_MUTEX_UNLOCK;
\end{verbatim} \endcode
This ensures that \verb+gsl_function+ is not called while a LAL routine This ensures that \c gsl_function is not called while a LAL routine
is calling a GSL function in a different thread. You can do this even if is calling a GSL function in a different thread. You can do this even if
you don't always run your code with multiple threads. If you configure LAL you don't always run your code with multiple threads. If you configure LAL
without the \verb+--enable-pthread-lock+ flag, the macros without the <tt>--enable-pthread-lock</tt> flag, the macros
\verb+LALGSL_PTHREAD_MUTEX_LOCK+ and \verb+LALGSL_PTHREAD_MUTEX_UNLOCK+ \c LALGSL_PTHREAD_MUTEX_LOCK and \c LALGSL_PTHREAD_MUTEX_UNLOCK
do nothing. do nothing.
\vfill{\footnotesize\input{LALGSLHV}} */
\newpage\input{LALGSLC}
\newpage\input{LALGSLTestC}
</lalLaTeX> */
#ifndef _LALGSL_H #ifndef _LALGSL_H
#define _LALGSL_H #define _LALGSL_H
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef NDEBUG #ifdef NDEBUG
#ifndef LAL_NDEBUG #ifndef LAL_NDEBUG
#define LAL_NDEBUG #define LAL_NDEBUG
#endif #endif
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <lal/LALMalloc.h> #include <lal/LALMalloc.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALError.h> #include <lal/LALError.h>
#include <lal/LALRCSID.h>
#include <lal/XLALGSL.h> #include <lal/XLALGSL.h>
#include <gsl/gsl_errno.h> #include <gsl/gsl_errno.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALGSLH, "$Id$" );
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
extern LALStatus * lalGSLGlobalStatusPtr; extern LALStatus * lalGSLGlobalStatusPtr;
#endif /* SWIG */ #endif /* SWIG */
void void
LALGSLErrorHandler( LALGSLErrorHandler(
const char *reason, const char *reason,
const char *file, const char *file,
int line, int line,
int errnum int errnum
); );
 End of changes. 19 change blocks. 
41 lines changed or deleted 29 lines changed or added


 LALInitBarycenter.h   LALInitBarycenter.h 
skipping to change at line 36 skipping to change at line 36
#include <lal/LALBarycenter.h> #include <lal/LALBarycenter.h>
/** \cond DONT_DOXYGEN */ /** \cond DONT_DOXYGEN */
/* exported API Function prototypes. */ /* exported API Function prototypes. */
EphemerisData * XLALInitBarycenter ( const CHAR *earthEphemerisFile, const CHAR *sunEphemerisFile ); EphemerisData * XLALInitBarycenter ( const CHAR *earthEphemerisFile, const CHAR *sunEphemerisFile );
void XLALDestroyEphemerisData ( EphemerisData *edat ); void XLALDestroyEphemerisData ( EphemerisData *edat );
/* ==================== deprecated LAL interface ========================= =========================*/ /* ==================== deprecated LAL interface ========================= =========================*/
NRCSID (LALINITBARYCENTERH,"$Id$");
#define LALINITBARYCENTERH_EOPEN 1 #define LALINITBARYCENTERH_EOPEN 1
#define LALINITBARYCENTERH_EMEM 2 #define LALINITBARYCENTERH_EMEM 2
#define LALINITBARYCENTERH_EEPHFILE 32 #define LALINITBARYCENTERH_EEPHFILE 32
#define LALINITBARYCENTERH_MSGEOPEN "Could not open ephemeris file" #define LALINITBARYCENTERH_MSGEOPEN "Could not open ephemeris file"
#define LALINITBARYCENTERH_MSGEMEM "Out of memory" #define LALINITBARYCENTERH_MSGEMEM "Out of memory"
#define LALINITBARYCENTERH_MSGEEPHFILE "Error in reading an ephemeris file" #define LALINITBARYCENTERH_MSGEEPHFILE "Error in reading an ephemeris file"
void LALInitBarycenter(LALStatus *, EphemerisData *); void LALInitBarycenter(LALStatus *, EphemerisData *);
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 LALMalloc.h   LALMalloc.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
*/ */
/************************************ <lalVerbatim file="LALMallocHV">
$Id$
************************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALMalloc.h}}
\label{s:LALMalloc.h}
Provides standard LAL memory allocation/deallocation routines.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALMalloc.h>
\end{verbatim}
\noindent This header covers routines that replace the standard
\verb+malloc()+, \verb+calloc()+, \verb+realloc()+, and \verb+free()+.
All memory allocation and deallocation in LAL should use these
replacement functions. If the \verb+NDEBUG+ flag is set at compile
time, the LAL routines are \verb+#define+d to be the same as the
standard C routines.
\vfill{\footnotesize\input{LALMallocHV}}
\newpage\input{LALMallocC}
\newpage\input{LALMallocTestC}
</lalLaTeX> */
#ifndef _LALMALLOC_H #ifndef _LALMALLOC_H
#define _LALMALLOC_H #define _LALMALLOC_H
#include <stddef.h> #include <stddef.h>
#include <lal/LALRCSID.h>
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALMALLOCH, "$Id$" ); /** \addtogroup LALMalloc_h */ /*@{*/
void *XLALMalloc( size_t n ); void *XLALMalloc( size_t n );
void *XLALMallocLong( size_t n, const char *file, int line ); void *XLALMallocLong( size_t n, const char *file, int line );
void *XLALCalloc( size_t m, size_t n ); void *XLALCalloc( size_t m, size_t n );
void *XLALCallocLong( size_t m, size_t n, const char *file, int line ); void *XLALCallocLong( size_t m, size_t n, const char *file, int line );
void *XLALRealloc( void *p, size_t n ); void *XLALRealloc( void *p, size_t n );
void *XLALReallocLong( void *p, size_t n, const char *file, int line ); void *XLALReallocLong( void *p, size_t n, const char *file, int line );
void XLALFree( void *p ); void XLALFree( void *p );
#define XLALMalloc( n ) XLALMallocLong( n, __FILE__, __LINE__ ) #define XLALMalloc( n ) XLALMallocLong( n, __FILE__, __LINE__ )
#define XLALCalloc( m, n ) XLALCallocLong( m, n, __FILE__, __LINE__ ) #define XLALCalloc( m, n ) XLALCallocLong( m, n, __FILE__, __LINE__ )
#define XLALRealloc( p, n ) XLALReallocLong( p, n, __FILE__, __LINE__ ) #define XLALRealloc( p, n ) XLALReallocLong( p, n, __FILE__, __LINE__ )
/*@}*/
#if defined NDEBUG || defined LAL_NDEBUG #if defined NDEBUG || defined LAL_NDEBUG
#define LALMalloc malloc #define LALMalloc malloc
#define LALMallocShort malloc #define LALMallocShort malloc
#define LALMallocLong( n, file, line ) malloc( n ) #define LALMallocLong( n, file, line ) malloc( n )
#define LALCalloc calloc #define LALCalloc calloc
#define LALCallocShort calloc #define LALCallocShort calloc
#define LALCallocLong( m, n, file, line ) calloc( m, n ) #define LALCallocLong( m, n, file, line ) calloc( m, n )
#define LALRealloc realloc #define LALRealloc realloc
skipping to change at line 106 skipping to change at line 76
extern char *lalMemDbgArgPtr; /* set to ptr arg in free or realloc */ extern char *lalMemDbgArgPtr; /* set to ptr arg in free or realloc */
extern char *lalMemDbgRetPtr; /* set to ptr returned in alloc functions */ extern char *lalMemDbgRetPtr; /* set to ptr returned in alloc functions */
extern char *lalMemDbgPtr; /* set in both cases */ extern char *lalMemDbgPtr; /* set in both cases */
extern char *lalMemDbgUsrPtr; /* avaliable global memory pointer for use r */ extern char *lalMemDbgUsrPtr; /* avaliable global memory pointer for use r */
extern void **lalMemDbgUsrHndl; /* avaliable global memory handle for user */ extern void **lalMemDbgUsrHndl; /* avaliable global memory handle for user */
extern int lalIsMemDbgArgPtr; /* ( lalMemDbgUsrPtr == lalMemDbgArgPtr ) */ extern int lalIsMemDbgArgPtr; /* ( lalMemDbgUsrPtr == lalMemDbgArgPtr ) */
extern int lalIsMemDbgRetPtr; /* ( lalMemDbgUsrPtr == lalMemDbgRetPtr ) */ extern int lalIsMemDbgRetPtr; /* ( lalMemDbgUsrPtr == lalMemDbgRetPtr ) */
extern int lalIsMemDbgPtr; /* ( lalMemDbgUsrPtr == lalMemDbgPtr ) */ extern int lalIsMemDbgPtr; /* ( lalMemDbgUsrPtr == lalMemDbgPtr ) */
#endif /* SWIG */ #endif /* SWIG */
void * // ----- Prototypes
LALMallocShort( size_t n ); /** \addtogroup LALMalloc_h */ /*@{*/
void *LALMallocShort( size_t n );
void * void *LALMallocLong( size_t n, const char *file, int line );
LALMallocLong( size_t n, const char *file, int line ); void *LALCallocShort( size_t m, size_t n );
void LALFree( void *p );
void void *LALCallocLong( size_t m, size_t n, const char *file, int line );
LALFree( void *p ); void *LALReallocShort( void *p, size_t n );
void *LALReallocLong( void *p, size_t n, const char *file, int line );
void * void LALCheckMemoryLeaks( void );
LALCallocShort( size_t m, size_t n ); /*@}*/
void *
LALCallocLong( size_t m, size_t n, const char *file, int line );
void *
LALReallocShort( void *p, size_t n );
void *
LALReallocLong( void *p, size_t n, const char *file, int line );
void
LALCheckMemoryLeaks( void );
#endif /* NDEBUG || LAL_NDEBUG */ #endif /* NDEBUG || LAL_NDEBUG */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALMALLOC_H */ #endif /* _LALMALLOC_H */
 End of changes. 5 change blocks. 
55 lines changed or deleted 13 lines changed or added


 LALMathematica.h   LALMathematica.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
*/ */
/* <lalVerbatim file="LALMathematicaHV"> #ifndef _LALMATHEMATICA_H
* Author: Hanna, C. R. #define _LALMATHEMATICA_H
* $Id$
* </lalVerbatim> */
/* <lalLaTeX> /* remove SWIG interface directives */
* \section{Header \texttt{LALMathematica.h}} #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
* \label{s:LALMathematica.h} #define SWIGLAL_STRUCT(...)
* \providecommand{\MATHEMATICA}{$M\scriptstyle{ATHEMATICA}^{\textrm{{\smal #endif
l\textregistered} }}$}
* Provides structures, functions and macro definitions for modules that #include <math.h>
* generate \MATHEMATICA notebooks. Currently, the only modules using this #include <stdio.h>
* header file are \texttt{LALMath3DPlot()}, which generates 3D animated #include <stdlib.h>
#include <lal/LALStdlib.h>
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
/**
* \addtogroup LALMathematica_h
* \author Hanna, C. R.
*
* \brief Provides structures, functions and macro definitions for modules
that
* generate MATHEMATICA notebooks.
*
* Currently, the only modules using this
* header file are <tt>LALMath3DPlot()</tt>, which generates 3D animated
* plots of template banks having three parameters and * plots of template banks having three parameters and
* \texttt{LALMathNDPlot()} which plots the 3-dimensional projections of a * <tt>LALMathNDPlot()</tt> which plots the 3-dimensional projections of a
* bank that is N-dimensional. * bank that is N-dimensional.
* *
* \subsection*{Synopsis} * \heading{Synopsis}
* \begin{verbatim} * \code
* #include <lal/LALMathematica.h> * #include <lal/LALMathematica.h>
* \end{verbatim} * \endcode
* *
* This header file defines macros containing \MATHEMATICA syntax that is * This header file defines macros containing MATHEMATICA syntax that is
* otherwise messy to implement into C source files. Here is how to use * otherwise messy to implement into C source files. Here is how to use
* these macros to make your own program generate a \MATHEMATICA notebook. * these macros to make your own program generate a MATHEMATICA notebook.
* *
* \begin{enumerate} * <ol>
* \item Open a file with a pointer named ``nb" and a file extenstion ``.nb * <li> Open a file with a pointer named &quot;nb&quot; and a file extensti
". on &quot;.nb&quot;.
* \item Use BEG\_NOTEBOOK to start the notebook file. * </li><li> Use BEG_NOTEBOOK to start the notebook file.
* \item Use the appropriate BEG and END macros with fprint(nb, ``Your * </li><li> Use the appropriate BEG and END macros with fprint(nb, &quot;Y
* Text") in between to write your text to the cells of the notebook. If our
* you are writing \MATHEMATICA commands use the INPUT macros; for plain * Text&quot) in between to write your text to the cells of the notebook.
If
* you are writing MATHEMATICA commands use the INPUT macros; for plain
* text, use TEXT Macros. * text, use TEXT Macros.
* \item Denote titles and sections with the appropriate macros. * </li><li> Denote titles and sections with the appropriate macros.
* \item Use END\_NOTEBOOK to end the notebook and use fclose(nb) to close * </li><li> Use END_NOTEBOOK to end the notebook and use fclose(nb) to clo
* the file ``nb". se
* \end{enumerate} * the file &quot;nb&quot;.
* </li></ol>
* *
* The result is very readable/changeable source similar in style to most * The result is very readable/changeable source similar in style to most
* markup languages. An example program might look like: * markup languages. An example program might look like:
* \begin{verbatim} * \code
* FILE *nb; * FILE *nb;
* nb = fopen("YourFileName.nb", "rw"); * nb = fopen("YourFileName.nb", "rw");
* BEG_NOTEBOOK; * BEG_NOTEBOOK;
* BEG_TITLECELL; * BEG_TITLECELL;
* fprintf(nb, "Sample Program Title"); * fprintf(nb, "Sample Program Title");
* END_TITLECELL_; * END_TITLECELL_;
* BEG_SECTIONCELL; * BEG_SECTIONCELL;
* fprintf(nb, "Sample Program Section Name"); * fprintf(nb, "Sample Program Section Name");
* END_SECTIONCELL; * END_SECTIONCELL;
* END_NOTEBOOK; * END_NOTEBOOK;
* fclose(nb); * fclose(nb);
* \end{verbatim} * \endcode
* *
* \vfill{\footnotesize\input{LALMathematicaHV}}
* *
* \newpage * \heading{Notes}
* \subsection*{Error codes} * <ul>
* \input{LALMathematicaHE} * <li> Obviously the definitions and functions associated with this header
* are NOT LAL compliant and thus do not belong in any lal routines except
* test programs.</li>
* <li> There are many more commands to manipulate the structure of
* MATHEMATICA notebooks that are not included in this header. The macros
* are only what is necessary for a <em>bare minimum</em> interface.</li>
* </ul>
* *
* \subsection*{Macros} */
* \input{LALMathematicaHM} /*@{*/
* \noindent
* See the source file \texttt{Math3DPlot.c} for an example of how to use /**\name Error Codes */ /*@{*/
* these macros to generate a \MATHEMATICA notebook in your own program. #define LALMATHEMATICAH_ENULL 1 /**< NULL pointer to a LALMathemati
ca.h input structure */
#define LALMATHEMATICAH_EFILE 2 /**< Could not open file to write a
Mathematica Notebook */
#define LALMATHEMATICAH_EVAL 3 /**< Invalid parameter value */
/*@}*/
/** \cond DONT_DOXYGEN */
#define LALMATHEMATICAH_MSGENULL "NULL pointer to a LALMathematica.h
input structure"
#define LALMATHEMATICAH_MSGEFILE "Could not open file to write a Mat
hematica Notebook"
#define LALMATHEMATICAH_MSGEVAL "Invalid parameter value"
/** \endcond */
/** \name Macros
* *
* \begin{description} * See the source file \ref LALMath3DPlot.c for an example of how to use
* \item{NOTEBOOK} Denotes the beginning and ending of the notebook file. * these macros to generate a MATHEMATICA notebook in your own program.
A
* BEG\_NOTEBOOK tag must start the file and an END\_NOTEBOOK tag must end
* it.
* \item{TITLE} Placing an fprint(nb, ``Your Title") between BEG and END
* tags will place a \emph{title font} cell in the notebook.
* \item{GROUP} Cells placed in between these tags will be grouped together
* \item{SECTION} Same as title except the text printed will be in
* \emph{section font}. Subsequent input and text cells following the
* END\_SECTIONCELL tag will be grouped with that section until a new
* BEG\_SECTIONCELL tag is encountered.
* \item{INPUT} provides cells to input \MATHEMATICA commands.
* \item{TEXT} provides cells to input plain text.
* \end{description}
* *
* Notice that the file pointer must be named ``nb" in order to use the * <dl>
* <dt>NOTEBOOK</dt><dd>Denotes the beginning and ending of the notebook fi
le. A
* BEG_NOTEBOOK tag must start the file and an END_NOTEBOOK tag must end
* it.</dd>
* <dt>TITLE</dt><dd>Placing an fprint(nb, &quot;Your Title&quot;) between
BEG and END
* tags will place a <em>title font</em> cell in the notebook.</dd>
* <dt>GROUP</dt><dd>Cells placed in between these tags will be grouped tog
ether</dd>
* <dt>SECTION</dt><dd>Same as title except the text printed will be in
* <em>section font</em>. Subsequent input and text cells following the
* END_SECTIONCELL tag will be grouped with that section until a new
* BEG_SECTIONCELL tag is encountered.</dd>
* <dt>INPUT</dt><dd>provides cells to input MATHEMATICA commands.</dd>
* <dt>TEXT</dt><dd>provides cells to input plain text.</dd>
* </dl>
*
* Notice that the file pointer must be named &quot;nb&quot; in order to us
e the
* macros defined in this header. When grouping several cell objects * macros defined in this header. When grouping several cell objects
* together the last object in the list should have an underscored END tag * together the last object in the list should have an underscored END tag
* instead of an END tag without an underscore. Although the notebook will * instead of an END tag without an underscore. Although the notebook will
* compile (usually) if you use the tags without an ending underscore, the * compile (usually) if you use the tags without an ending underscore, the
* dangling comma is taken as a null member of the list of grouped cells. * dangling comma is taken as a null member of the list of grouped cells.
* Therefore, when you view the notebook in \MATHEMATICA you may see the * Therefore, when you view the notebook in MATHEMATICA you may see the
* word ``NULL" printed on a line. That is an indication that you should * word &quot;NULL&quot; printed on a line. That is an indication that you
* use the underscore version of the tag which preceeded the ``NULL" should
* use the underscore version of the tag which preceeded the &quot;NULL&quo
t;
* statement. * statement.
* */
* \vfill{\footnotesize\input{LALMathematicaHV}} /*@{*/
*
* \newpage
* \subsection*{Types}
* \input{LALMathematicaHT}
* \idx[Type]{Math3DPointList}
* \idx[Type]{MathNDPointList}
* \noindent
* The Math3DPointList type is used by \texttt{Math3DPlot.c} as an input
* structure to plot 3-dimensional template banks. It is a linked list wit
h
* parameters for each coordinate x,y,z and a next pointer. It also has a
* parameter called grayLevel which must be $\epsilon [0,1]$. It specifies
* the shading of the point in the final plot with 0 representing black and
* 1 representing white. By creatively assigning its value the grayscale
* shade of the points may convey additional information.
* \\\\
* \noindent The MathNDPointList type is similar except the coordinates are
* stored as data in the REAL4Vector \texttt{coordinates}.
*
* \subsection*{Notes}
* \noindent\begin{itemize}
* \item Obviously the definitions and functions associated with this heade
r
* are NOT lal compliant and thus do not belong in any lal routines except
* test programs.
* \item There are many more commands to manipulate the structure of
* \MATHEMATICA notebooks that are not included in this header. The macros
* are only what is necessary for a \emph{bare minimum} interface.
* \end{itemize}
*
* \vfill{\footnotesize\input{LALMathematicaHV}}
*
* \newpage\input{LALMath3DPlotC}
* \newpage\input{LALMathNDPlotC}
* \newpage\input{LALMath3DPlotTestC}
* \newpage\input{LALMathNDPlotTestC}
* </lalLaTeX> */
#ifndef _LALMATHEMATICA_H
#define _LALMATHEMATICA_H
/* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...)
#endif
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <lal/LALStdlib.h>
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
/* <lalErrTable file="LALMathematicaHE"> */
#define LALMATHEMATICAH_ENULL 1
#define LALMATHEMATICAH_MSGENULL "NULL pointer to a LALMathematica.h input
structure"
#define LALMATHEMATICAH_EFILE 2
#define LALMATHEMATICAH_MSGEFILE "Could not open file to write a Mathematic
a Notebook"
#define LALMATHEMATICAH_EVAL 3
#define LALMATHEMATICAH_MSGEVAL "Invalid parameter value"
/* </lalErrTable> */
/* <lalVerbatim file="LALMathematicaHM"> */
#define BEG_NOTEBOOK fprintf(nb, "Notebook[{\n") #define BEG_NOTEBOOK fprintf(nb, "Notebook[{\n")
#define END_NOTEBOOK fprintf(nb, "}]\n") #define END_NOTEBOOK fprintf(nb, "}]\n")
#define BEG_TITLECELL fprintf(nb, "Cell[\"") #define BEG_TITLECELL fprintf(nb, "Cell[\"")
#define END_TITLECELL fprintf(nb, "\", \"Title\"],\n") #define END_TITLECELL fprintf(nb, "\", \"Title\"],\n")
#define END_TITLECELL_ fprintf(nb, "\", \"Title\"]\n") #define END_TITLECELL_ fprintf(nb, "\", \"Title\"]\n")
#define BEG_GROUPCELL fprintf(nb, "Cell[CellGroupData[{\n" ) #define BEG_GROUPCELL fprintf(nb, "Cell[CellGroupData[{\n" )
#define END_GROUPCELLC fprintf(nb, "}, Closed ]],\n") #define END_GROUPCELLC fprintf(nb, "}, Closed ]],\n")
#define END_GROUPCELLC_ fprintf(nb, "}, Closed ]]\n") #define END_GROUPCELLC_ fprintf(nb, "}, Closed ]]\n")
#define BEG_SECTIONCELL fprintf(nb, "Cell[\"") #define BEG_SECTIONCELL fprintf(nb, "Cell[\"")
#define END_SECTIONCELL fprintf(nb, "\", \"Section\"],\n") #define END_SECTIONCELL fprintf(nb, "\", \"Section\"],\n")
#define END_SECTIONCELL_ fprintf(nb, "\", \"Section\"]\n") #define END_SECTIONCELL_ fprintf(nb, "\", \"Section\"]\n")
#define BEG_INPUTCELL fprintf(nb, "Cell[BoxData[\\(") #define BEG_INPUTCELL fprintf(nb, "Cell[BoxData[\\(")
#define END_INPUTCELL fprintf(nb, "\\)], \"Input\"],\n") #define END_INPUTCELL fprintf(nb, "\\)], \"Input\"],\n")
#define END_INPUTCELL_ fprintf(nb, "\\)], \"Input\"]\n") #define END_INPUTCELL_ fprintf(nb, "\\)], \"Input\"]\n")
#define BEG_TEXTCELL fprintf(nb, "Cell[\"\\<") #define BEG_TEXTCELL fprintf(nb, "Cell[\"\\<")
#define END_TEXTCELL fprintf(nb, "\\>\", \"Text\"],\n") #define END_TEXTCELL fprintf(nb, "\\>\", \"Text\"],\n")
#define END_TEXTCELL_ fprintf(nb, "\\>\", \"Text\"]\n") #define END_TEXTCELL_ fprintf(nb, "\\>\", \"Text\"]\n")
/* </lalVerbatim> */ /*@}*/
NRCSID (LALMATHEMATICAH, "$Id$");
/* <lalVerbatim file="LALMathematicaHT"> */ /** This type is used by \ref LALMath3DPlot.c as an input structure to plot
3-dimensional template banks.
* It is a linked list with
* parameters for each coordinate x,y,z and a next pointer. It also has a
* parameter called grayLevel which must be \f$\epsilon [0,1]\f$. It speci
fies
* the shading of the point in the final plot with 0 representing black and
* 1 representing white. By creatively assigning its value the grayscale
* shade of the points may convey additional information.
*/
typedef struct tagMath3DPointList{ typedef struct tagMath3DPointList{
SWIGLAL_STRUCT(Math3DPointList); SWIGLAL_STRUCT(Math3DPointList);
struct tagMath3DPointList *next; struct tagMath3DPointList *next;
REAL4 x; REAL4 x;
REAL4 y; REAL4 y;
REAL4 z; REAL4 z;
REAL4 grayLevel; REAL4 grayLevel;
}Math3DPointList; }Math3DPointList;
/** This type is similar to Math3DPointList except the coordinates are
* stored as data in the REAL4Vector \c coordinates.
*/
typedef struct tagMathNDPointList{ typedef struct tagMathNDPointList{
SWIGLAL_STRUCT(MathNDPointList); SWIGLAL_STRUCT(MathNDPointList);
struct tagMathNDPointList *next; struct tagMathNDPointList *next;
REAL4Vector *coordinates; REAL4Vector *coordinates;
INT4 dimension; INT4 dimension;
REAL4 grayLevel; REAL4 grayLevel;
} MathNDPointList; } MathNDPointList;
/* </lalVerbatim> */
/*@}*/
void void
LALMath3DPlot( LALStatus *status, LALMath3DPlot( LALStatus *status,
Math3DPointList *first, Math3DPointList *first,
INT4 *ntiles, INT4 *ntiles,
REAL4 *pointSize); REAL4 *pointSize);
void void
LALMathNDPlot( LALStatus *status, LALMathNDPlot( LALStatus *status,
MathNDPointList *first, MathNDPointList *first,
 End of changes. 22 change blocks. 
135 lines changed or deleted 124 lines changed or added


 LALMoment.h   LALMoment.h 
skipping to change at line 32 skipping to change at line 32
#define _LALMOMENT_H #define _LALMOMENT_H
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALMOMENTH, "$Id$");
/** /**
\author Tibbits, M. M. \author Tibbits, M. M.
\addtogroup LALMoment_h \addtogroup LALMoment_h
\brief This header provides the prototype for the LALDMoment() and LALSMome nt() function. \brief This header provides the prototype for the LALDMoment() and LALSMome nt() function.
\code \code
(S - single precision ) (S - single precision )
(D - double precision ) (D - double precision )
\endcode \endcode
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 LALNoiseModels.h   LALNoiseModels.h 
skipping to change at line 39 skipping to change at line 39
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/LALConstants.h> #include <lal/LALConstants.h>
#include <lal/RealFFT.h> #include <lal/RealFFT.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALNOISEMODELSH, "$Id$" );
/** /**
\addtogroup LALNoiseModels_h \addtogroup LALNoiseModels_h
\author Sathyaprakash, B.S. \author Sathyaprakash, B.S.
\brief Header file for model noise generation codes. \brief Header file for model noise generation codes.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/LALNoiseModels.h> #include <lal/LALNoiseModels.h>
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 LALRunningMedian.h   LALRunningMedian.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
*/ */
/************************************ <lalVerbatim file="LALRunningMedianHV
">
Author: B. Machenschalk
$Id$
************************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALRunningMedian.h}}
\label{s:LALRunningMedian.h}
Provides routines to efficiently calculate the running median
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALRunningMedian.h>
\end{verbatim}
\noindent This header covers routines to efficiently calculate the
running median of REAL4 and REAL8 sequences
</lalLaTeX> */
#ifndef _LALRUNNINGMEDIAN_H #ifndef _LALRUNNINGMEDIAN_H
#define _LALRUNNINGMEDIAN_H #define _LALRUNNINGMEDIAN_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALRUNNINGMEDIANH, "$Id$"); /**
\author Somya D. Mohanty, B. Machenschalk
\addtogroup LALRunningMedian_h
/* <lalLaTeX> \brief Provides routines to efficiently calculate the running median
\subsection*{Error conditions} \heading{Synopsis}
\input{LALRunningMedianHErrTab} \code
#include <lal/LALRunningMedian.h>
\endcode
</lalLaTeX> */ This header covers routines to efficiently calculate the
running median of REAL4 and REAL8 sequences
The routine <tt>LALDRunningMedian()</tt> calculates the running medians of
a
REAL8Sequence. The routine <tt>LALSRunningMedian()</tt> does the same for a
REAL4Sequence.
\c input ist a REAL4/REAL8Sequence containing the input array, \c blocksize
is the length of the block the medians are calculated of.
With n being the lenght of the input array and b being the blocksize,
the medians array must be a REAL4/REAL8 sequence of length (n-b+1).
<tt>LALDRunningMedian2()</tt> and <tt>LALSRunningMedian2()</tt> are a
different implentation of the same algorithm. It should behave exactly like
<tt>LALDRunningMedian()</tt>, but has proven to be a
little faster and more stable. Check if it works for you.
\heading{Algorithm}
For a detailed description of the algorithm see the
LIGO document T-030168-00-D, Somya D. Mohanty:
Efficient Algorithm for computing a Running Median
/*
<lalErrTable file="LALRunningMedianHErrTab">
*/ */
/*@{*/
#define LALRUNNINGMEDIANH_EMALOC1 1 /** \name Error Codes */
#define LALRUNNINGMEDIANH_EMALOC2 2 /*@{*/
#define LALRUNNINGMEDIANH_EMALOC3 3 #define LALRUNNINGMEDIANH_EMALOC1 1 /**< Could not allocate inde
#define LALRUNNINGMEDIANH_EMALOC4 4 xblock */
#define LALRUNNINGMEDIANH_EMALOC5 5 #define LALRUNNINGMEDIANH_EMALOC2 2 /**< Could not allocate chec
#define LALRUNNINGMEDIANH_EMALOC6 6 ks */
#define LALRUNNINGMEDIANH_ECV 7 #define LALRUNNINGMEDIANH_EMALOC3 3 /**< Could not allocate chec
#define LALRUNNINGMEDIANH_ENULL 8 ks4shift */
#define LALRUNNINGMEDIANH_EZERO 9 #define LALRUNNINGMEDIANH_EMALOC4 4 /**< Could not allocate node
#define LALRUNNINGMEDIANH_ELARGE 10 addresses */
#define LALRUNNINGMEDIANH_EIMED 11 #define LALRUNNINGMEDIANH_EMALOC5 5 /**< Could not aloocate firs
t node */
#define LALRUNNINGMEDIANH_EMALOC6 6 /**< Could not allocate node
*/
#define LALRUNNINGMEDIANH_ECV 7 /**< Could not creat
e output vector (LALCreateVector() failed) */
#define LALRUNNINGMEDIANH_ENULL 8 /**< Invalid input: NULL poi
nter. */
#define LALRUNNINGMEDIANH_EZERO 9 /**< Invalid input: block le
ngth must be \>2 */
#define LALRUNNINGMEDIANH_ELARGE 10 /**< Invalid input: block le
ngth larger than imput length */
#define LALRUNNINGMEDIANH_EIMED 11 /**< Invalid input: wrong si
ze of median array */
/*@}*/
/** \cond DONT_DOXYGEN */
#define LALRUNNINGMEDIANH_MSGEMALOC1 "Could not allocate indexblock" #define LALRUNNINGMEDIANH_MSGEMALOC1 "Could not allocate indexblock"
#define LALRUNNINGMEDIANH_MSGEMALOC2 "Could not allocate checks" #define LALRUNNINGMEDIANH_MSGEMALOC2 "Could not allocate checks"
#define LALRUNNINGMEDIANH_MSGEMALOC3 "Could not allocate checks4shift" #define LALRUNNINGMEDIANH_MSGEMALOC3 "Could not allocate checks4shift"
#define LALRUNNINGMEDIANH_MSGEMALOC4 "Could not allocate nodeaddresses" #define LALRUNNINGMEDIANH_MSGEMALOC4 "Could not allocate nodeaddresses"
#define LALRUNNINGMEDIANH_MSGEMALOC5 "Could not aloocate first node" #define LALRUNNINGMEDIANH_MSGEMALOC5 "Could not aloocate first node"
#define LALRUNNINGMEDIANH_MSGEMALOC6 "Could not allocate node" #define LALRUNNINGMEDIANH_MSGEMALOC6 "Could not allocate node"
#define LALRUNNINGMEDIANH_MSGECV "Could not create output vector (LALCr eateVector failed)" #define LALRUNNINGMEDIANH_MSGECV "Could not create output vector (LALCr eateVector failed)"
#define LALRUNNINGMEDIANH_MSGENULL "Invalid input: NULL pointer." #define LALRUNNINGMEDIANH_MSGENULL "Invalid input: NULL pointer."
#define LALRUNNINGMEDIANH_MSGEZERO "Invalid input: block length must be > 2" #define LALRUNNINGMEDIANH_MSGEZERO "Invalid input: block length must be > 2"
#define LALRUNNINGMEDIANH_MSGELARGE "Invalid input: block length larger th an imput length" #define LALRUNNINGMEDIANH_MSGELARGE "Invalid input: block length larger th an imput length"
#define LALRUNNINGMEDIANH_MSGEIMED "Invalid input: wrong size of median a rray" #define LALRUNNINGMEDIANH_MSGEIMED "Invalid input: wrong size of median a rray"
/** \endcond */
/*
</lalErrTable>
*/
/* Structures. */ /* Structures. */
/* <lalLaTeX> /** This is the parameter structure for the LALRunningMedian functions.
\subsection*{Structures}
This is the parameter structure for the LALRunningMedian functions.
Currently the only parameter supported is the blocksize, the number Currently the only parameter supported is the blocksize, the number
of elements a single median is calculated from. The current of elements a single median is calculated from. The current
implementation requires the blocksize to be $< 2$. implementation requires the blocksize to be \< 2.
\begin{verbatim} */
typedef struct tagLALRunningMedianPar
{
UINT4 blocksize;
}
LALRunningMedianPar;
\end{verbatim}
</lalLaTeX> */
typedef struct tagLALRunningMedianPar typedef struct tagLALRunningMedianPar
{ {
SWIGLAL_STRUCT(LALRunningMedianPar); SWIGLAL_STRUCT(LALRunningMedianPar);
UINT4 blocksize; UINT4 blocksize; /**< the number of elements a single median is calcu lated from */
} }
LALRunningMedianPar; LALRunningMedianPar;
/* Function prototypes. */ /* Function prototypes. */
/** \see See LALRunningMedian_h for documentation */
void void
LALDRunningMedian( LALStatus *status, LALDRunningMedian( LALStatus *status,
REAL8Sequence *medians, REAL8Sequence *medians,
const REAL8Sequence *input, const REAL8Sequence *input,
LALRunningMedianPar param); LALRunningMedianPar param);
/** \see See LALRunningMedian_h for documentation */
void void
LALSRunningMedian( LALStatus *status, LALSRunningMedian( LALStatus *status,
REAL4Sequence *medians, REAL4Sequence *medians,
const REAL4Sequence *input, const REAL4Sequence *input,
LALRunningMedianPar param); LALRunningMedianPar param);
/** \see See LALRunningMedian_h for documentation */
void void
LALDRunningMedian2( LALStatus *status, LALDRunningMedian2( LALStatus *status,
REAL8Sequence *medians, REAL8Sequence *medians,
const REAL8Sequence *input, const REAL8Sequence *input,
LALRunningMedianPar param); LALRunningMedianPar param);
/** \see See LALRunningMedian_h for documentation */
void void
LALSRunningMedian2( LALStatus *status, LALSRunningMedian2( LALStatus *status,
REAL4Sequence *medians, REAL4Sequence *medians,
const REAL4Sequence *input, const REAL4Sequence *input,
LALRunningMedianPar param); LALRunningMedianPar param);
/* <lalLaTeX> /*@}*/
\newpage\input{LALRunningMedianC}
</lalLaTeX> */
/* Test program. */
/* <lalLaTeX>
\newpage\input{LALRunningMedianTestC}
</lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALRUNNINGMEDIAN_H */ #endif /* _LALRUNNINGMEDIAN_H */
 End of changes. 18 change blocks. 
67 lines changed or deleted 65 lines changed or added


 LALStatusMacros.h   LALStatusMacros.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
*/ */
/****************************** <lalVerbatim file="LALStatusMacrosHV"> // ---------- SEE LALStatusMacros.dox for doxygen documentation ----------
Author: Creighton, J. D. E. and Creighton, T. D.
$Id$
******************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALStatusMacros.h}}
\label{s:LALStatusMacros.h}
Provides macros for handling the LAL status structure.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALStatusMacros.h>
\end{verbatim}
\noindent This header provides macros and functions for tracking and
reporting the runtime status of a program. The intent is
simultaneously to standardize the error reporting, and to make the
reporting as transparent as possible to people coding individual
routines.
\subsection{Status-reporting objects}
\label{ss:status-reporting-objects}
LAL routines make use of two objects in reporting their current
status: the status structure \verb@LALStatus@, and the global integer
\verb@lalDebugLevel@. These two objects are described in the following
sections.
\subsubsection{The \texttt{LALStatus} structure}
\idx[Type]{LALStatus}
LAL routines store their current execution status in a linked list of
structures of type \verb@LALStatus@, with each node in the list
representing a subroutine in the current calling sequence. The
\verb@LALStatus@ structure is described in Sec.~\ref{ss:status-structure}
of the header \verb@LALDatatypes.h@, but for completeness, we explain
its fields below:
\begin{description}
\item[\texttt{INT4 statusCode}] A code indicating the exit status of a
function. 0 represents a normal exit. Negative values are reserved
for certain standard error types. The authors of individual functions
should assign positive values to the various ways in which their code
can fail.
\item[\texttt{const CHAR *statusDescription}] An explanatory string
corresponding to the numerical status code.
\item[\texttt{volatile const CHAR *Id}] A character string identifying
the source file and version number of the function being reported on.
\item[\texttt{const CHAR *function}] The name of the function.
\item[\texttt{const CHAR *file}] The file name of the \verb@.c@ file
containing the function code.
\item[\texttt{INT4 line}] The line number in the \verb@.c@ file of the
instruction where any error was reported.
\item[\texttt{LALStatus *statusPtr}] A recursive pointer to another
status pointer. This structure is used to report an error in a
subroutine of the current function. Thus if an error occurs in a
deeply-nested routine, the status structure returned to the main
program will be the head of a linked list of status structures, one
for each nested level, with the tail structure reporting the actual
error that caused the overlying routines to fail.
\item[\texttt{INT4 level}] The nested-function level where any error
was reported.
\end{description}
In almost all circumstances the programmer will \emph{not} have to
access this structure directly, relying instead on the macros defined
in this header. The exception is the \verb@statusCode@ field, which
the programmer may want to query directly.
The \verb@statusCode@ field is set to a nonzero value any time an
error condition arises that would lead to abnormal termination of the
current function. Programmers can assign positive error codes to the
various types of error that may be encountered in their routines.
Additionally, the following following status codes are reserved to
report certain standard conditions:
\begin{center}
\begin{tabular}{|cp{3.5cm}p{6.5cm}|}
\hline
Code & Message & Explanation \\
\hline
\tt 0 & & Nominal execution; the function returned
successfully. \\
\tt -1 & \vspace{-1.4ex}\tt Recursive error & The function aborted due
to failure of a subroutine. \\
\tt -2 & \vspace{-1.4ex}\tt INITSTATUS: non-null status pointer & The
status structure passed to the function had a non-\verb@NULL@
\verb@statusPtr@ field, which blocks the function from calling
subroutines (it is symptomatic of something screwy going on in the
calling routine). \\
\tt -4 & \vspace{-1.4ex}\tt ATTATCHSTATUSPTR: memory allocation error
& The function was unable to allocate a \verb@statusPtr@ field to pass
down to a subroutine. \\
\tt -8 & \vspace{-1.4ex}\tt DETATCHSTATUSPTR: null status pointer &
The \verb@statusPtr@ field could not be deallocated at the end of all
subroutine calls; one of the subroutines must have lost it or set it
to \verb@NULL@. \\
\tt -16 & \vspace{-1.4ex}\tt INITSTATUS: non-zero xlalErrno &
The \verb@xlalError@ variable is non-zero, which suggests that an
error in an XLAL routine has occured and has not been handled. \\
\tt -16 & \vspace{-1.4ex}\tt RETURN: untrapped XLAL error code &
The \verb@xlalError@ variable is non-zero, which indicates that an
error in an XLAL routine has occured and has not been handled. \\
\hline
\end{tabular}
\end{center}
\subsubsection{The \texttt{lalDebugLevel}}
\idx[Variable]{lalDebugLevel}
The \verb@lalDebugLevel@ is a global variable, set at runtime, that
determines how much and what kind of debugging information will be
reported. It is declared as an \verb@extern int@ in the header
\verb@LALStatusMacros.h@, and is therefore accessible in any standard
LAL module that includes this header. Note, however, that it is
declared to be of the C type \verb@int@, which is usually but not
always a 32-bit integer (on some systems it may only be 16 bits).
The value of \verb@lalDebugLevel@ should be thought of not as a number,
but as a \emph{bit mask}, wherein each bit in the binary
representation turns on or off a specific type of status reporting.
At present, there are five types of status reporting, each associated
with a bit in \verb@lalDebugLevel@.
\paragraph{Error messages} tell the operator that a computation has
terminated abnormally, and has failed to produce an acceptable result.
Normally this is associated with assigning a non-zero
\verb@statusCode@; an error message is printed automatically whenever
a function exits with non-zero \verb@statusCode@.
\paragraph{Warning messages} tell the user that a computation is
working, but with unusual behaviour that might indicate an unreliable
or meaningless result. Warnings do not normally result in a non-zero
\verb@statusCode@.
\paragraph{Information messages} tell the operator that the
computation is proceeding as expected, and simply provide additional
information about its progress.
\paragraph{Tracing messages} are printed automatically a subroutine
is called or returned; they simply track the current sequence of
function calls.
\paragraph{Memory information messages} are a special type of
information message; they tell the operator when and how much memory
is allocated or freed from the memory heap.
\paragraph{}The module \verb@LALError.c@ defines functions for
printing each of these types of status message. Each type of message
is turned on by setting the corrsponding bit in \verb@lalDebugLevel@ to
1, and is suppressed by setting the bit to 0. This header file
\verb@#define@s flags with numerical values designed to switch on the
appropriate bits. Combinations of bits can be switched on by
combining these flags using the bitwise-\textit{or} operator,
\verb@|@. The flags are defined as follows:
\begin{center}
\begin{tabular}{|lccl|}
\hline
Flag & Octal & Decimal & Meaning \\
\hline
\multicolumn{4}{|l|}{\it Primitive flags} \\
\tt LALNDEBUG & 000000 & 0 & No debugging or status messages \\
\tt LALERROR & 000001 & 1 & Turn on error messages \\
\tt LALWARNING & 000002 & 2 & Turn on warning messages \\
\tt LALINFO & 000004 & 4 & Turn on info messages \\
\tt LALTRACE & 000010 & 8 & Turn on tracing messages \\
\tt LALMEMINFO & 000020 & 16 & Turn on memory messages \\
\tt LALNMEMDBG & 000040 & 32 & Turn off all memory debugging \\
\tt LALNMEMPAD & 000100 & 64 & Turn off memory padding \\
\tt LALNMEMTRK & 000200 & 128 & Turn off memory tracking \\
\tt LALMEMDBG & 040000 & 16384 & Turn on memory debugging without message
s \\
\multicolumn{4}{|l|}{\it Combination flags} \\
\tt LALMSGLVL1 & 000001 & 1 & Error messages only \\
\tt LALMSGLVL2 & 000003 & 3 & Error and warning messages \\
\tt LALMSGLVL3 & 000007 & 7 & Error, warning, and info messages \\
\tt LALMEMTRACE & 000030 & 24 & Memory and tracing messages \\
\tt LALALLDBG & 077437 & 32543 & All messages and debugging \\
\hline
\end{tabular}
\end{center}
\idx[Constant]{LALNDEBUG}
\idx[Constant]{LALERROR}
\idx[Constant]{LALWARNING}
\idx[Constant]{LALINFO}
\idx[Constant]{LALTRACE}
\idx[Constant]{LALMEMINFO}
\idx[Constant]{LALMEMNDBG}
\idx[Constant]{LALMEMNPAD}
\idx[Constant]{LALMEMNTRK}
\idx[Constant]{LALMEMDBG}
\idx[Constant]{LALMSGLVL1}
\idx[Constant]{LALMSGLVL2}
\idx[Constant]{LALMSGLVL3}
\idx[Constant]{LALMEMTRACE}
\idx[Constant]{LALALLDBG}
The most significant bit
of \verb@lalDebugLevel@ has a special meaning in that it is not
associated with any type of status message. However, certain pieces
of debugging or error-tracking code --- such as the memory leak
detection code in \verb@LALMalloc.c@ --- do not write status messages
and are not associated with a \verb@lalDebugLevel@ bit; instead, these
pieces of code are turned on for \emph{any} nonzero value of
\verb@lalDebugLevel@, unless the \verb@LALNMEMDBG@ bit is set.
Switching on only the most significant bit with
\verb@LALMEMDBG@ activates this code without turning on any other
error reporting.
To turn debugging code on or off at compile time (rather than
runtime), see Sec.~\ref{ss:compilation-flags}, below.
\subsection{Using the status tools}
\label{ss:using-status-tools}
The following summarizes everything the common programmer needs to
know in order to follow LAL standard error reporting. It can be
treated as a primer on LAL coding conventions.
\subsubsection{LAL function calls}
All functions should have return type void. The first argument of any
function should be a pointer to a structure of type \verb@LALStatus@.
Thus:
\begin{verbatim}
void MyFunction( LALStatus *stat, ... )
\end{verbatim}
Since the function has no return code, it must report all errors or
failure through the status structure. A function that is passed a
\verb@NULL@ pointer in place of the status pointer should terminate
the program with a \verb@SIGABRT@ signal, as this is its only way to
report the error. However, this is one of the few circumstances under
which a function sould deliberately raise a signal. In all other
cases the error should be trapped, reported in the status structure,
and control returned to the calling routine.
\subsubsection{Assigning an RCS \texttt{\$Id\$} string}
\idx{NRCSID()}
Every source file should have a unique character string identifying
that version of that file. The standard convention, for a file
\verb@MyFile.c@, is to declare a string \verb@MYFILEC@ at the top of
the module using the macro \verb@NRCSID()@ (defined in the include
file \verb@LALRCSID.h@):
\vspace{2ex}
\noindent\texttt{NRCSID( MYFILEC, \$Id\$ );}
\vspace{2ex}
\noindent where \texttt{\$Id\$} is expanded by RCS to give the full
name and version number of the source file.
\subsubsection{Initializing the status structure}
\idx{INITSTATUS()}
The first instruction in any function, after variable declarations,
should be the macro \verb@INITSTATUS()@, which takes three arguments:
the function's status pointer, the function name (a string literal)
and the module's RCS \texttt{\$Id\$} string.
\begin{verbatim}
INITSTATUS( stat, "MyFunction", MYFILEC );
\end{verbatim}
This macro checks that a valid status pointer has been passed to the
function, and if so, initializes the other fields to indicate (by
default) nominal execution. If \verb@stat@ is null, the macro causes
the program to terminate with a \verb@SIGABRT@ signal, as described
above.
\subsubsection{Normal return from a function}
\idx{RETURN()}
Upon completion, the function should issue the macro \verb@RETURN()@,
which takes one argument: the function's status pointer.
\begin{verbatim}
RETURN( stat );
\end{verbatim}
This takes the place of any return statements. If
\verb@stat->statusCode@ is non-zero, the macro calls \verb@LALError()@
(see \verb@LALError.c@) to log \verb@stat->statusDescription@ and
other information, depending on implementation and the value of
\verb@lalDebugLevel@. Typically \verb@RETURN()@ is used only for
successful completion, with other macros \verb@ABORT()@,
\verb@ASSERT()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@ being used
to report failure. However, it is possible for the programmer to
assign the fields of \verb@*stat@ by hand, and then issue
\verb@RETURN()@.
\subsubsection{Abnormal return from a function}
\idx{ABORT()}
The standard method to terminate a function unsuccessfully is with the
\verb@ABORT()@ macro, which takes three arguments: the status pointer,
the status code, and the status description string. Normally the
various error codes and descriptions will be constants defined in the
function's header file \verb@MyHeader.h@:
\begin{verbatim}
ABORT( stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR );
\end{verbatim}
where the error code \verb@MYHEADERH_EMYERR@ and the error message
\verb@MYHEADERH_MSGEMYERR@ are defined in \verb@MyHeader.h@. This
standard LAL naming convention for error messages prevents namespace
conflicts between different header files. Like \verb@RETURN()@,
\verb@ABORT()@ correctly handles any status logging required by the
implementation and the \verb@lalDebugLevel@. Note that \verb@ABORT()@
does \emph{not} raise a \verb@SIGABRT@ signal, but instead returns
control to the calling routine.
\subsubsection{Error checking within a function}
\idx{ASSERT()}
Another way to indicate an unsuccessful termination is with the macro
\verb@ASSERT()@, which takes as arguments a test statement, a status
pointer, a status code, and a status description. The statement
\verb@ASSERT( assertion, ... );@ is in all ways equivalent to the
statement \verb@if ( !assertion ) ABORT( ... );@, except on a failure
the \verb@ASSERT()@ macro will also report the failed assertion. In
the above example, one might have:
\begin{verbatim}
ASSERT( assertion, stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR );
\end{verbatim}
One subtle but important point is that the \verb@ASSERT()@ should be
used only to trap coding errors, rather than runtime errors, which
would be trapped using \verb@ABORT()@. In other words, the assertion
should always test true in the final debugged program. This is vital
because certain compilation flags will remove all \verb@ASSERT()@
macros at compile time, in order to speed execution of the final code.
See Sec.~\ref{ss:compilation-flags}, below.
Programmers should also be aware that using \verb@ASSERT()@ to exit a
function in normal runtime can have serious side effects. For
example, it is an error to allocate dynamic memory to local variables
in a function and then fail to free it before returning. Thus, if you
have dynamically allocated memory, you cannot then use \verb@ASSERT()@
for runtime error checking, as this does not permit you to free the
memory before returning. Instead, you must explicitly check the
assertion, and, if it fails, free the memory and call \verb@ABORT()@.
\subsubsection{Calling subroutines}
\idx{ATTATCHSTATUSPTR()}
\idx{DETATCHSTATUSPTR()}
\idx{CHECKSTATUSPTR()}
\idx[Macro]{TRY()}
If the function is to call other LAL functions as subroutines, four
more macros are used to report possible errors arising in these
routines. The macros are \verb@ATTATCHSTATUSPTR()@,
\verb@DETATCHSTATUSPTR()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@.
The usage of these macros is as follows.
\begin{enumerate}
\item First, before any subroutines are called, the function must call
the macro \verb@ATTATCHSTATUSPTR()@ which takes as its argument the
status pointer of the current function:
\begin{verbatim}
ATTATCHSTATUSPTR( stat );
\end{verbatim}
This allocates \verb@stat->statusPtr@, which is the status pointer
that will be handed down into any and all subroutines. If the pointer
has already been allocated, \verb@ATTATCHSTATUSPTR()@ will raise a
\verb@SIGABRT@, as this is symptomatic of a coding error.
In most cases \verb@ATTATCHSTATUSPTR()@ need only be called once in a
given function, immediately after \verb@INITSTATUS()@, no matter how
many subroutine calls that function makes. The exception is if the
function deals with (or ignores) errors reported by its subroutines.
In that case, the function should detatch the status pointer using
\verb@DETATCHSTATUSPTR()@ (below), and then re-attatch it.
The macro \verb@ATTATCHSTATUSPTR()@ sets the status code to be $-1$
and the status message to be \verb@"Recursive error"@. These flags
are unset when \verb@DETATCHSTATUSPTR()@ (below) is called. This is
so that a use of \verb@RETURN()@ prior to detatching the status
pointer will yield an error.
\item When a subroutine is called, it should be handed the
\verb@statusPtr@ field of the calling function's status structure, to
report its own errors. The calling function should test the returned
status code, and either attempt to deal with any abnormal returns, or
abort with status code $-1$. The macro \verb@CHECKSTATUSPTR()@
simplifies the latter case. It takes one arguments: the status
pointer of the current function (not the subroutine).
\begin{verbatim}
MySubroutine( stat->statusPtr, ... );
CHECKSTATUSPTR( stat );
\end{verbatim}
The \verb@TRY()@ macro is a somewhat more streamlined approach but
with equivalent results. It takes two arguments. The first is the
subroutine call, and the second is the status pointer. Thus:
\begin{verbatim}
TRY( MySubroutine( stat->statusPtr, ... ), stat );
\end{verbatim}
The only practical difference between these two approaches is that
\verb@TRY()@ also reports the name of the failed subroutine call when
logging errors.
Similar caveats apply when using \verb@CHECKSTATUSPTR()@ and
\verb@TRY()@ as when using \verb@ASSERT()@, in that these macros can
force an immediate return with no additional housekeeping
instructions. For instance, if you have dynamically-allocated local
memory, you should explicitly check the \verb@statusPtr->statusCode@
field to see if a subroutine failed, then free the memory and call
\verb@ABORT()@ to exit.
If the calling routine attempts to work around an error reported from
a subroutine, and the attempt fails, the routine should \emph{not} use
\verb@CHECKSTATUSPTR()@ to exit with status code $-1$. Instead, it
should call \verb@ABORT()@ with an appropriate (positive) code and
message to indicate how the attempted workaround failed.
\item After all subroutines have been called, but before any
\verb@RETURN()@ statement, the function must call the
\verb@DETATCHSTATUSPTR()@ macro, with the status pointer of the
current function (not the subroutines) as its argument:
\begin{verbatim}
DETATCHSTATUSPTR( stat );
\end{verbatim}
This simply deallocates \verb@stat->statusPtr@ (and any subsequent
structures in the list), and sets it to \verb@NULL@. It is an error
to exit the function with non-\verb@NULL@ \verb@statusPtr@, unless the
exit was due to a subroutine failure. \verb@ABORT()@ and
\verb@ASSERT()@ check for this automatically; the only place you
normally need to call \verb@DETATCHSTATUSPTR()@ is immediately before
\verb@RETURN()@. This macro also sets the status code and the status
message to nominal values.
Additionally, if a function successfully works around an error
reported by a subroutine, it should call \verb@DETATCHSTATUSPTR()@ and
\verb@ATTATCHSTATUSPTR()@ to create a fresh status pointer before
calling another subroutine.
\end{enumerate}
\subsubsection{Cleaning up after subroutine failure}
\idx[Macro]{BEGINFAIL()}
\idx[Macro]{ENDFAIL()}
Although they are convenient, the \verb@TRY()@ and
\verb@CHECKSTATUSPTR()@ macros have a serious drawback in that they
may cause the calling function to return immediately. If the calling
function had previously allocated any local memory storage, this
memory will be cast adrift, with no means of accessing or subsequently
freeing it (short of terminating the runtime process). Such a memory
leak is a violation of the LAL function standard.
The macros \verb@BEGINFAIL()@ and \verb@ENDFAIL()@ allow a function to
test the return code of a subroutine, and, if that indicates a
failure, to execute one or more ``cleanup'' instructions before itself
returning. Each macro takes a single argument: the current function's
status pointer. The macros must occur in matched pairs, and use the
same syntax as a \verb@do ... while@ statement: they either span a
single instruction, or a block of instructions enclosed in braces.
For example, if a function had allocated memory to some pointer
\verb@localPointer@, any subsequent call to a subroutine
\verb@LALSubroutine()@ would take the following form:
\begin{verbatim}
LALSubroutine( stat->statusPtr, ... );
BEGINFAIL( stat )
LALFree( localPointer );
ENDFAIL( stat );
\end{verbatim}
For another example, if a function had to create three vectors
\verb@*vector1@, \verb@*vector2@, \verb@*vector3@, the allocation
would look something like this:
\begin{verbatim}
TRY( LALSCreateVector( stat->statusPtr, &vector1, 100 ), stat );
LALSCreateVector( stat->statusPtr, &vector2, 100 );
BEGINFAIL( stat )
TRY( LALSDestroyVector( stat->statusPtr, &vector1 ), stat );
ENDFAIL( stat );
LALSCreateVector( stat->statusPtr, &vector3, 100 );
BEGINFAIL( stat ) {
TRY( LALSDestroyVector( stat->statusPtr, &vector1 ), stat );
TRY( LALSDestroyVector( stat->statusPtr, &vector2 ), stat );
} ENDFAIL( stat );
\end{verbatim}
As indicated above, the cleanup instructions can include calls to
other LAL routines. The \verb@BEGINFAIL( stat )@ macro call first
checks \verb@stat->statusPtr@ to see if a subroutine error has
occured. If it has, the macro detaches and saves that pointer, then
attaches a new \verb@stat->statusPtr@ to be used in calls to the
cleanup routines. After the cleanup instructions have been executed,
the \verb@ENDFAIL( stat )@ macro call reattaches the saved status
pointer and returns with a subroutine error code. In this way, the
returned status list indicates where the original failure occurred,
rather than giving an uninformative report from the last cleanup
routine.
Of course a \emph{second} failure in one of the cleanup routines can
cause serious problems. If the routine was called using a
\verb@TRY()@ macro, it will force an immediate return from the calling
function, with a status code and status list indicating how the cleanp
routine failed. The original status list saved by \verb@BEGINFAIL()@
is lost. While this loss does constitute a memory leak, the failure
of a cleanup routine in itself indicates that there are serious
problems with the memory management.
It is possible to nest \verb@BEGINFAIL()@\ldots\verb@ENDFAIL();@
blocks, but this is unlikely to serve any useful purpose. Once
cleanup routines start to fail, it is probably beyond the scope of the
LAL function to deal with the resulting memory leaks.
\subsubsection{Issuing status messages}
\idx{LALError()}
\idx{LALWarning()}
\idx{LALInfo()}
\idx{LALTrace()}
\idx{REPORTSTATUS()}
The module \verb@LALError.c@ defines the functions \verb@LALError()@,
\verb@LALWarning()@, \verb@LALInfo()@, and \verb@LALTrace()@ to issue
various types of status message. This is the preferred means of
printing status messages, since each type of message can be activated
or suppressed by setting \verb@lalDebugLevel@ appropriately. In fact,
\verb@LALError()@ and \verb@LALTrace()@ are called automatically by
the status macros whenever they are required, so most LAL modules will
explicitly invoke only the \verb@LALWarning()@ and \verb@LALInfo()@
functions.
\verb@LALStatusMacros.h@ provides a macro, \verb@REPORTSTATUS()@,
which is used to report the current state of the \verb@LALStatus@ list.
It takes a status pointer as its argument:
\begin{verbatim}
REPORTSTATUS( stat );
\end{verbatim}
This macro iteratively prints the contents of \verb@stat@ and all
subsequent structures in the list to the error log.
The action of \verb@REPORTSTATUS()@ is not suppressed by any value of
\verb@lalDebugLevel@. Therefore, as a rule, it should only be called by
test programs, not by LAL routines intended for use in production
code.
\subsubsection{Setting the initial \texttt{LALStatus} structure and
global \texttt{lalDebugLevel}}
\idx[Type]{LALStatus}
\idx[Variable]{lalDebugLevel}
As mentioned above, any module including \verb@LALStatusMacros.h@
includes the global variable \verb@lalDebugLevel@ as an
\verb@extern int@. At least one module in the final executable
program must have a global \emph{declaration} of \verb@extern int lalDebugL
evel@
(not \verb@extern int@), and assign \verb@lalDebugLevel@ a value. In
most cases \verb@lalDebugLevel@ will be declared in the module containing
the \verb@main()@ function, and will be assigned a value on
declaration or from command-line arguments to \verb@main()@.
Alternatively, if the LAL functions are to be embedded in a non-LAL
program, \verb@lalDebugLevel@ can be declared and set in the topmost
module that calls LAL functions.
A \verb@LALStatus@ structure should also be declared as a local variable
in the \verb@main()@ function of a LAL program, or in the topmost
function calling LAL functions withing a non-LAL program, to pass in
its LAL function calls. The structure must be empty (all fields set
to zero) before being passed into a function. The \verb@LALStatus@
structure need only be declared and initialized once, no matter how
many LAL functions are called.
Thus a typical LAL program might look something like the following:
\begin{verbatim}
extern int lalDebugLevel;
int main( int argc, char **argv )
{
static LALStatus stat;
lalDebugLevel = 1;
MyFunction( &stat );
REPORTSTATUS( &stat );
return stat.statusCode;
}
\end{verbatim}
Please note that all status macros described above can force a return
from the calling routine. This is a Bad Thing if the calling routine
is \verb@main()@, since \verb@main()@ must normally return \verb@int@
rather than \verb@void@. It is therefore recommended that none of
these macros except \verb@REPORTSTATUS()@ be used at the top level.
\subsubsection{Non-confomant functions}
These standards apply only to functions that will be publicly
available in the LAL libraries. Within a module, a programmer may
define and use subroutines that do not conform to the LAL function
standards, provided these routines are only visible within that
module. Such functions should be declared as \verb@static@ to ensure
this. A publicly-visible non-conformant function requires special
dispensation.
\subsection{Compilation flags}
\label{ss:compilation-flags}
LAL provides two flags that can be used to exclude or modify debugging
code at compile time. Although these flags are typically
\verb@#define@d or \verb@#undef@ined globally and can affect many
modules (notably modules in the \verb@support@ package), their primary
effect is on the debugging and status-reporting tools defined in this
header. The two flags are named \verb@NDEBUG@ and \verb@NOLALMACROS@.
\subsubsection{The \texttt{NDEBUG} flag}
Setting the \verb@NDEBUG@ (or \verb@LAL_NDEBUG@) flag turns off debugging a
nd
error-reporting code, in order to get condensed production-line programs.
As
far as error reporting is concerned, setting the \verb@NDEBUG@ flag at comp
ile
time is similar to setting \verb@lalDebugLevel@ equal to zero at runtime, i
n
that it suppresses all status messages and memory leak detection. However,
the \verb@NDEBUG@ flag accoplishes this by telling the compiler preprocesso
r
to remove the relevant code from the object file, thus eliminating frequent
and unnecessary tests on \verb@lalDebugLevel@. When debugging is turned of
f,
the global integer variable \verb@lalNoDebug@ is non-zero; otherwise it is
zero.
Compiling with the \verb@NDEBUG@ flag set also removes all
\verb@ASSERT()@ macros from the object code, in keeping with the
philosophy that \verb@ASSERT()@ statements should only be used to
catch coding bugs, not runtime errors.
\subsubsection{The \texttt{NOLALMACROS} flag}
Setting the \verb@NOLALMACROS@ flag replaces the status-handling
macros described above with actual functions that accomplish the same
results. These functions are defined in the module \verb@LALError.c@.
Function calls introduce computational and memory overheads that are
absent in macros, since macro replacement occurs at compile time.
However, there are circumstances in which one might want to use
function calls rather than macro replacement.
For example, debuggers typically cannot step through the individual
instructions within a macro. If a conflict somehow arose between a
particular piece of code and its status macros, this conflict would be
easier to catch and resolve by replacing the macros with function
calls into which the debugger could step.
\subsubsection{Using the compilation flags}
There are three ways to set these flags when compiling LAL programs or
libraries.
When compiling your own modules, the flags can be set using one or
more \verb@#define@ statements within the module or its header file:
\begin{verbatim}
#define NDEBUG
#define NOLALMACROS
\end{verbatim}
To restrict the scope of these flags, they should later be unset using
the corresponding \verb@#undef@ statements.
Alternatively, these can be set in the \verb@Makefile@ or when
compiling. The syntax for most UNIX C compilers is something like the
following:
\begin{verbatim}
> gcc ... -DNDEBUG -DNOLALMACROS ...
\end{verbatim}
If you want to compile a large number of modules, or the entire
library, under the effects of one or more of these flags, you will not
want to go through and modify every header or \verb@Makefile@.
Instead, you may add either \verb@-DNDEBUG@ or \verb@-DNOLALMACROS@
(or both) to the environment variable \verb@CPPFLAGS@. They will then
automatically be set for all compilations done in that environment.
The command for doing this in \verb@sh@ or \verb@bash@ shells is:
\begin{verbatim}
> CPPFLAGS="$CPPFLAGS -DNDEBUG -DNOLALMACROS"
\end{verbatim}
while in \verb@csh@ or \verb@tcsh@ shells it is:
\begin{verbatim}
> setenv CPPFLAGS "$CPPFLAGS -DNDEBUG -DNOLALMACROS"
\end{verbatim}
Note that if you plan to do further LAL code development on the same
system, you may want to keep two versions of the library around: one
with the flag(s) set and one without.
\subsection*{Notes}
Why are the status handling routines written as macros rather than
functions? There are three good reasons.
First, many of the handling routines must be able to force an exit
from the function calling them. This cannot be done if the routine is
in its own function, except by raising signal flags (which is a Bad
Thing according to LAL standards).
Second, it is useful for these routines to assign a status structure's
file and line fields using the \verb@__FILE__@ and \verb@__LINE__@
macros. If the routine is its own function, then these will just give
the file and line number where the error handling routine is defined.
If the routine is a macro, then these will give the file and line
number where the macro was called, which is much more interesting.
Third, by expanding macros at compile time, the runtime performance of
the resulting code is marginally better. Most of these macros will,
under nominal conditions, reduce to a single conditional test of an
integer value, with no additional overhead from function calling and
parameter passing. Thus programmers can be encouraged to include
extensive error trapping in all their routines, without having to
worry about compromising performance.
It should be mentioned that, for these reasons, compiling a module
with the \verb@NOLALMACROS@ flag above does not actually eliminate the
status handling macros. Rather, the macros are modified to call
specialized functions that do most (but not all) of the processing.
\subsection*{Example: A LAL primer}
The following sections give a sample program program
\verb@LALPrimerTest.c@, along with its supporting header file
\verb@LALPrimer.h@ and function module \verb@LALPrimer.c@. The
program itself is trivial to the point of silliness: it takes two
arguments from the command line and computes their ratio. (Optionally
it can take a third command line argument to set the
\verb@lalDebugLevel@.) It is intended simply to illustrate how to use
the LAL status structure and macros in an actual, complete piece of
code.
For a more fully developed sample program, see the package
\verb@hello@. That package also demonstrates how to document a
package using the autodocumentation utilities, which the
\verb@LALPrimer@ routines ignore.
\vfill{\footnotesize\input{LALStatusMacrosHV}}
\newpage\subsection{Sample header: \texttt{LALPrimer.h}}
\vspace{3ex}
\input{LALPrimerH}
\newpage\subsection{Sample module: \texttt{LALPrimer.c}}
\vspace{3ex}
\input{LALPrimerC}
\newpage\subsection{Sample program: \texttt{LALPrimerTest.c}}
\vspace{3ex}
\input{LALPrimerTestC}
</lalLaTeX> */
#ifndef _LALSTATUSMACROS_H #ifndef _LALSTATUSMACROS_H
#define _LALSTATUSMACROS_H #define _LALSTATUSMACROS_H
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef NDEBUG #ifdef NDEBUG
#ifndef LAL_NDEBUG #ifndef LAL_NDEBUG
#define LAL_NDEBUG #define LAL_NDEBUG
#endif #endif
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <lal/LALMalloc.h> #include <lal/LALMalloc.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALError.h> #include <lal/LALError.h>
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALSTATUSMACROSH, "$Id$"); extern int lalDebugLevel; /**< Global LAL debug level, see \ref ss_lal
DebugLevel for more details */
extern int lalDebugLevel;
extern const int lalNoDebug; extern const int lalNoDebug;
#define LAL_EXLAL 16384 #define LAL_EXLAL 16384
#define LAL_MSGEXLAL "Failure in an XLAL routine" #define LAL_MSGEXLAL "Failure in an XLAL routine"
#define ABORTXLAL(sp) ABORT(sp,LAL_EXLAL,LAL_MSGEXLAL) #define ABORTXLAL(sp) ABORT(sp,LAL_EXLAL,LAL_MSGEXLAL)
#ifndef NOLALMACROS #ifndef NOLALMACROS
#define INITSTATUS( statusptr, funcname, id ) \ #define INITSTATUS( statusptr ) \
do { if ( (statusptr) ) \ do { if ( (statusptr) ) \
{ \ { \
INT4 level_ = (statusptr)->level ; \ INT4 level_ = (statusptr)->level ; \
INT4 statp_ = (statusptr)->statusPtr ? 1 : 0 ; \ INT4 statp_ = (statusptr)->statusPtr ? 1 : 0 ; \
memset( (statusptr), 0, sizeof( LALStatus ) ); /* possible memory leak */ \ memset( (statusptr), 0, sizeof( LALStatus ) ); /* possible memory leak */ \
(statusptr)->level = level_ > 0 ? level_ : 1 ; \ (statusptr)->level = level_ > 0 ? level_ : 1 ; \
(statusptr)->Id = (id); (statusptr)->Id = "$Id$";
\ \
(statusptr)->function = (funcname); (statusptr)->function = __func__;
\ \
SETSTATUSFILELINE( statusptr ); \ SETSTATUSFILELINE( statusptr ); \
(void) LALTrace( statusptr, 0 ); \ (void) LALTrace( statusptr, 0 ); \
if ( statp_ ) \ if ( statp_ ) \
ABORT( statusptr, -2, "INITSTATUS: non-null status pointer" ); \ ABORT( statusptr, -2, "INITSTATUS: non-null status pointer" ); \
else if ( xlalErrno ) \ else if ( xlalErrno ) \
ABORT( statusptr, -16, "INITSTATUS: non-zero xlalErrno" ); \ ABORT( statusptr, -16, "INITSTATUS: non-zero xlalErrno" ); \
} \ } \
else \ else \
lalAbortHook( "Abort: function %s, file %s, line %d, %s\n" \ lalAbortHook( "Abort: function %s, file %s, line %d, %s\n" \
" Null status pointer passed to function\n", \ " Null status pointer passed to function\n", \
(funcname), __FILE__, __LINE__, (id) ); \ __func__, __FILE__, __LINE__, "$Id$" ); \
} while ( 0 ) } while ( 0 )
#define RETURN( statusptr ) \ #define RETURN( statusptr ) \
do { if ( 1 ) \ do { if ( 1 ) \
{ \ { \
SETSTATUSFILELINE( statusptr ); \ SETSTATUSFILELINE( statusptr ); \
if ( (statusptr)->statusCode ) \ if ( (statusptr)->statusCode ) \
(void) LALError( statusptr, "RETURN:" ); \ (void) LALError( statusptr, "RETURN:" ); \
(void) LALTrace( statusptr, 1 ); \ (void) LALTrace( statusptr, 1 ); \
if ( xlalErrno ) \ if ( xlalErrno ) \
skipping to change at line 935 skipping to change at line 186
ptr_->statusDescription ); \ ptr_->statusDescription ); \
else \ else \
LALPrintError( "\tStatus code 0: Nominal\n" ); \ LALPrintError( "\tStatus code 0: Nominal\n" ); \
LALPrintError( "\tfunction %s, file %s, line %i\n", \ LALPrintError( "\tfunction %s, file %s, line %i\n", \
ptr_->function, ptr_->file, ptr_->line ); \ ptr_->function, ptr_->file, ptr_->line ); \
} \ } \
} while ( 0 ) } while ( 0 )
#else /* NOLALMACROS */ #else /* NOLALMACROS */
#define INITSTATUS( statusptr, funcname, id ) \ #define INITSTATUS( statusptr ) \
do { if ( LALInitStatus( statusptr, funcname, id, __FILE__, __LINE__ ) ) do { if ( LALInitStatus( statusptr, __func__, "$Id$", __FILE__, __LINE__
return; } while ( 0 ) ) ) return; } while ( 0 )
#define RETURN( statusptr ) \ #define RETURN( statusptr ) \
do { if ( LALPrepareReturn( statusptr, __FILE__, __LINE__ ), 1 ) return; } while ( 0 ) do { if ( LALPrepareReturn( statusptr, __FILE__, __LINE__ ), 1 ) return; } while ( 0 )
#define ATTATCHSTATUSPTR( statusptr ) \ #define ATTATCHSTATUSPTR( statusptr ) \
do { if ( LALAttatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return; } while ( 0 ) do { if ( LALAttatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return; } while ( 0 )
#define DETATCHSTATUSPTR( statusptr ) \ #define DETATCHSTATUSPTR( statusptr ) \
do { if ( LALDetatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return; } while ( 0 ) do { if ( LALDetatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return; } while ( 0 )
 End of changes. 7 change blocks. 
768 lines changed or deleted 12 lines changed or added


 LALStdio.h   LALStdio.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
*/ */
#if 0 /* autodoc block */ /**
\addtogroup LALStdio_h
<lalVerbatim file="LALStdioHV">
$Id$
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{LALStdio.h}}
\label{s:LALStdio.h}
Provides LAL functions similar to the non-file functions in \verb+<stdio.h> +. \brief Provides LAL functions similar to the non-file functions in <tt>< stdio.h></tt>.
\subsection*{Synopsis} \heading{Synopsis}
\begin{verbatim} \code
#include <lal/LALStdio.h> #include <lal/LALStdio.h>
#include <lal/FileIO.h> #include <lal/FileIO.h>
\end{verbatim} \endcode
\vfill{\footnotesize\input{LALStdioHV}} */
</lalLaTeX>
#endif /* autodoc block */
#ifndef _LALSTDIO_H #ifndef _LALSTDIO_H
#define _LALSTDIO_H #define _LALSTDIO_H
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <inttypes.h> #include <inttypes.h>
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALSTDIOH, "$Id$" );
#if LAL_BOINC_ENABLED #if LAL_BOINC_ENABLED
extern FILE* boinc_fopen(const char* path, const char* mode); extern FILE* boinc_fopen(const char* path, const char* mode);
#define LALFopen boinc_fopen #define LALFopen boinc_fopen
#else #else
#define LALFopen fopen #define LALFopen fopen
#endif #endif
#define LALFclose fclose #define LALFclose fclose
#define LAL_INT2_PRId PRId16 #define LAL_INT2_PRId PRId16
#define LAL_INT2_PRIi PRIi16 #define LAL_INT2_PRIi PRIi16
 End of changes. 6 change blocks. 
22 lines changed or deleted 9 lines changed or added


 LALStdlib.h   LALStdlib.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
*/ */
/************************************ <lalVerbatim file="LALStdlibHV"> /**
Author: J. D. E. Creighton, T. D. Creighton \author J. D. E. Creighton, T. D. Creighton
$Id$ \addtogroup LALStdlib_h
************************************* </lalVerbatim> */
/* <lalLaTeX>
\section{Header \texttt{LALConfig.h}}
\label{s:LALConfig.h}
Defines configuration macro constants.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LALConfig.h>
\end{verbatim}
\noindent This header (which is not technically in the \texttt{std} package
;
rather it is generated directly in the \texttt{include/lal} directory durin
g
configuration) is included in essentially every other header file. It
contains macro constants that are defined at configuration time. They are:
\idx[Constant]{LAL\_VERSION}
\idx[Constant]{LAL\_VERSION\_MAJOR}
\idx[Constant]{LAL\_VERSION\_MINOR}
\idx[Constant]{LAL\_CONFIGURE\_ARGS}
\idx[Constant]{LAL\_CONFIGURE\_DATE}
\idx[Constant]{LAL\_CVS\_TAG}
\idx[Constant]{LAL\_SIZEOF\_DOUBLE}
\idx[Constant]{LAL\_SIZEOF\_FLOAT}
\idx[Constant]{LAL\_SIZEOF\_INT}
\idx[Constant]{LAL\_SIZEOF\_LONG}
\idx[Constant]{LAL\_SIZEOF\_LONG\_LONG}
\idx[Constant]{LAL\_SIZEOF\_SHORT}
\idx[Constant]{LAL\_NDEBUG}
\idx[Constant]{NOLALMACROS}
\idx[Constant]{LAL\_PTHREAD\_LOCK}
\idx[Constant]{LAL\_MPI\_ENABLED}
\begin{description}
\item[\texttt{LAL\_VERSION}] Constant string containing the version of LAL.
\item[\texttt{LAL\_VERSION\_MAJOR}] Integer representing the major version
number of LAL.
\item[\texttt{LAL\_VERSION\_MINOR}] Integer representing the minor version
number of LAL.
\item[\texttt{LAL\_CONFIGURE\_ARGS}] Constant string containing the argumen
ts
given to the configure script.
\item[\texttt{LAL\_CONFIGURE\_DATE}] Constant string containing the date
when LAL was configured.
\item[\texttt{LAL\_CVS\_TAG}] Constant string containing the CVS tag used t
o
checkout LAL (blank if none).
\item[\texttt{LAL\_SIZEOF\_DOUBLE}] Integer representing the size of a
double precision floating point number.
\item[\texttt{LAL\_SIZEOF\_FLOAT}] Integer representing the size of a
single precision floating point number.
\item[\texttt{LAL\_SIZEOF\_INT}] Integer representing the size of a
integer.
\item[\texttt{LAL\_SIZEOF\_LONG}] Integer representing the size of a
long integer.
\item[\texttt{LAL\_SIZEOF\_LONG\_LONG}] Integer representing the size of a
long long integer.
\item[\texttt{LAL\_SIZEOF\_SHORT}] Integer representing the size of a
short integer.
\item[\texttt{LAL\_NDEBUG}] Defined if debugging is turned off (use the
configure argument \texttt{--disable-debug} to do this).
\item[\texttt{NOLALMACROS}] Defined if status macros are replaced by functi
ons
(where possible) (use the configure argument \texttt{--disable-macros} to
do
this).
\item[\texttt{LAL\_PTHREAD\_LOCK}] Defined if POSIX thread mutex locking is
to be used for threadsafety (use the configure argument
\texttt{--enable-pthread-lock} to do this).
\item[\texttt{LAL\_MPI\_ENABLED}] Defined if LAL MPI routines will be compi
led
(use the configure argument \texttt{--enable-mpi} to do this).
\end{description}
\newpage
\section{Header \texttt{LALStdlib.h}}
\label{s:LALStdlib.h}
Includes the standard LAL header files. \brief Includes the standard LAL header files.
\subsection*{Synopsis} \heading{Synopsis}
\begin{verbatim} \code
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
\end{verbatim} \endcode
\noindent This header is the overall header for the \verb@std@ This header is the overall header for the \c std
package. It provides the datatypes, constants, and macros required by package. It provides the datatypes, constants, and macros required by
most LAL functions, by including the following header files in the most LAL functions, by including the following header files in the
\verb@std@ package: \c std package:
\vspace{1ex} \code
#include <lal/LALDatatypes.h>
#include <lal/LALStatusMacros.h>
\endcode
</lalLaTeX> */ This header also includes function prototype headers for certain standard m
odules used
by many LAL routines:
\code
#include <stdio.h>
#include <stdarg.h>
#include <lal/LALMalloc.h>
\endcode
*/
#ifndef _LALSTDLIB_H #ifndef _LALSTDLIB_H
#define _LALSTDLIB_H #define _LALSTDLIB_H
/* <lalVerbatim> */
#include <lal/LALRCSID.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALStatusMacros.h> #include <lal/LALStatusMacros.h>
/* </lalVerbatim>
<lalLaTeX>
\noindent\verb@LALStdlib.h@ also includes function prototype headers
for certain standard modules used by many LAL routines:
\vspace{1ex}
</lalLaTeX>
<lalVerbatim> */
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <lal/LALMalloc.h> #include <lal/LALMalloc.h>
/* </lalVerbatim>
<lalLaTeX>
\vfill{\footnotesize\input{LALStdlibHV}}
</lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALSTDLIBH, "$Id$");
/* These are non-ANSI standard routines that will be allowed in LAL */ /* These are non-ANSI standard routines that will be allowed in LAL */
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
int getopt( int, char * const *, const char * ); int getopt( int, char * const *, const char * );
FILE *popen( const char *, const char * ); FILE *popen( const char *, const char * );
int pclose( FILE * ); int pclose( FILE * );
#endif /* SWIG */ #endif /* SWIG */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 13 change blocks. 
110 lines changed or deleted 24 lines changed or added


 LALString.h   LALString.h 
skipping to change at line 24 skipping to change at line 24
* 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 _LALSTRING_H #ifndef _LALSTRING_H
#define _LALSTRING_H #define _LALSTRING_H
#include <stddef.h> #include <stddef.h>
#include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALSTRINGH, "$Id$" );
char * XLALStringAppend( char *s, const char *append ); char * XLALStringAppend( char *s, const char *append );
char * XLALStringDuplicate( const char *s ); char * XLALStringDuplicate( const char *s );
size_t XLALStringCopy( char *dst, const char *src, size_t size ); size_t XLALStringCopy( char *dst, const char *src, size_t size );
size_t XLALStringConcatenate( char *dst, const char *src, size_t size ); size_t XLALStringConcatenate( char *dst, const char *src, size_t size );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALSTRING_H */ #endif /* _LALSTRING_H */
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 LALVCSInfo.h   LALVCSInfo.h 
skipping to change at line 38 skipping to change at line 38
#endif #endif
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* vcs information defines */ /* vcs information defines */
#define LAL_NAME "LAL" #define LAL_NAME "LAL"
#define LAL_VCS_ID "34d73389ee7baffbf076311d443fd8a02daea76a" #define LAL_VCS_ID "711028f35c53197b1241956fdbba9a43113b8dc0"
#define LAL_VCS_DATE "2012-01-23 14:43:06 +0000" #define LAL_VCS_DATE "2012-04-10 20:38:40 +0000"
#define LAL_VCS_BRANCH "None" #define LAL_VCS_BRANCH "None"
#define LAL_VCS_TAG "lal-v6.6.2" #define LAL_VCS_TAG "lal-v6.7.0"
#define LAL_VCS_AUTHOR "Adam Mercer <adam.mercer@ligo.org>" #define LAL_VCS_AUTHOR "Adam Mercer <adam.mercer@ligo.org>"
#define LAL_VCS_COMMITTER "Adam Mercer <adam.mercer@ligo.org>" #define LAL_VCS_COMMITTER "Adam Mercer <adam.mercer@ligo.org>"
#define LAL_VCS_STATUS "CLEAN: All modifications committed" #define LAL_VCS_STATUS "CLEAN: All modifications committed"
/* vcs information defines - identable*/ /* vcs information defines - identable*/
#define LAL_VCS_IDENT_ID "$" "LALId: 34d73389ee7baffbf076311d443fd8a02daea7 #define LAL_VCS_IDENT_ID "$" "LALId: 711028f35c53197b1241956fdbba9a43113b8d
6a " "$" c0 " "$"
#define LAL_VCS_IDENT_DATE "$" "LALDate: 2012-01-23 14:43:06 +0000 " "$" #define LAL_VCS_IDENT_DATE "$" "LALDate: 2012-04-10 20:38:40 +0000 " "$"
#define LAL_VCS_IDENT_BRANCH "$" "LALBranch: None " "$" #define LAL_VCS_IDENT_BRANCH "$" "LALBranch: None " "$"
#define LAL_VCS_IDENT_TAG "$" "LALTag: lal-v6.6.2 " "$" #define LAL_VCS_IDENT_TAG "$" "LALTag: lal-v6.7.0 " "$"
#define LAL_VCS_IDENT_AUTHOR "$" "LALAuthor: Adam Mercer <adam.mercer@ligo. org> " "$" #define LAL_VCS_IDENT_AUTHOR "$" "LALAuthor: Adam Mercer <adam.mercer@ligo. org> " "$"
#define LAL_VCS_IDENT_COMMITTER "$" "LALCommitter: Adam Mercer <adam.mercer @ligo.org> " "$" #define LAL_VCS_IDENT_COMMITTER "$" "LALCommitter: Adam Mercer <adam.mercer @ligo.org> " "$"
#define LAL_VCS_IDENT_STATUS "$" "LALStatus: CLEAN: All modifications commi tted " "$" #define LAL_VCS_IDENT_STATUS "$" "LALStatus: CLEAN: All modifications commi tted " "$"
/* global variables for vcs information, defined in LALVCSInfo.c */ /* global variables for vcs information, defined in LALVCSInfo.c */
extern const char *const lalVCSVersion; extern const char *const lalVCSVersion;
extern const char *const lalVCSId; extern const char *const lalVCSId;
extern const char *const lalVCSDate; extern const char *const lalVCSDate;
extern const char *const lalVCSBranch; extern const char *const lalVCSBranch;
extern const char *const lalVCSTag; extern const char *const lalVCSTag;
 End of changes. 4 change blocks. 
7 lines changed or deleted 7 lines changed or added


 LALVersion.h   LALVersion.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
*/ */
#if 0 /* autodoc block */ #ifndef _LALVERSION_H
#define _LALVERSION_H
<lalVerbatim file="LALVersionHV"> #include <lal/LALDatatypes.h>
$Id$
</lalVerbatim>
<lalLaTeX> #ifdef __cplusplus
extern "C" {
#endif
\section{Header \texttt{LALVersion.h}} /**
\label{s:LALVersion.h} \addtogroup LALVersion_h
Provides routines for reporting the LAL version. \brief Provides routines for reporting the LAL version.
\subsection*{Synopsis} \heading{Synopsis}
\begin{verbatim} \code
#include <lal/LALVersion.h> #include <lal/LALVersion.h>
\end{verbatim} \endcode
\noindent This header covers the routines for reporting the LAL version. \section ss_globals Global variables
\subsection*{Global variables} \code
\idx[Constant]{lalVersion}
\idx[Constant]{lalVersionMajor}
\idx[Constant]{lalVersionMinor}
\idx[Constant]{lalConfigureArgs}
\idx[Constant]{lalConfigureDate}
\begin{verbatim}
extern const char *lalVersion; extern const char *lalVersion;
extern const int lalVersionMajor; extern const int lalVersionMajor;
extern const int lalVersionMinor; extern const int lalVersionMinor;
extern const char *lalConfigureArgs; extern const char *lalConfigureArgs;
extern const char *lalConfigureDate; extern const char *lalConfigureDate;
\end{verbatim} \endcode
These constant variables are set at compile time and included into the LAL These constant variables are set at compile time and included into the LAL
library. They contain the information about the version of LAL and the library. They contain the information about the version of LAL and the
configuration information. configuration information.
\subsection*{Error conditions} */ /*@{*/
\input{LALVersionHErrTab}
\newpage\input{LALVersionC}
\newpage\input{LALVersionTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifndef _LALVERSION_H
#define _LALVERSION_H
#include <lal/LALDatatypes.h>
#ifdef __cplusplus
extern "C" {
#endif
NRCSID( LALVERSIONH, "$Id$" );
/* <lalErrTable file="LALVersionHErrTab"> */ /**\name Error Codes */ /*@{*/
#define LALVERSIONH_ENULL 1 #define LALVERSIONH_ENULL 1 /**< Null string pointer */
#define LALVERSIONH_ESIZE 2 #define LALVERSIONH_ESIZE 2 /**< Zero string size */
#define LALVERSIONH_ESPRN 4 #define LALVERSIONH_ESPRN 4 /**< Error in snprintf */
#define LALVERSIONH_ESHRT 8 #define LALVERSIONH_ESHRT 8 /**< String too short */
/*@}*/
/*@}*/
#define LALVERSIONH_MSGENULL "Null string pointer." #define LALVERSIONH_MSGENULL "Null string pointer."
#define LALVERSIONH_MSGESIZE "Zero string size." #define LALVERSIONH_MSGESIZE "Zero string size."
#define LALVERSIONH_MSGESPRN "Error in snprintf." #define LALVERSIONH_MSGESPRN "Error in snprintf."
#define LALVERSIONH_MSGESHRT "String too short." #define LALVERSIONH_MSGESHRT "String too short."
/* </lalErrTable> */
extern const char *const lalVersion; extern const char *const lalVersion;
extern const int lalVersionMajor; extern const int lalVersionMajor;
extern const int lalVersionMinor; extern const int lalVersionMinor;
extern const int lalVersionMicro; extern const int lalVersionMicro;
extern const int lalVersionDevel; extern const int lalVersionDevel;
extern const char *const lalBuildDate; extern const char *const lalBuildDate;
extern const char *const lalConfigureArgs; extern const char *const lalConfigureArgs;
extern const char *const lalConfigureDate; extern const char *const lalConfigureDate;
void void
 End of changes. 13 change blocks. 
47 lines changed or deleted 24 lines changed or added


 LPC.h   LPC.h 
skipping to change at line 30 skipping to change at line 30
#ifndef _LPC_H #ifndef _LPC_H
#define _LPC_H #define _LPC_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <lal/LALMalloc.h> #include <lal/LALMalloc.h>
/*<lalLaTeX file="LPCH">
\section{Header \texttt{LPC.h}}
\label{s:LPC.h}
Functions for linear predictor filters.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/LPC.h>
\end{verbatim}
\subsection*{Error Conditions}
\input{LPCHErrTab}
</lalLaTeX>*/
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID (LPCH, "$Id$"); /**
\addtogroup LPC_h
/******************************** <lalErrTable file="LPCHErrTab"> */ \brief Functions for linear predictor filters.
#define LPCH_EIN 1
#define LPCH_EMEM 2 \heading{Synopsis}
#define LPCH_ENUM 3 \code
#include <lal/LPC.h>
\endcode
*/
/*@{*/
/**\name Error Codes */
/*@{*/
#define LPCH_EIN 1 /**< invalid input */
#define LPCH_EMEM 2 /**< memory error */
#define LPCH_ENUM 3 /**< numerical error */
/*@}*/
/*@}*/
#define LPCH_MSGEIN "invalid input" #define LPCH_MSGEIN "invalid input"
#define LPCH_MSGEMEM "memory error" #define LPCH_MSGEMEM "memory error"
#define LPCH_MSGENUM "numerical error" #define LPCH_MSGENUM "numerical error"
/*************************************************** </lalErrTable> */
void LALPolystab(LALStatus *status, void LALPolystab(LALStatus *status,
REAL4Vector *a); REAL4Vector *a);
void LALLPC(LALStatus *status, void LALLPC(LALStatus *status,
REAL4Vector *aout, /* returned filter coefficients */ REAL4Vector *aout, /* returned filter coefficients */
REAL4Vector *x, /* training data */ REAL4Vector *x, /* training data */
UINT4 p /* filter order */ UINT4 p /* filter order */
); );
 End of changes. 4 change blocks. 
21 lines changed or deleted 18 lines changed or added


 LogPrintf.h   LogPrintf.h 
skipping to change at line 24 skipping to change at line 24
* 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
*/ */
/**
* \author Reinhard Prix
* \date 2005
* \file
* \brief General-purpose log-message handling, controlled by lalDebugLevel
*
* $Id$
*/
#ifndef _LOGPRINTF_H /* Double-include protection. */ #ifndef _LOGPRINTF_H /* Double-include protection. */
#define _LOGPRINTF_H #define _LOGPRINTF_H
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALRCSID.h>
NRCSID( LOGPRINTFH, "$Id$" );
/*---------- INCLUDES ----------*/ /*---------- INCLUDES ----------*/
#include <stdarg.h> #include <stdarg.h>
#include <gsl/gsl_matrix.h> #include <gsl/gsl_matrix.h>
/**
* \addtogroup LogPrintf_h
* \author Reinhard Prix
* \date 2005
* \brief General-purpose log-message handling, controlled by lalDebugLevel
independent of lalDebugLevel,
* mostly modelled after the MSG_LOG class in BOINC.
*
*/
/*@{*/
/*---------- DEFINES ----------*/ /*---------- DEFINES ----------*/
/*---------- TYPES ----------*/ /*---------- TYPES ----------*/
/** Argument-type for LogPrintf(): determines log-level of this message */ /** Argument-type for LogPrintf(): determines log-level of this message */
typedef enum typedef enum
{ {
LOG_CRITICAL = -1, LOG_CRITICAL = -1, /**< log-level for critical errors */
LOG_NORMAL = 0, LOG_NORMAL = 0, /**< 'normal' log-level */
LOG_DEBUG = 1, LOG_DEBUG = 1, /**< debug log-level */
LOG_DETAIL = 2, LOG_DETAIL = 2, /**< detailed log-level */
LOG_LAST /* don't use */ LOG_LAST /**< internal: don't use */
} LogLevel_t; } LogLevel_t;
/*---------- GLOBALs ----------*/ /*---------- GLOBALs ----------*/
/*---------- PROTOTYPES [API] ----------*/ /*---------- PROTOTYPES [API] ----------*/
void LogSetFile(FILE* file); void LogSetFile(FILE* file);
void LogSetLevel(LogLevel_t level); void LogSetLevel(LogLevel_t level);
void LogPrintf (LogLevel_t, const char* format, ...); void LogPrintf (LogLevel_t, const char* format, ...);
void LogPrintfVerbatim (LogLevel_t, const char* format, ...); void LogPrintfVerbatim (LogLevel_t, const char* format, ...);
int XLALfprintfGSLmatrix ( FILE *fp, const char *fmt, const gsl_matrix *gij ); int XLALfprintfGSLmatrix ( FILE *fp, const char *fmt, const gsl_matrix *gij );
int XLALfprintfGSLvector ( FILE *fp, const char *fmt, const gsl_vector *vec t ); int XLALfprintfGSLvector ( FILE *fp, const char *fmt, const gsl_vector *vec t );
int XLALfprintfGSLvector_int ( FILE *fp, const char *fmt, const gsl_vector_ int *vect ); int XLALfprintfGSLvector_int ( FILE *fp, const char *fmt, const gsl_vector_ int *vect );
REAL8 XLALGetTimeOfDay(void); REAL8 XLALGetTimeOfDay(void);
char * XLALClearLinebreaks ( const char *str ); char * XLALClearLinebreaks ( const char *str );
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/* C++ protection. */ /* C++ protection. */
#endif /* Double-include protection. */ #endif /* Double-include protection. */
 End of changes. 5 change blocks. 
16 lines changed or deleted 18 lines changed or added


 Matrix.h   Matrix.h 
skipping to change at line 40 skipping to change at line 40
* *
* @{ * @{
* \defgroup MatrixMultiply_c Module MatrixMultiply.c * \defgroup MatrixMultiply_c Module MatrixMultiply.c
* \defgroup MatrixDivide_c Module MatrixDivide.c * \defgroup MatrixDivide_c Module MatrixDivide.c
* \defgroup MatrixPower_c Module MatrixPower.c * \defgroup MatrixPower_c Module MatrixPower.c
* \defgroup MiscMatlab_c Module MiscMatlab.c * \defgroup MiscMatlab_c Module MiscMatlab.c
* *
*/ */
#include <math.h> #include <math.h>
#include <lal/LALRCSID.h>
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/SeqFactories.h> #include <lal/SeqFactories.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#ifndef __MATLAB_MATRIX_H__ #ifndef __MATLAB_MATRIX_H__
#define __MATLAB_MATRIX_H__ #define __MATLAB_MATRIX_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
skipping to change at line 78 skipping to change at line 77
#define MATLABMATRIXH_MSGECHK "Error checking failed to catch bad da ta" #define MATLABMATRIXH_MSGECHK "Error checking failed to catch bad da ta"
#define MATLABMATRIXH_MSGEFLS "Incorrect answer for valid data" #define MATLABMATRIXH_MSGEFLS "Incorrect answer for valid data"
#define MATLABMATRIXH_MSGEUSE "Bad user-entered data" #define MATLABMATRIXH_MSGEUSE "Bad user-entered data"
#define MATLABMATRIXH_MSGENULL "Null Pointer." #define MATLABMATRIXH_MSGENULL "Null Pointer."
#define MATLABMATRIXH_MSGEALOC "Memory Allocation Error" #define MATLABMATRIXH_MSGEALOC "Memory Allocation Error"
#define MATLABMATRIXH_MSGEFPMS "Filter Parameter Structure Error" #define MATLABMATRIXH_MSGEFPMS "Filter Parameter Structure Error"
#define MATLABMATRIXH_MSGENUMZ "Incorrect number of command line arguments" #define MATLABMATRIXH_MSGENUMZ "Incorrect number of command line arguments"
#define MATLABMATRIXH_MSGELNTH "Vector/Array of Improper Length" #define MATLABMATRIXH_MSGELNTH "Vector/Array of Improper Length"
#define MATLABMATRIXH_MSGENNUL "Non-Null Pointer that should be NULL" #define MATLABMATRIXH_MSGENNUL "Non-Null Pointer that should be NULL"
NRCSID( MATLABMATRIXH, "$Id$");
/* Multiply */ /* Multiply */
/** \addtogroup MatrixMultiply_c /** \addtogroup MatrixMultiply_c
* @{ * @{
*/ */
void LALDDotStarDVector ( void LALDDotStarDVector (
LALStatus *status, LALStatus *status,
REAL8Vector **result, REAL8Vector **result,
REAL8 B, REAL8 B,
REAL8Vector *A REAL8Vector *A
); );
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 MatrixUtils.h   MatrixUtils.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
*/ */
#ifndef _MATRIXUTILS_H
#define _MATRIXUTILS_H
#include <lal/LALStdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\author Creighton, T. D. \author Creighton, T. D.
\file \addtogroup MatrixUtils_h
\brief Provides routines to solve linear systems. \brief Provides routines to solve linear systems.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/MatrixUtils.h> #include <lal/MatrixUtils.h>
\endcode \endcode
This header covers routines to solve linear systems of equations and This header covers routines to solve linear systems of equations and
eigensystems, using algorithms adapted from Chapters~2 and~11 of eigensystems, using algorithms adapted from Chapters~2 and~11 of
Numerical Recipes~[\ref ptvf1992]. The only routines at present are Numerical Recipes [\ref ptvf1992]. The only routines at present are
for computing eigenvalues and eigenvectors of real symmetric matrices. for computing eigenvalues and eigenvectors of real symmetric matrices.
Routines for inverting or computing the determinant of arbitrary Routines for inverting or computing the determinant of arbitrary
square matrices will likely follow. square matrices will likely follow.
\section TODOref Notation \heading{Notation}
A \e matrix is represented in LAL by a <tt>\<datatype\>Array</tt> A \e matrix is represented in LAL by a <tt>\<datatype\>Array</tt>
structure with a <tt>dimLength->length</tt> field of 2; the structure with a <tt>dimLength-\>length</tt> field of 2; the
<tt>dimLength->data</tt> field gives the dimensions \f$[M,N]\f$ of the <tt>dimLength-\>data</tt> field gives the dimensions \f$[M,N]\f$ of the
matrix. Using the place-index notation common in tensor calculus, a matrix. Using the place-index notation common in tensor calculus, a
matrix is a two-index tensor: matrix is a two-index tensor:
\f{equation}{ \f{equation}{
\mathsf{A}^a{}_b = \left[\begin{array}{cccc} \mathsf{A}^a{}_b = \left[\begin{array}{cccc}
A^1{}_1 & A^1{}_2 & \cdots & A^1{}_N \\ A^1{}_1 & A^1{}_2 & \cdots & A^1{}_N \\
A^2{}_1 & A^2{}_2 & \cdots & A^2{}_N \\ A^2{}_1 & A^2{}_2 & \cdots & A^2{}_N \\
\vdots & \vdots & \ddots & \vdots \\ \vdots & \vdots & \ddots & \vdots \\
A^M{}_1 & A^M{}_2 & \cdots & A^M{}_N A^M{}_1 & A^M{}_2 & \cdots & A^M{}_N
\end{array}\right] \;, \end{array}\right] \;,
\f} \f}
skipping to change at line 79 skipping to change at line 88
index: index:
\f{equation}{ \f{equation}{
\mathsf{c}^a = \left[\begin{array}{c} c^1 \\ c^2 \\ \vdots \\ c^M \mathsf{c}^a = \left[\begin{array}{c} c^1 \\ c^2 \\ \vdots \\ c^M
\end{array}\right] \;. \end{array}\right] \;.
\f} \f}
In LAL, both of these objects are conventionally represented as a LAL In LAL, both of these objects are conventionally represented as a LAL
vector structure. Whether the object is to be used as a row or column vector structure. Whether the object is to be used as a row or column
vector must be determined from context; it is not specified by the vector must be determined from context; it is not specified by the
datatype. datatype.
\section TODOref Properties \heading{Properties}
The basic matrix operations are addition, scalar multiplication, and The basic matrix operations are addition, scalar multiplication, and
vector multiplication. We assume the reader is familiar with these. vector multiplication. We assume the reader is familiar with these.
In addition, we will refer to the following unary operations on In addition, we will refer to the following unary operations on
\e square matrices: \e square matrices:
\e Inversion: The inverse \f$(\mathsf{A}^{-1}){}^a{}_b\f$ of a \e Inversion: The inverse \f$(\mathsf{A}^{-1}){}^a{}_b\f$ of a
matrix \f$\mathsf{A}^a{}_b\f$ is one such that their matrix product is the matrix \f$\mathsf{A}^a{}_b\f$ is one such that their matrix product is the
identity matrix \f$\bd^a{}_b\f$ (whose elements \f$\delta^i{}_j\f$ are just identity matrix \f$\bd^a{}_b\f$ (whose elements \f$\delta^i{}_j\f$ are just
the Kr\"onecker delta function). the Kronecker delta function).
\e Transposition: The transpose \f$(\mathsf{A}^T){}^a{}_b\f$ of a \e Transposition: The transpose \f$(\mathsf{A}^T){}^a{}_b\f$ of a
matrix \f$\mathsf{A}^a{}_b\f$ is given by interchanging the indecies on matrix \f$\mathsf{A}^a{}_b\f$ is given by interchanging the indecies on
each component: \f$(A^T){}^i{}_j=A^j{}_i\f$. each component: \f$(A^T){}^i{}_j=A^j{}_i\f$.
\e Conjugation: The Hermitian conjugate (adjoint) \e Conjugation: The Hermitian conjugate (adjoint)
\f$(\mathsf{A}^\dag){}^a{}_b\f$ of a matrix \f$\mathsf{A}^a{}_b\f$ is given by \f$(\mathsf{A}^\dag){}^a{}_b\f$ of a matrix \f$\mathsf{A}^a{}_b\f$ is given by
interchanging the indecies and taking the complex conjugate of each interchanging the indecies and taking the complex conjugate of each
component: \f$(A^\dag){}^i{}_j={A^j{}_i}^*\f$. component: \f$(A^\dag){}^i{}_j={A^j{}_i}^*\f$.
skipping to change at line 112 skipping to change at line 121
original matrix's inverse is called \e orthogonal. A matrix that original matrix's inverse is called \e orthogonal. A matrix that
is identical to its own Hermitian conjugate is called \e Hermitian is identical to its own Hermitian conjugate is called \e Hermitian
(or <em>self-adjoint</em>. A matrix whose Hermitian conjugate is (or <em>self-adjoint</em>. A matrix whose Hermitian conjugate is
identical to the original matrix's inverse is called \e unitary. identical to the original matrix's inverse is called \e unitary.
At present, the routines under this header only deal with \e real At present, the routines under this header only deal with \e real
matrices (i.e.\ matrices, vectors, and scalars whose components are matrices (i.e.\ matrices, vectors, and scalars whose components are
all real). In this case, symmetric is equivalent to Hermitian, and all real). In this case, symmetric is equivalent to Hermitian, and
orthogonal is equivalent to unitary. orthogonal is equivalent to unitary.
%"
*/ */
/* @{ */
#ifndef _MATRIXUTILS_H /** \name Error Codes */
#define _MATRIXUTILS_H /*@{*/
#define MATRIXUTILSH_ENUL 1 /**< Unexpected null pointer in argu
#include <lal/LALStdlib.h> ments */
#define MATRIXUTILSH_EDIM 2 /**< Bad matrix dimensions */
#ifdef __cplusplus #define MATRIXUTILSH_EITER 3 /**< Did not converge after maximum
extern "C" { iterations */
#endif #define MATRIXUTILSH_ESING 4 /**< Singular matrix */
#define MATRIXUTILSH_EMEM 5 /**< Memory allocation error */
NRCSID( MATRIXUTILSH, "$Id$" ); /*@}*/
/** \name Error Codes */ /*@{*/ /*@}*/
#define MATRIXUTILSH_ENUL 1
#define MATRIXUTILSH_EDIM 2
#define MATRIXUTILSH_EITER 3
#define MATRIXUTILSH_ESING 4
#define MATRIXUTILSH_EMEM 5
#define MATRIXUTILSH_MSGENUL "Unexpected null pointer in arguments" #define MATRIXUTILSH_MSGENUL "Unexpected null pointer in arguments"
#define MATRIXUTILSH_MSGEDIM "Bad matrix dimensions" #define MATRIXUTILSH_MSGEDIM "Bad matrix dimensions"
#define MATRIXUTILSH_MSGEITER "Did not converge after maximum iterations" #define MATRIXUTILSH_MSGEITER "Did not converge after maximum iterations"
#define MATRIXUTILSH_MSGESING "Singular matrix" #define MATRIXUTILSH_MSGESING "Singular matrix"
#define MATRIXUTILSH_MSGEMEM "Memory allocation error" #define MATRIXUTILSH_MSGEMEM "Memory allocation error"
/*@}*/
/* Function prototypes. */ /* Function prototypes. */
void void
LALI2MatrixAdd( LALStatus *, INT2Array *out, INT2Array *in1, INT2Array *in2 ); LALI2MatrixAdd( LALStatus *, INT2Array *out, INT2Array *in1, INT2Array *in2 );
void void
LALI4MatrixAdd( LALStatus *, INT4Array *out, INT4Array *in1, INT4Array *in2 ); LALI4MatrixAdd( LALStatus *, INT4Array *out, INT4Array *in1, INT4Array *in2 );
void void
LALI8MatrixAdd( LALStatus *, INT8Array *out, INT8Array *in1, INT8Array *in2 ); LALI8MatrixAdd( LALStatus *, INT8Array *out, INT8Array *in1, INT8Array *in2 );
void void
LALU2MatrixAdd( LALStatus *, UINT2Array *out, UINT2Array *in1, UINT2Array * in2 ); LALU2MatrixAdd( LALStatus *, UINT2Array *out, UINT2Array *in1, UINT2Array * in2 );
void void
LALU4MatrixAdd( LALStatus *, UINT4Array *out, UINT4Array *in1, UINT4Array * in2 ); LALU4MatrixAdd( LALStatus *, UINT4Array *out, UINT4Array *in1, UINT4Array * in2 );
 End of changes. 15 change blocks. 
33 lines changed or deleted 34 lines changed or added


 ODE.h   ODE.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
*/ */
/**** <lalVerbatim file="ODEHV">
* Author: J. D. E. Creighton
* $Id$
**** </lalVerbatim> */
/**** <lalLaTeX>
*
* \section{Header \texttt{ODE.h}}
*
* Routines for solving ordinary differential equations (ODEs).
*
* \subsection*{Synopsis}
* \begin{verbatim}
* #include <lal/ODE.h>
* \end{verbatim}
*
* These routines solve ordinary differential equations (ODEs) of the form:
* \begin{displaymath}
* \dot{\mathbf{x}} = {\mathbf{f}}({\mathbf{x}},t,\ldots)
* \end{displaymath}
* where $\mathbf{f}$ is a specified vector-valued function.
*
**** </lalLaTeX> */
#ifndef _ODE_H #ifndef _ODE_H
#define _ODE_H #define _ODE_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#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
NRCSID( ODEH, "$Id$" ); /**
* \author J. D. E. Creighton
/**** <lalLaTeX> * \addtogroup ODE_h
* *
* \subsection*{Error conditions} * \brief Routines for solving ordinary differential equations (ODEs).
* *
**** </lalLaTeX> */ * \heading{Synopsis}
/**** <lalErrTable> */ * \code
#define ODEH_ENULL 001 * #include <lal/ODE.h>
#define ODEH_ESAME 002 * \endcode
#define ODEH_ESIZE 004 *
#define ODEH_ESZMM 010 * These routines solve ordinary differential equations (ODEs) of the form:
#define ODEH_ENSTP 020 * \f[
* \dot{\mathbf{x}} = {\mathbf{f}}({\mathbf{x}},t,\ldots)
* \f]
* where \f$\mathbf{f}\f$ is a specified vector-valued function.
*
*/
/*@{*/
/**\name Error Codes */
/*@{*/
#define ODEH_ENULL 001 /**< Null pointer. */
#define ODEH_ESAME 002 /**< Same data pointer. */
#define ODEH_ESIZE 004 /**< Invalid size. */
#define ODEH_ESZMM 010 /**< Size mismatch. */
#define ODEH_ENSTP 020 /**< Step number mismatch. */
/*@}*/
/** \cond DONT_DOXYGEN */
#define ODEH_MSGENULL "Null pointer." #define ODEH_MSGENULL "Null pointer."
#define ODEH_MSGESAME "Same data pointer." #define ODEH_MSGESAME "Same data pointer."
#define ODEH_MSGESIZE "Invalid size." #define ODEH_MSGESIZE "Invalid size."
#define ODEH_MSGESZMM "Size mismatch." #define ODEH_MSGESZMM "Size mismatch."
#define ODEH_MSGENSTP "Step number mismatch." #define ODEH_MSGENSTP "Step number mismatch."
/**** </lalErrTable> */ /** \endcond */
/**** <lalLaTeX> /** The independent variables of the ODE (parameters to the ODE function) *
* /
* \subsection*{Structures}
* \idx[Type]{REAL4ODEIndep}
* \idx[Type]{REAL4ODEParams}
*
**** </lalLaTeX> */
/**** <lalVerbatim> */
typedef struct typedef struct
tagREAL4ODEIndep tagREAL4ODEIndep
{ {
SWIGLAL_STRUCT(REAL4ODEIndep); SWIGLAL_STRUCT(REAL4ODEIndep);
REAL4 t; REAL4 t; /**< The independent parameter (e.g., time) that is evolved
void *aux; */
void *aux; /**< Storage for auxiliary variables used internally in the
ODE routine */
} }
REAL4ODEIndep; REAL4ODEIndep;
/**** </lalVerbatim> */
/**** <lalLaTeX> /** The parameters for the ODE step integrator */
*
* The independent variables of the ODE (parameters to the ODE function).
* The fields are:
* \begin{description}
* \item[\texttt{t}] The independent parameter (e.g., time) that is evolved
.
* \item[\texttt{aux}] Storage for auxiliary variables used internally in t
he
* ODE routine.
* \end{description}
*
**** </lalLaTeX> */
/**** <lalVerbatim> */
typedef struct typedef struct
tagREAL4ODEParams tagREAL4ODEParams
{ {
SWIGLAL_STRUCT(REAL4ODEParams); SWIGLAL_STRUCT(REAL4ODEParams);
void ( *ode )( LALStatus *, REAL4Vector *, REAL4Vector *, REAL4ODEIndep * void ( *ode )( LALStatus *, REAL4Vector *, REAL4Vector *, REAL4ODEIndep *
); ); /**< Pointer to the function that computes the RHS of the ODE */
REAL4ODEIndep *indep; REAL4ODEIndep *indep; /**< The independent variables of used by th
REAL4 tstep; is function */
REAL4Vector *xdot; REAL4 tstep; /**< The suggested time step to use */
REAL4Vector *xerr; REAL4Vector *xdot; /**< The value of the LHS of the ODE at the
REAL4 eps; current time */
REAL4VectorSequence *dx; REAL4Vector *xerr; /**< The estimated errors from the last ODE
step */
REAL4 eps; /**< The allowed fractional error per step;
if \c eps is \< \c LAL_REAL4_EPS, then the latter is used */
REAL4VectorSequence *dx; /**< Workspace storage for use in the the st
ep integrator; the length of the sequence depends on which integrator is us
ed */
} }
REAL4ODEParams; REAL4ODEParams;
/**** </lalVerbatim> */
/**** <lalLaTeX>
*
* The parameters for the ODE step integrator. The fields are:
* \begin{description}
* \item[\texttt{ode}] Pointer to the function that computes the RHS of the
ODE.
* \item[\texttt{indep}] The independent variables of used by this function
.
* \item[\texttt{tstep}] The suggested time step to use.
* \item[\texttt{xdot}] The value of the LHS of the ODE at the current time
.
* \item[\texttt{xerr}] The estimated errors from the last ODE step.
* \item[\texttt{eps}] The allowed fractional error per step. If \verb+eps
+ is
* less than \verb+LAL_REAL4_EPS+, then the latter is used instead.
* \item[\texttt{dx}] Workspace storage for use in the the step integrator.
* The length of the sequence depends on which integrator is used.
* \end{description}
*
* \vfill{\footnotesize\input{ODEHV}}
* \newpage\input{ODEC}
* \newpage\input{ODETestC}
*
**** </lalLaTeX> */
/** \see See ODE_h for documentation */
void LALSRungeKutta4( void LALSRungeKutta4(
LALStatus *status, LALStatus *status,
REAL4Vector *output, REAL4Vector *output,
REAL4Vector *input, REAL4Vector *input,
REAL4ODEParams *params REAL4ODEParams *params
); );
/** \see See ODE_h for documentation */
void LALSRungeKutta5( void LALSRungeKutta5(
LALStatus *status, LALStatus *status,
REAL4Vector *output, REAL4Vector *output,
REAL4Vector *input, REAL4Vector *input,
REAL4ODEParams *params REAL4ODEParams *params
); );
/** \see See ODE_h for documentation */
void LALSRungeKutta5Adapt( void LALSRungeKutta5Adapt(
LALStatus *status, LALStatus *status,
REAL4Vector *output, REAL4Vector *output,
REAL4Vector *input, REAL4Vector *input,
REAL4ODEParams *params REAL4ODEParams *params
); );
/*@}*/
#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 /* _ODE_H */ #endif /* _ODE_H */
 End of changes. 14 change blocks. 
94 lines changed or deleted 56 lines changed or added


 PrintFTSeries.h   PrintFTSeries.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
*/ */
#ifndef _PRINTFTSERIES_H
#define _PRINTFTSERIES_H
#include <lal/LALStdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\addtogroup PrintFTSeries_h
\author J. T. Whelan <jtwhelan@loyno.edu> \author J. T. Whelan <jtwhelan@loyno.edu>
\file
\heading{Header \ref PrintFTSeries.h}
\latexonly\label{s_PrintFTSeries_h}\endlatexonly
This is a simple utility to print time and frequency series into a \brief This is a simple utility to print time and frequency series into
file. a file.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/PrintFTSeries.h> #include <lal/PrintFTSeries.h>
\endcode \endcode
Provides prototype information for the routines in Provides prototype information for the routines in \ref PrintTimeSeries_
\ref PrintTimeSeries.c and \ref PrintFrequencySeries.c. c and \ref PrintFrequencySeries_c.
*/ */
/*@{*/
#ifndef _PRINTFTSERIES_H /** \defgroup PrintTimeSeries_c Module PrintTimeSeries.c
#define _PRINTFTSERIES_H
#include <lal/LALRCSID.h> Print a \<datatype\>TimeSeries object into a
#include <lal/LALStdlib.h> file. For use in non-production and test code only.
#ifdef __cplusplus \heading{Description}
extern "C" {
#endif
NRCSID( PRINTFTSERIESH, "$Id$" ); Each member of this family of functions prints the elements of
\f$\langle\mbox{datatype}\rangle\f$\c TimeSeries into a file. Note:
the file name is specified using a character string. This function is
for debugging use only: its arguments do not conform to LAL standards
so it should not be used in any real analysis codes.
\heading{Notes}
This function's arguments do not conform to the LAL spec. For this
reason it should only be used for debugging purposes in test
functions, not in any production code.
Additionally, since printf cannot handle INT8 as integers, the
functions <tt>LALI8PrintTimeSeries()</tt> and
<tt>LALU8PrintTimeSeries()</tt> use a typecast to REAL8 and are thus
only valid for numbers between around \f$-10^{15}\f$ and \f$10^{15}\f$.
The first five lines of the file are a header containing:
<ol>
<li> the name of the series</li>
<li> the starting epoch </li>
<li> the units expressed in terms of the basic SI units</li>
<li> column labels</li>
</ol>
after which come the data, one per line.
The output format is two or three tab-separated columns: the first
column is the time corresponding to the row in question, in seconds
after the series' starting epoch; for real and integer time
series, the second column is the value of the series; for complex time
series, the second column is the real part and the third the imaginary
part of the value.
*/
/*@{*/
void LALI2PrintTimeSeries( INT2TimeSeries *series , const CHAR *filename ); void LALI2PrintTimeSeries( INT2TimeSeries *series , const CHAR *filename );
void LALI4PrintTimeSeries( INT4TimeSeries *series , const CHAR *filename ); void LALI4PrintTimeSeries( INT4TimeSeries *series , const CHAR *filename );
void LALI8PrintTimeSeries( INT8TimeSeries *series , const CHAR *filename ); void LALI8PrintTimeSeries( INT8TimeSeries *series , const CHAR *filename );
void LALU2PrintTimeSeries( UINT2TimeSeries *series , const CHAR *filename ) ; void LALU2PrintTimeSeries( UINT2TimeSeries *series , const CHAR *filename ) ;
void LALU4PrintTimeSeries( UINT4TimeSeries *series , const CHAR *filename ) ; void LALU4PrintTimeSeries( UINT4TimeSeries *series , const CHAR *filename ) ;
void LALU8PrintTimeSeries( UINT8TimeSeries *series , const CHAR *filename ) ; void LALU8PrintTimeSeries( UINT8TimeSeries *series , const CHAR *filename ) ;
void LALPrintTimeSeries( REAL4TimeSeries *series , const CHAR *filename ); void LALPrintTimeSeries( REAL4TimeSeries *series , const CHAR *filename );
void LALSPrintTimeSeries( REAL4TimeSeries *series , const CHAR *filename ); void LALSPrintTimeSeries( REAL4TimeSeries *series , const CHAR *filename );
void LALDPrintTimeSeries( REAL8TimeSeries *series , const CHAR *filename ); void LALDPrintTimeSeries( REAL8TimeSeries *series , const CHAR *filename );
void LALCPrintTimeSeries( COMPLEX8TimeSeries *series , const CHAR *filename ); void LALCPrintTimeSeries( COMPLEX8TimeSeries *series , const CHAR *filename );
void LALZPrintTimeSeries( COMPLEX16TimeSeries *series , const CHAR *filenam e ); void LALZPrintTimeSeries( COMPLEX16TimeSeries *series , const CHAR *filenam e );
/*@}*/
/** \defgroup PrintFrequencySeries_c Module PrintFrequencySeries.c
Print a \<datatype\>FrequencySeries object into a
file. For use in non-production and test code only.
\heading{Description}
Each member of this family of functions prints the elements of
\<datatype\>FrequencySeries into a file.
Note: the file name is specified using a character string. This
function is for debugging use only: its arguments do not conform to
LAL standards so it should not be used in any real analysis codes.
\heading{Notes}
This function's arguments do not conform to the LAL spec. For this
reason it should only be used for debugging purposes in test
functions, not in any production code.
Additionally, since printf cannot handle INT8 as integers, the
functions <tt>LALI8PrintFrequencySeries()</tt> and
<tt>LALU8PrintFrequencySeries()</tt> use a typecast to REAL8 and are
thus only valid for numbers between around \f$-10^{15}\f$ and \f$10^{15}\f$
.
The first four lines of the file are a header containing:
<ol>
<li> the name of the series</li>
<li> heterodyning information, if any</li>
<li> the starting epoch, relative to the GPS reference epoch (1980 January
6)</li>
<li> the units expressed in terms of the basic SI units</li>
<li> column labels</li>
</ol>
after which come the data, one per line.
The output format is two or three tab-separated columns: the first
column is the frequency in hertz corresponding to the row in question;
for real and integer frequency series, the second column is the value
of the series; for complex frequency series, the second column is the
real part and the third the imaginary part of the value.
Note that the frequency given is the physical frequency. In the case
of a heterodyned frequency series, this is the heterodyning frequency
plus the frequency offset. A frequency series of length \f$[N]\f$ is
assumed to be packed so that the 0th element corresponds to zero
frequency offset, elements 1 through \f$[N/2]\f$ to positive frequency
offsets (in ascending order), and elements \f$N-[N/2]\f$ to \f$N-1\f$ to
negative frequency offsets (also in ascending order, so that the
frequency corresponding to the \f$N-1\f$st element is just below that of
the 0th element). If \f$N\f$ is even, the element in position \f$N/2\f$ is
assumed to correspond both the maximum poitive and negative frequency
offset.
*/
/*@{*/
void LALI2PrintFrequencySeries( INT2FrequencySeries *series , const CHAR *f ilename ); void LALI2PrintFrequencySeries( INT2FrequencySeries *series , const CHAR *f ilename );
void LALI4PrintFrequencySeries( INT4FrequencySeries *series , const CHAR *f ilename ); void LALI4PrintFrequencySeries( INT4FrequencySeries *series , const CHAR *f ilename );
void LALI8PrintFrequencySeries( INT8FrequencySeries *series , const CHAR *f ilename ); void LALI8PrintFrequencySeries( INT8FrequencySeries *series , const CHAR *f ilename );
void LALU2PrintFrequencySeries( UINT2FrequencySeries *series , const CHAR * filename ); void LALU2PrintFrequencySeries( UINT2FrequencySeries *series , const CHAR * filename );
void LALU4PrintFrequencySeries( UINT4FrequencySeries *series , const CHAR * filename ); void LALU4PrintFrequencySeries( UINT4FrequencySeries *series , const CHAR * filename );
void LALU8PrintFrequencySeries( UINT8FrequencySeries *series , const CHAR * filename ); void LALU8PrintFrequencySeries( UINT8FrequencySeries *series , const CHAR * filename );
void LALPrintFrequencySeries( REAL4FrequencySeries *series , const CHAR *fi lename ); void LALPrintFrequencySeries( REAL4FrequencySeries *series , const CHAR *fi lename );
void LALSPrintFrequencySeries( REAL4FrequencySeries *series , const CHAR *f ilename ); void LALSPrintFrequencySeries( REAL4FrequencySeries *series , const CHAR *f ilename );
void LALDPrintFrequencySeries( REAL8FrequencySeries *series , const CHAR *f ilename ); void LALDPrintFrequencySeries( REAL8FrequencySeries *series , const CHAR *f ilename );
void LALCPrintFrequencySeries( COMPLEX8FrequencySeries *series , const CHAR *filename ); void LALCPrintFrequencySeries( COMPLEX8FrequencySeries *series , const CHAR *filename );
void LALZPrintFrequencySeries( COMPLEX16FrequencySeries *series , const CHA R *filename ); void LALZPrintFrequencySeries( COMPLEX16FrequencySeries *series , const CHA R *filename );
/*@}*/
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _PRINTFTSERIES_H */ #endif /* _PRINTFTSERIES_H */
 End of changes. 14 change blocks. 
16 lines changed or deleted 111 lines changed or added


 PrintVector.h   PrintVector.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
*/ */
#ifndef _PRINTVECTOR_H
#define _PRINTVECTOR_H
#ifndef _LALSTDLIB_H
#include <lal/LALStdlib.h>
#ifndef _LALSTDLIB_H
#define _LALSTDLIB_H
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\addtogroup PrintVector_h
\author Allen, B.; generalized by J. T. Whelan <jtwhelan@loyno.edu> \author Allen, B.; generalized by J. T. Whelan <jtwhelan@loyno.edu>
\file
\heading{Header \ref PrintVector.h} \brief This is a simple utility to print vectors into a file.
\latexonly\label{s_PrintVector_h}\endlatexonly
This is a simple utility to print vectors into a file.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/PrintVector.h> #include <lal/PrintVector.h>
\endcode \endcode
Contains the prototypes for the Contains the prototypes for the LAL <tt>\<datatype\>PrintVector</tt> fun
LAL\f$\langle\mbox{DT}\rangle\f$PrintVector functions ctions
*/ \heading{Description}
#ifndef _PRINTVECTOR_H Each member of this family of functions prints the elements of
#define _PRINTVECTOR_H \f$\langle\mbox{datatype}\rangle\f$\c Vector into a file. Note: the
file names are <tt>\<datatype\>PrintVector.000</tt>,
<tt>\<datatype\>PrintVector.001</tt>, and so on.
(<tt>\<datatype\></tt> is the abbreviation for the datatype,
included in the function names above.) The file numbers are
incremented with each additional call. This function is for debugging
use only: it uses a static internal variable to keep track of the file
number so it should not be used in any real analysis codes.
#include <lal/LALRCSID.h> \heading{Notes}
#ifndef _LALSTDLIB_H This function uses an internal static variable to keep track of file
#include <lal/LALStdlib.h> numbers. For this reason it should only be used for debugging
#ifndef _LALSTDLIB_H purposes in test functions, not in any production code.
#define _LALSTDLIB_H
#endif
#endif
#ifdef __cplusplus Additionally, since printf cannot handle INT8 as integers, the
extern "C" { functions <tt>LALI8PrintVector()</tt> and <tt>LALU8PrintVector()</tt> use
#endif a typecast to REAL8 and are thus only valid for numbers between around
\f$-10^{15}\f$ and \f$10^{15}\f$.
NRCSID( PRINTVECTORH, "$Id$" ); The output format is two or three space-separated columns: the first
column is the index of the element; the second is the element itself
for real and integer vectors and the real part of the element for
complex vectors; complex vectors have a third column containing the
imaginary part of the element.
*/
/*@{*/
void LALCHARPrintVector( CHARVector *vector ); void LALCHARPrintVector( CHARVector *vector );
void LALI2PrintVector( INT2Vector *vector ); void LALI2PrintVector( INT2Vector *vector );
void LALI4PrintVector( INT4Vector *vector ); void LALI4PrintVector( INT4Vector *vector );
void LALI8PrintVector( INT8Vector *vector ); void LALI8PrintVector( INT8Vector *vector );
void LALU2PrintVector( UINT2Vector *vector ); void LALU2PrintVector( UINT2Vector *vector );
void LALU4PrintVector( UINT4Vector *vector ); void LALU4PrintVector( UINT4Vector *vector );
void LALU8PrintVector( UINT8Vector *vector ); void LALU8PrintVector( UINT8Vector *vector );
void LALPrintVector( REAL4Vector *vector ); void LALPrintVector( REAL4Vector *vector );
void LALSPrintVector( REAL4Vector *vector ); void LALSPrintVector( REAL4Vector *vector );
void LALDPrintVector( REAL8Vector *vector ); void LALDPrintVector( REAL8Vector *vector );
void LALCPrintVector( COMPLEX8Vector *vector ); void LALCPrintVector( COMPLEX8Vector *vector );
void LALZPrintVector( COMPLEX16Vector *vector ); void LALZPrintVector( COMPLEX16Vector *vector );
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _PRINTVECTOR_H */ #endif /* _PRINTVECTOR_H */
 End of changes. 13 change blocks. 
21 lines changed or deleted 45 lines changed or added


 Random.h   Random.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
*/ */
/**** <lalVerbatim file="RandomHV">
* Author: Creighton, J. D. E. and Tibbits, M. M.
* $Id$
**** </lalVerbatim> */
/**** <lalLaTeX>
*
* \section{Header \texttt{Random.h}}
* \label{s:Random.h}
*
* Generates random numbers.
*
* \subsection*{Synopsis}
* \begin{verbatim}
* #include <lal/Random.h>
* \end{verbatim}
*
* \noindent This header covers the routines for generating random numbers.
*
**** </lalLaTeX> */
#ifndef _RANDOM_H #ifndef _RANDOM_H
#define _RANDOM_H #define _RANDOM_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (RANDOMH, "$Id$"); /**
* \author Creighton, J. D. E. and Tibbits, M. M.
/**** <lalLaTeX> * \addtogroup Random_h
* *
* \subsection*{Error conditions} * \brief Generates random numbers.
* *
**** </lalLaTeX> */ * \heading{Synopsis}
* \code
* #include <lal/Random.h>
* \endcode
*
* This header covers the routines for generating random numbers.
*
*/
/*@{*/
/**\name Error Codes */
/*@{*/
#define RANDOMH_ENULL 1 /**< Null pointer */
#define RANDOMH_ENNUL 2 /**< Non-null pointer */
#define RANDOMH_ESIZE 4 /**< Invalid size */
#define RANDOMH_ELNTH 8 /**< Must have more than one data po
int */
#define RANDOMH_ESEGZ 16 /**< Invalid number of segments */
#define RANDOMH_ENUMZ 32 /**< Invalid number of points in seg
ment */
#define RANDOMH_EALOC 64 /**< Memory Allocation Error */
#define RANDOMH_EINIT 128 /**< Params must be initialized with
CreateParams first */
#define RANDOMH_EZERO 256 /**< Output Vector length must be gr
eater than zero */
#define RANDOMH_ESEED 512 /**< Improper seed value */
/*@}*/
/*@}*/
/* <lalErrTable> */
#define RANDOMH_ENULL 1
#define RANDOMH_ENNUL 2
#define RANDOMH_ESIZE 4
#define RANDOMH_ELNTH 8
#define RANDOMH_ESEGZ 16
#define RANDOMH_ENUMZ 32
#define RANDOMH_EALOC 64
#define RANDOMH_EINIT 128
#define RANDOMH_EZERO 256
#define RANDOMH_ESEED 512
#define RANDOMH_MSGENULL "Null pointer" #define RANDOMH_MSGENULL "Null pointer"
#define RANDOMH_MSGENNUL "Non-null pointer" #define RANDOMH_MSGENNUL "Non-null pointer"
#define RANDOMH_MSGESIZE "Invalid size" #define RANDOMH_MSGESIZE "Invalid size"
#define RANDOMH_MSGELNTH "Must have more than one data point" #define RANDOMH_MSGELNTH "Must have more than one data point"
#define RANDOMH_MSGESEGZ "Invalid number of segments" #define RANDOMH_MSGESEGZ "Invalid number of segments"
#define RANDOMH_MSGENUMZ "Invalid number of points in segment" #define RANDOMH_MSGENUMZ "Invalid number of points in segment"
#define RANDOMH_MSGEALOC "Memory Allocation Error" #define RANDOMH_MSGEALOC "Memory Allocation Error"
#define RANDOMH_MSGEINIT "Params must be initialized with CreateParams firs t" #define RANDOMH_MSGEINIT "Params must be initialized with CreateParams firs t"
#define RANDOMH_MSGEZERO "Output Vector length must be greater than zero" #define RANDOMH_MSGEZERO "Output Vector length must be greater than zero"
#define RANDOMH_MSGESEED "Improper seed value" #define RANDOMH_MSGESEED "Improper seed value"
/* </lalErrTable> */
/**** <lalLaTeX>
*
* \subsection*{Structures}
* \idx[Type]{RandomParams}
* \idx[Type]{MTRandomParams}
*
* \begin{verbatim}
* typedef struct tagRandomParams RandomParams;
* \end{verbatim}
*
* This structure contains the parameters necessary for generating the curr
ent
* sequence of random numbers (based on the initial seed). The contents sh
ould
* not be manually adjusted.
*
* \begin{verbatim}
* typedef struct tagMTRandomParams MTRandomParams;
* \end{verbatim}
*
* This structure contains the parameters necessary for generating the curr
ent
* sequence of Mersenne twiser random numbers (based on the initial seed).
The
* contents should not be manually adjusted.
*
**** </lalLaTeX> */
/** \ingroup Random_h
* \brief This structure contains the parameters necessary for generating t
he current
* sequence of random numbers (based on the initial seed).
* \note The contents should not be manually adjusted.
*/
typedef struct typedef struct
tagRandomParams tagRandomParams
{ {
SWIGLAL_STRUCT(RandomParams); SWIGLAL_STRUCT(RandomParams);
INT4 i; INT4 i;
INT4 y; INT4 y;
INT4 v[32]; INT4 v[32];
} }
RandomParams; RandomParams;
typedef struct tagMTRandomParams MTRandomParams; typedef struct tagMTRandomParams MTRandomParams;
/**** <lalLaTeX>
*
* \newpage\input{RandomC}
* \newpage\input{RandomTestC}
* \newpage\input{MersenneRandomC}
* \newpage\input{MersenneRandomTestC}
*
**** </lalLaTeX> */
INT4 XLALBasicRandom( INT4 i ); INT4 XLALBasicRandom( INT4 i );
RandomParams * XLALCreateRandomParams( INT4 seed ); RandomParams * XLALCreateRandomParams( INT4 seed );
void XLALResetRandomParams( RandomParams *params, INT4 seed ); void XLALResetRandomParams( RandomParams *params, INT4 seed );
void XLALDestroyRandomParams( RandomParams *params ); void XLALDestroyRandomParams( RandomParams *params );
REAL4 XLALUniformDeviate( RandomParams *params ); REAL4 XLALUniformDeviate( RandomParams *params );
int XLALNormalDeviates( REAL4Vector *deviates, RandomParams *params ); int XLALNormalDeviates( REAL4Vector *deviates, RandomParams *params );
REAL4 XLALNormalDeviate( RandomParams *params ); REAL4 XLALNormalDeviate( RandomParams *params );
void void
LALCreateRandomParams ( LALCreateRandomParams (
 End of changes. 8 change blocks. 
75 lines changed or deleted 38 lines changed or added


 ReadFTSeries.h   ReadFTSeries.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
*/ */
#ifndef _READFTSERIES_H
#define _READFTSERIES_H
#include <lal/LALStdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\addtogroup ReadFTSeries_h
\author Torres, C. W. \author Torres, C. W.
\file
\heading{Header \ref ReadFTSeries.h} \brief This is a simple utility to Read time and frequency series into a
\latexonly\label{s_ReadFTSeries_h}\endlatexonly file.
This is a simple utility to Read time and frequency series into a
file.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/ReadFTSeries.h> #include <lal/ReadFTSeries.h>
\endcode \endcode
Provides prototype information for the routines in Provides prototype information for the routines in \ref ReadTimeSeries_c
\ref ReadTimeSeries.c and \ref ReadFrequencySeries.c. and \ref ReadFrequencySeries_c.
*/ /*@{*/
*/
#ifndef _READFTSERIES_H
#define _READFTSERIES_H
#include <lal/LALRCSID.h>
#include <lal/LALStdlib.h>
#ifdef __cplusplus /**\name Error Codes */ /*@{*/
extern "C" { #define READFTSERIESH_EFILENOTFOUND 1 /**< Invalid Filename or Fi
#endif le Not Found */
#define READFTSERIESH_EPARSE 2 /**< Error Parsing File */
/*@}*/
/** \cond DONT_DOXYGEN */
#define READFTSERIESH_MSGEFILENOTFOUND "Invalid Filename or File Not Fo
und"
#define READFTSERIESH_MSGEPARSE "Error Parsing File"
/** \endcond */
#ifndef SWIG /* exclude from SWIG interface */ #ifndef SWIG /* exclude from SWIG interface */
/** \cond DONT_DOXYGEN */
enum enumLALSupportUnitTextSize { enum enumLALSupportUnitTextSize {
LALSupportUnitTextSize = sizeof("10^-32768 m^-32768/32767 " LALSupportUnitTextSize = sizeof("10^-32768 m^-32768/32767 "
"kg^-32768/32767 " "kg^-32768/32767 "
"s^-32768/32767 A^-32768/32767 " "s^-32768/32767 A^-32768/32767 "
"K^-32768/32767 strain^-32768/32767 " "K^-32768/32767 strain^-32768/32767 "
"count^-32768/32767") "count^-32768/32767")
}; };
enum enumMaxLineLength { enum enumMaxLineLength {
MaxLineLength = LALSupportUnitTextSize + sizeof("Units are ()\n") MaxLineLength = LALSupportUnitTextSize + sizeof("Units are ()\n")
}; };
/** \endcond */
#endif /* SWIG */ #endif /* SWIG */
NRCSID( READFTSERIESH, "$Id$" ); /** \defgroup ReadTimeSeries_c Module ReadTimeSeries.c
\author Torres, C. V.
\brief Each member of this family of functions reads from a file the ou
tput of the corresponding \c PrintTimeSeries routine.
\heading{Notes}
These functions perform I/O operations, which are not a part of LAL
proper They should only be used for debugging purposes in test
functions, not in any production code.
*/ /*@{*/
void LALReadTimeSeries(LALStatus* status, REAL4TimeSeries *series , const CHAR *filename ); void LALReadTimeSeries(LALStatus* status, REAL4TimeSeries *series , const CHAR *filename );
void LALSReadTimeSeries(LALStatus* status, REAL4TimeSeries *series , const CHAR *filename ); void LALSReadTimeSeries(LALStatus* status, REAL4TimeSeries *series , const CHAR *filename );
void LALDReadTimeSeries(LALStatus* status, REAL8TimeSeries *series , const CHAR *filename ); void LALDReadTimeSeries(LALStatus* status, REAL8TimeSeries *series , const CHAR *filename );
void LALCReadTimeSeries(LALStatus* status, COMPLEX8TimeSeries *series , co nst CHAR *filename ); void LALCReadTimeSeries(LALStatus* status, COMPLEX8TimeSeries *series , co nst CHAR *filename );
void LALZReadTimeSeries(LALStatus* status, COMPLEX16TimeSeries *series , c onst CHAR *filename ); void LALZReadTimeSeries(LALStatus* status, COMPLEX16TimeSeries *series , c onst CHAR *filename );
/*@}*/
/** \defgroup ReadFrequencySeries_c Module ReadFrequencySeries.c
\author Torres, C. V.
\brief Each member of this family of functions reads from a file the ou
tput of the corresponding \c PrintFrequencySeries routine.
\heading{Notes}
These functions perform I/O operations, which are not a part of LAL
proper. They should only be used for debugging purposes in test
functions, not in any production code.
*/ /*@{*/
void LALReadFrequencySeries(LALStatus* status, REAL4FrequencySeries *serie s , const CHAR *filename ); void LALReadFrequencySeries(LALStatus* status, REAL4FrequencySeries *serie s , const CHAR *filename );
void LALSReadFrequencySeries(LALStatus* status, REAL4FrequencySeries *seri es , const CHAR *filename ); void LALSReadFrequencySeries(LALStatus* status, REAL4FrequencySeries *seri es , const CHAR *filename );
void LALDReadFrequencySeries(LALStatus* status, REAL8FrequencySeries *seri es , const CHAR *filename ); void LALDReadFrequencySeries(LALStatus* status, REAL8FrequencySeries *seri es , const CHAR *filename );
void LALCReadFrequencySeries(LALStatus* status, COMPLEX8FrequencySeries *se ries , const CHAR *filename ); void LALCReadFrequencySeries(LALStatus* status, COMPLEX8FrequencySeries *se ries , const CHAR *filename );
void LALZReadFrequencySeries(LALStatus* status, COMPLEX16FrequencySeries * series , const CHAR *filename ); void LALZReadFrequencySeries(LALStatus* status, COMPLEX16FrequencySeries * series , const CHAR *filename );
/*@}*/
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _READSERIES_H */ #endif /* _READSERIES_H */
/**\name Error Codes */ /*@{*/
#define READFTSERIESH_EFILENOTFOUND 1
#define READFTSERIESH_EPARSE 2
#define READFTSERIESH_MSGEFILENOTFOUND "Invalid Filename or File Not Fo
und"
#define READFTSERIESH_MSGEPARSE "Error Parsing File"
/*@}*/
 End of changes. 14 change blocks. 
20 lines changed or deleted 54 lines changed or added


 ReadNoiseSpectrum.h   ReadNoiseSpectrum.h 
skipping to change at line 26 skipping to change at line 26
* 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 Name: ReadNoiseSpectrum.h * File Name: ReadNoiseSpectrum.h
* *
* Author: Brady, P. R. * Author: Brady, P. R.
* *
* Revision: $Id$
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
/* <lalVerbatim file="ReadNoiseSpectrumHV">
Author: Brady, P. R.
$Id$
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{ReadNoiseSpectrum.h}}
\label{s:ReadNoiseSpectrum.h}
Provides function to read in a file containing a possibly unequally sampled
noise amplitude spectrum ($\textrm{strain}/\sqrt(\textrm{Hz})$) and return
as
a frequency series.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/ReadNoiseSpectrum.h>
\end{verbatim}
</lalLaTeX> */
#ifndef _READNOISESPECTRUMH_H #ifndef _READNOISESPECTRUMH_H
#define _READNOISESPECTRUMH_H #define _READNOISESPECTRUMH_H
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/Date.h> #include <lal/Date.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
NRCSID (READNOISESPECTRUMH, "$Id$"); /**
\addtogroup ReadNoiseSpectrum_h
\author Brady, P. R.
/* <lalLaTeX> \brief Provides function to read in a file containing a possibly unequal
\newpage\subsection*{Error codes} ly sampled
</lalLaTeX> */ noise amplitude spectrum (\f$\textrm{strain}/\sqrt(\textrm{Hz})\f$) and
/* <lalErrTable> */ return as
#define LALREADNOISESPECTRUMH_ENULL 1 a frequency series.
#define LALREADNOISESPECTRUMH_ENNUL 2
#define LALREADNOISESPECTRUMH_EALOC 3 \heading{Synopsis}
#define LALREADNOISESPECTRUMH_EOPEN 4 \code
#define LALREADNOISESPECTRUMH_EFCLO 5 #include <lal/ReadNoiseSpectrum.h>
#define LALREADNOISESPECTRUMH_EPARS 8 \endcode
*/ /*@{*/
/**\name Error Codes */ /*@{*/
#define LALREADNOISESPECTRUMH_ENULL 1 /**< Null pointer */
#define LALREADNOISESPECTRUMH_ENNUL 2 /**< Non-null pointer */
#define LALREADNOISESPECTRUMH_EALOC 3 /**< Memory allocation error */
#define LALREADNOISESPECTRUMH_EOPEN 4 /**< Error opening file */
#define LALREADNOISESPECTRUMH_EFCLO 5 /**< Error closing file */
#define LALREADNOISESPECTRUMH_EPARS 8 /**< Error parsing spectrum file */
/*@}*/
/*@}*/
#define LALREADNOISESPECTRUMH_MSGENULL "Null pointer" #define LALREADNOISESPECTRUMH_MSGENULL "Null pointer"
#define LALREADNOISESPECTRUMH_MSGENNUL "Non-null pointer" #define LALREADNOISESPECTRUMH_MSGENNUL "Non-null pointer"
#define LALREADNOISESPECTRUMH_MSGEALOC "Memory allocation error" #define LALREADNOISESPECTRUMH_MSGEALOC "Memory allocation error"
#define LALREADNOISESPECTRUMH_MSGEOPEN "Error opening file" #define LALREADNOISESPECTRUMH_MSGEOPEN "Error opening file"
#define LALREADNOISESPECTRUMH_MSGEFCLO "Error closing file" #define LALREADNOISESPECTRUMH_MSGEFCLO "Error closing file"
#define LALREADNOISESPECTRUMH_MSGEPARS "Error parsing spectrum file" #define LALREADNOISESPECTRUMH_MSGEPARS "Error parsing spectrum file"
/* </lalErrTable> */
#define LALREADNOISESPECTRUM_MAXLINELENGTH 2048 #define LALREADNOISESPECTRUM_MAXLINELENGTH 2048
void LALReadNoiseSpectrum( void LALReadNoiseSpectrum(
LALStatus *status, LALStatus *status,
REAL4FrequencySeries *spectrum, REAL4FrequencySeries *spectrum,
CHAR *fname CHAR *fname
); );
/* <lalLaTeX>
\vfill{\footnotesize\input{ReadNoiseSpectrumHV}}
\newpage\input{ReadNoiseSpectrumC}
</lalLaTeX> */
#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 /* _READNOISESPECTRUMH_H */ #endif /* _READNOISESPECTRUMH_H */
 End of changes. 6 change blocks. 
38 lines changed or deleted 24 lines changed or added


 RealFFT.h   RealFFT.h 
skipping to change at line 41 skipping to change at line 41
#ifdef __cplusplus #ifdef __cplusplus
#ifdef __GNUC__ #ifdef __GNUC__
#define RESTRICT __restrict__ #define RESTRICT __restrict__
#else #else
#define RESTRICT #define RESTRICT
#endif #endif
#else #else
#define RESTRICT restrict #define RESTRICT restrict
#endif #endif
NRCSID( REALFFTH, "$Id$" );
/** Plan to perform FFT of REAL4 data */ /** Plan to perform FFT of REAL4 data */
typedef struct tagREAL4FFTPlan REAL4FFTPlan; typedef struct tagREAL4FFTPlan REAL4FFTPlan;
/** Plan to perform FFT of REAL8 data */ /** Plan to perform FFT of REAL8 data */
typedef struct tagREAL8FFTPlan REAL8FFTPlan; typedef struct tagREAL8FFTPlan REAL8FFTPlan;
#define tagRealFFTPlan tagREAL4FFTPlan #define tagRealFFTPlan tagREAL4FFTPlan
#define RealFFTPlan REAL4FFTPlan #define RealFFTPlan REAL4FFTPlan
/** /**
* *
* \addtogroup RealFFT_h * \addtogroup RealFFT_h
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ResampleTimeSeries.h   ResampleTimeSeries.h 
skipping to change at line 37 skipping to change at line 37
#ifndef _RESAMPLETIMESERIES_H #ifndef _RESAMPLETIMESERIES_H
#define _RESAMPLETIMESERIES_H #define _RESAMPLETIMESERIES_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
NRCSID( RESAMPLETIMESERIESH, "$Id$" );
/** /**
* \author Brown, D. A. * \author Brown, D. A.
* \addtogroup ResampleTimeSeries_h Header ResampleTimeSeries.h * \addtogroup ResampleTimeSeries_h Header ResampleTimeSeries.h
* *
* \brief Provides routines to resample a time series. * \brief Provides routines to resample a time series.
* *
* At present only integer downsampling of ::REAL4TimeSeries by a power of two is supported. * At present only integer downsampling of ::REAL4TimeSeries by a power of two is supported.
* *
* \heading{Synopsis} * \heading{Synopsis}
* \code * \code
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 RngMedBias.h   RngMedBias.h 
skipping to change at line 26 skipping to change at line 26
* 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 Name: RngMedBias.h * File Name: RngMedBias.h
* *
* Authors: Krishnan, B. * Authors: Krishnan, B.
* *
* Revision: $Id$
* *
* History: Created by Krishnan Feb 24, 2004 * History: Created by Krishnan Feb 24, 2004
* *
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
/* *********************************** <lalVerbatim file="RngMedBiasHV">
Author: Krishnan, B., Itoh, Y.
$Id$
************************************* </lalVerbatim> */
/* <lalLaTeX> *********************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Header \texttt{RngMedBias.h}}
\label{s:RngMedBias.h}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/RngMedBias.h>
\end{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{Error conditions}
\vspace{0.1in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill{\footnotesize\input{RngMedBiasHV}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\input{RngMedBiasC}
%%%%%%%%%% Test program. %%
\newpage\input{RngMedBiasTestC}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*************************************************</lalLaTeX> */
/*
* 4. Protection against double inclusion (include-loop protection)
* Note the naming convention!
*/
#ifndef _RNGMEDBIAS_H #ifndef _RNGMEDBIAS_H
#define _RNGMEDBIAS_H #define _RNGMEDBIAS_H
/*
* 5. Includes. This header may include others; if so, they go immediately
* after include-loop protection. Includes should appear in the followin
g
* order:
* a. Standard library includes
* b. LDAS includes
* c. LAL includes
*/
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
/*
* Protection against C++ name mangling
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /**
* 6. Assignment of Id string using NRCSID() \author Krishnan, B., Itoh, Y.
*/ \addtogroup RngMedBias_h
\brief Routine for finding bias in median for exponential distribution
NRCSID (RNGMEDBIASH, "$Id$"); \heading{Synopsis}
/* \code
* 7. Error codes and messages. This must be auto-extracted for #include <lal/RngMedBias.h>
* inclusion in the documentation. \endcode
*/
/* <lalErrTable file="RngMedBiasHErrorTable"> */ */
/*@{*/
#define RNGMEDBIASH_ENULL 1 /**\name Error Codes */
#define RNGMEDBIASH_EVAL 5 /*@{*/
#define RNGMEDBIASH_ENULL 1 /**< Null pointer */
#define RNGMEDBIASH_EVAL 5 /**< Invalid value */
/*@}*/
/*@}*/
#define RNGMEDBIASH_MSGENULL "Null pointer" #define RNGMEDBIASH_MSGENULL "Null pointer"
#define RNGMEDBIASH_MSGEVAL "Invalid value" #define RNGMEDBIASH_MSGEVAL "Invalid value"
/* </lalErrTable> */
/* ****************************************************** /* ******************************************************
* 8. Macros. But, note that macros are deprecated. * 8. Macros. But, note that macros are deprecated.
* They could be moved to the modules where are needed * They could be moved to the modules where are needed
*/ */
/* ******************************************************* /* *******************************************************
* 9. Constant Declarations. (discouraged) * 9. Constant Declarations. (discouraged)
*/ */
/* ************************************************************** /* **************************************************************
 End of changes. 10 change blocks. 
66 lines changed or deleted 17 lines changed or added


 Segments.h   Segments.h 
skipping to change at line 139 skipping to change at line 139
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/XLALError.h> #include <lal/XLALError.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
/** \cond DONT_DOXYGEN */
NRCSID( SEGMENTSH, "$Id$" );
/** \endcond */
/*------------------- Compile-time parameters -------------------*/ /*------------------- Compile-time parameters -------------------*/
/** \ingroup Segments_h */ /*@{*/ /** \ingroup Segments_h */ /*@{*/
#define SEGMENTSH_ALLOCBLOCK 64 /**< Initial number of LALSeg spaces to #define SEGMENTSH_ALLOCBLOCK 64 /**< Initial number of LALSeg spaces to
* allocate in memory at one time; this is * allocate in memory at one time; this is
* intended to reduce the number of memory * intended to reduce the number of memory
* reallocation calls needing to be made to * reallocation calls needing to be made to
* build up a segment list. For a large * build up a segment list. For a large
* segment list, the reallocation size * segment list, the reallocation size
* switches over to a multiplicative factor . * switches over to a multiplicative factor .
*/ */
 End of changes. 1 change blocks. 
4 lines changed or deleted 0 lines changed or added


 SegmentsIO.h   SegmentsIO.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
*/ */
/* <lalVerbatim file="SegmentsIOHV"> /**
Author: Peter Shawhan * \addtogroup SegmentsIO_h
Revision: $Id$ * \author Peter Shawhan
</lalVerbatim> */ *
* \brief Provides segment list reading and writing functions as part of th
/* <lalLaTeX> e \c lalsupport library.
\section{Header \texttt{SegmentsIO.h}} *
\label{s:SegmentsIO.h} * \heading{Synopsis}
* \code
Provides segment list reading and writing functions as part of the \texttt{ * #include <lal/Segments.h>
lalsupport} library. * #include <lal/SegmentsIO.h>
* \endcode
\subsection*{Synopsis} *
\begin{verbatim} * \heading{Notes}
#include <lal/Segments.h> * The baseline format of a segment list file is described at
#include <lal/SegmentsIO.h> * <tt>http://www.lsc-group.phys.uwm.edu/daswg/docs/technical/seglist_forma
\end{verbatim} t.html</tt> .
*/
\subsection*{Notes} /*@{*/
The baseline format of a segment list file is described at /**\name Error Codes */ /*@{*/
\newline #define SEGMENTSIOH_ENULL 1 /**< Null pointer passed to function */
\texttt{http://www.lsc-group.phys.uwm.edu/daswg/docs/technical/seglist\_for #define SEGMENTSIOH_EINVAL 2 /**< LALSegList structure was not properly
mat.html} . initialized */
#define SEGMENTSIOH_EBADOPT 3 /**< Invalid option letter in options strin
\subsection*{Error codes} g */
</lalLaTeX> */ #define SEGMENTSIOH_ENOFMT 4 /**< No output format specified in options
string */
#define SEGMENTSIOH_EOPENR 5 /**< Error opening segment list file for re
ading */
#define SEGMENTSIOH_EOPENW 6 /**< Error opening segment list file for wr
iting */
#define SEGMENTSIOH_EFMT 7 /**< Segment list file is not in a recogniz
ed format */
#define SEGMENTSIOH_EPARSE 8 /**< Parsing error while reading from file
*/
#define SEGMENTSIOH_EDOM 9 /**< GPS times do not represent a valid seg
ment */
#define SEGMENTSIOH_EINT 10 /**< Internal error in SegmentsIO module */
/*@}*/
/*@}*/
/* <lalErrTable> */
#define SEGMENTSIOH_ENULL 1
#define SEGMENTSIOH_MSGENULL "Null pointer passed to function" #define SEGMENTSIOH_MSGENULL "Null pointer passed to function"
#define SEGMENTSIOH_EINVAL 2
#define SEGMENTSIOH_MSGEINVAL "LALSegList structure was not properly initia lized" #define SEGMENTSIOH_MSGEINVAL "LALSegList structure was not properly initia lized"
#define SEGMENTSIOH_EBADOPT 3
#define SEGMENTSIOH_MSGEBADOPT "Invalid option letter in options string" #define SEGMENTSIOH_MSGEBADOPT "Invalid option letter in options string"
#define SEGMENTSIOH_ENOFMT 4
#define SEGMENTSIOH_MSGENOFMT "No output format specified in options string " #define SEGMENTSIOH_MSGENOFMT "No output format specified in options string "
#define SEGMENTSIOH_EOPENR 5
#define SEGMENTSIOH_MSGEOPENR "Error opening segment list file for reading" #define SEGMENTSIOH_MSGEOPENR "Error opening segment list file for reading"
#define SEGMENTSIOH_EOPENW 6
#define SEGMENTSIOH_MSGEOPENW "Error opening segment list file for writing" #define SEGMENTSIOH_MSGEOPENW "Error opening segment list file for writing"
#define SEGMENTSIOH_EFMT 7
#define SEGMENTSIOH_MSGEFMT "Segment list file is not in a recognized forma t" #define SEGMENTSIOH_MSGEFMT "Segment list file is not in a recognized forma t"
#define SEGMENTSIOH_EPARSE 8
#define SEGMENTSIOH_MSGEPARSE "Parsing error while reading from file" #define SEGMENTSIOH_MSGEPARSE "Parsing error while reading from file"
#define SEGMENTSIOH_EDOM 9
#define SEGMENTSIOH_MSGEDOM "GPS times do not represent a valid segment" #define SEGMENTSIOH_MSGEDOM "GPS times do not represent a valid segment"
#define SEGMENTSIOH_EINT 10
#define SEGMENTSIOH_MSGEINT "Internal error in SegmentsIO module" #define SEGMENTSIOH_MSGEINT "Internal error in SegmentsIO module"
/* </lalErrTable> */
/* <lalLaTeX>
\vfill{\footnotesize\input{SegmentsIOHV}}
\newpage\input{SegmentsIOC}
\newpage\input{SegmentsIOTestC}
</lalLaTeX> */
#ifndef _SEGMENTSIO_H #ifndef _SEGMENTSIO_H
#define _SEGMENTSIO_H #define _SEGMENTSIO_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <lal/FileIO.h> #include <lal/FileIO.h>
#include <lal/Segments.h> #include <lal/Segments.h>
NRCSID( SEGMENTSIOH, "$Id$" );
/* Function prototypes */ /* Function prototypes */
void void
LALSegListRead( LALStatus *status, LALSegList *seglist, const CHAR *fileNam e, const CHAR *options ); LALSegListRead( LALStatus *status, LALSegList *seglist, const CHAR *fileNam e, const CHAR *options );
void void
LALSegListWrite( LALStatus *status, LALSegList *seglist, const CHAR *fileNa me, const CHAR *options ); LALSegListWrite( LALStatus *status, LALSegList *seglist, const CHAR *fileNa me, const CHAR *options );
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 13 change blocks. 
46 lines changed or deleted 40 lines changed or added


 SeqFactories.h   SeqFactories.h 
skipping to change at line 79 skipping to change at line 79
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (SEQFACTORIESH, "$Id$");
/**\name Error Codes *//*@{*/ /**\name Error Codes *//*@{*/
/** \ingroup SeqFactories_h */ /** \ingroup SeqFactories_h */
#define SEQFACTORIESH_ESLENGTH 1 #define SEQFACTORIESH_ESLENGTH 1
#define SEQFACTORIESH_EVLENGTH 2 #define SEQFACTORIESH_EVLENGTH 2
#define SEQFACTORIESH_EALENGTH 4 #define SEQFACTORIESH_EALENGTH 4
#define SEQFACTORIESH_EVPTR 8 #define SEQFACTORIESH_EVPTR 8
#define SEQFACTORIESH_EUPTR 16 #define SEQFACTORIESH_EUPTR 16
#define SEQFACTORIESH_EDPTR 32 #define SEQFACTORIESH_EDPTR 32
#define SEQFACTORIESH_EINPTR 64 #define SEQFACTORIESH_EINPTR 64
#define SEQFACTORIESH_EMALLOC 128 #define SEQFACTORIESH_EMALLOC 128
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Sequence.h   Sequence.h 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef _SEQUENCE_H #ifndef _SEQUENCE_H
#define _SEQUENCE_H #define _SEQUENCE_H
#include <stddef.h> #include <stddef.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALRCSID.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
NRCSID(SEQUENCEH, "$Id:");
/* COMPLEX8 prototypes */ /* COMPLEX8 prototypes */
void XLALDestroyCOMPLEX8Sequence ( void XLALDestroyCOMPLEX8Sequence (
COMPLEX8Sequence *sequence COMPLEX8Sequence *sequence
); );
COMPLEX8Sequence *XLALCreateCOMPLEX8Sequence ( COMPLEX8Sequence *XLALCreateCOMPLEX8Sequence (
size_t length size_t length
); );
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 SimulateCoherentGW.h   SimulateCoherentGW.h 
skipping to change at line 39 skipping to change at line 39
#include <lal/DetectorSite.h> #include <lal/DetectorSite.h>
#include <lal/SkyCoordinates.h> #include <lal/SkyCoordinates.h>
#include <lal/LALBarycenter.h> #include <lal/LALBarycenter.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
NRCSID( SIMULATECOHERENTGWH, "$Id$" );
/** /**
\author Creighton, T. D. \author Creighton, T. D.
\addtogroup SimulateCoherentGW_h \addtogroup SimulateCoherentGW_h
\brief Provides routines to simulate generic gravitational waveforms \brief Provides routines to simulate generic gravitational waveforms
originating from a particular source. originating from a particular source.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include <lal/SimulateCoherentGW.h> #include <lal/SimulateCoherentGW.h>
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 SkyCoordinates.h   SkyCoordinates.h 
skipping to change at line 34 skipping to change at line 34
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( SKYCOORDINATESH, "$Id$" );
/** \addtogroup SkyCoordinates_h /** \addtogroup SkyCoordinates_h
* *
* @{ * @{
* \defgroup CelestialCoordinates_c Module CelestialCoordinates.c * \defgroup CelestialCoordinates_c Module CelestialCoordinates.c
* \defgroup TerrestrialCoordinates_c Module TerrestrialCoordinates.c * \defgroup TerrestrialCoordinates_c Module TerrestrialCoordinates.c
* \defgroup SkyCoordinates_c Module SkyCoordinates.c * \defgroup SkyCoordinates_c Module SkyCoordinates.c
* *
*/ */
/** \name Error codes *//**@{*/ /** \name Error codes *//**@{*/
#define SKYCOORDINATESH_ENUL 1 /**< Unexpected null pointer in argu ments */ #define SKYCOORDINATESH_ENUL 1 /**< Unexpected null pointer in argu ments */
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Skymap.h   Skymap.h 
/* /*
* $Id$
* *
* Copyright (C) 2008-9 Antony Searle * Copyright (C) 2008-9 Antony Searle
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 34 skipping to change at line 33
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <lal/LALDetectors.h> #include <lal/LALDetectors.h>
#include <lal/LALRCSID.h>
NRCSID(EPSEARCHH, "$Id$");
// Manipulate log-represented values without overflowing // Manipulate log-represented values without overflowing
double XLALSkymapLogSumExp(double a, double b); double XLALSkymapLogSumExp(double a, double b);
double XLALSkymapLogTotalExp(double* begin, double* end); double XLALSkymapLogTotalExp(double* begin, double* end);
// Lightweight coordinate transformations // Lightweight coordinate transformations
void XLALSkymapCartesianFromSpherical(double a[3], double b[2]); void XLALSkymapCartesianFromSpherical(double a[3], double b[2]);
void XLALSkymapSphericalFromCartesian(double a[2], double b[3]); void XLALSkymapSphericalFromCartesian(double a[2], double b[3]);
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 Sort.h   Sort.h 
skipping to change at line 26 skipping to change at line 26
* 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 Name: Sort.h * File Name: Sort.h
* *
* Author: Creighton, T. D. * Author: Creighton, T. D.
* *
* Revision: $Id$
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
/* #ifndef _SORT_H
#define _SORT_H
<lalVerbatim file="SortHV"> #include <lal/LALStdlib.h>
$Id$
</lalVerbatim>
<lalLaTeX> #ifdef __cplusplus
extern "C" {
#endif
\section{Header \texttt{Sort.h}} /**
\label{s:Sort.h} \addtogroup Sort_h
Provides routines for sorting, indexing, and ranking real vector \brief Provides routines for sorting, indexing, and ranking real vector
elements. elements.
\subsection{Synopsis} \heading{Synopsis}
\begin{verbatim} \code
#include <lal/Sort.h> #include <lal/Sort.h>
\end{verbatim} \endcode
</lalLaTeX> */ \heading{Description}
#ifndef _SORT_H These routines sort a vector <tt>*data</tt> (of type \c REAL4Vector
#define _SORT_H or \c REAL8Vector) into ascending order using the in-place
heapsort algorithm, or construct an index vector <tt>*index</tt> that
indexes <tt>*data</tt> in increasing order (leaving <tt>*data</tt>
unchanged), or construct a rank vector <tt>*rank</tt> that gives the
rank order of the corresponding <tt>*data</tt> element.
#include <lal/LALStdlib.h> The relationship between sorting, indexing, and ranking can be a bit
confusing. One way of looking at it is that the original array is
ordered by index, while the sorted array is ordered by rank. The
index array gives the index as a function of rank; i.e.\ if you're
looking for a given rank (say the 0th, or smallest element), the index
array tells you where to look it up in the unsorted array:
\code
unsorted_array[index[i]] = sorted_array[i]
\endcode
The rank array gives the rank as a function of index; i.e.\ it tells
you where a given element in the unsorted array will appear in the
sorted array:
\code
unsorted_array[j] = sorted_array[rank[j]]
\endcode
Clearly these imply the following relationships, which can be used to
construct the index array from the rank array or vice-versa:
\code
index[rank[j]] = j
rank[index[i]] = i
\endcode
#ifdef __cplusplus The XLAL versions of these routines, \c XLALHeapSort(), \c XLALHeapIndex(),
extern "C" { and \c XLALHeapRank(), perform the same operations but on arrays of
#endif \c nobj generic objects of size \c size pointed to by \c base and
using the comparison function \c compar. The function \c compar() has
the prototype
\code
int compar( void *p, const void *x, const void *y )
\endcode
and returns \f$-1\f$ if \f${\mathtt{x}}<{\mathtt{y}}\f$,
\f$0\f$ if \f${\mathtt{x}}={\mathtt{y}}\f$,
and \f$+1\f$ if \f${\mathtt{x}}>{\mathtt{y}}\f$. Here \c p (which may be N
ULL)
is a pointer to additional data that may be used in the comparison function
.
This pointer is passed to the comparison function unchanged from the argume
nt
\c params of \c XLALHeapSort(), \c XLALHeapIndex(), and
\c XLALHeapRank().
NRCSID(SORTH,"$Id$"); \heading{Algorithm}
/* <lalLaTeX> These routines use the standard heap sort algorithm described in
Sec. 8.3 of Ref. [\ref ptvf1992].
\subsection*{Error conditions} The <tt>LALSHeapSort()</tt> and <tt>LALDHeapSort()</tt> routines are entire
\input{SortHErrTab} ly
</lalLaTeX> in-place, with no auxiliary storage vector. The <tt>LALSHeapIndex()</tt>
and <tt>LALDHeapIndex()</tt> routines are also technically in-place, but
they require two input vectors (the data vector and the index vector),
and leave the data vector unchanged. The <tt>LALSHeapRank()</tt> and
<tt>LALDHeapRank()</tt> routines require two input vectors (the data and
rank vectors), and also allocate a temporary index vector internally;
these routines are therefore the most memory-intensive. All of these
algorithms are \f$N\log_2(N)\f$ algorithms, regardless of the ordering of
the initial dataset.
<lalErrTable file="SortHErrTab"> */ Note: if you can use \c qsort(), you should.
#define SORTH_ENUL 1 */
#define SORTH_ELEN 2 /*@{*/
#define SORTH_EMEM 3 /** \name Error Codes */
/*@{*/
#define SORTH_ENUL 1 /**< Null pointer */
#define SORTH_ELEN 2 /**< Length mismatch */
#define SORTH_EMEM 3 /**< Memory allocation error */
/*@}*/
/** \cond DONT_DOXYGEN */
#define SORTH_MSGENUL "Null pointer" #define SORTH_MSGENUL "Null pointer"
#define SORTH_MSGELEN "Length mismatch" #define SORTH_MSGELEN "Length mismatch"
#define SORTH_MSGEMEM "Memory allocation error" #define SORTH_MSGEMEM "Memory allocation error"
/** \endcond */
/* </lalErrTable>
<lalLaTeX>
\subsection*{Structures}
</lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX> /* ----- HeapSort.c ----- */
\newpage\input{HeapSortC}
</lalLaTeX> */
/** \see See \ref Sort_h for documentation */
int XLALHeapSort( void *base, UINT4 nobj, UINT4 size, void *params, int XLALHeapSort( void *base, UINT4 nobj, UINT4 size, void *params,
int (*compar)(void *, const void *, const void *) ); int (*compar)(void *, const void *, const void *) );
/** \see See \ref Sort_h for documentation */
int XLALHeapIndex( INT4 *indx, void *base, UINT4 nobj, UINT4 size, void *pa rams, int XLALHeapIndex( INT4 *indx, void *base, UINT4 nobj, UINT4 size, void *pa rams,
int (*compar)(void *, const void *, const void *) ); int (*compar)(void *, const void *, const void *) );
/** \see See \ref Sort_h for documentation */
int XLALHeapRank( INT4 *rank, void *base, UINT4 nobj, UINT4 size, void *par ams, int XLALHeapRank( INT4 *rank, void *base, UINT4 nobj, UINT4 size, void *par ams,
int (*compar)(void *, const void *, const void *) ); int (*compar)(void *, const void *, const void *) );
/** \see See \ref Sort_h for documentation */
void LALSHeapSort(LALStatus *status, void LALSHeapSort(LALStatus *status,
REAL4Vector *vector); REAL4Vector *vector);
/** \see See \ref Sort_h for documentation */
void LALSHeapIndex(LALStatus *status, void LALSHeapIndex(LALStatus *status,
INT4Vector *indx, INT4Vector *indx,
REAL4Vector *vector); REAL4Vector *vector);
/** \see See \ref Sort_h for documentation */
void LALSHeapRank(LALStatus *status, void LALSHeapRank(LALStatus *status,
INT4Vector *rank, INT4Vector *rank,
REAL4Vector *vector); REAL4Vector *vector);
/** \see See \ref Sort_h for documentation */
void LALDHeapSort(LALStatus *status, void LALDHeapSort(LALStatus *status,
REAL8Vector *vector); REAL8Vector *vector);
/** \see See \ref Sort_h for documentation */
void LALDHeapIndex(LALStatus *status, void LALDHeapIndex(LALStatus *status,
INT4Vector *indx, INT4Vector *indx,
REAL8Vector *vector); REAL8Vector *vector);
/** \see See \ref Sort_h for documentation */
void LALDHeapRank(LALStatus *status, void LALDHeapRank(LALStatus *status,
INT4Vector *rank, INT4Vector *rank,
REAL8Vector *vector); REAL8Vector *vector);
/* <lalLaTeX> /*@}*/
\newpage\input{SortTestC}
</lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SORT_H */ #endif /* _SORT_H */
 End of changes. 29 change blocks. 
42 lines changed or deleted 96 lines changed or added


 SphericalHarmonics.h   SphericalHarmonics.h 
skipping to change at line 45 skipping to change at line 45
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/LALConstants.h> #include <lal/LALConstants.h>
#ifndef _SPHERICALHARMONICS_H #ifndef _SPHERICALHARMONICS_H
#define _SPHERICALHARMONICS_H #define _SPHERICALHARMONICS_H
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID( SPHERICALHARMONICSH, "$Id$");
/** /**
* Computes the (s)Y(l,m) spin-weighted spherical harmonic. * Computes the (s)Y(l,m) spin-weighted spherical harmonic.
* *
* From somewhere .... * From somewhere ....
* *
* See also: * See also:
* Implements Equations (II.9)-(II.13) of * Implements Equations (II.9)-(II.13) of
* D. A. Brown, S. Fairhurst, B. Krishnan, R. A. Mercer, R. K. Kopparapu, * D. A. Brown, S. Fairhurst, B. Krishnan, R. A. Mercer, R. K. Kopparapu,
* L. Santamaria, and J. T. Whelan, * L. Santamaria, and J. T. Whelan,
* "Data formats for numerical relativity waves", * "Data formats for numerical relativity waves",
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 StreamInput.h   StreamInput.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
*/ */
#ifndef _STREAMINPUT_H
#define _STREAMINPUT_H
#include <lal/LALStdlib.h>
#include <lal/Grid.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\addtogroup StreamInput_h
\author Creighton, T. D. \author Creighton, T. D.
\file
\heading{Header \ref StreamInput.h}
\latexonly\label{s_StreamInput_h}\endlatexonly
Provides routines to read data from an open stream and store it in LAL \brief Provides routines to read data from an open stream and store it i
data structures. n LAL data structures.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include "StreamInput.h" #include "StreamInput.h"
\endcode \endcode
This header provides prototypes for routines that construct This header provides prototypes for routines that construct
LAL data structures using the data from a file (or other I/O) stream. LAL data structures using the data from a file (or other I/O) stream.
The routines do not provide a system-level interface to create files The routines do not provide a system-level interface to create files
and open or close file streams; they simply assume that they have been and open or close file streams; they simply assume that they have been
passed an open, readable stream. Nonetheless, because they involve passed an open, readable stream. Nonetheless, because they involve
I/O stream manipulation, these routines are placed in the I/O stream manipulation, these routines are placed in the
\c lalsupport library rather than in \c lal proper. \c lalsupport library rather than in \c lal proper.
The routines in \ref StreamVectorInput.c and The routines in \ref StreamVectorInput_c and
\ref StreamVectorSequenceInput.c are compartmentalized in such a way \ref StreamVectorSequenceInput_c are compartmentalized in such a way
that they can easily be converted if the LAL specification later that they can easily be converted if the LAL specification later
changes the way in which I/O streams are handled. In partucular, the changes the way in which I/O streams are handled. In partucular, the
only file I/O commands used are <tt>fgets()</tt> and <tt>feof()</tt>. only file I/O commands used are <tt>fgets()</tt> and <tt>feof()</tt>.
Thus the upgrade would involve only the following global changes: Thus the upgrade would involve only the following global changes:
<ol> <ol>
<li> Replace all occurrences of <tt>FILE *</tt> with the name of the <li> Replace all occurrences of <tt>FILE *</tt> with the name of the
LAL I/O stream pointer type.</li> LAL I/O stream pointer type.</li>
<li> Replace all occurrences of <tt>fgets()</tt> and <tt>feof()</tt> with <li> Replace all occurrences of <tt>fgets()</tt> and <tt>feof()</tt> with
equivalent LAL functions.</li> equivalent LAL functions.</li>
</ol> </ol>
In particular, there is no need to translate routines such as In particular, there is no need to translate routines such as
<tt>fscanf()</tt>; one should simply read data into a LAL <tt>fscanf()</tt>; one should simply read data into a LAL
\c CHARVector and then use <tt>sscanf()</tt> to format the input. \c CHARVector and then use <tt>sscanf()</tt> to format the input.
This is the approach used in the numerical input routines in This is the approach used in the numerical input routines in
\ref StreamVectorInput.c and \ref StreamVectorSequenceInput.c. \ref StreamVectorInput_c and \ref StreamVectorSequenceInput_c.
The routines in \ref StreamSequenceInput.c are less robust but much The routines in \ref StreamSequenceInput_c are less robust but much
more efficient: they use <tt>fscanf()</tt> to parse the input stream more efficient: they use <tt>fscanf()</tt> to parse the input stream
directly. They are intended primarily for test programs that may need directly. They are intended primarily for test programs that may need
to read large datafiles of undetermined length. The routines in to read large datafiles of undetermined length. The routines in
\ref StreamSeriesInput.c and \ref StreamGridInput.c also parse the \ref StreamSeriesInput_c and \ref StreamGridInput_c also parse the
input stream directly using <tt>fscanf()</tt>, to avoid potentially input stream directly using <tt>fscanf()</tt>, to avoid potentially
crippling computational overhead. crippling computational overhead.
*/ */ /*@{*/
#ifndef _STREAMINPUT_H
#define _STREAMINPUT_H
#include <lal/LALStdlib.h>
#include <lal/Grid.h>
#ifdef __cplusplus
extern "C" {
#endif
NRCSID(STREAMINPUTH,"$Id$");
/** /** \name Error Codes */ /*@{*/
\heading{Error conditions} #define STREAMINPUTH_ENUL 1 /**< Unexpected null pointer in arguments *
\name Error Codes */ /*@{*/ /
#define STREAMINPUTH_ENUL 1 #define STREAMINPUTH_EOUT 2 /**< Output handle points to a non-null poi
#define STREAMINPUTH_EOUT 2 nter */
#define STREAMINPUTH_EMEM 3 #define STREAMINPUTH_EMEM 3 /**< Memory allocation error */
#define STREAMINPUTH_ELEN 4 #define STREAMINPUTH_ELEN 4 /**< No numbers were read */
#define STREAMINPUTH_ESLEN 5 #define STREAMINPUTH_ESLEN 5 /**< Not enough numbers read to fill sequen
#define STREAMINPUTH_EVLEN 6 ce */
#define STREAMINPUTH_EDLEN 7 #define STREAMINPUTH_EVLEN 6 /**< Could not determine complex vectorLeng
#define STREAMINPUTH_EDIM 8 th */
#define STREAMINPUTH_EFMT 9 #define STREAMINPUTH_EDLEN 7 /**< Dimension lengths inconsistent or not
#define STREAMINPUTH_EBUF 10 given */
#define STREAMINPUTH_EDIM 8 /**< Inconsistent or non-positive arrayDim
value */
#define STREAMINPUTH_EFMT 9 /**< Badly formatted number */
#define STREAMINPUTH_EBUF 10 /**< BUFFSIZE not a multiple of largest com
plex type size */
/*@}*/
/*@}*/
#define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments" #define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments"
#define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer" #define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer"
#define STREAMINPUTH_MSGEMEM "Memory allocation error" #define STREAMINPUTH_MSGEMEM "Memory allocation error"
#define STREAMINPUTH_MSGELEN "No numbers were read" #define STREAMINPUTH_MSGELEN "No numbers were read"
#define STREAMINPUTH_MSGESLEN "Not enough numbers read to fill sequence" #define STREAMINPUTH_MSGESLEN "Not enough numbers read to fill sequence"
#define STREAMINPUTH_MSGEVLEN "Could not determine complex vectorLength" #define STREAMINPUTH_MSGEVLEN "Could not determine complex vectorLength"
#define STREAMINPUTH_MSGEDLEN "Dimension lengths inconsistent or not given" #define STREAMINPUTH_MSGEDLEN "Dimension lengths inconsistent or not given"
#define STREAMINPUTH_MSGEDIM "Inconsistent or non-positive arrayDim value" #define STREAMINPUTH_MSGEDIM "Inconsistent or non-positive arrayDim value"
#define STREAMINPUTH_MSGEFMT "Badly formatted number" #define STREAMINPUTH_MSGEFMT "Badly formatted number"
#define STREAMINPUTH_MSGEBUF "BUFFSIZE not a multiple of largest complex t ype size" #define STREAMINPUTH_MSGEBUF "BUFFSIZE not a multiple of largest complex t ype size"
/*@}*//**
\heading{Types}
*/
/* Function prototypes. */ /* Function prototypes. */
void /**
LALCHARReadVector( LALStatus *status, CHARVector **vector, FILE *stream ); \defgroup StreamVectorInput_c Module StreamVectorInput.c
\ingroup StreamInput_h
void \author Creighton, T. D.
LALI2ReadVector( LALStatus *status, INT2Vector **vector, FILE *stream, BOO
LEAN strict );
void \brief Reads data from a single line in an input stream.
LALI4ReadVector( LALStatus *status, INT4Vector **vector, FILE *stream, BOO
LEAN strict );
void \heading{Description}
LALI8ReadVector( LALStatus *status, INT8Vector **vector, FILE *stream, BOO
LEAN strict );
void These routines read ASCII data from the I/O stream <tt>*stream</tt>
LALU2ReadVector( LALStatus *status, UINT2Vector **vector, FILE *stream, BO until a newline or the end-of-input is reached. (The line can be of
OLEAN strict ); arbitrary length; the data is temporarily stored in a linked list of
buffers.) Once read, a LAL vector structure <tt>**vector</tt> is
created and the data stored in it. The routine passes back a pointer
to the new structure. For the numerical routines, the \c strict
parameter determines whether the routine will do strict error checking
based on the contents of the input stream (see below).
void The basic routine in this module is <tt>LALCHARReadVector()</tt>, which
LALU4ReadVector( LALStatus *status, UINT4Vector **vector, FILE *stream, BO simply stores bytes read from <tt>*stream</tt> until the next newline
OLEAN strict ); character <tt>'\n'</tt>, null character <tt>'\0'</tt>, or the end of the
input as determined by the <tt>feof()</tt> function. The vector
includes the newline (if present), and also an explicit <tt>'\0'</tt> at
the end, if one was not already present. This routine should
\e not be used to read a binary data stream, which are not
logically divided into ``lines''. Unless it aborts due to invalid
arguments or failed memory allocation, <tt>LALCHARReadVector()</tt> will
always return successfully regardless of the contents of the input
stream; <tt>*vector</tt> will created containing at least a single
<tt>'\0'</tt> terminator, if nothing else.
void The other routines in this module use <tt>LALCHARReadVector()</tt> to
LALU8ReadVector( LALStatus *status, UINT8Vector **vector, FILE *stream, BO read a line, and then parse it into numerical datatypes using the
OLEAN strict ); corresponding routine in the \ref StringConvert.c.
Conversion stops when the routine encounters a character that cannot
be parsed as part of a number. If \c strict is 0, the routine
will fail only due to invalid arguments or memory allocation failure,
not from a poorly-formatted input stream; if no numbers are read,
<tt>*vector</tt> will remain \c NULL, but no error will be reported.
(In this mode, the calling routine should always test the output
before trying to dereference it, in order to avoid segmentation
violations.) If \c strict is nonzero, the routine will report an
error if the input stream was poorly formatted, either an \c ELEN
error if no numbers were read, or \c EFMT if a character was
encountered that was neither part of a parseable number nor
whitespace.
void Note that \c strict=0 allows an input stream to contain blank
LALSReadVector( LALStatus *status, REAL4Vector **vector, FILE *stream, BOO lines or comments. A comment begins with any character that cannot
LEAN strict ); occur in a valid number, which will cause the numerical parser to skip
the rest of the line. The usual comment delimiters are <tt>'#'</tt> and
<tt>'%'</tt>, but any character except <tt>'+'</tt> <tt>'-'</tt>,
<tt>'e'</tt>, <tt>'E'</tt>, <tt>'.'</tt>, digits, and whitespace will work.
void */
LALDReadVector( LALStatus *status, REAL8Vector **vector, FILE *stream, BOO /*@{*/
LEAN strict ); void LALCHARReadVector( LALStatus *status, CHARVector **vector, FILE *stre
am );
void LALI2ReadVector( LALStatus *status, INT2Vector **vector, FILE *stream
, BOOLEAN strict );
void LALI4ReadVector( LALStatus *status, INT4Vector **vector, FILE *stream
, BOOLEAN strict );
void LALI8ReadVector( LALStatus *status, INT8Vector **vector, FILE *stream
, BOOLEAN strict );
void LALU2ReadVector( LALStatus *status, UINT2Vector **vector, FILE *strea
m, BOOLEAN strict );
void LALU4ReadVector( LALStatus *status, UINT4Vector **vector, FILE *strea
m, BOOLEAN strict );
void LALU8ReadVector( LALStatus *status, UINT8Vector **vector, FILE *strea
m, BOOLEAN strict );
void LALSReadVector( LALStatus *status, REAL4Vector **vector, FILE *stream
, BOOLEAN strict );
void LALDReadVector( LALStatus *status, REAL8Vector **vector, FILE *stream
, BOOLEAN strict );
/*@}*/
void /**
LALCHARReadVectorSequence( LALStatus *status, CHARVectorSequence **sequenc \defgroup StreamVectorSequenceInput_c Module StreamVectorSequenceInput.c
e, FILE *stream ); \ingroup StreamInput_h
\author Creighton, T. D.
void \brief Reads the entire contents of an input stream into a vector sequen
LALI2ReadVectorSequence( LALStatus *status, INT2VectorSequence **sequence, ce.
FILE *stream );
void \heading{Description}
LALI4ReadVectorSequence( LALStatus *status, INT4VectorSequence **sequence,
FILE *stream );
void These routines read data from the I/O stream <tt>*stream</tt> until the
LALI8ReadVectorSequence( LALStatus *status, INT8VectorSequence **sequence, end-of-input is reached. Each line is stored as a data vector, and
FILE *stream ); the vectors are combined into a LAL vector sequence structure
<tt>**sequence</tt>. Each line vector is padded with zeros to match the
length of the longest line. The routine passes back a pointer to the
new structure.
void The routine <tt>LALCHARReadVectorSequence()</tt> essentially stores an
LALU2ReadVectorSequence( LALStatus *status, UINT2VectorSequence **sequence image of the I/O stream as a sequence of lines padded with <tt>'\0'</tt>
, FILE *stream ); characters. However, it will skip over any empty lines, which occur,
for instance, when the end-of-input or a null character <tt>'\0'</tt>
occurs immediately following a newline character <tt>'\n'</tt>. The
numeric routines will additionally skip blank lines, comment lines, or
other input lines that have no parseable numbers in them. (As with
the routines in \ref StreamVectorInput.c, comment in sindicated by a
<tt>#</tt> sign at the beginning of a line or a <tt>%</tt> sign anywhere
in the line, signifying that the remainder of the line is to be
ignored.) However, if an input line contains \e any parseable
data, then the corresponding vector in the vector sequence will be
allocated (and padded with zeros, if it is shorter than the longest
line).
void \heading{Algorithm}
LALU4ReadVectorSequence( LALStatus *status, UINT4VectorSequence **sequence
, FILE *stream );
void These functions first create a linked list of vectors, using the
LALU8ReadVectorSequence( LALStatus *status, UINT8VectorSequence **sequence routines in \ref StreamVectorInput.c to read them in. Once the list
, FILE *stream ); is complete, the longest vector length is determined, and the vector
sequence is created and filled.
void The numeric routines skip over blank, comment, or otherwise
LALSReadVectorSequence( LALStatus *status, REAL4VectorSequence **sequence, unparseable lines by catching and handling the \c LEN error code
FILE *stream ); generated by the vector input routine. However, it is worth pointing
out that the vector input routine will have generated an error message
if the error reporting bit in \c lalDebugLevel was set. The
vector sequence input routines will therefore generate a followup
messages indicating that the preceding error was successfully dealt
with. So you may see pairs of \c ABORT: and \c CONTINUE:
error messages when reading files containing blank or comment lines.
void */
LALDReadVectorSequence( LALStatus *status, REAL8VectorSequence **sequence, /*@{*/
FILE *stream ); void LALCHARReadVectorSequence( LALStatus *status, CHARVectorSequence **se
quence, FILE *stream );
void LALI2ReadVectorSequence( LALStatus *status, INT2VectorSequence **sequ
ence, FILE *stream );
void LALI4ReadVectorSequence( LALStatus *status, INT4VectorSequence **sequ
ence, FILE *stream );
void LALI8ReadVectorSequence( LALStatus *status, INT8VectorSequence **sequ
ence, FILE *stream );
void LALU2ReadVectorSequence( LALStatus *status, UINT2VectorSequence **seq
uence, FILE *stream );
void LALU4ReadVectorSequence( LALStatus *status, UINT4VectorSequence **seq
uence, FILE *stream );
void LALU8ReadVectorSequence( LALStatus *status, UINT8VectorSequence **seq
uence, FILE *stream );
void LALSReadVectorSequence( LALStatus *status, REAL4VectorSequence **sequ
ence, FILE *stream );
void LALDReadVectorSequence( LALStatus *status, REAL8VectorSequence **sequ
ence, FILE *stream );
/*@}*/
void /**
LALCHARReadSequence( LALStatus *status, CHARSequence **sequence, FILE *stre \defgroup StreamSequenceInput_c Module StreamSequenceInput.c
am ); \ingroup StreamInput_h
\author Creighton, T. D.
void \brief Converts an input stream into a data sequence.
LALI2ReadSequence( LALStatus *status, INT2Sequence **sequence, FILE *stream
);
void \heading{Description}
LALI4ReadSequence( LALStatus *status, INT4Sequence **sequence, FILE *stream
);
void These routines read data from the I/O stream <tt>*stream</tt> until the
LALI8ReadSequence( LALStatus *status, INT8Sequence **sequence, FILE *stream end-of-input is reached. (The input can be of arbitrary length; the
); data is temporarily stored in a linked list of buffers.) Once read, a
LAL sequence structure <tt>**sequence</tt> is created and the data
stored in it. The routine passes back a pointer to the new structure.
void The routine <tt>LALCHARReadSequence()</tt> simply stores the entire
LALU2ReadSequence( LALStatus *status, UINT2Sequence **sequence, FILE *strea remaining contents of the I/O stream in a \c CHARSequence,
m ); including whitespace, newline <tt>'\n'</tt>, null <tt>'\0'</tt>, or other
special characters. (It can in principle be used to read and store
binary data as a sequence of bytes. Note that the end-of-transmission
byte <tt>'\004'</tt> does \e not necessarily mark the end-of-input,
which is instead determined using the <tt>feof()</tt> function.)
void The other routines in this module interpret the input as a sequence of
LALU4ReadSequence( LALStatus *status, UINT4Sequence **sequence, FILE *strea whitespace-separated numbers, which are parsed directly from the I/O
m ); stream using <tt>fscanf()</tt>. The sequence is terminated at the
end-of-input or at any point where <tt>fscanf()</tt> is unable to parse
the input.
void For the complex input routines <tt>LALCReadSequence()</tt> and
LALU8ReadSequence( LALStatus *status, UINT8Sequence **sequence, FILE *strea <tt>LALZReadSequence()</tt>, each pair of numbers read are interpreted
m ); as the real and imaginary parts of a complex number. The usual input
format is for each line to contain a pair of numbers, but
<tt>fscanf()</tt> does not distinguish between newline and other
whitespace characters, so neither do these routines.
void Unlike the numerical routines in other \ref StreamInput.h modules,
LALSReadSequence( LALStatus *status, REAL4Sequence **sequence, FILE *stream these routines have no mechanism to deal with comments; every
); whitespace-delimited substring will be treated as a number.
void \heading{Algorithm}
LALDReadSequence( LALStatus *status, REAL8Sequence **sequence, FILE *stream
);
void These routines read data into a linked list of buffers, to allow
LALCReadSequence( LALStatus *status, COMPLEX8Sequence **sequence, FILE *str memory allocation to occur in batches for improved efficiency. The
eam ); numerical routines also use <tt>fscanf()</tt> directly on the I/O stream
to avoid the inefficiency of storing and parsing intermediate
character strings, as is done by the corresponding vector sequence
input routines. This reduces robustness and versatility (as
indicated, for instance, by the inability of dealing with comments),
and increases the number of potential points-of-failure (by requiring
a consistent implementation across platforms of <tt>getc()</tt> and
<tt>fscanf()</tt>, rather than the single function <tt>fgets()</tt> used
by other stream input routines). However, these sacrifices are
necessary to allow LAL applications to ingest large quantities of
numerical data efficiently.
void */
LALZReadSequence( LALStatus *status, COMPLEX16Sequence **sequence, FILE *st /*@{*/
ream ); void LALCHARReadSequence( LALStatus *status, CHARSequence **sequence, FILE
*stream );
void LALI2ReadSequence( LALStatus *status, INT2Sequence **sequence, FILE *s
tream );
void LALI4ReadSequence( LALStatus *status, INT4Sequence **sequence, FILE *s
tream );
void LALI8ReadSequence( LALStatus *status, INT8Sequence **sequence, FILE *s
tream );
void LALU2ReadSequence( LALStatus *status, UINT2Sequence **sequence, FILE *
stream );
void LALU4ReadSequence( LALStatus *status, UINT4Sequence **sequence, FILE *
stream );
void LALU8ReadSequence( LALStatus *status, UINT8Sequence **sequence, FILE *
stream );
void LALSReadSequence( LALStatus *status, REAL4Sequence **sequence, FILE *s
tream );
void LALDReadSequence( LALStatus *status, REAL8Sequence **sequence, FILE *s
tream );
void LALCReadSequence( LALStatus *status, COMPLEX8Sequence **sequence, FILE
*stream );
void LALZReadSequence( LALStatus *status, COMPLEX16Sequence **sequence, FIL
E *stream );
/*@}*/
void void
LALI2ReadTSeries( LALStatus *status, INT2TimeSeries *series, FILE *stream ) ; LALI2ReadTSeries( LALStatus *status, INT2TimeSeries *series, FILE *stream ) ;
void void
LALI4ReadTSeries( LALStatus *status, INT4TimeSeries *series, FILE *stream ) ; LALI4ReadTSeries( LALStatus *status, INT4TimeSeries *series, FILE *stream ) ;
void void
LALI8ReadTSeries( LALStatus *status, INT8TimeSeries *series, FILE *stream ) ; LALI8ReadTSeries( LALStatus *status, INT8TimeSeries *series, FILE *stream ) ;
void void
LALU2ReadTSeries( LALStatus *status, UINT2TimeSeries *series, FILE *stream ); LALU2ReadTSeries( LALStatus *status, UINT2TimeSeries *series, FILE *stream );
void void
 End of changes. 39 change blocks. 
129 lines changed or deleted 240 lines changed or added


 StreamOutput.h   StreamOutput.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
*/ */
#ifndef _STREAMOUTPUT_H
#define _STREAMOUTPUT_H
#include <lal/LALStdlib.h>
#include <lal/Grid.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
\addtogroup StreamOutput_h
\author Creighton, T. D. \author Creighton, T. D.
\file
\heading{Header \ref StreamOutput.h} \brief Provides routines to write data from LAL data structures to an op
\latexonly\label{s_StreamOutput_h}\endlatexonly en stream.
Provides routines to write data from LAL data structures to an open
stream.
\heading{Synopsis} \heading{Synopsis}
\code \code
#include "StreamOutput.h" #include "StreamOutput.h"
\endcode \endcode
This header provides prototypes for routines that write the This header provides prototypes for routines that write the
contents of LAL time/frequency series structures or grid structures to contents of LAL time/frequency series structures or grid structures to
a file (or other I/O) stream, in a standard format. The routines do a file (or other I/O) stream, in a standard format. The routines do
not provide a system-level interface to create files and open or close not provide a system-level interface to create files and open or close
file streams; they simply assume that they have been passed an open, file streams; they simply assume that they have been passed an open,
writeable stream. Nonetheless, because they involve I/O stream writeable stream. Nonetheless, because they involve I/O stream
manipulation, these routines are placed in the \c lalsupport manipulation, these routines are placed in the \c lalsupport
library rather than in \c lal proper. library rather than in \c lal proper.
*/ */ /*@{*/
#ifndef _STREAMOUTPUT_H
#define _STREAMOUTPUT_H
#include <lal/LALStdlib.h>
#include <lal/Grid.h>
#ifdef __cplusplus
extern "C" {
#endif
NRCSID( STREAMOUTPUTH, "$Id$" );
/** /** \name Error Codes */ /*@{*/
\heading{Error conditions} #define STREAMOUTPUTH_ENUL 1 /**< Unexpected null pointer in arguments *
\name Error Codes */ /*@{*/ /
#define STREAMOUTPUTH_ENUL 1 #define STREAMOUTPUTH_EPRN 2 /**< Print statement failed */
#define STREAMOUTPUTH_EPRN 2 /*@}*/
/*@}*/
#define STREAMOUTPUTH_MSGENUL "Unexpected null pointer in arguments" #define STREAMOUTPUTH_MSGENUL "Unexpected null pointer in arguments"
#define STREAMOUTPUTH_MSGEPRN "Print statement failed" #define STREAMOUTPUTH_MSGEPRN "Print statement failed"
/*@}*//**
\heading{Types}
*/
/* Function prototypes. */ /* Function prototypes. */
void void
LALI2WriteTSeries( LALStatus *status, FILE *stream, INT2TimeSeries *series ); LALI2WriteTSeries( LALStatus *status, FILE *stream, INT2TimeSeries *series );
void void
LALI4WriteTSeries( LALStatus *status, FILE *stream, INT4TimeSeries *series ); LALI4WriteTSeries( LALStatus *status, FILE *stream, INT4TimeSeries *series );
void void
LALI8WriteTSeries( LALStatus *status, FILE *stream, INT8TimeSeries *series ); LALI8WriteTSeries( LALStatus *status, FILE *stream, INT8TimeSeries *series );
void void
LALU2WriteTSeries( LALStatus *status, FILE *stream, UINT2TimeSeries *serie s ); LALU2WriteTSeries( LALStatus *status, FILE *stream, UINT2TimeSeries *serie s );
void void
LALU4WriteTSeries( LALStatus *status, FILE *stream, UINT4TimeSeries *serie s ); LALU4WriteTSeries( LALStatus *status, FILE *stream, UINT4TimeSeries *serie s );
 End of changes. 8 change blocks. 
30 lines changed or deleted 20 lines changed or added


 StringInput.h   StringInput.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
*/ */
/********************************** <lalVerbatim file="StringInputHV">
Author: Creighton, T. D.
$Id$
**************************************************** </lalVerbatim> */
/********************************************************** <lalLaTeX>
\section{Header \texttt{StringInput.h}}
\label{s:StringInput.h}
Provides routines to parse \verb@CHARVector@s into other LAL
datatypes.
\subsection*{Synopsis}
\begin{verbatim}
#include "StringInput.h"
\end{verbatim}
\noindent This header provides prototypes for routines that construct
LAL data structures using the data from a character string. As in
standard C, a \emph{string} is a block of non-null bytes of arbitrary
length, terminated by a null byte \verb@'\0'@, and referred to by a
value of type \verb@CHAR *@ pointing to the first byte in the string.
It is not to be confused with a \verb@CHARVector@, a LAL structure
referring to a block of data of a specified length, which may or may
not contain one or more instances of \verb@'\0'@.
In general, the routines under this header will have string inputs of
type \verb@const CHAR *@ (in order to allow, for instance, string
literals to be used as inputs), but will allocate \verb@CHARVector@
structures to store string outputs. Unless otherwise specified, these
outputs are guaranteed to contain at least one \verb@'\0'@ character,
so their \verb@data@ fields are valid strings. It is the
responsibility of the calling routine to ensure that the string input
contains a terminating \verb@'\0'@ within the memory segment pointed
to by the \verb@CHAR *@ input, in order to avoid segmentation
violation.
These routines are intended to work in conjunction with the functions
in \verb@StreamInput.h@ to add LAL robustness to otherwise ad-hoc data
input routines. However, the functions in \verb@StringInput.h@ are
fully LAL-compliant and use only LAL types, so they are included in
\verb@liblal@ proper.
******************************************************* </lalLaTeX> */
#ifndef _STRINGINPUT_H #ifndef _STRINGINPUT_H
#define _STRINGINPUT_H #define _STRINGINPUT_H
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/LALStdio.h> #include <lal/LALStdio.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
NRCSID( STRINGINPUTH, "$Id$"); /**
\addtogroup StringInput_h
\author Creighton, T. D.
/********************************************************** <lalLaTeX> \brief Provides routines to parse \c CHARVectors into other LAL datatype
\subsection*{Error conditions} s.
****************************************** </lalLaTeX><lalErrTable> */
#define STRINGINPUTH_ENUL 1
#define STRINGINPUTH_EOUT 2
#define STRINGINPUTH_EMEM 3
#define STRINGINPUTH_MSGENUL "Unexpected null pointer in arguments" \heading{Synopsis}
#define STRINGINPUTH_MSGEOUT "Output handle points to a non-null pointer" \code
#define STRINGINPUTH_MSGEMEM "Memory allocation error" #include "StringInput.h"
/******************************************** </lalErrTable><lalLaTeX> \endcode
\subsection*{Constants} This header provides prototypes for routines that construct
\idx[Constant]{LAL\_INT2\_FORMAT} LAL data structures using the data from a character string. As in
\idx[Constant]{LAL\_INT4\_FORMAT} standard C, a \e string is a block of non-null bytes of arbitrary
\idx[Constant]{LAL\_INT8\_FORMAT} length, terminated by a null byte <tt>'\0'</tt>, and referred to by a
\idx[Constant]{LAL\_UINT2\_FORMAT} value of type <tt>CHAR *</tt> pointing to the first byte in the string.
\idx[Constant]{LAL\_UINT4\_FORMAT} It is not to be confused with a \c CHARVector, a LAL structure
\idx[Constant]{LAL\_UINT8\_FORMAT} referring to a block of data of a specified length, which may or may
\idx[Constant]{LAL\_REAL4\_FORMAT} not contain one or more instances of <tt>'\0'</tt>.
\idx[Constant]{LAL\_REAL8\_FORMAT}
In general, the routines under this header will have string inputs of
type <tt>const CHAR *</tt> (in order to allow, for instance, string
literals to be used as inputs), but will allocate \c CHARVector
structures to store string outputs. Unless otherwise specified, these
outputs are guaranteed to contain at least one <tt>'\0'</tt> character,
so their \c data fields are valid strings. It is the
responsibility of the calling routine to ensure that the string input
contains a terminating <tt>'\0'</tt> within the memory segment pointed
to by the <tt>CHAR *</tt> input, in order to avoid segmentation
violation.
These routines are intended to work in conjunction with the functions
in <tt>StreamInput.h</tt> to add LAL robustness to otherwise ad-hoc data
input routines. However, the functions in \ref StringInput.h are
fully LAL-compliant and use only LAL types, so they are included in
\c liblal proper.
\heading{Constants}
The following constants are format strings that can be used by the The following constants are format strings that can be used by the
various C \verb@scanf()@ or \verb@printf()@ functions to parse or various C <tt>scanf()</tt> or <tt>printf()</tt> functions to parse or
write sequences of characters corresponding to base LAL datatypes. write sequences of characters corresponding to base LAL datatypes.
Since the C datatypes (\verb@short@, \verb@int@, \verb@long@, Since the C datatypes (\c short, \c int, \c long,
\verb@long long@, \verb@float@, \verb@double@, etc.) do not have fixed <tt>long long</tt>, \c float, \c double, etc.) do not have fixed
mappings to LAL base datatypes (\verb@INT2@, \verb@INT4@, \verb@INT8@, mappings to LAL base datatypes (\c INT2, \c INT4, \c INT8,
\verb@REAL4@, \verb@REAL8@, etc.), the appropriate format strings for \c REAL4, \c REAL8, etc.), the appropriate format strings for
each LAL datatype must be determined at configuration time and set at each LAL datatype must be determined at configuration time and set at
compile time. compile time.
These format strings give only the conversion character preceded by These format strings give only the conversion character preceded by
any length modifier according to the type (\verb@short@, \verb@long@, any length modifier according to the type (\c short, \c long,
etc.). In particular they do \emph{not} contain the initial etc.). In particular they do \e not contain the initial
\verb@'%'@ character that initiates the conversion specification. <tt>'%'</tt> character that initiates the conversion specification.
However, being \verb@#define@d string literals, they can be combined However, being <tt>\#define</tt>d string literals, they can be combined
with \verb@"%"@ string literals or more complicated format strings with <tt>"%"</tt> string literals or more complicated format strings
through implicit concatenation. Thus to scan \verb@string@ for a through implicit concatenation. Thus to scan \c string for a
\verb@UINT4@ number \verb@n@ one would write: \c UINT4 number \c n one would write:
\begin{verbatim} \code
sscanf( string, "%" LAL_UINT4_FORMAT, &n ); sscanf( string, "%" LAL_UINT4_FORMAT, &n );
\end{verbatim} \endcode
Similarly, to print a \verb@REAL8@ number \verb@x@ with 12 digits Similarly, to print a \c REAL8 number \c x with 12 digits
following the decimal place, one could use the following: following the decimal place, one could use the following:
\begin{verbatim} \code
printf( "%.12" LAL_REAL8_FORMAT, x ); printf( "%.12" LAL_REAL8_FORMAT, x );
\end{verbatim} \endcode
Of course, floating-point numbers are more commonly printed using the Of course, floating-point numbers are more commonly printed using the
\verb@"%e"@ conversion specifier, which does not generally require <tt>"%e"</tt> conversion specifier, which does not generally require
type-dependent length modifiers. type-dependent length modifiers.
\begin{center} <table>
\begin{tabular}{|ll|} <tr><th>Name</th><th>Usual value</th></tr>
\hline <tr><td>#LAL_INT2_FORMAT</td><td><tt>"hd"</tt></td></tr>
Name & Usual value \\ <tr><td>#LAL_INT4_FORMAT</td><td><tt>"d"</tt> or <tt>"ld"</tt></td></tr>
\hline <tr><td>#LAL_INT8_FORMAT</td><td><tt>"ld"</tt> or <tt>"lld"</tt></td></tr>
\tt LAL\_INT2\_FORMAT & {\tt "hd"} \\ <tr><td>#LAL_UINT2_FORMAT</td><td><tt>"hu"</tt></td></tr>
\tt LAL\_INT4\_FORMAT & {\tt "d"} or {\tt "ld"} \\ <tr><td>#LAL_UINT4_FORMAT</td><td><tt>"u"</tt> or <tt>"lu"</tt></td></tr>
\tt LAL\_INT8\_FORMAT & {\tt "ld"} or {\tt "lld"} \\ <tr><td>#LAL_UINT8_FORMAT</td><td><tt>"lu"</tt> or <tt>"llu"</tt></td></tr>
\tt LAL\_UINT2\_FORMAT & {\tt "hu"} \\ <tr><td>#LAL_REAL4_FORMAT</td><td><tt>"f"</tt></td></tr>
\tt LAL\_UINT4\_FORMAT & {\tt "u"} or {\tt "lu"} \\ <tr><td>#LAL_REAL8_FORMAT</td><td><tt>"lf"</tt></td></tr>
\tt LAL\_UINT8\_FORMAT & {\tt "lu"} or {\tt "llu"} \\ </table>
\tt LAL\_REAL4\_FORMAT & {\tt "f"} \\
\tt LAL\_REAL8\_FORMAT & {\tt "lf"} \\
\hline
\end{tabular}
\end{center}
******************************************************* </lalLaTeX> */
/********************************************************** <lalLaTeX>
\subsection*{Types}
\subsubsection*{Structure \texttt{TokenList}}
\idx[Type]{TokenList}
This structure stores a number of null-terminated strings of arbitrary
length. The entire list is stored flattened in a \verb@CHARVector@,
and individual tokens are pointed to by a \verb@CHAR *[]@ handle. The
fields are:
\begin{description}
\item[\texttt{UINT4 nTokens}] The number of tokens in the list.
\item[\texttt{CHAR **tokens}] A list of pointers to the individual
tokens. The elements \verb@tokens[0..nTokens-1]@ point to tokens, and
the element \verb@tokens[nTokens]@ is explicitly \verb@NULL@ (as is
the convention for an \verb@argv@ argument list).
\item[\texttt{CHARVector *list}] The flattened list of tokens, */
separated by (and terminated with) \verb@'\0'@ characters. /*@{*/
\end{description}
******************************************************* </lalLaTeX> */ /** \name Error Codes */ /*@{*/
#define STRINGINPUTH_ENUL 1 /**< Unexpected null pointer in arguments */
#define STRINGINPUTH_EOUT 2 /**< Output handle points to a non-null poin
ter */
#define STRINGINPUTH_EMEM 3 /**< Memory allocation error */
/*@}*/
/** \cond DONT_DOXYGEN */
#define STRINGINPUTH_MSGENUL "Unexpected null pointer in arguments"
#define STRINGINPUTH_MSGEOUT "Output handle points to a non-null pointer"
#define STRINGINPUTH_MSGEMEM "Memory allocation error"
/** \endcond */
/**
* This structure stores a number of null-terminated strings of arbitrary
* length. The entire list is stored flattened in a \c CHARVector,
* and individual tokens are pointed to by a <tt>CHAR *[]</tt> handle.
*/
typedef struct tagTokenList { typedef struct tagTokenList {
SWIGLAL_STRUCT(TokenList); SWIGLAL_STRUCT(TokenList);
UINT4 nTokens; /* number of tokens */ UINT4 nTokens; /**< The number of tokens in the list */
CHAR **tokens; /* list of pointers to tokens */ CHAR **tokens; /**< A list of pointers to the individual tokens;
CHARVector *list; /* flattened list of null-terminated tokens */ * the elements <tt>tokens[0..nTokens-1]</tt> point to
tokens, and
* the element <tt>tokens[nTokens]</tt> is explicitly \
c NULL (as is
the convention for an \c argv argument list */
CHARVector *list; /**< The flattened list of tokens, separated by (and te
rminated with) <tt>'\0'</tt> characters */
} TokenList; } TokenList;
/* <lalLaTeX> /*@}*/
\vfill{\footnotesize\input{StringInputHV}}
</lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX>
\newpage\input{StringTokenC}
</lalLaTeX> */
void void
LALCreateTokenList( LALStatus *status, LALCreateTokenList( LALStatus *status,
TokenList **list, TokenList **list,
const CHAR *string, const CHAR *string,
const CHAR *delimiters ); const CHAR *delimiters );
void void
LALDestroyTokenList( LALStatus *status, LALDestroyTokenList( LALStatus *status,
TokenList **list ); TokenList **list );
int int
XLALCreateTokenList( TokenList **list, XLALCreateTokenList( TokenList **list,
const CHAR *string, const CHAR *string,
const CHAR *delimiters ); const CHAR *delimiters );
int void
XLALDestroyTokenList( TokenList **list ); XLALDestroyTokenList( TokenList *list );
/* <lalLaTeX>
\newpage\input{StringConvertC}
</lalLaTeX> */
void void
LALStringToU2( LALStatus *status, UINT2 *value, const CHAR *string, CHAR ** endptr ); LALStringToU2( LALStatus *status, UINT2 *value, const CHAR *string, CHAR ** endptr );
void void
LALStringToU4( LALStatus *status, UINT4 *value, const CHAR *string, CHAR ** endptr ); LALStringToU4( LALStatus *status, UINT4 *value, const CHAR *string, CHAR ** endptr );
void void
LALStringToU8( LALStatus *status, UINT8 *value, const CHAR *string, CHAR ** endptr ); LALStringToU8( LALStatus *status, UINT8 *value, const CHAR *string, CHAR ** endptr );
void void
 End of changes. 21 change blocks. 
139 lines changed or deleted 95 lines changed or added


 StringVector.h   StringVector.h 
skipping to change at line 47 skipping to change at line 47
/* C++ protection. */ /* C++ protection. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/*---------- INCLUDES ----------*/ /*---------- INCLUDES ----------*/
#include <stdarg.h> #include <stdarg.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALRCSID.h>
/*---------- DEFINES ----------*/ /*---------- DEFINES ----------*/
/*----- Error-codes -----*/ /*----- Error-codes -----*/
/*---------- exported types ----------*/ /*---------- exported types ----------*/
/*---------- Global variables ----------*/ /*---------- Global variables ----------*/
/*---------- exported prototypes [API] ----------*/ /*---------- exported prototypes [API] ----------*/
#ifdef SWIG /* SWIG interface directives */ #ifdef SWIG /* SWIG interface directives */
/* disable keywords arguments for XLALCreateStringVector */ /* disable keywords arguments for XLALCreateStringVector */
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 TimeFreqFFT.h   TimeFreqFFT.h 
skipping to change at line 39 skipping to change at line 39
#include <lal/ComplexFFT.h> #include <lal/ComplexFFT.h>
#include <lal/RealFFT.h> #include <lal/RealFFT.h>
#include <lal/Window.h> #include <lal/Window.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
NRCSID( TIMEFREQFFTH, "$Id$" );
/** /**
* \addtogroup TimeFreqFFT_h * \addtogroup TimeFreqFFT_h
* *
* \brief Performs real-to-complex, complex-to-real FFTs and average power spectrum estimation. * \brief Performs real-to-complex, complex-to-real FFTs and average power spectrum estimation.
* *
* \heading{Synopsis} * \heading{Synopsis}
* \code * \code
* #include <lal/TimeFreqFFT.h> * #include <lal/TimeFreqFFT.h>
* \endcode * \endcode
* *
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 TimeSeries.h   TimeSeries.h 
/* /*
* $Id$
* *
* Copyright (C) 2007 Kipp Cannon * Copyright (C) 2007 Kipp Cannon
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your * Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. * option) any later version.
* *
* This program is distributed in the hope that it will be useful, but * This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of * WITHOUT ANY WARRANTY; without even the implied warranty of
skipping to change at line 26 skipping to change at line 25
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., * with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef _TIMESERIES_H #ifndef _TIMESERIES_H
#define _TIMESERIES_H #define _TIMESERIES_H
#include <stddef.h> #include <stddef.h>
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#include <lal/LALRCSID.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
NRCSID(TIMESERIESH, "$Id:");
/* COMPLEX8 prototypes */ /* COMPLEX8 prototypes */
void XLALDestroyCOMPLEX8TimeSeries ( void XLALDestroyCOMPLEX8TimeSeries (
COMPLEX8TimeSeries *series COMPLEX8TimeSeries *series
); );
COMPLEX8TimeSeries *XLALCreateCOMPLEX8TimeSeries ( COMPLEX8TimeSeries *XLALCreateCOMPLEX8TimeSeries (
const CHAR *name, const CHAR *name,
const LIGOTimeGPS *epoch, const LIGOTimeGPS *epoch,
REAL8 f0, REAL8 f0,
 End of changes. 3 change blocks. 
4 lines changed or deleted 0 lines changed or added


 Units.h   Units.h 
skipping to change at line 143 skipping to change at line 143
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (UNITSH, "$Id$");
/** \ingroup Units_h /** \ingroup Units_h
* @{ * @{
*/ */
/**\name Error Codes */ /*@{*/ /**\name Error Codes */ /*@{*/
#define UNITSH_ENULLPIN 1 /**< Null pointer to input */ #define UNITSH_ENULLPIN 1 /**< Null pointer to input */
#define UNITSH_ENULLPOUT 2 /**< Null pointer to output */ #define UNITSH_ENULLPOUT 2 /**< Null pointer to output */
#define UNITSH_ENULLPD 3 /**< Null pointer to data member of vector */ #define UNITSH_ENULLPD 3 /**< Null pointer to data member of vector */
#define UNITSH_ENULLPPARAM 4 /**< Null pointer to parameters */ #define UNITSH_ENULLPPARAM 4 /**< Null pointer to parameters */
#define UNITSH_ESTRINGSIZE 5 /**< Output string too short */ #define UNITSH_ESTRINGSIZE 5 /**< Output string too short */
#define UNITSH_EOVERFLOW 6 /**< Exponent outside of (U)INT2 bou nds */ #define UNITSH_EOVERFLOW 6 /**< Exponent outside of (U)INT2 bou nds */
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 UserInput.h   UserInput.h 
skipping to change at line 21 skipping to change at line 21
* 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
*/ */
/** \defgroup UserInput User-input handling
* \ingroup support
* \author Reinhard Prix
* \date $Date$
* \brief Module for general parsing of user-input from config-file and/or
command-line.
*
*/
/** \file
* \ingroup UserInput
* \author Reinhard Prix
* \brief Header file defining the API for the UserInput modules.
*/
#ifndef _USERINPUT_H /* Double-include protection. */ #ifndef _USERINPUT_H /* Double-include protection. */
#define _USERINPUT_H #define _USERINPUT_H
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
#include <lal/ConfigFile.h> #include <lal/ConfigFile.h>
#if 0 #if 0
#include <lal/LIGOMetadataTables.h> #include <lal/LIGOMetadataTables.h>
#endif #endif
/*----- family of short-cut macros: register _struct-pointer_ "uvar->" stru /** \addtogroup UserInput_h
ct User-Variables ----- */ * \author Reinhard Prix
* \brief Module for simple unified handling of user-input from config-file
and/or command-line.
\heading{Description}
This module provides simple function and macros to 'register' a set of C-v
ariables as 'User Variables',
which can then be read in from the commandline and/or an input config file
, as parsed by \ref ConfigFile_h.
The module handles generating and outputting a help-string on the availabl
e inputs when requested, and
can deal with required inputs and providing defaults.
\heading{Usage}
The general approach consists of these steps
<ol>
<li> read log-level from user-input using XLALGetDebugLevel() [<b>Note:</b
> this must happend before and (X)LAL memory allocation!!]</li>
<li> set default-value for optional user-variables</li>
<li> \c register all user-variables using calls to \c XLALRegister<TYPE>Us
erVar(), or more conveniently, using the shortcut-macros
XLALreg<TYPE>UserStruct() that assume a struct-pointer named 'uvar' c
ontaining all user-variables as 'uvar->UserVariable'.</li>
<li> parse all user-input using XLALUserVarReadAllInput()</li>
<li> At the end, free user-input structure</li>
</ol>
One can use XLALUserVarWasSet() to determine wheter the user specified inp
ut for a given (optional) variable, or if it still has just its default val
ue.
The function XLALUserVarGetLog() can be used to obtain a log-string contai
ning the full user-input, either in \c commandline- or \c ConfigFile format
.
Here is a worked simple example of its recommended use:
\code
#include <stdio.h>
#include <lal/UserInput.h>
// these are the C-variables we want to read in from user-input
typedef struct {
BOOLEAN help; // did user request help-output?
INT4 anInteger;
REAL8 aDoubleVar;
CHAR *andAString;
REAL8 specialGeekSwitch;
} UserInput_t;
UserInput_t empty_UserInput; // this is zero-intialized!
int main(int argc,char *argv[])
{
UserInput_t UserVariables = empty_UserInput; // initializes this struct
to {0}
UserInput_t *uvar = &UserVariables; // struct-pointer allows us
to use the XLALreg<TYPE>UserStruct() macros...
// 1. step: read lal-debug level, using short-option '-v'
if ( XLALGetDebugLevel ( argc, argv, 'v') != XLAL_SUCCESS )
XLAL_ERROR ( XLAL_EFUNC );
// 2. step: set default-values for optional user-input variables
uvar->anInteger = 0;
uvar->andAString = NULL; // Note: need to assign allocated strings h
ere as default!!
// 3. step: Register all user-variables using the shortcut macros:
XLALregBOOLUserStruct ( help, 'h', UVAR_HELP, "Outpu
t this help-message");
XLALregINTUserStruct ( anInteger, 'i', UVAR_OPTIONAL, "An ex
ample user-variable of an optional integer");
XLALregREALUserStruct ( aDoubleVar, 'r', UVAR_REQUIRED, "This
REAL8 user-variable is required");
XLALregSTRINGUserStruct( andAString, 0, UVAR_OPTIONAL, "Optio
nal string-input, has no short-option");
XLALregREALUserStruct ( specialGeekSwitch, 'g', UVAR_DEVELOPER, "Thi
s REAL8 user-variable is required");
// 4. step: parse all user-input, from either config-file if given, or c
ommandline (overloads config-file values)
if ( XLALUserVarReadAllInput ( argc, argv ) != XLAL_SUCCESS )
XLAL_ERROR ( XLAL_EFUNC );
if (uvar->help) // if user had requested help, then we're already d
one here
return 0;
printf ("User-input was: anInteger = %d, aDoubleVar = %f, andAString = %
s\n", uvar->anInteger, uvar->aDoubleVar, uvar->andAString );
// 5. step: free user-input module memory
XLALDestroyUserVars();
LALCheckMemoryLeaks();
return 0;
} // main()
\endcode
\note This code can be compiled <b>as is</b> within lalapps, and yields
\code
$ ./testUserInput -v1 --help
Usage: testUserInput [@ConfigFile] [options], where options are:
-v INT set lalDebugLevel [0]
-h, --help BOOL Output this help-message []
-i, --anInteger INT An example user-variable of an optiona
l integer [0]
-r, --aDoubleVar REAL This REAL8 user-variable is required [
REQUIRED]
--andAString STRING Optional string-input, has no short-op
tion [NULL]
---------- The following are 'Developer'-options not useful for most use
rs:----------
-g, --specialGeekSwitch REAL This REAL8 user-variable is required [
0.0]
\endcode
And if called correctly:
\code
$ ./testUserInput -r 3.1415 --andAString="stupid example"
User-input was: anInteger = 0, aDoubleVar = 3.141500, andAString = stupid e
xample
\endcode
\note For a real-world example of usage, see various codes in lalapps/src/p
ulsar, notably synthesizeLVStats.c
*/
/*@{*/
/** \name Shortcut Macros
* With this family of short-cut macros one can conveniently register User-
variables
* that are accessible via a \e struct-pointer &quot;uvar->&quot;
*/
/*@{*/
#define XLALregREALUserStruct(name,option,flag,help) \ #define XLALregREALUserStruct(name,option,flag,help) \
XLALRegisterREALUserVar(#name, option, flag, help, &(uvar-> name)) XLALRegisterREALUserVar(#name, option, flag, help, &(uvar-> name))
#define XLALregINTUserStruct(name,option,flag,help) \ #define XLALregINTUserStruct(name,option,flag,help) \
XLALRegisterINTUserVar(#name, option,flag, help, &(uvar-> name)) XLALRegisterINTUserVar(#name, option,flag, help, &(uvar-> name))
#define XLALregBOOLUserStruct(name,option,flag,help) \ #define XLALregBOOLUserStruct(name,option,flag,help) \
XLALRegisterBOOLUserVar(#name, option, flag, help, &(uvar-> name)) XLALRegisterBOOLUserVar(#name, option, flag, help, &(uvar-> name))
#define XLALregSTRINGUserStruct(name,option,flag,help) \ #define XLALregSTRINGUserStruct(name,option,flag,help) \
XLALRegisterSTRINGUserVar(#name, option, flag, help, &(uvar-> name)) XLALRegisterSTRINGUserVar(#name, option, flag, help, &(uvar-> name))
#define XLALregLISTUserStruct(name,option,flag,help) \ #define XLALregLISTUserStruct(name,option,flag,help) \
XLALRegisterLISTUserVar(#name, option, flag, help, &(uvar-> name)) XLALRegisterLISTUserVar(#name, option, flag, help, &(uvar-> name))
/*@}*/
/** State-flags: variable is optional, required, help, developer or was_set */ /** State-flags: variable is optional, required, help, developer or was_set */
typedef enum { typedef enum {
UVAR_OPTIONAL = 0, /**< not required, and hasn't been s et */ UVAR_OPTIONAL = 0, /**< not required, and hasn't been s et */
UVAR_REQUIRED = 1<<0, /**< we require the user to set this variabl e */ UVAR_REQUIRED = 1<<0, /**< we require the user to set this variabl e */
UVAR_HELP = 1<<1, /**< special variable: trigger output of hel p-string */ UVAR_HELP = 1<<1, /**< special variable: trigger output of hel p-string */
UVAR_DEVELOPER = 1<<2, /**< OPTIONAL and hidden in help-output at l alDebugLevel==0 */ UVAR_DEVELOPER = 1<<2, /**< OPTIONAL and hidden in help-output at l alDebugLevel==0 */
UVAR_SPECIAL = 1<<3, /**< OPTIONAL and *turns off* checking of re quired variables (LALUserVarCheckRequired) */ UVAR_SPECIAL = 1<<3, /**< OPTIONAL and *turns off* checking of re quired variables (LALUserVarCheckRequired) */
UVAR_WAS_SET = 1<<7 /**< flag that this user-var has bee n set by user */ UVAR_WAS_SET = 1<<7 /**< flag that this user-var has bee n set by user */
} UserVarState; } UserVarState;
skipping to change at line 105 skipping to change at line 207
int XLALRegisterREALUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, REAL8 *cvar ); int XLALRegisterREALUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, REAL8 *cvar );
int XLALRegisterINTUserVar ( const CHAR *name, CHAR optchar, UserVarState f lag, const CHAR *helpstr, INT4 *cvar ); int XLALRegisterINTUserVar ( const CHAR *name, CHAR optchar, UserVarState f lag, const CHAR *helpstr, INT4 *cvar );
int XLALRegisterBOOLUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, BOOLEAN *cvar ); int XLALRegisterBOOLUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, BOOLEAN *cvar );
int XLALRegisterSTRINGUserVar ( const CHAR *name, CHAR optchar, UserVarStat e flag, const CHAR *helpstr, CHAR **cvar ); int XLALRegisterSTRINGUserVar ( const CHAR *name, CHAR optchar, UserVarStat e flag, const CHAR *helpstr, CHAR **cvar );
int XLALRegisterLISTUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, LALStringVector **cvar); int XLALRegisterLISTUserVar ( const CHAR *name, CHAR optchar, UserVarState flag, const CHAR *helpstr, LALStringVector **cvar);
/* ========== Deprecated LAL interface wrappers ========== */ /* ========== Deprecated LAL interface wrappers ========== */
/** \name Error codes */ /** \name Error codes */
/*@{*/ /*@{*/
#define USERINPUTH_ENULL 1 #define USERINPUTH_ENULL 1 /**< Arguments contained an unexpec
#define USERINPUTH_ENONULL 2 ted null pointer. */
#define USERINPUTH_EMEM 3 #define USERINPUTH_ENONULL 2 /**< Output pointer is not NULL */
#define USERINPUTH_EOPT 4 #define USERINPUTH_EMEM 3 /**< Out of memory */
#define USERINPUTH_ENOUVARS 5 #define USERINPUTH_EOPT 4 /**< Unknown command-line option en
#define USERINPUTH_ECMDLARG 6 countered */
#define USERINPUTH_EUNKNOWN 7 #define USERINPUTH_ENOUVARS 5 /**< No user-variables have been re
#define USERINPUTH_ENOTSET 8 gistered! */
#define USERINPUTH_EDEBUG 9 #define USERINPUTH_ECMDLARG 6 /**< Illegal command-line argument
#define USERINPUTH_EONECONFIG 10 */
#define USERINPUTH_ERECFORMAT 11 #define USERINPUTH_EUNKNOWN 7 /**< Unknown user-variable */
#define USERINPUTH_EXLAL 12 #define USERINPUTH_ENOTSET 8 /**< Required user-variable was not
#define USERINPUTH_ENAMECOLL 13 set */
#define USERINPUTH_EDEBUG 9 /**< lalDebugLevel can only be read
before ANY mallocs(), even hidden */
#define USERINPUTH_EONECONFIG 10 /**< Currently one ONE config-file
can be specified using '\@' */
#define USERINPUTH_ERECFORMAT 11 /**< Unknown format for recording u
ser-input */
#define USERINPUTH_EXLAL 12 /**< Failure in XLAL function */
#define USERINPUTH_ENAMECOLL 13 /**< Commandline option assigned mo
re than once */
/*@}*/
/** \cond DONT_DOXYGEN */
#define USERINPUTH_MSGENULL "Arguments contained an unexpected null poin ter." #define USERINPUTH_MSGENULL "Arguments contained an unexpected null poin ter."
#define USERINPUTH_MSGENONULL "Output pointer is not NULL" #define USERINPUTH_MSGENONULL "Output pointer is not NULL"
#define USERINPUTH_MSGEMEM "Out of memory" #define USERINPUTH_MSGEMEM "Out of memory"
#define USERINPUTH_MSGEOPT "Unknown command-line option encountered" #define USERINPUTH_MSGEOPT "Unknown command-line option encountered"
#define USERINPUTH_MSGENOUVARS "No user-variables have been registered!" #define USERINPUTH_MSGENOUVARS "No user-variables have been registered!"
#define USERINPUTH_MSGECMDLARG "Illegal command-line argument" #define USERINPUTH_MSGECMDLARG "Illegal command-line argument"
#define USERINPUTH_MSGEUNKNOWN "Unknown user-variable" #define USERINPUTH_MSGEUNKNOWN "Unknown user-variable"
#define USERINPUTH_MSGENOTSET "Required user-variable was not set" #define USERINPUTH_MSGENOTSET "Required user-variable was not set"
#define USERINPUTH_MSGEDEBUG "lalDebugLevel can only be read before ANY m allocs(), even hidden.." #define USERINPUTH_MSGEDEBUG "lalDebugLevel can only be read before ANY m allocs(), even hidden.."
#define USERINPUTH_MSGEONECONFIG "Currently one ONE config-file can be spec ified using '@'" #define USERINPUTH_MSGEONECONFIG "Currently one ONE config-file can be spec ified using '@'"
#define USERINPUTH_MSGERECFORMAT "Unknown format for recording user-input " #define USERINPUTH_MSGERECFORMAT "Unknown format for recording user-input "
#define USERINPUTH_MSGEXLAL "Failure in XLAL function" #define USERINPUTH_MSGEXLAL "Failure in XLAL function"
#define USERINPUTH_MSGENAMECOLL "Commandline option assigned more than once " #define USERINPUTH_MSGENAMECOLL "Commandline option assigned more than once "
/** \endcond */
/*@}*/ /** \name Deprecated LAL-interface
* These functions and macros are deprecated, and you should user their XLA
L-equivalents instead.
*/ /*@{*/
/*----- short-cut macros to register global "uvar_" User-Variables ----- */ /*----- short-cut macros to register global "uvar_" User-Variables ----- */
#define LALregREALUserVar(status,name,option,flag,help) \ #define LALregREALUserVar(status,name,option,flag,help) \
TRY(LALRegisterREALUserVar((status)->statusPtr, #name, option, flag, help,& (uvar_ ## name)), status) TRY(LALRegisterREALUserVar((status)->statusPtr, #name, option, flag, help,& (uvar_ ## name)), status)
#define LALregINTUserVar(status,name,option,flag,help) \ #define LALregINTUserVar(status,name,option,flag,help) \
TRY(LALRegisterINTUserVar((status)->statusPtr, #name, option,flag, help,&(u var_ ## name)), status) TRY(LALRegisterINTUserVar((status)->statusPtr, #name, option,flag, help,&(u var_ ## name)), status)
#define LALregBOOLUserVar(status,name,option,flag,help) \ #define LALregBOOLUserVar(status,name,option,flag,help) \
TRY(LALRegisterBOOLUserVar((status)->statusPtr, #name, option, flag, help, &(uvar_ ## name)),status) TRY(LALRegisterBOOLUserVar((status)->statusPtr, #name, option, flag, help, &(uvar_ ## name)),status)
skipping to change at line 188 skipping to change at line 294
void LALUserVarHelpString (LALStatus *, CHAR **helpstring, const CHAR *prog name); void LALUserVarHelpString (LALStatus *, CHAR **helpstring, const CHAR *prog name);
void LALUserVarCheckRequired (LALStatus *); void LALUserVarCheckRequired (LALStatus *);
INT4 LALUserVarWasSet (const void *cvar); INT4 LALUserVarWasSet (const void *cvar);
void LALGetDebugLevel (LALStatus *, int argc, char *argv[], CHAR optchar); void LALGetDebugLevel (LALStatus *, int argc, char *argv[], CHAR optchar);
void LALUserVarGetLog (LALStatus *, CHAR **logstr, UserVarLogFormat format ); void LALUserVarGetLog (LALStatus *, CHAR **logstr, UserVarLogFormat format );
#if 0 #if 0
void LALUserVarGetProcParamsTable (LALStatus *status, ProcessParamsTable ** out, CHAR *progname); void LALUserVarGetProcParamsTable (LALStatus *status, ProcessParamsTable ** out, CHAR *progname);
#endif #endif
/*@}*/
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* C++ protection. */ #endif /* C++ protection. */
#endif /* Double-include protection. */ #endif /* Double-include protection. */
 End of changes. 8 change blocks. 
32 lines changed or deleted 180 lines changed or added


 VectorIndexRange.h   VectorIndexRange.h 
skipping to change at line 22 skipping to change at line 22
* *
* \heading{Synopsis} * \heading{Synopsis}
* \code * \code
* #include <lal/VectorIndexRange.h> * #include <lal/VectorIndexRange.h>
* \endcode * \endcode
* *
* @{ * @{
*/ */
#include <math.h> #include <math.h>
#include <lal/LALRCSID.h>
#include <lal/LALStdlib.h> #include <lal/LALStdlib.h>
#include <lal/SeqFactories.h> #include <lal/SeqFactories.h>
#include <lal/AVFactories.h> #include <lal/AVFactories.h>
#ifndef __LALVECTORINDEXRANGE_H__ #ifndef __LALVECTORINDEXRANGE_H__
#define __LALVECTORINDEXRANGE_H__ #define __LALVECTORINDEXRANGE_H__
/* remove SWIG interface directives */ /* remove SWIG interface directives */
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT #define SWIGLAL_STRUCT
skipping to change at line 65 skipping to change at line 64
#define VECTORINDEXRANGEH_MSGECHK "Error checking failed to catch bad data" #define VECTORINDEXRANGEH_MSGECHK "Error checking failed to catch bad data"
#define VECTORINDEXRANGEH_MSGEFLS "Incorrect answer for valid data" #define VECTORINDEXRANGEH_MSGEFLS "Incorrect answer for valid data"
#define VECTORINDEXRANGEH_MSGEUSE "Bad user-entered data" #define VECTORINDEXRANGEH_MSGEUSE "Bad user-entered data"
#define VECTORINDEXRANGEH_MSGENULL "Null Pointer." #define VECTORINDEXRANGEH_MSGENULL "Null Pointer."
#define VECTORINDEXRANGEH_MSGEALOC "Memory Allocation Error" #define VECTORINDEXRANGEH_MSGEALOC "Memory Allocation Error"
#define VECTORINDEXRANGEH_MSGEFPMS "Filter Parameter Structure Error" #define VECTORINDEXRANGEH_MSGEFPMS "Filter Parameter Structure Error"
#define VECTORINDEXRANGEH_MSGENUMZ "Incorrect number of command line argume nts" #define VECTORINDEXRANGEH_MSGENUMZ "Incorrect number of command line argume nts"
#define VECTORINDEXRANGEH_MSGELNTH "Vector/Array of Improper Length" #define VECTORINDEXRANGEH_MSGELNTH "Vector/Array of Improper Length"
#define VECTORINDEXRANGEH_MSGENNUL "Non-Null Pointer that should be NULL" #define VECTORINDEXRANGEH_MSGENNUL "Non-Null Pointer that should be NULL"
NRCSID( VECTORINDEXRANGEH, "$Id$" );
/* typedefs */ /* typedefs */
/* CHAR */ /* CHAR */
typedef struct typedef struct
tagCHARVectorPair { tagCHARVectorPair {
SWIGLAL_STRUCT(CHARVectorPair); SWIGLAL_STRUCT(CHARVectorPair);
CHARVector **head; CHARVector **head;
CHARVector **tail; CHARVector **tail;
} CHARVectorPair; } CHARVectorPair;
 End of changes. 2 change blocks. 
3 lines changed or deleted 0 lines changed or added


 VectorOps.h   VectorOps.h 
skipping to change at line 62 skipping to change at line 62
#define VECTOROPSH_ESZMM 4 /**< Size mismatch */ #define VECTOROPSH_ESZMM 4 /**< Size mismatch */
#define VECTOROPSH_ESAME 8 /**< Input/Output data vectors are the same */ #define VECTOROPSH_ESAME 8 /**< Input/Output data vectors are the same */
/** @}*/ /** @}*/
/** @}*/ /** @}*/
#define VECTOROPSH_MSGENULL "Null pointer" #define VECTOROPSH_MSGENULL "Null pointer"
#define VECTOROPSH_MSGESIZE "Invalid input size" #define VECTOROPSH_MSGESIZE "Invalid input size"
#define VECTOROPSH_MSGESZMM "Size mismatch" #define VECTOROPSH_MSGESZMM "Size mismatch"
#define VECTOROPSH_MSGESAME "Input/Output data vectors are the same" #define VECTOROPSH_MSGESAME "Input/Output data vectors are the same"
NRCSID (VECTOROPSH, "$Id$");
/* /*
* *
* XLAL Routines. * XLAL Routines.
* *
*/ */
/* sigle precision */ /* sigle precision */
COMPLEX8Vector * XLALCCVectorDivide( COMPLEX8Vector *out, const COMPLEX8Vec tor *in1, const COMPLEX8Vector *in2 ); COMPLEX8Vector * XLALCCVectorDivide( COMPLEX8Vector *out, const COMPLEX8Vec tor *in1, const COMPLEX8Vector *in2 );
COMPLEX8Vector * XLALCCVectorMultiply( COMPLEX8Vector *out, const COMPLEX8V ector *in1, const COMPLEX8Vector *in2 ); COMPLEX8Vector * XLALCCVectorMultiply( COMPLEX8Vector *out, const COMPLEX8V ector *in1, const COMPLEX8Vector *in2 );
COMPLEX8Vector * XLALCCVectorMultiplyConjugate( COMPLEX8Vector *out, const COMPLEX8Vector *in1, const COMPLEX8Vector *in2 ); COMPLEX8Vector * XLALCCVectorMultiplyConjugate( COMPLEX8Vector *out, const COMPLEX8Vector *in1, const COMPLEX8Vector *in2 );
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 Window.h   Window.h 
skipping to change at line 35 skipping to change at line 35
#if !defined(SWIG) && !defined(SWIGLAL_STRUCT) #if !defined(SWIG) && !defined(SWIGLAL_STRUCT)
#define SWIGLAL_STRUCT(...) #define SWIGLAL_STRUCT(...)
#endif #endif
#include <lal/LALDatatypes.h> #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (WINDOWH, "$Id$"); /** \addtogroup window */
/*@{*/
/** Structure for storing REAL4 window function data, providing storage for
a sequence of samples
* as well as metadata about the window such as the sum-of-squarse of the s
amples
*/
typedef struct tagREAL4Window { typedef struct tagREAL4Window {
SWIGLAL_STRUCT(REAL4Window); SWIGLAL_STRUCT(REAL4Window);
REAL4Sequence *data; REAL4Sequence *data; /**< The window function samples */
REAL8 sumofsquares; REAL8 sumofsquares; /**< The sum of the squares of the w
REAL8 sum; indow function samples */
REAL8 sum; /**< The sum of the window function
samples */
} REAL4Window; } REAL4Window;
/** Structure for storing REAL8 window function data, providing storage for
a sequence of samples
* as well as metadata about the window such as the sum-of-squarse of the s
amples
*/
typedef struct tagREAL8Window { typedef struct tagREAL8Window {
SWIGLAL_STRUCT(REAL8Window); SWIGLAL_STRUCT(REAL8Window);
REAL8Sequence *data; REAL8Sequence *data; /**< The window function samples */
REAL8 sumofsquares; REAL8 sumofsquares; /**< The sum of the squares of the w
REAL8 sum; indow function samples */
REAL8 sum; /**< The sum of the window function
samples */
} REAL8Window; } REAL8Window;
REAL4Window *XLALCreateREAL4WindowFromSequence(REAL4Sequence *sequence); REAL4Window *XLALCreateREAL4WindowFromSequence(REAL4Sequence *sequence);
REAL8Window *XLALCreateREAL8WindowFromSequence(REAL8Sequence *sequence); REAL8Window *XLALCreateREAL8WindowFromSequence(REAL8Sequence *sequence);
REAL4Window *XLALCreateRectangularREAL4Window(UINT4 length); REAL4Window *XLALCreateRectangularREAL4Window(UINT4 length);
REAL4Window *XLALCreateHannREAL4Window(UINT4 length); REAL4Window *XLALCreateHannREAL4Window(UINT4 length);
REAL4Window *XLALCreateWelchREAL4Window(UINT4 length); REAL4Window *XLALCreateWelchREAL4Window(UINT4 length);
REAL4Window *XLALCreateBartlettREAL4Window(UINT4 length); REAL4Window *XLALCreateBartlettREAL4Window(UINT4 length);
REAL4Window *XLALCreateParzenREAL4Window(UINT4 length); REAL4Window *XLALCreateParzenREAL4Window(UINT4 length);
skipping to change at line 86 skipping to change at line 93
REAL8Window *XLALCreateGaussREAL8Window(UINT4 length, REAL8 beta); REAL8Window *XLALCreateGaussREAL8Window(UINT4 length, REAL8 beta);
void XLALDestroyREAL4Window(REAL4Window *window); void XLALDestroyREAL4Window(REAL4Window *window);
void XLALDestroyREAL8Window(REAL8Window *window); void XLALDestroyREAL8Window(REAL8Window *window);
REAL4Sequence *XLALUnitaryWindowREAL4Sequence(REAL4Sequence *sequence, cons t REAL4Window *window); REAL4Sequence *XLALUnitaryWindowREAL4Sequence(REAL4Sequence *sequence, cons t REAL4Window *window);
COMPLEX8Sequence *XLALUnitaryWindowCOMPLEX8Sequence(COMPLEX8Sequence *seque nce, const REAL4Window *window); COMPLEX8Sequence *XLALUnitaryWindowCOMPLEX8Sequence(COMPLEX8Sequence *seque nce, const REAL4Window *window);
REAL8Sequence *XLALUnitaryWindowREAL8Sequence(REAL8Sequence *sequence, cons t REAL8Window *window); REAL8Sequence *XLALUnitaryWindowREAL8Sequence(REAL8Sequence *sequence, cons t REAL8Window *window);
COMPLEX16Sequence *XLALUnitaryWindowCOMPLEX16Sequence(COMPLEX16Sequence *se quence, const REAL8Window *window); COMPLEX16Sequence *XLALUnitaryWindowCOMPLEX16Sequence(COMPLEX16Sequence *se quence, const REAL8Window *window);
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _WINDOW_H */ #endif /* _WINDOW_H */
 End of changes. 6 change blocks. 
7 lines changed or deleted 24 lines changed or added


 XLALError.h   XLALError.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 XLALError.h #ifndef XLALERROR_H
* \ingroup std #define XLALERROR_H
#include <stdarg.h>
#include <stddef.h>
#include <lal/LALAtomicDatatypes.h>
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
/**
* \addtogroup XLALError_h
* \author Creighton, J. D. E. * \author Creighton, J. D. E.
* \date 2005 * \date 2005
* \brief This header covers routines to provide the XLAL interface error * \brief This header covers routines to provide the XLAL interface error
* handling. * handling.
* *
* \par XLAL Errors * \heading{XLAL Errors}
* *
* When an XLAL routine fails, the routine should set the <tt>xlalErrno</tt > to * When an XLAL routine fails, the routine should set the <tt>xlalErrno</tt > to
* an appropriate error number and return with the appropriate error code. The * an appropriate error number and return with the appropriate error code. The
* return value depends on the return type of the XLAL function. Furthermo re, * return value depends on the return type of the XLAL function. Furthermo re,
* the XLAL error handler should be invoked. * the XLAL error handler should be invoked.
* *
* Whenever possible (i.e., always), standard XLAL error macros should be u sed * Whenever possible (i.e., always), standard XLAL error macros should be u sed
* when generating an error. These macros (i) invoke the current error han dler, * when generating an error. These macros (i) invoke the current error han dler,
* (ii) set the error code to the specified value, and (iii) return with th e * (ii) set the error code to the specified value, and (iii) return with th e
* correct return value. In addition, these macros may take an optional * correct return value. In addition, these macros may take an optional
* printf-like format string (along with additional parameters for this for mat * printf-like format string (along with additional parameters for this for mat
* string) to provide additional information about the nature of the failur e. * string) to provide additional information about the nature of the failur e.
* The error macros that should be used are: * The error macros that should be used are:
* *
* <tt>XLAL_ERROR(errnum [, fmt [, ...]])</tt> for XLAL routines returning an * <tt> #XLAL_ERROR(errnum [, fmt [, ...]])</tt> for XLAL routines returnin g an
* integer type. * integer type.
* *
* <tt>XLAL_ERROR_VOID(errnum [, fmt [, ...]])</tt> for XLAL routines with no * <tt> #XLAL_ERROR_VOID(errnum [, fmt [, ...]])</tt> for XLAL routines wit h no
* return value. * return value.
* *
* <tt>XLAL_ERROR_NULL(errnum [, fmt [, ...]])</tt> for XLAL routines retur ning * <tt> #XLAL_ERROR_NULL(errnum [, fmt [, ...]])</tt> for XLAL routines ret urning
* a pointer. * a pointer.
* *
* <tt>XLAL_ERROR_REAL4(errnum [, fmt [, ...]])</tt> for XLAL routines * <tt> #XLAL_ERROR_REAL4(errnum [, fmt [, ...]])</tt> for XLAL routines
* returning a <tt>REAL4</tt> floating-point value. * returning a <tt>REAL4</tt> floating-point value.
* *
* <tt>XLAL_ERROR_REAL8(errnum [, fmt [, ...]])</tt> for XLAL routines * <tt> #XLAL_ERROR_REAL8(errnum [, fmt [, ...]])</tt> for XLAL routines
* returning a <tt>REAL8</tt> floating-point value. * returning a <tt>REAL8</tt> floating-point value.
* *
* Assert-like error checking can be performed with <tt>XLAL_CHECK</tt>-sty * Assert-like error checking can be performed with <tt>#XLAL_CHECK</tt>-st
le yle
* macros. Unlike <tt>assert()</tt> statements, <tt>XLAL_CHECK</tt> macros * macros. Unlike <tt>assert()</tt> statements, <tt>#XLAL_CHECK</tt> macro
s
* do <i>not</i> get removed when the code is not compiled with * do <i>not</i> get removed when the code is not compiled with
* <tt>NDEBUG</tt> defined. * <tt>NDEBUG</tt> defined.
* *
* Additional error, warning, and informational messages can be generated u sing * Additional error, warning, and informational messages can be generated u sing
* the routines <tt>XLALPrintError()</tt>, <tt>XLALPrintWarning()</tt> and * the routines <tt>XLALPrintError()</tt>, <tt>XLALPrintWarning()</tt> and
* <tt>XLALPrintInfo()</tt>. These routines (which work just like * <tt>XLALPrintInfo()</tt>. These routines (which work just like
* <tt>printf()</tt>) print or suppress the message depending on the value of * <tt>printf()</tt>) print or suppress the message depending on the value of
* <tt>lalDebugLevel</tt>. To print error/warning/info messages with a * <tt>lalDebugLevel</tt>. To print error/warning/info messages with a
* standard format, use the macros * standard format, use the macros
* <tt>XLAL_PRINT_ERROR(fmt [, ...])</tt> * <tt>#XLAL_PRINT_ERROR(fmt [, ...])</tt>
* <tt>XLAL_PRINT_WARNING(fmt [, ...])</tt> * <tt>#XLAL_PRINT_WARNING(fmt [, ...])</tt>
* <tt>XLAL_PRINT_INFO(fmt [, ...])</tt> * <tt>#XLAL_PRINT_INFO(fmt [, ...])</tt>
* *
* On rare occations, you may be prepared for an XLAL routine to fail, and may * On rare occations, you may be prepared for an XLAL routine to fail, and may
* want to handle the failure immediately. In these circumstances, the XLA L * want to handle the failure immediately. In these circumstances, the XLA L
* error handler needs to be disabled before the routine is called so that the * error handler needs to be disabled before the routine is called so that the
* failure can be caught. The <tt>XLAL_TRY(statement,errnum)</tt> macro is * failure can be caught. The <tt>#XLAL_TRY(statement,errnum)</tt> macro i s
* designed to be used in these situations. Here is an example: * designed to be used in these situations. Here is an example:
* \code * \code
* REAL8 XLALLogFactorial(INT4 n) * REAL8 XLALLogFactorial(INT4 n)
* { * {
* REAL8 y; * REAL8 y;
* int errnum; * int errnum;
* XLAL_TRY(y = XLALGammaFunction(n + 1), errnum); * XLAL_TRY(y = XLALGammaFunction(n + 1), errnum);
* if (XLAL_IS_REAL8_FAIL_NAN(y)) * if (XLAL_IS_REAL8_FAIL_NAN(y))
* switch (errnum) { * switch (errnum) {
* case XLAL_ERANGE: * case XLAL_ERANGE:
skipping to change at line 97 skipping to change at line 110
* y += 0.5 * log(2.0 * LAL_PI * n); * y += 0.5 * log(2.0 * LAL_PI * n);
* return y; * return y;
* default: * default:
* XLALSetErrno(errnum); * XLALSetErrno(errnum);
* XLAL_ERROR_REAL8(XLAL_EFUNC); * XLAL_ERROR_REAL8(XLAL_EFUNC);
* } * }
* return log(y); * return log(y);
* } * }
* \endcode * \endcode
* *
* \par XLAL Function Return Codes * \heading{XLAL Function Return Codes}
* *
* XLAL functions that return an integer-type will return <tt>XLAL_FAILURE< /tt> * XLAL functions that return an integer-type will return <tt>#XLAL_FAILURE </tt>
* on failure. XLAL functions that return a pointer will return <tt>NULL</ tt> * on failure. XLAL functions that return a pointer will return <tt>NULL</ tt>
* on failure. * on failure.
* *
* The LAL specification requires that XLAL functions that return a * The LAL specification requires that XLAL functions that return a
* floating-point type (either <tt>REAL4</tt> or <tt>REAL8</tt>) should ret urn * floating-point type (either <tt>::REAL4</tt> or <tt>::REAL8</tt>) should return
* a particular value to indicate an error. These values are given by the * a particular value to indicate an error. These values are given by the
* macros <tt>XLAL_REAL4_FAIL_NAN</tt> and <tt>XLAL_REAL8_FAIL_NAN</tt> (th ey * macros <tt>#XLAL_REAL4_FAIL_NAN</tt> and <tt>#XLAL_REAL8_FAIL_NAN</tt> ( they
* are Not a Number or NaN values). To implement these we choose hexadecim al * are Not a Number or NaN values). To implement these we choose hexadecim al
* representations and then provide static functions that return the equiva lent * representations and then provide static functions that return the equiva lent
* <tt>REAL4</tt> or <tt>REAL8</tt> values. The macros then invoke these * <tt>::REAL4</tt> or <tt>::REAL8</tt> values. The macros then invoke the se
* functions. This is done so that the compiler can easily inline the * functions. This is done so that the compiler can easily inline the
* functions (or eliminate them if they are not used). Conversion from the * functions (or eliminate them if they are not used). Conversion from the
* hexadecimal representation to the floating-point representation is done * hexadecimal representation to the floating-point representation is done
* using a union. * using a union.
* *
* The LAL specification also requires that there be two macros, * The LAL specification also requires that there be two macros,
* <tt>XLAL_IS_REAL4_FAIL_NAN(val)</tt> and * <tt>#XLAL_IS_REAL4_FAIL_NAN(val)</tt> and
* <tt>XLAL_IS_REAL8_FAIL_NAN(val)</tt> that will test if val is one of the * <tt>#XLAL_IS_REAL8_FAIL_NAN(val)</tt> that will test if val is one of th
se ese
* XLAL-specific fail NaNs. Again these macros invoke static functions tha t * XLAL-specific fail NaNs. Again these macros invoke static functions tha t
* return the result of the comparison. The cmparison itself is done with the * return the result of the comparison. The cmparison itself is done with the
* hexadecimal representation. * hexadecimal representation.
* *
* \par XLAL Error Codes * \heading{XLAL Error Codes}
* *
* The LAL specification requires particular return code and error values. * The LAL specification requires particular return code and error values.
* These are implemented here as enumeration constants in the * These are implemented here as enumeration constants in the
* <tt>XLALErrorValue</tt> enumeration. * <tt>::XLALErrorValue</tt> enumeration.
*/ */
/*@{*/
#ifndef XLALERROR_H
#define XLALERROR_H
#include <stdarg.h>
#include <stddef.h>
#include <lal/LALAtomicDatatypes.h>
NRCSID( XLALERRORH, "$Id$" );
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
/* /*
* *
* Use these functions to print arbitrary messages as errors or warnings. * Use these functions to print arbitrary messages as errors or warnings.
* *
*/ */
/** Prints an error message if error printing is enabled by lalDebugLevel. */ /** Prints an error message if error printing is enabled by lalDebugLevel. */
int XLALPrintError(const char *fmt, ...); int XLALPrintError(const char *fmt, ...);
skipping to change at line 218 skipping to change at line 217
/** Prints a deprecation warning at the "warning" verbosity level. */ /** Prints a deprecation warning at the "warning" verbosity level. */
int XLALPrintDeprecationWarning(const char *old, const char *replacement); int XLALPrintDeprecationWarning(const char *old, const char *replacement);
/* /*
* *
* Macros that will print error/warning/info messages with a standard forma t. * Macros that will print error/warning/info messages with a standard forma t.
* *
*/ */
/** \def XLAL_PRINT_ERROR(fmt [, ...]) /** \brief Macro that will print an error message with a standard format.
* \brief Macro that will print an error message with a standard format. *
* \params fmt A printf-like format string. * Prototype: <b>XLAL_PRINT_ERROR(fmt [, ...])</b>
* \params ... (Optional) Arguments to the format string. *
* \b Parameters:<ul>
* <li> \b fmt A printf-like format string.
* <li> \b ... (Optional) Arguments to the format string.
* </ul>
*/ */
#define XLAL_PRINT_ERROR(...) \ #define XLAL_PRINT_ERROR(...) \
XLALPrintErrorMessage(__func__, __FILE__, __LINE__, __VA_ARGS__) XLALPrintErrorMessage(__func__, __FILE__, __LINE__, __VA_ARGS__)
/** \def XLAL_PRINT_WARNING(fmt [, ...]) /** \brief Macro that will print a warning message with a standard format.
* \brief Macro that will print a warning message with a standard format. *
* \params fmt A printf-like format string. * Prototype: <b>XLAL_PRINT_WARNING(fmt [, ...])</b>
* \params ... (Optional) Arguments to the format string. *
* \b Parameters:<ul>
* <li> \b fmt A printf-like format string.
* <li> \b ... (Optional) Arguments to the format string.
* </ul>
*/ */
#define XLAL_PRINT_WARNING(...) \ #define XLAL_PRINT_WARNING(...) \
XLALPrintWarningMessage(__func__, __FILE__, __LINE__, __VA_ARGS__) XLALPrintWarningMessage(__func__, __FILE__, __LINE__, __VA_ARGS__)
/** \def XLAL_PRINT_INFO(fmt [, ...]) /** \brief Macro that will print an info message with a standard format.
* \brief Macro that will print an info message with a standard format. *
* \params fmt A printf-like format string. * Prototype: <b>XLAL_PRINT_INFO(fmt [, ...])</b>
* \params ... (Optional) Arguments to the format string. *
* \b Parameters:<ul>
* <li> \b fmt A printf-like format string.
* <li> \b ... (Optional) Arguments to the format string.
* </ul>
*/ */
#define XLAL_PRINT_INFO(...) \ #define XLAL_PRINT_INFO(...) \
XLALPrintInfoMessage(__func__, __FILE__, __LINE__, __VA_ARGS__) XLALPrintInfoMessage(__func__, __FILE__, __LINE__, __VA_ARGS__)
/* silence gcc warnings about certain (possibly) unused symbols */ /* silence gcc warnings about certain (possibly) unused symbols */
#ifdef __GNUC__ #ifdef __GNUC__
#define UNUSED __attribute__ ((unused)) #define UNUSED __attribute__ ((unused))
#else #else
#define UNUSED #define UNUSED
#endif #endif
skipping to change at line 526 skipping to change at line 537
/** Routine to set the XLAL error number and invoke the XLAL error handler. /** Routine to set the XLAL error number and invoke the XLAL error handler.
* It is used by the error macros. */ * It is used by the error macros. */
void XLALError( void XLALError(
const char *func, /**< name of function where the error occurs */ const char *func, /**< name of function where the error occurs */
const char *file, /**< source file name (use the __FILE__ macro) */ const char *file, /**< source file name (use the __FILE__ macro) */
int line, /**< source line number (use the __LINE__ macro) * / int line, /**< source line number (use the __LINE__ macro) * /
int errnum /**< error code */ int errnum /**< error code */
); );
/** \def XLAL_ERROR_VAL(val, errnum [, fmt [, ...]]) /** \brief Macro to invoke the <tt>XLALError()</tt> function and return
* \brief Macro to invoke the <tt>XLALError()</tt> function and return
* with code val (it should not really be used itself, but forms the basis for * with code val (it should not really be used itself, but forms the basis for
* other macros). * other macros).
* *
* \param val The value to return. * Prototype: <b>XLAL_ERROR_VAL(val, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b val The value to return.
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR_VAL(val, ...) XLAL_ERROR_VAL_(val, __VA_ARGS__, NULL, NU LL) #define XLAL_ERROR_VAL(val, ...) XLAL_ERROR_VAL_(val, __VA_ARGS__, NULL, NU LL)
/* Helper macro for internal use only */ /* Helper macro for internal use only */
#define XLAL_ERROR_VAL_(val, errnum, fmt, ...) \ #define XLAL_ERROR_VAL_(val, errnum, fmt, ...) \
do { \ do { \
if (fmt) XLAL_PRINT_ERROR(fmt, __VA_ARGS__); \ if (fmt) XLAL_PRINT_ERROR(fmt, __VA_ARGS__); \
XLALError(__func__, __FILE__, __LINE__, errnum); \ XLALError(__func__, __FILE__, __LINE__, errnum); \
return val; \ return val; \
} while (0) } while (0)
/** \def XLAL_ERROR(errnum [, fmt [, ...]]) /** Macro to invoke a failure from a XLAL routine returning an integer.
* \brief Macro to invoke a failure from a XLAL routine returning an intege
r.
* *
* \param errnum The XLAL error number to set. * Prototype: <b>XLAL_ERROR(errnum [, fmt [, ...]])</b>
* \param fmt (Optional) Format string for additional error information. *
* \param ... (Optional) Additional arguments for printf-like format. * \b Parameters:<ul>
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error informatio
n.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR(...) XLAL_ERROR_VAL(XLAL_FAILURE, __VA_ARGS__) #define XLAL_ERROR(...) XLAL_ERROR_VAL(XLAL_FAILURE, __VA_ARGS__)
/** \def XLAL_ERROR_NULL(errnum [, fmt [, ...]]) /** Macro to invoke a failure from a XLAL routine returning a pointer.
* \brief Macro to invoke a failure from a XLAL routine returning a pointer
.
* *
* \param errnum The XLAL error number to set. * Prototype: <b>XLAL_ERROR_NULL(errnum [, fmt [, ...]])</b>
* \param fmt (Optional) Format string for additional error information. *
* \param ... (Optional) Additional arguments for printf-like format. * \b Parameters:<ul>
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR_NULL(...) XLAL_ERROR_VAL(NULL, __VA_ARGS__) #define XLAL_ERROR_NULL(...) XLAL_ERROR_VAL(NULL, __VA_ARGS__)
/** \def XLAL_ERROR_VOID(errnum [, fmt [, ...]]) /** \brief Macro to invoke a failure from a XLAL routine returning void.
* \brief Macro to invoke a failure from a XLAL routine returning void.
* *
* \param errnum The XLAL error number to set. * Prototype: <b>XLAL_ERROR_VOID(errnum [, fmt [, ...]])</b>
* \param fmt (Optional) Format string for additional error information. *
* \param ... (Optional) Additional arguments for printf-like format. * \b Parameters:<ul>
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR_VOID(...) XLAL_ERROR_VAL(/* void */, __VA_ARGS__) #define XLAL_ERROR_VOID(...) XLAL_ERROR_VAL(/* void */, __VA_ARGS__)
/** \def XLAL_ERROR_REAL4(errnum [, fmt [, ...]]) /** \brief Macro to invoke a failure from a XLAL routine returning a <tt>RE
* \brief Macro to invoke a failure from a XLAL routine returning a AL4</tt>.
* <tt>REAL4</tt>.
* *
* \param errnum The XLAL error number to set. * Prototype: <b>XLAL_ERROR_REAL4(errnum [, fmt [, ...]])</b>
* \param fmt (Optional) Format string for additional error information. *
* \param ... (Optional) Additional arguments for printf-like format. * \b Parameters:<ul>
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR_REAL4(...) XLAL_ERROR_VAL(XLAL_REAL4_FAIL_NAN, __VA_ARGS __) #define XLAL_ERROR_REAL4(...) XLAL_ERROR_VAL(XLAL_REAL4_FAIL_NAN, __VA_ARGS __)
/** \def XLAL_ERROR_REAL8(errnum [, fmt [, ...]]) /** * \brief Macro to invoke a failure from a XLAL routine returning a <tt
* \brief Macro to invoke a failure from a XLAL routine returning a >REAL8</tt>.
* <tt>REAL8</tt>.
* *
* \param errnum The XLAL error number to set. * Prototype <b>XLAL_ERROR_REAL8(errnum [, fmt [, ...]])</b>
* \param fmt (Optional) Format string for additional error information. *
* \param ... (Optional) Additional arguments for printf-like format. * \b Parameters:<ul>
* <li> \b errnum The XLAL error number to set.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_ERROR_REAL8(...) XLAL_ERROR_VAL(XLAL_REAL8_FAIL_NAN, __VA_ARGS __) #define XLAL_ERROR_REAL8(...) XLAL_ERROR_VAL(XLAL_REAL8_FAIL_NAN, __VA_ARGS __)
/** \def XLAL_CHECK_VAL(val, assertion, errnum [, fmt [, ...]]) /** \brief Macro to test an assertion; if it is not true, invoke the
* \brief Macro to test an assertion; if it is not true, invoke the
* <tt>XLALError()</tt> function and return with code val (it should not re ally * <tt>XLALError()</tt> function and return with code val (it should not re ally
* be used itself, but forms the basis for other macros). * be used itself, but forms the basis for other macros).
* *
* \param val The value to return. * Prototype: <b>XLAL_CHECK_VAL(val, assertion, errnum [, fmt [, ...]])</b>
* \param assertion The assertion to test. *
* \param errnum The XLAL error number to set if the assertion is false. * \b Parameters:<ul>
* \param fmt (Optional) Format string for additional error information. * <li> \b val The value to return.
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK_VAL(val, assertion, ...) \ #define XLAL_CHECK_VAL(val, assertion, ...) \
do { \ do { \
if (!(assertion)) { \ if (!(assertion)) { \
XLAL_PRINT_ERROR("Check ("#assertion") failed"); \ XLAL_PRINT_ERROR("Check ("#assertion") failed"); \
XLAL_ERROR_VAL(val, __VA_ARGS__); \ XLAL_ERROR_VAL(val, __VA_ARGS__); \
} \ } \
} while (0) } while (0)
/** \def XLAL_CHECK(assertion, errnum [, fmt [, ...]]) /** * \brief Macro to test an assertion and invoke a failure if it is not
* \brief Macro to test an assertion and invoke a failure if it is not true true
* in a function that returns an integer. * in a function that returns an integer.
* *
* \param assertion The assertion to test. * Prototype: <b>XLAL_CHECK(assertion, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set if the assertion is false. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK(assertion, ...) \ #define XLAL_CHECK(assertion, ...) \
XLAL_CHECK_VAL(XLAL_FAILURE, assertion, __VA_ARGS__) XLAL_CHECK_VAL(XLAL_FAILURE, assertion, __VA_ARGS__)
/** \def XLAL_CHECK_NULL(assertion, errnum [, fmt [, ...]]) /** \brief Macro to test an assertion and invoke a failure if it is not tru
* \brief Macro to test an assertion and invoke a failure if it is not true e
* in a function that returns a pointer. * in a function that returns a pointer.
* *
* \param assertion The assertion to test. * Prototype: <b>XLAL_CHECK_NULL(assertion, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set if the assertion is false. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK_NULL(assertion, ...) \ #define XLAL_CHECK_NULL(assertion, ...) \
XLAL_CHECK_VAL(NULL, assertion, __VA_ARGS__) XLAL_CHECK_VAL(NULL, assertion, __VA_ARGS__)
/** \def XLAL_CHECK_VOID(assertion, errnum [, fmt [, ...]]) /** \brief Macro to test an assertion and invoke a failure if it is not tru
* \brief Macro to test an assertion and invoke a failure if it is not true e
* in a function that returns void. * in a function that returns void.
* *
* \param assertion The assertion to test. * Prototype: <b>XLAL_CHECK_VOID(assertion, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set if the assertion is false. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK_VOID(assertion, ...) \ #define XLAL_CHECK_VOID(assertion, ...) \
XLAL_CHECK_VAL(/* void */, assertion, __VA_ARGS__) XLAL_CHECK_VAL(/* void */, assertion, __VA_ARGS__)
/** \def XLAL_CHECK_REAL4(assertion, errnum [, fmt [, ...]]) /** \brief Macro to test an assertion and invoke a failure if it is not tru
* \brief Macro to test an assertion and invoke a failure if it is not true e
* in a function that returns a <tt>REAL4</tt>. * in a function that returns a <tt>REAL4</tt>.
* *
* \param assertion The assertion to test. * Prototype: <b>XLAL_CHECK_REAL4(assertion, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set if the assertion is false. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK_REAL4(assertion, ...) \ #define XLAL_CHECK_REAL4(assertion, ...) \
XLAL_CHECK_VAL(XLAL_REAL4_FAIL_NAN, assertion, __VA_ARGS__) XLAL_CHECK_VAL(XLAL_REAL4_FAIL_NAN, assertion, __VA_ARGS__)
/** \def XLAL_CHECK_REAL8(assertion, errnum [, fmt [, ...]]) /** \brief Macro to test an assertion and invoke a failure if it is not tru
* \brief Macro to test an assertion and invoke a failure if it is not true e
* in a function that returns a <tt>REAL8</tt>. * in a function that returns a <tt>REAL8</tt>.
* *
* \param assertion The assertion to test. * Prototype: <b>XLAL_CHECK_REAL8(assertion, errnum [, fmt [, ...]])</b>
* \param errnum The XLAL error number to set if the assertion is false. *
* \param fmt (Optional) Format string for additional error information. * \b Parameters:<ul>
* \param ... (Optional) Additional arguments for printf-like format. * <li> \b assertion The assertion to test.
* <li> \b errnum The XLAL error number to set if the assertion is false.
* <li> \b fmt (Optional) Format string for additional error information.
* <li> \b ... (Optional) Additional arguments for printf-like format.
* </ul>
*/ */
#define XLAL_CHECK_REAL8(assertion, ...) \ #define XLAL_CHECK_REAL8(assertion, ...) \
XLAL_CHECK_VAL(XLAL_REAL4_FAIL_NAN, assertion, __VA_ARGS__) XLAL_CHECK_VAL(XLAL_REAL4_FAIL_NAN, assertion, __VA_ARGS__)
/*@}*/
#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 /* XLALERROR_H */ #endif /* XLALERROR_H */
 End of changes. 47 change blocks. 
124 lines changed or deleted 178 lines changed or added


 XLALGSL.h   XLALGSL.h 
skipping to change at line 30 skipping to change at line 30
#ifndef XLALGSL_H #ifndef XLALGSL_H
#define XLALGSL_H #define XLALGSL_H
#include <gsl/gsl_errno.h> #include <gsl/gsl_errno.h>
#include <lal/LALConfig.h> #include <lal/LALConfig.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( XLALGSLH, "$Id$" );
#ifdef LAL_PTHREAD_LOCK #ifdef LAL_PTHREAD_LOCK
#include <pthread.h> #include <pthread.h>
extern pthread_mutex_t lalGSLPthreadMutex; extern pthread_mutex_t lalGSLPthreadMutex;
#define XLALGSL_PTHREAD_MUTEX_LOCK pthread_mutex_lock( &lalGSLPthreadMutex ) #define XLALGSL_PTHREAD_MUTEX_LOCK pthread_mutex_lock( &lalGSLPthreadMutex )
#define XLALGSL_PTHREAD_MUTEX_UNLOCK pthread_mutex_unlock( &lalGSLPthreadMu tex ) #define XLALGSL_PTHREAD_MUTEX_UNLOCK pthread_mutex_unlock( &lalGSLPthreadMu tex )
#else #else
#define XLALGSL_PTHREAD_MUTEX_LOCK ((void)(0)) #define XLALGSL_PTHREAD_MUTEX_LOCK ((void)(0))
#define XLALGSL_PTHREAD_MUTEX_UNLOCK ((void)(0)) #define XLALGSL_PTHREAD_MUTEX_UNLOCK ((void)(0))
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 ZPGFilter.h   ZPGFilter.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
*/ */
/************************************ <lalVerbatim file="ZPGFilterHV"> #ifndef _ZPGFILTER_H
Author: Creighton, T. D. #define _ZPGFILTER_H
$Id$
**************************************************** </lalVerbatim> */
/********************************************************** <lalLaTeX> #include <lal/LALStdlib.h>
\section{Header \texttt{ZPGFilter.h}} #if defined(__cplusplus)
\label{s:ZPGFilter.h} extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
Provides routines to manipulate ZPG filters. /**
\addtogroup ZPGFilter_h
\author Creighton, T. D.
\subsection*{Synopsis} \brief Provides routines to manipulate ZPG filters.
\begin{verbatim}
\heading{Synopsis}
\code
#include <lal/ZPGFilter.h> #include <lal/ZPGFilter.h>
\end{verbatim} \endcode
\noindent This header covers routines that create, destroy, and This header covers routines that create, destroy, and
transform objects of type \verb@<datatype>ZPGFilter@, where transform objects of type <tt>\<datatype\>ZPGFilter</tt>, where
\verb@<datatype>@ is either \verb@COMPLEX8@ or \verb@COMPLEX16@. <tt>\<datatype\></tt> is either \c COMPLEX8 or \c COMPLEX16.
Generically, these data types can be used to store any rational Generically, these data types can be used to store any rational
complex function in a factored form. Normally this function is a complex function in a factored form. Normally this function is a
filter response, or ``transfer function'' $T(z)$, expressed in terms filter response, or "transfer function" \f$T(z)\f$, expressed in terms
of a complex frequency parameter $z=\exp(2\pi if\Delta t)$, where of a complex frequency parameter \f$z=\exp(2\pi if\Delta t)\f$, where
$\Delta t$ is the sampling interval. The rational function is \f$\Delta t\f$ is the sampling interval. The rational function is
factored as follows: factored as follows:
$$ \f[
T(f) = g\times\frac{\prod_k (z-a_k)}{\prod_l (z-b_l)} T(f) = g\times\frac{\prod_k (z-a_k)}{\prod_l (z-b_l)}
$$ \f]
where $g$ is the gain, $a_k$ are the (finite) zeros, and $b_l$ are the where \f$g\f$ is the gain, \f$a_k\f$ are the (finite) zeros, and \f$b_l\f$
are the
(finite) poles. It should be noted that rational functions always (finite) poles. It should be noted that rational functions always
have the same number of zeros as poles if one includes the point have the same number of zeros as poles if one includes the point
$z=\infty$; any excess in the number of finite zeros or poles in the \f$z=\infty\f$; any excess in the number of finite zeros or poles in the
rational expression simply indicates that there is a corresponding rational expression simply indicates that there is a corresponding
pole or zero of that order at infinity. It is also worth pointing out pole or zero of that order at infinity. It is also worth pointing out
that the ``gain'' is just the overall prefactor of this rational that the "gain" is just the overall prefactor of this rational
function, and is not necessarily equal to the actual gain of the function, and is not necessarily equal to the actual gain of the
transfer function at any particular frequency. transfer function at any particular frequency.
Another common complex frequency space is the $w$-space, obtained Another common complex frequency space is the \f$w\f$-space, obtained
from the $z$-space by the bilinear transformation: from the \f$z\f$-space by the bilinear transformation:
$$ \f[
w = i\left(\frac{1-z}{1+z}\right) = \tan(\pi f\Delta t) , \quad w = i\left(\frac{1-z}{1+z}\right) = \tan(\pi f\Delta t) , \quad
z = \frac{1+iw}{1-iw} \; . z = \frac{1+iw}{1-iw} \; .
$$ \f]
Other variables can also be used to represent the complex frequency Other variables can also be used to represent the complex frequency
plane. The \verb@<datatype>ZPGFilter@ structure can be used to plane. The <tt>\<datatype\>ZPGFilter</tt> structure can be used to
represent the transfer function in any of these spaces by transforming represent the transfer function in any of these spaces by transforming
the coordinates of the zeros and poles, and incorporating any residual the coordinates of the zeros and poles, and incorporating any residual
factors into the gain. Care must be taken to include any zeros or factors into the gain. Care must be taken to include any zeros or
poles that are brought in from infinity by the transformation, and to poles that are brought in from infinity by the transformation, and to
remove any zeros or poles which were sent to infinity. Thus the remove any zeros or poles which were sent to infinity. Thus the
number of zeros and poles of the \verb@<datatype>ZPGFilter@ is not number of zeros and poles of the <tt>\<datatype\>ZPGFilter</tt> is not
necessarily constant under transformations! Routines invoking the necessarily constant under transformations! Routines invoking the
\verb@<datatype>ZPGFilter@ data types should document which complex <tt>\<datatype\>ZPGFilter</tt> data types should document which complex
variable is assumed. variable is assumed.
******************************************************* </lalLaTeX> */ */
/*@{*/
#ifndef _ZPGFILTER_H
#define _ZPGFILTER_H
#include <lal/LALStdlib.h>
#if defined(__cplusplus)
extern "C" {
#elif 0
} /* so that editors will match preceding brace */
#endif
NRCSID(ZPGFILTERH,"$Id$"); /**
@{
\defgroup CreateZPGFilter_c Module CreateZPGFilter.c
\defgroup DestroyZPGFilter_c Module DestroyZPGFilter.c
\defgroup BilinearTransform_c Module BilinearTransform.c
@}
*/
/********************************************************** <lalLaTeX> /** \name Error Codes */ /*@{*/
\subsection*{Error conditions} #define ZPGFILTERH_ENUL 1 /**< Unexpected null pointer in arguments */
****************************************** </lalLaTeX><lalErrTable> */ #define ZPGFILTERH_EOUT 2 /**< Output handle points to a non-null poin
#define ZPGFILTERH_ENUL 1 ter */
#define ZPGFILTERH_EOUT 2 #define ZPGFILTERH_EMEM 3 /**< Memory allocation error */
#define ZPGFILTERH_EMEM 3 #define ZPGFILTERH_EBAD 4 /**< Bad filter parameters */
#define ZPGFILTERH_EBAD 4 /*@}*/
/*@}*/
#define ZPGFILTERH_MSGENUL "Unexpected null pointer in arguments" #define ZPGFILTERH_MSGENUL "Unexpected null pointer in arguments"
#define ZPGFILTERH_MSGEOUT "Output handle points to a non-null pointer" #define ZPGFILTERH_MSGEOUT "Output handle points to a non-null pointer"
#define ZPGFILTERH_MSGEMEM "Memory allocation error" #define ZPGFILTERH_MSGEMEM "Memory allocation error"
#define ZPGFILTERH_MSGEBAD "Bad filter parameters" #define ZPGFILTERH_MSGEBAD "Bad filter parameters"
/******************************************** </lalErrTable><lalLaTeX>
\subsection*{Structures}
********************************************************</lalLaTeX> */
/* <lalLaTeX>
\vfill{\footnotesize\input{ZPGFilterHV}}
</lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX>
\newpage\input{CreateZPGFilterC}
</lalLaTeX> */
COMPLEX8ZPGFilter *XLALCreateCOMPLEX8ZPGFilter(INT4 numZeros, INT4 numPoles ); COMPLEX8ZPGFilter *XLALCreateCOMPLEX8ZPGFilter(INT4 numZeros, INT4 numPoles );
COMPLEX16ZPGFilter *XLALCreateCOMPLEX16ZPGFilter(INT4 numZeros, INT4 numPol es); COMPLEX16ZPGFilter *XLALCreateCOMPLEX16ZPGFilter(INT4 numZeros, INT4 numPol es);
void XLALDestroyCOMPLEX8ZPGFilter( COMPLEX8ZPGFilter *filter ); void XLALDestroyCOMPLEX8ZPGFilter( COMPLEX8ZPGFilter *filter );
void XLALDestroyCOMPLEX16ZPGFilter( COMPLEX16ZPGFilter *filter ); void XLALDestroyCOMPLEX16ZPGFilter( COMPLEX16ZPGFilter *filter );
int XLALWToZCOMPLEX8ZPGFilter( COMPLEX8ZPGFilter *filter ); int XLALWToZCOMPLEX8ZPGFilter( COMPLEX8ZPGFilter *filter );
int XLALWToZCOMPLEX16ZPGFilter( COMPLEX16ZPGFilter *filter ); int XLALWToZCOMPLEX16ZPGFilter( COMPLEX16ZPGFilter *filter );
void void
LALCreateCOMPLEX8ZPGFilter( LALStatus *status, LALCreateCOMPLEX8ZPGFilter( LALStatus *status,
COMPLEX8ZPGFilter **output, COMPLEX8ZPGFilter **output,
INT4 numZeros, INT4 numZeros,
INT4 numPoles ); INT4 numPoles );
void void
LALCreateCOMPLEX16ZPGFilter( LALStatus *status, LALCreateCOMPLEX16ZPGFilter( LALStatus *status,
COMPLEX16ZPGFilter **output, COMPLEX16ZPGFilter **output,
INT4 numZeros, INT4 numZeros,
INT4 numPoles ); INT4 numPoles );
/* <lalLaTeX>
\newpage\input{DestroyZPGFilterC}
</lalLaTeX> */
void void
LALDestroyCOMPLEX8ZPGFilter( LALStatus *status, LALDestroyCOMPLEX8ZPGFilter( LALStatus *status,
COMPLEX8ZPGFilter **input ); COMPLEX8ZPGFilter **input );
void void
LALDestroyCOMPLEX16ZPGFilter( LALStatus *status, LALDestroyCOMPLEX16ZPGFilter( LALStatus *status,
COMPLEX16ZPGFilter **input ); COMPLEX16ZPGFilter **input );
/* <lalLaTeX>
\newpage\input{BilinearTransformC}
</lalLaTeX> */
void void
LALWToZCOMPLEX8ZPGFilter( LALStatus *status, LALWToZCOMPLEX8ZPGFilter( LALStatus *status,
COMPLEX8ZPGFilter *filter ); COMPLEX8ZPGFilter *filter );
void void
LALWToZCOMPLEX16ZPGFilter( LALStatus *status, LALWToZCOMPLEX16ZPGFilter( LALStatus *status,
COMPLEX16ZPGFilter *filter ); COMPLEX16ZPGFilter *filter );
#if 0 #if 0
{ /* so that editors will match succeeding brace */ { /* so that editors will match succeeding brace */
 End of changes. 24 change blocks. 
69 lines changed or deleted 52 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/