AVFactories.h   AVFactories.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
File Name: AVFactories.h File Name: AVFactories.h
<lalVerbatim file="AVFactoriesHV"> <lalVerbatim file="AVFactoriesHV">
Revision: $Id: AVFactories.h,v 1.6 2000/07/23 01:13:06 jolien Exp $ Revision: $Id: AVFactories.h,v 1.7 2000/11/09 23:37:19 jolien Exp $
</lalVerbatim> </lalVerbatim>
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{AVFactories.h}} \section{Header \texttt{AVFactories.h}}
\label{s:AVFactories.h} \label{s:AVFactories.h}
Provides prototype and status code information for use of CreateVector, Provides prototype and status code information for use of CreateVector,
CreateArray, LALDestroyVector and DestroyArray CreateArray, LALDestroyVector and DestroyArray
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "AVFactories.h" #include <lal/AVFactories.h>
\end{verbatim} \end{verbatim}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _AVFACTORIES_H #ifndef _AVFACTORIES_H
#define _AVFACTORIES_H #define _AVFACTORIES_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (AVFACTORIESH, "$Id: AVFactories.h,v 1.6 2000/07/23 01:13:06 jolien Exp $"); NRCSID (AVFACTORIESH, "$Id: AVFactories.h,v 1.7 2000/11/09 23:37:19 jolien Exp $");
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
\input{AVFactoriesHErrTab} \input{AVFactoriesHErrTab}
</lalLaTeX> */ </lalLaTeX> */
/* /*
<lalErrTable file="AVFactoriesHErrTab"> <lalErrTable file="AVFactoriesHErrTab">
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 BandPassTimeSeries.h   BandPassTimeSeries.h 
/*************************** <lalVerbatim file="BandPassTimeSeriesHV"> /*************************** <lalVerbatim file="BandPassTimeSeriesHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: BandPassTimeSeries.h,v 1.4 2000/07/23 01:15:14 jolien Exp $ $Id: BandPassTimeSeries.h,v 1.8 2001/08/21 04:19:53 jolien Exp $
**************************** </lalVerbatim> */ **************************************************** </lalVerbatim> */
/* <lalLaTeX> /********************************************************** <lalLaTeX>
\section{Header \texttt{BandPassTimeSeries.h}} \section{Header \texttt{BandPassTimeSeries.h}}
\label{s:BandPassTimeSeries.h} \label{s:BandPassTimeSeries.h}
Provides routines to low- or high-pass filter a time series. Provides routines to low- or high-pass filter a time series.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "BandPassTimeSeries.h" #include <lal/BandPassTimeSeries.h>
\end{verbatim} \end{verbatim}
\noindent This header covers routines that apply a time-domain low- or \noindent This header covers routines that apply a time-domain low- or
high-pass filter to a data series of type \verb@<datatype>TimeSeries@. high-pass filter to a data series of type \verb@<datatype>TimeSeries@.
Further documentation is given in the individual routines' modules. Further documentation is given in the individual routines' modules.
</lalLaTeX> */ ******************************************************* </lalLaTeX> */
#ifndef _BANDPASSTIMESERIES_H #ifndef _BANDPASSTIMESERIES_H
#define _BANDPASSTIMESERIES_H #define _BANDPASSTIMESERIES_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "IIRFilter.h" #include <lal/IIRFilter.h>
#include "ZPGFilter.h" #include <lal/ZPGFilter.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID(BANDPASSTIMESERIESH,"$Id: BandPassTimeSeries.h,v 1.4 2000/07/23 01:1 NRCSID(BANDPASSTIMESERIESH,"$Id: BandPassTimeSeries.h,v 1.8 2001/08/21 04:1
5:14 jolien Exp $"); 9:53 jolien Exp $");
/* <lalLaTeX>
/********************************************************** <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
\begin{tabular}{|c|l|l|} ****************************************** </lalLaTeX><lalErrTable> */
\hline #define BANDPASSTIMESERIESH_ENUL 1
status & status & Explanation #define BANDPASSTIMESERIESH_EBAD 2
\\
code & description & #define BANDPASSTIMESERIESH_MSGENUL "Unexpected null pointer in arguments"
\\ #define BANDPASSTIMESERIESH_MSGEBAD "Bad filter parameters"
\hline /******************************************** </lalErrTable><lalLaTeX>
\tt 1 & \tt Null pointer & Missing a required pointer.
\\ \subsection*{Types}
\tt 2 & \tt Bad filter parameters & Filter creation parameters outside of
\\ \subsubsection*{Structure \texttt{PassBandParamStruc}}
& & acceptable ranges. \idx[Type]{PassBandParamStruc}
\\
\hline This structure stores data used for constructing a low- or high-pass
\end{tabular} filter: either the order and characteristic frequency of the filter,
or the frequencies and desired attenuations at the ends of some
</lalLaTeX> */ transition band. In the latter case, a nonzero filter order parameter
\verb@n@ indicates a maximum allowed order. The fields are:
#define BANDPASSTIMESERIES_ENUL 1
#define BANDPASSTIMESERIES_EBAD 2
#define BANDPASSTIMESERIES_MSGENUL "Null pointer"
#define BANDPASSTIMESERIES_MSGEBAD "Bad filter parameters"
/* <lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
struct PassBandParamStruc
\end{verbatim}
\index{\verb&PassBandParamStruc&}
\noindent 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 n indicates a maximum allowed order. The fields are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] A user-assigned name. \item[\texttt{CHAR *name}] A user-assigned name.
\item[\texttt{INT4 n}] The maximum desired filter order (actual order \item[\texttt{INT4 n}] The maximum desired filter order (actual order
may be less if specified attenuations do not require a high order). may be less if specified attenuations do not require a high order).
\item[\texttt{REAL8 f1}, \texttt{f2}] The reference frequencies of the \item[\texttt{REAL8 f1}, \texttt{f2}] The reference frequencies of the
transition band. transition band.
\item[\texttt{REAL8 a1}, \texttt{a2}] The minimal desired attenuation \item[\texttt{REAL8 a1}, \texttt{a2}] The minimal desired attenuation
factors at the reference frequencies. factors at the reference frequencies.
\end{description} \end{description}
</lalLaTeX> */ ******************************************************* </lalLaTeX> */
typedef struct tagPassBandParamStruc{ typedef struct tagPassBandParamStruc{
CHAR *name; CHAR *name;
INT4 nMax; INT4 nMax;
REAL8 f1; REAL8 f1;
REAL8 f2; REAL8 f2;
REAL8 a1; REAL8 a1;
REAL8 a2; REAL8 a2;
} PassBandParamStruc; } PassBandParamStruc;
/* <lalLaTeX> /* <lalLaTeX>
\vfill{\footnotesize\input{BandPassTimeSeriesHV}} \vfill{\footnotesize\input{BandPassTimeSeriesHV}}
</lalLaTeX> */ </lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{ButterworthTimeSeriesC} \newpage\input{ButterworthTimeSeriesC}
</lalLaTeX> */ </lalLaTeX> */
void LALButterworthREAL4TimeSeries(LALStatus *stat, void
REAL4TimeSeries *series, LALButterworthREAL4TimeSeries( LALStatus *stat,
PassBandParamStruc *params); REAL4TimeSeries *series,
PassBandParamStruc *params );
void LALButterworthREAL8TimeSeries(LALStatus *stat,
REAL8TimeSeries *series, void
PassBandParamStruc *params); LALButterworthREAL8TimeSeries( LALStatus *stat,
REAL8TimeSeries *series,
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. */ /* Test program. */
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{BandPassTestC} \newpage\input{BandPassTestC}
</lalLaTeX> */ </lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _BANDPASSTIMESERIES_H */ #endif /* _BANDPASSTIMESERIES_H */
 End of changes. 12 change blocks. 
58 lines changed or deleted 41 lines changed or added


 Comm.h   Comm.h 
/*----------------------------------------------------------------------- /*
* <lalVerbatim file="CommHV">
* $Id: Comm.h,v 1.10 2001/12/05 21:11:36 jolien Exp $
* </lalVerbatim>
*/
/*
* <lalLaTeX>
* *
* File Name: Comm.h * \section{Header \texttt{Comm.h}}
* *
* Author: Allen, B. and Creighton, J. D. E. * Provides routines for MPI communication.
* *
* Revision: $Id: Comm.h,v 1.3 2000/07/23 01:12:39 jolien Exp $ * \subsection*{Synopsis}
* \begin{verbatim}
* #include <lal/Comm.h>
* \end{verbatim}
* *
*----------------------------------------------------------------------- * \noindent This header covers the routines for doing MPI communication.
*
* </lalLaTeX>
*/ */
#ifndef _COMM_H #ifndef _COMM_H
#define _COMM_H #define _COMM_H
#include "LALDatatypes.h" #include <lal/LALConfig.h>
#include "AVFactories.h" #ifdef LAL_MPI_ENABLED
#include "mpi.h"
#include <mpi.h>
#include <lal/LALDatatypes.h>
#include <lal/AVFactories.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (COMMH, "$Id: Comm.h,v 1.3 2000/07/23 01:12:39 jolien Exp $"); NRCSID (COMMH, "$Id: Comm.h,v 1.10 2001/12/05 21:11:36 jolien Exp $");
#define COMM_ENULL 1 /*
#define COMM_ESIZE 2 * <lalLaTeX>
#define COMM_ESTRL 4 * \subsection*{Error conditions}
#define COMM_EMPIE 8 * \input{CommHErrTab}
#define COMM_ESENV 16 * </lalLaTeX>
#define COMM_ESYSC 32 *
* <lalErrTable file="CommHErrTab">
#define COMM_MSGENULL "Null pointer" */
#define COMM_MSGESIZE "Invalid size" #define COMMH_ENULL 1
#define COMM_MSGESTRL "String too long" #define COMMH_ENNUL 2
#define COMM_MSGEMPIE "MPI error" #define COMMH_ESIZE 4
#define COMM_MSGESENV "Couldn't set environment variable" #define COMMH_ESZMM 8
#define COMM_MSGESYSC "Error executing system command" #define COMMH_EMPIE 16
#define COMMH_EHAND 32
/* Structure for identifying processors */ #define COMMH_ENOBJ 64
typedef struct
tagMPIId #define COMMH_MSGENULL "Null pointer"
{ #define COMMH_MSGENNUL "Non-Null pointer"
INT4 numProcs; #define COMMH_MSGESIZE "Invalid size"
INT4 myId; #define COMMH_MSGESZMM "Exchange size mismatch"
INT4 nameLen; #define COMMH_MSGEMPIE "MPI error"
CHAR procName[MPI_MAX_PROCESSOR_NAME]; #define COMMH_MSGEHAND "Wrong handshake"
} #define COMMH_MSGENOBJ "Invalid number of objects"
MPIId; /*
* </lalErrTable>
*/
typedef struct /*
tagMPIDebugParams * <lalLaTeX>
{ * \subsection*{Types}
CHAR *debugger; * </lalLaTeX>
CHAR *progName; */
INT4 delay;
INT4 myId;
}
MPIDebugParams;
typedef enum typedef enum
{ {
MPIDone, MPIDone,
MPIMisc, MPIMisc,
MPIErr, MPIErr,
MPIMsg, MPIMsg,
MPICHAR,
MPII2,
MPII4,
MPII8,
MPIU2,
MPIU4,
MPIU8,
MPIS,
MPID,
MPIC,
MPIZ,
MPICHARVector, MPICHARVector,
MPICHARVectorData, MPICHARVectorData,
MPII2Vector, MPII2Vector,
MPII2VectorData, MPII2VectorData,
MPII4Vector, MPII4Vector,
MPII4VectorData, MPII4VectorData,
MPII8Vector, MPII8Vector,
MPII8VectorData, MPII8VectorData,
MPIU2Vector,
MPIU2VectorData,
MPIU4Vector,
MPIU4VectorData,
MPIU8Vector,
MPIU8VectorData,
MPISVector, MPISVector,
MPISVectorData, MPISVectorData,
MPIDVector, MPIDVector,
MPIDVectorData, MPIDVectorData,
MPICVector, MPICVector,
MPICVectorData, MPICVectorData,
MPIZVector, MPIZVector,
MPIZVectorData, MPIZVectorData,
MPII2TimeSeries, MPII2TimeSeries,
MPII4TimeSeries, MPII4TimeSeries,
MPII8TimeSeries, MPII8TimeSeries,
MPIU2TimeSeries,
MPIU4TimeSeries,
MPIU8TimeSeries,
MPISTimeSeries, MPISTimeSeries,
MPIDTimeSeries, MPIDTimeSeries,
MPICTimeSeries, MPICTimeSeries,
MPIZTimeSeries, MPIZTimeSeries,
MPII2FrequencySeries, MPII2FrequencySeries,
MPII4FrequencySeries, MPII4FrequencySeries,
MPII8FrequencySeries, MPII8FrequencySeries,
MPIU2FrequencySeries,
MPIU4FrequencySeries,
MPIU8FrequencySeries,
MPISFrequencySeries, MPISFrequencySeries,
MPIDFrequencySeries, MPIDFrequencySeries,
MPICFrequencySeries, MPICFrequencySeries,
MPIZFrequencySeries MPIZFrequencySeries
} }
MPIMsgCode; MPIMsgCode;
typedef struct typedef struct
tagMPIMessage tagMPIMessage
{ {
INT4 msg; INT4 msg;
INT4 send; INT4 send;
INT4 source; INT4 source;
} }
MPIMessage; MPIMessage;
/*
* <lalLaTeX>
*
* \subsubsection*{Structure \texttt{MPIMessage}}
* \idx[Type]{MPIMessage}
*
* This structure is sent to a remote process, via \verb+LALMPISendMsg()+,
* to alert that process that there is a message. Note that
* \verb+LALMPIRecvMsg()+ is the only \verb+Recv+-type function that does n
ot
* require the source to be identified; the receiver can then identify the
* source from the message received.
*
* Essentially, \verb+LALMPISendMsg()+ and \verb+LALMPIRecvMsg()+ form a
* handshake for a subsequent transmission, and \verb+MPIMessage+ specifies
* the protocol. The local process uses \verb+LALMPISendMsg()+ to communic
ate
* with a remote process, which is waiting to hear from \emph{any} process
* using \verb+LALMPIRecvMsg()+. The message the local process sends speci
fies
* \begin{enumerate}
* \item An integer code telling the remote process what operation it sho
uld
* take (e.g., get ready to exchange some data, tell the remote process
* to terminate, etc.).
* \item A boolean integer that is zero if the remote process is expected
* to send something to the local process, or non-zero if the local pro
cess
* will send something to the remote process.
* \item An integer representing the MPI process number of the local proc
ess.
* \end{enumerate}
*
* The fields are:
* \begin{description}
* \item[\texttt{INT4 msg}] An integer code specifying to the receiver what
* type of operation is to be taken.
* \item[\texttt{INT4 send}] A boolean that is non-zero if the originator
* of the message will be sending something to the recipiant of the messa
ge
* in a subsequent communication, or zero if the recipiant of the message
* is expected to send something to the originator of the message.
* \item[\texttt{INT4 source}] The MPI process number of the originator of
the
* message.
* \end{description}
*
* </lalLaTeX>
*/
typedef struct
tagExchParams
{
INT4 send;
INT4 numObjects;
INT4 partnerProcNum;
INT4 myProcNum;
INT4 exchObjectType;
MPI_Comm mpiComm;
}
ExchParams;
typedef struct
tagInitExchParams
{
INT4 myProcNum;
MPI_Comm mpiComm;
}
InitExchParams;
/*
* <lalLaTeX>
*
* \subsubsection*{Structures \texttt{ExchParams} and \texttt{InitExchParam
s}}
* \idx[Type]{ExchParams}
* \idx[Type]{InitExchParams}
*
* These structures are used in the \verb+Exch+-type routines. The structu
re
* \verb+InitExchParams+ are the parameters used in initializing an exchang
e
* protocol using \verb+LALInitializeExchange+. The fields are:
* \begin{description}
* \item[\texttt{INT4 myProcNum}] The MPI process number of the local pro
cess.
* \item[\texttt{MPI\_Comm mpiComm}] The MPI communicator.
* \end{description}
*
* The structure \verb+ExchParams+ is created by \verb+LALInitializeExchang
e()+,
* destroyed by \verb+LALFinalizeExchange()+, and serves as the parameter f
or
* the various \verb+LALExchange+$\langle\textit{type}\rangle$ functions.
It
* is also required as the input to \verb+LALInitializeExchange()+ for the
* originator of the exchange request. The fields are:
* \begin{description}
* \item[\texttt{INT4 send}] A code that indicates whether this process i
s
* sending (non-zero) or recieving (zero). The process that initialize
s
* the exchange chooses whether it will send in the subsequent exchange
s
* (non-zero value for the \verb+send+ field of the input
* \verb+ExchParams+), or receive (zero value).
* \item[\texttt{INT4 numObjects}] The (maximum) number of objects to be
* exchanged. (The partners in the exchange may have some mechanism to
* decide to terminate the exchange early, e.g., by exchanging a negati
ve
* integer.)
* \item[\texttt{INT4 partnerProcNum}] The MPI process number of the part
ner
* in the exchange.
* \item[\texttt{INT4 myProcNum}] The MPI process number of the local pro
cess.
* \item[\texttt{INT4 exchObjectType}] An integer code representing the t
ype
* of object that will be excanged.
* \item[\texttt{MPI\_Comm mpiComm}] The MPI communicator.
* \end{description}
*
* </lalLaTeX>
*/
/*
* <lalLaTeX>
* \vfill{\footnotesize\input{CommHV}}
* \newpage\input{SendRecvC}
* \newpage\input{ExchangeC}
* \newpage\input{SendRecvTestC}
* \newpage\input{ExchangeTestC}
* </lalLaTeX>
*/
void
LALMPISendMsg(
LALStatus *status,
MPIMessage *msg,
INT4 dest,
MPI_Comm mpiComm
);
void void
LALMPIExportEnvironment ( LALMPIRecvMsg(
LALStatus *status, LALStatus *status,
const CHAR *env, MPIMessage *msg,
INT4 myId MPI_Comm mpiComm
); );
void void
LALMPIDebug ( LALMPISendCHAR(
LALStatus *status, LALStatus *status,
MPIDebugParams *params CHAR *element,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIKillScript ( LALMPIRecvCHAR(
LALStatus *status, LALStatus *status,
MPIId *id CHAR *element,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPISendMsg ( LALMPISendINT2(
LALStatus *status, LALStatus *status,
MPIMessage *msg, INT2 *element,
INT4 dest INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT2(
LALStatus *status,
INT2 *element,
INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPIRecvMsg ( LALMPISendINT4(
LALStatus *status, LALStatus *status,
MPIMessage *msg INT4 *element,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPISendCHARVector ( LALMPIRecvINT4(
LALStatus *status, LALStatus *status,
INT4 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT8(
LALStatus *status,
INT8 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT8(
LALStatus *status,
INT8 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT2(
LALStatus *status,
UINT2 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT2(
LALStatus *status,
UINT2 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT4(
LALStatus *status,
UINT4 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT4(
LALStatus *status,
UINT4 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT8(
LALStatus *status,
UINT8 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT8(
LALStatus *status,
UINT8 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL4(
LALStatus *status,
REAL4 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvREAL4(
LALStatus *status,
REAL4 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL8(
LALStatus *status,
REAL8 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvREAL8(
LALStatus *status,
REAL8 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX8(
LALStatus *status,
COMPLEX8 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvCOMPLEX8(
LALStatus *status,
COMPLEX8 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX16(
LALStatus *status,
COMPLEX16 *element,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvCOMPLEX16(
LALStatus *status,
COMPLEX16 *element,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCHARVector(
LALStatus *status,
CHARVector *vector, CHARVector *vector,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvCHARVector ( LALMPIRecvCHARVector(
LALStatus *status, LALStatus *status,
CHARVector *vector, CHARVector *vector,
INT4 source INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPISendINT2Vector ( LALMPISendINT2Vector(
LALStatus *status, LALStatus *status,
INT2Vector *vector, INT2Vector *vector,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvINT2Vector ( LALMPIRecvINT2Vector(
LALStatus *status, LALStatus *status,
INT2Vector *vector, INT2Vector *vector,
INT4 source INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPISendREAL4Vector ( LALMPISendINT4Vector(
LALStatus *status, LALStatus *status,
INT4Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT4Vector(
LALStatus *status,
INT4Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT8Vector(
LALStatus *status,
INT8Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT8Vector(
LALStatus *status,
INT8Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT2Vector(
LALStatus *status,
UINT2Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT2Vector(
LALStatus *status,
UINT2Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT4Vector(
LALStatus *status,
UINT4Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT4Vector(
LALStatus *status,
UINT4Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT8Vector(
LALStatus *status,
UINT8Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT8Vector(
LALStatus *status,
UINT8Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL4Vector(
LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvREAL4Vector ( LALMPIRecvREAL4Vector(
LALStatus *status, LALStatus *status,
REAL4Vector *vector, REAL4Vector *vector,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL8Vector(
LALStatus *status,
REAL8Vector *vector,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvREAL8Vector(
LALStatus *status,
REAL8Vector *vector,
INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPISendCOMPLEX8Vector ( LALMPISendCOMPLEX8Vector(
LALStatus *status, LALStatus *status,
COMPLEX8Vector *vector, COMPLEX8Vector *vector,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvCOMPLEX8Vector ( LALMPIRecvCOMPLEX8Vector(
LALStatus *status, LALStatus *status,
COMPLEX8Vector *vector, COMPLEX8Vector *vector,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX16Vector(
LALStatus *status,
COMPLEX16Vector *vector,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPISendINT2TimeSeries ( LALMPIRecvCOMPLEX16Vector(
LALStatus *status, LALStatus *status,
COMPLEX16Vector *vector,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT2TimeSeries(
LALStatus *status,
INT2TimeSeries *series, INT2TimeSeries *series,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvINT2TimeSeries ( LALMPIRecvINT2TimeSeries(
LALStatus *status, LALStatus *status,
INT2TimeSeries *series, INT2TimeSeries *series,
INT4 source INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPISendREAL4TimeSeries ( LALMPISendINT4TimeSeries(
LALStatus *status, LALStatus *status,
INT4TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT4TimeSeries(
LALStatus *status,
INT4TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT8TimeSeries(
LALStatus *status,
INT8TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT8TimeSeries(
LALStatus *status,
INT8TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT2TimeSeries(
LALStatus *status,
UINT2TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT2TimeSeries(
LALStatus *status,
UINT2TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT4TimeSeries(
LALStatus *status,
UINT4TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT4TimeSeries(
LALStatus *status,
UINT4TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT8TimeSeries(
LALStatus *status,
UINT8TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT8TimeSeries(
LALStatus *status,
UINT8TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL4TimeSeries(
LALStatus *status,
REAL4TimeSeries *series, REAL4TimeSeries *series,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvREAL4TimeSeries ( LALMPIRecvREAL4TimeSeries(
LALStatus *status, LALStatus *status,
REAL4TimeSeries *series, REAL4TimeSeries *series,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL8TimeSeries(
LALStatus *status,
REAL8TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPISendCOMPLEX8TimeSeries ( LALMPIRecvREAL8TimeSeries(
LALStatus *status, LALStatus *status,
REAL8TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX8TimeSeries(
LALStatus *status,
COMPLEX8TimeSeries *series, COMPLEX8TimeSeries *series,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvCOMPLEX8TimeSeries ( LALMPIRecvCOMPLEX8TimeSeries(
LALStatus *status, LALStatus *status,
COMPLEX8TimeSeries *series, COMPLEX8TimeSeries *series,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX16TimeSeries(
LALStatus *status,
COMPLEX16TimeSeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvCOMPLEX16TimeSeries(
LALStatus *status,
COMPLEX16TimeSeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT2FrequencySeries(
LALStatus *status,
INT2FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT2FrequencySeries(
LALStatus *status,
INT2FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT4FrequencySeries(
LALStatus *status,
INT4FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT4FrequencySeries(
LALStatus *status,
INT4FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendINT8FrequencySeries(
LALStatus *status,
INT8FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvINT8FrequencySeries(
LALStatus *status,
INT8FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT2FrequencySeries(
LALStatus *status,
UINT2FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT2FrequencySeries(
LALStatus *status,
UINT2FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT4FrequencySeries(
LALStatus *status,
UINT4FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvUINT4FrequencySeries(
LALStatus *status,
UINT4FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendUINT8FrequencySeries(
LALStatus *status,
UINT8FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPISendREAL4FrequencySeries ( LALMPIRecvUINT8FrequencySeries(
LALStatus *status, LALStatus *status,
UINT8FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL4FrequencySeries(
LALStatus *status,
REAL4FrequencySeries *series, REAL4FrequencySeries *series,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvREAL4FrequencySeries ( LALMPIRecvREAL4FrequencySeries(
LALStatus *status, LALStatus *status,
REAL4FrequencySeries *series, REAL4FrequencySeries *series,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendREAL8FrequencySeries(
LALStatus *status,
REAL8FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvREAL8FrequencySeries(
LALStatus *status,
REAL8FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
); );
void void
LALMPISendCOMPLEX8FrequencySeries ( LALMPISendCOMPLEX8FrequencySeries(
LALStatus *status, LALStatus *status,
COMPLEX8FrequencySeries *series, COMPLEX8FrequencySeries *series,
INT4 dest INT4 dest,
MPI_Comm mpiComm
); );
void void
LALMPIRecvCOMPLEX8FrequencySeries ( LALMPIRecvCOMPLEX8FrequencySeries(
LALStatus *status, LALStatus *status,
COMPLEX8FrequencySeries *series, COMPLEX8FrequencySeries *series,
INT4 source INT4 source,
MPI_Comm mpiComm
);
void
LALMPISendCOMPLEX16FrequencySeries(
LALStatus *status,
COMPLEX16FrequencySeries *series,
INT4 dest,
MPI_Comm mpiComm
);
void
LALMPIRecvCOMPLEX16FrequencySeries(
LALStatus *status,
COMPLEX16FrequencySeries *series,
INT4 source,
MPI_Comm mpiComm
);
void
LALInitializeExchange(
LALStatus *status,
ExchParams **exchParamsOut,
ExchParams *exchParamsInp,
InitExchParams *params
);
void
LALFinalizeExchange(
LALStatus *status,
ExchParams **exchParams
);
void
LALExchangeCHAR(
LALStatus *status,
CHAR *object,
ExchParams *exchParms
);
void
LALExchangeINT2(
LALStatus *status,
INT2 *object,
ExchParams *exchParms
);
void
LALExchangeINT4(
LALStatus *status,
INT4 *object,
ExchParams *exchParms
);
void
LALExchangeINT8(
LALStatus *status,
INT8 *object,
ExchParams *exchParms
);
void
LALExchangeUINT2(
LALStatus *status,
UINT2 *object,
ExchParams *exchParms
);
void
LALExchangeUINT4(
LALStatus *status,
UINT4 *object,
ExchParams *exchParms
);
void
LALExchangeUINT8(
LALStatus *status,
UINT8 *object,
ExchParams *exchParms
);
void
LALExchangeREAL4(
LALStatus *status,
REAL4 *object,
ExchParams *exchParms
);
void
LALExchangeREAL8(
LALStatus *status,
REAL8 *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX8(
LALStatus *status,
COMPLEX8 *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX16(
LALStatus *status,
COMPLEX16 *object,
ExchParams *exchParms
);
void
LALExchangeCHARVector(
LALStatus *status,
CHARVector *object,
ExchParams *exchParms
);
void
LALExchangeINT2Vector(
LALStatus *status,
INT2Vector *object,
ExchParams *exchParms
);
void
LALExchangeINT4Vector(
LALStatus *status,
INT4Vector *object,
ExchParams *exchParms
);
void
LALExchangeINT8Vector(
LALStatus *status,
INT8Vector *object,
ExchParams *exchParms
);
void
LALExchangeUINT2Vector(
LALStatus *status,
UINT2Vector *object,
ExchParams *exchParms
);
void
LALExchangeUINT4Vector(
LALStatus *status,
UINT4Vector *object,
ExchParams *exchParms
);
void
LALExchangeUINT8Vector(
LALStatus *status,
UINT8Vector *object,
ExchParams *exchParms
);
void
LALExchangeREAL4Vector(
LALStatus *status,
REAL4Vector *object,
ExchParams *exchParms
);
void
LALExchangeREAL8Vector(
LALStatus *status,
REAL8Vector *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX8Vector(
LALStatus *status,
COMPLEX8Vector *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX16Vector(
LALStatus *status,
COMPLEX16Vector *object,
ExchParams *exchParms
);
void
LALExchangeINT2TimeSeries(
LALStatus *status,
INT2TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeINT4TimeSeries(
LALStatus *status,
INT4TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeINT8TimeSeries(
LALStatus *status,
INT8TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT2TimeSeries(
LALStatus *status,
UINT2TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT4TimeSeries(
LALStatus *status,
UINT4TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT8TimeSeries(
LALStatus *status,
UINT8TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeREAL4TimeSeries(
LALStatus *status,
REAL4TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeREAL8TimeSeries(
LALStatus *status,
REAL8TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX8TimeSeries(
LALStatus *status,
COMPLEX8TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX16TimeSeries(
LALStatus *status,
COMPLEX16TimeSeries *object,
ExchParams *exchParms
);
void
LALExchangeINT2FrequencySeries(
LALStatus *status,
INT2FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeINT4FrequencySeries(
LALStatus *status,
INT4FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeINT8FrequencySeries(
LALStatus *status,
INT8FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT2FrequencySeries(
LALStatus *status,
UINT2FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT4FrequencySeries(
LALStatus *status,
UINT4FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeUINT8FrequencySeries(
LALStatus *status,
UINT8FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeREAL4FrequencySeries(
LALStatus *status,
REAL4FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeREAL8FrequencySeries(
LALStatus *status,
REAL8FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX8FrequencySeries(
LALStatus *status,
COMPLEX8FrequencySeries *object,
ExchParams *exchParms
);
void
LALExchangeCOMPLEX16FrequencySeries(
LALStatus *status,
COMPLEX16FrequencySeries *object,
ExchParams *exchParms
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* LAL_MPI_ENABLED */
#endif /* _COMM_H */ #endif /* _COMM_H */
 End of changes. 57 change blocks. 
112 lines changed or deleted 1122 lines changed or added


 ComplexFFT.h   ComplexFFT.h 
/*----------------------------------------------------------------------- /**** <lalVerbatim file="ComplexFFTHV">
* * $Id: ComplexFFT.h,v 1.9 2001/08/27 17:25:04 jolien Exp $
* File Name: ComplexFFT.h **** </lalVerbatim> */
*
* Author: Creighton, J. D. E. /**** <lalLaTeX>
*
* Revision: $Id: ComplexFFT.h,v 1.2 2000/07/23 01:13:20 jolien Exp $
*
*-----------------------------------------------------------------------
* *
* NAME * \section{Header \texttt{ComplexFFT.h}}
* ComplexFFT.h * \label{s:ComplexFFT.h}
* *
* SYNOPSIS * Performs complex-to-complex FFTs.
* #include "ComplexFFT.h"
* *
* DESCRIPTION * \subsection*{Synopsis}
* \begin{verbatim}
* #include <lal/ComplexFFT.h>
* \end{verbatim}
* *
* DIAGNOSTICS * Perform complex-to-complex fast Fourier transforms of vectors using the
* package FFTW~\cite{fj:1998}.
* *
*----------------------------------------------------------------------- **** </lalLaTeX> */
*/
#ifndef _COMPLEXFFT_H #ifndef _COMPLEXFFT_H
#define _COMPLEXFFT_H #define _COMPLEXFFT_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID( COMPLEXFFTH, "$Id: ComplexFFT.h,v 1.2 2000/07/23 01:13:20 jolien Ex p $" ); NRCSID( COMPLEXFFTH, "$Id: ComplexFFT.h,v 1.9 2001/08/27 17:25:04 jolien Ex p $" );
#define COMPLEXFFT_ENULL 1 /**** <lalLaTeX>
#define COMPLEXFFT_ENNUL 2 * \subsection*{Error conditions}
#define COMPLEXFFT_ESIZE 4 **** </lalLaTeX> */
#define COMPLEXFFT_ESZMM 8 /**** <lalErrTable> */
#define COMPLEXFFT_ESLEN 16
#define COMPLEXFFT_ESAME 32 #define COMPLEXFFTH_ENULL 1
#define COMPLEXFFTH_ENNUL 2
#define COMPLEXFFT_MSGENULL "Null pointer" #define COMPLEXFFTH_ESIZE 4
#define COMPLEXFFT_MSGENNUL "Non-null pointer" #define COMPLEXFFTH_ESZMM 8
#define COMPLEXFFT_MSGESIZE "Invalid input size" #define COMPLEXFFTH_ESLEN 16
#define COMPLEXFFT_MSGESZMM "Size mismatch" #define COMPLEXFFTH_ESAME 32
#define COMPLEXFFT_MSGESLEN "Invalid/mismatched sequence lengths" #define COMPLEXFFTH_EALOC 64
#define COMPLEXFFT_MSGESAME "Input/Output data vectors are the same" #define COMPLEXFFTH_EFFTW 128
typedef struct #define COMPLEXFFTH_MSGENULL "Null pointer"
tagComplexFFTPlan #define COMPLEXFFTH_MSGENNUL "Non-null pointer"
{ #define COMPLEXFFTH_MSGESIZE "Invalid input size"
INT4 sign; #define COMPLEXFFTH_MSGESZMM "Size mismatch"
UINT4 size; #define COMPLEXFFTH_MSGESLEN "Invalid/mismatched sequence lengths"
void *plan; #define COMPLEXFFTH_MSGESAME "Input/Output data vectors are the same"
} #define COMPLEXFFTH_MSGEFFTW "Error in FFTW"
ComplexFFTPlan; #define COMPLEXFFTH_MSGEALOC "Memory allocation failed"
/**** </lalErrTable> */
/**** <lalLaTeX>
*
* \subsection*{Structures}
*
**** </lalLaTeX> */
/**** <lalVerbatim> */
typedef struct tagComplexFFTPlan ComplexFFTPlan;
/**** </lalVerbatim> */
/**** <lalLaTeX>
*
* This structure contains the parameters necessary for performing an FFT o
f a
* given size and direction. The contents should not be manually adjusted.
*
* \newpage\input{ComplexFFTC}
* \newpage\input{ComplexFFTTestC}
**** </lalLaTeX> */
/* #define KEEP_OLD_COMPLEX_FFT */
void
LALCreateForwardComplexFFTPlan(
LALStatus *status,
ComplexFFTPlan **plan,
UINT4 size,
INT4 measure
);
void
LALCreateReverseComplexFFTPlan(
LALStatus *status,
ComplexFFTPlan **plan,
UINT4 size,
INT4 measure
);
void
LALDestroyComplexFFTPlan (
LALStatus *status,
ComplexFFTPlan **plan
);
void
LALCOMPLEX8VectorFFT (
LALStatus *status,
COMPLEX8Vector *output,
COMPLEX8Vector *input,
ComplexFFTPlan *plan
);
#ifdef KEEP_OLD_FFT
#define KEEP_OLD_COMPLEX_FFT
#endif
#ifdef KEEP_OLD_COMPLEX_FFT
void void
LALEstimateFwdComplexFFTPlan ( LALEstimateFwdComplexFFTPlan (
LALStatus *stat, LALStatus *stat,
ComplexFFTPlan **plan, ComplexFFTPlan **plan,
UINT4 size UINT4 size
); );
void void
LALEstimateInvComplexFFTPlan ( LALEstimateInvComplexFFTPlan (
skipping to change at line 86 skipping to change at line 141
UINT4 size UINT4 size
); );
void void
LALMeasureInvComplexFFTPlan ( LALMeasureInvComplexFFTPlan (
LALStatus *stat, LALStatus *stat,
ComplexFFTPlan **plan, ComplexFFTPlan **plan,
UINT4 size UINT4 size
); );
void #endif /* KEEP_OLD_COMPLEX_FFT */
LALDestroyComplexFFTPlan (
LALStatus *stat,
ComplexFFTPlan **plan
);
void
LALCOMPLEX8VectorFFT (
LALStatus *stat,
COMPLEX8Vector *vout,
COMPLEX8Vector *vinp,
ComplexFFTPlan *plan
);
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _COMPLEXFFT_H */ #endif /* _COMPLEXFFT_H */
 End of changes. 12 change blocks. 
54 lines changed or deleted 99 lines changed or added


 DataBuffer.h   DataBuffer.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: DataBuffer.h <lalVerbatim file="DataBufferHV">
* $Id: DataBuffer.h,v 1.7 2001/05/04 18:37:03 duncan Exp $
* Author: Creighton, J. D. E. </lalVerbatim>
*
* Revision: $Id: DataBuffer.h,v 1.3 2000/07/23 01:13:41 jolien Exp $ <lalLaTeX>
*
*----------------------------------------------------------------------- \section{Header \texttt{DataBuffer.h}}
*/ \label{s:DataBuffer.h}
Root finding routines.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/DataBuffer.h>
\end{verbatim}
\noindent Gets segments of IFO\_DMRO data along with its (averaged over sev
eral
segments) power spectrum and response function.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _DATABUFFER_H #ifndef _DATABUFFER_H
#define _DATABUFFER_H #define _DATABUFFER_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "FrameData.h" #include <lal/FrameData.h>
#include "SpecBuffer.h" #include <lal/SpecBuffer.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (DATABUFFERH, "$Id: DataBuffer.h,v 1.3 2000/07/23 01:13:41 jolien Ex NRCSID (DATABUFFERH, "$Id: DataBuffer.h,v 1.7 2001/05/04 18:37:03 duncan Ex
p $"); p $");
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{DataBufferHErrTab}
</lalLaTeX>
<lalErrTable file="DataBufferHErrTab">
#endif /* autodoc block */
#define DATABUFFERH_ENULL 1
#define DATABUFFERH_ENNUL 2
#define DATABUFFERH_ESIZE 4
#define DATABUFFERH_ESZMM 8
#define DATABUFFERH_MSGENULL "Null pointer"
#define DATABUFFERH_MSGENNUL "Non-null pointer"
#define DATABUFFERH_MSGESIZE "Invalid input size"
#define DATABUFFERH_MSGESZMM "Size mismatch"
#if 0 /* autodoc block */
</lalErrTable>
<lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
typedef struct
tagDataSegment
{
INT2TimeSeries *data;
REAL4FrequencySeries *spec;
COMPLEX8FrequencySeries *resp;
INT4 endOfData;
INT4 newLock;
INT4 newCal;
INT4 number;
INT4 level;
}
DataSegment;
\end{verbatim}
The data structure returned by the data aquisition routine. The fields are
:
\begin{description}
\item[\texttt{data}] The time-series data.
\item[\texttt{spec}] The corresponding estimated (averaged) power spectrum.
\item[\texttt{resp}] The current response function, built from the swept-si
ne
calibration information.
\item[\texttt{endOfData}] Boolean that is non-zero if there is no more data
.
\item[\texttt{newLock}] Boolean that is non-zero if a new locked segment ha
s
been entered.
\item[\texttt{newCal}] Boolean that is non-zero if a new calibration
information has been read.
\item[\texttt{number}] The segment number.
\item[\texttt{level}] A field that Duncan wanted.
\end{description}
\begin{verbatim}
typedef struct
tagDataBufferPar
{
INT4 numSpec;
INT4 numPoints;
WindowType windowType;
RealFFTPlan *plan;
CHAR *framePath;
}
DataBufferPar;
\end{verbatim}
This is the parameter structure used when creating a data buffer. The fiel
ds
are:
\begin{description}
\item[\texttt{numSpec}] The number of spectra to average to get an average
spectrum.
\item[\texttt{numPoints}] The number of points of data in each segment.
\item[\texttt{windowType}] The type of window to use when creating the
spectra (see the \texttt{window} package).
\item[\texttt{plan}] The FFT plan to use when creating the spectra (see the
\texttt{fft} package).
\item[\texttt{framePath}] The path of the directory containing the frame fi
les.
\end{description}
\begin{verbatim}
typedef struct
tagDataBuffer
{
INT4 endOfData;
INT4 newLock;
INT4 newCal;
/* ... private data ... */
}
\end{verbatim}
This is the buffer of data segments. The ``public'' fields are:
\begin{description}
\item[\texttt{endOfData}] Boolean that is non-zero if there is no more data
.
\item[\texttt{newLock}] Boolean that is non-zero if a new locked segment ha
s
been entered.
\item[\texttt{newCal}] Boolean that is non-zero if a new calibration
information has been read.
\end{description}
\begin{verbatim}
typedef struct tagDataBlock DataBlock;
\end{verbatim}
An internal structure.
#define DATABUFFER_ENULL 1 </lalLaTeX>
#define DATABUFFER_ENNUL 2
#define DATABUFFER_ESIZE 4 #endif /* autodoc block */
#define DATABUFFER_ESZMM 8
#define DATABUFFER_MSGENULL "Null pointer"
#define DATABUFFER_MSGENNUL "Non-null pointer"
#define DATABUFFER_MSGESIZE "Invalid input size"
#define DATABUFFER_MSGESZMM "Size mismatch"
typedef struct typedef struct
tagDataBlock tagDataBlock
{ {
INT4 number; INT4 number;
INT4 continuous; INT4 continuous;
INT4 anomalous; INT4 anomalous;
INT2TimeSeries *framedata; INT2TimeSeries *framedata;
} }
DataBlock; DataBlock;
skipping to change at line 86 skipping to change at line 205
WindowType windowType; WindowType windowType;
RealFFTPlan *plan; RealFFTPlan *plan;
CHAR *framePath; CHAR *framePath;
} }
DataBufferPar; DataBufferPar;
typedef struct typedef struct
tagDataSegment tagDataSegment
{ {
INT2TimeSeries *data; INT2TimeSeries *data;
REAL4TimeSeries *real4Data;
REAL4FrequencySeries *spec; REAL4FrequencySeries *spec;
COMPLEX8FrequencySeries *resp; COMPLEX8FrequencySeries *resp;
INT4 endOfData; INT4 endOfData;
INT4 newLock; INT4 newLock;
INT4 newCal; INT4 newCal;
INT4 number; INT4 number;
INT4 level;
} }
DataSegment; DataSegment;
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{DataBufferC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALCreateDataBuffer ( LALCreateDataBuffer (
LALStatus *status, LALStatus *status,
DataBuffer **buffer, DataBuffer **buffer,
DataBufferPar *params DataBufferPar *params
); );
void void
LALDestroyDataBuffer ( LALDestroyDataBuffer (
LALStatus *status, LALStatus *status,
skipping to change at line 116 skipping to change at line 245
); );
void void
LALGetData ( LALGetData (
LALStatus *status, LALStatus *status,
DataSegment *output, DataSegment *output,
INT4 advance, INT4 advance,
DataBuffer *buffer DataBuffer *buffer
); );
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{DataBufferTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _DATABUFFER_H */ #endif /* _DATABUFFER_H */
 End of changes. 8 change blocks. 
24 lines changed or deleted 170 lines changed or added


 Date.h   Date.h 
/*----------------------------------------------------------------------- /* <lalVerbatim file="DateHV">
*
* File Name: Date.h Author: David Chin <dwchin@umich.edu> +1-734-730-1274
* $Id: Date.h,v 1.31 2001/12/08 21:28:38 dwchin Exp $
* Author: David Chin <dwchin@umich.edu>
* </lalVerbatim> */
* Revision: $Id: Date.h,v 1.2 2000/07/23 01:12:54 jolien Exp $
* /* <lalLaTeX>
*-----------------------------------------------------------------------
* \section{Header \texttt{Date.h}}
* NAME \label{s:Date.h}
* Date.h
* Provides routines for manipulating date and time information.
* SYNOPSIS
* #include "Date.h" \subsection*{Synopsis}
* \begin{verbatim}
* DESCRIPTION #include <lal/Date.h>
* Data type definitions for date and time manipulation. \end{verbatim}
* Function prototypes for date and time manipulation functions.
* This header covers routines for manipulating date and time
* DIAGNOSTICS information. The various time systems are discussed in~\cite{esaa:1992}.
*
*----------------------------------------------------------------------- </lalLaTeX> */
*/
#ifndef _DATE_H #ifndef _DATE_H
#define _DATE_H #define _DATE_H
/* the following two preprocessor defines are to include the prototypes for
* gmtime_r() and asctime_r() from /usr/include/time.h
* HOWEVER, they do no good if -ansi is used in gcc: warnings are generated
* that the prototypes have not been seen */
/* HP-UX and Solaris */
#ifndef _REENTRANT #ifndef _REENTRANT
# define _REENTRANT # define _REENTRANT
#endif #endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS
#endif
/* Linux */
#ifndef __USE_POSIX
# define __USE_POSIX
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#include "LALConstants.h" #include <lal/LALConstants.h>
#include "LALAtomicDatatypes.h" #include <lal/LALAtomicDatatypes.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "LALStatusMacros.h" #include <lal/LALStatusMacros.h>
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include <lal/DetectorSite.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C"
{
#endif #endif
NRCSID (DATEH, "$Id: Date.h,v 1.2 2000/07/23 01:12:54 jolien Exp $"); NRCSID (DATEH, "$Id: Date.h,v 1.31 2001/12/08 21:28:38 dwchin Exp $");
/* /* <lalLaTeX>
* Julian.c \subsection*{Error conditions}
*/ </lalLaTeX> */
#define JULIAN_ENULLINPUT 1
#define JULIAN_ENULLOUTPUT 2
#define JULIAN_EDATETOOEARLY 3
#define JULIAN_MSGENULLINPUT "Input is NULL"
#define JULIAN_MSGENULLOUTPUT "Output is NULL"
#define JULIAN_MSGEDATETOOEARLY "Date too early: Julian Day can only be com
puted for dates >= 1900-Mar"
/* /* <lalErrTable> */
* UtoGPS.c #define DATEH_ENULLINPUT 1
*/ #define DATEH_ENULLOUTPUT 2
#define UTOGPS_ENULLINPUT 1 #define DATEH_EDATETOOEARLY 3
#define UTOGPS_ENULLOUTPUT 2 #define DATEH_ERANGEGPSABS 4
#define DATEH_EBUFFTOOSMALL 5
#define DATEH_EASCTIMEFAIL 6
#define DATEH_EGPSDATETOOEARLY 7
#define UTOGPS_MSGENULLINPUT "Input is NULL" #define DATEH_MSGENULLINPUT "Input is NULL"
#define UTOGPS_MSGENULLOUTPUT "Output is NULL" #define DATEH_MSGENULLOUTPUT "Output is NULL"
#define DATEH_MSGEDATETOOEARLY "Date too early: Julian Day can only be comp
uted for dates >= 1900-03-01"
#define DATEH_MSGERANGEGPSABS "Input time out of range: only able to accura
tely convert times between 1980-Jan-06 00:00:00 UTC (GPS 0) and 2002-Mar-31
23:59:00 UTC (GPS 701654353)"
#define DATEH_MSGEBUFFTOOSMALL "Output timestamp string too small: min. siz
e = 26"
#define DATEH_MSGEASCTIMEFAIL "asctimeUNDERSCOREr() failed"
#define DATEH_MSGEGPSDATETOOEARLY "Date too early: GPS time only defined fo
r times on or after 1980-Jan-06 00:00:00 UTC"
/* /* </lalErrTable>
* Utime.c
*/
#define UTIME_ENULLINPUT 1
#define UTIME_ENULLOUTPUT 2
#define UTIME_ERANGE 3
#define UTIME_MSGENULLINPUT "Input is NULL"
#define UTIME_MSGENULLOUTPUT "Output is NULL"
#define UTIME_MSGERANGE "Input time out of range: 0 <= utc_seconds <= 94668
4823"
/* <lalLaTeX>
* DateString.c
*/
#define DATESTRING_ENULLINPUT 1
#define DATESTRING_ENULLOUTPUT 2
#define DATESTRING_EBUFFTOOSMALL 3
#define DATESTRING_MSGENULLINPUT "Input is NULL"
#define DATESTRING_MSGENULLOUTPUT "Output is NULL"
#define DATESTRING_MSGEBUFFTOOSMALL "Output timestamp string too small: min
. size = 26"
/* \subsection*{Structures}
* LMST1.c
*/
#define LMST1_ENULLINPUT 1
#define LMST1_ENULLOUTPUT 2
#define GMST1_ENULLINPUT 1 </lalLaTeX> */
#define GMST1_ENULLOUTPUT 2
#define LMST1_MSGENULLINPUT "Input is NULL" /* <lalLaTeX>
#define LMST1_MSGENULLOUTPUT "Output is NULL"
#define GMST1_MSGENULLINPUT "Input is NULL" \vfill{\footnotesize\input{DateHV}}
#define GMST1_MSGENULLOUTPUT "Output is NULL"
#define MST_SEC 0
#define MST_HRS 1
#define MST_DEG 2
#define MST_RAD 3
/* </lalLaTeX> */
* SecsToLALDate.c
*/ /* <lalLaTeX>
#define SECSTOLALDATE_ENULLOUTPUT 1
\subsection*{Types}
\subsubsection*{Enumeration \texttt{LALMSTUnits}}
\idx[Type]{LALMSTUnits}
This enumerated type is used as a parameter for Mean Sidereal Time
routines to specify the units in which to return the Mean Sidereal
Time. The allowed values are:
\medskip\noindent
\begin{tabular}{ll}
\verb+MST_SEC+ & arc-seconds \\
\verb+MST_HRS+ & arc-hours (\textit{i.e.} units of Right Ascension)\\
\verb+MST_DEG+ & degrees \\
\verb+MST_RAD+ & radians
\end{tabular}
\bigskip
</lalLaTeX> */
typedef enum
{
MST_SEC, /* arc seconds */
MST_HRS, /* arc hours (i.e. units of Right Ascension) */
MST_DEG, /* degrees */
MST_RAD /* radians */
} LALMSTUnits;
/* <lalLaTeX>
\subsubsection*{Enumeration \texttt{LALLeapSecAccuracy}}
\idx[Type]{LALLeapSecAccuracy}
This enumerated type is used as a parameter for \texttt{LALGPStoUTC()} and
\texttt{LALUTCtoGPS()} to specify if complete accuracy is required in use
of leap seconds. The allowed values are:
\medskip\noindent
\begin{tabular}{ll}
\verb+LALLEAPSEC_LOOSE+ & may miss leap seconds \\
\verb+LALLEAPSEC_STRICT+ & require all leap seconds
\end{tabular}
\bigskip
If strict accuracy is selected, the code will \texttt{ABORT} if leap second
data is not current. Otherwise, a warning will be printed, and the code
will continue execution.
</lalLaTeX> */
typedef enum
{
LALLEAPSEC_LOOSE,
LALLEAPSEC_STRICT
} LALLeapSecAccuracy;
/* <lalLaTeX>
#define SECSTOLALDATE_MSGENULLOUTPUT "Output is NULL" \subsubsection*{Structure \texttt{LALUnixDate}}
\idx[Type]{LALUnixDate}
/* The standard Unix tm structure */ This structure is just the standard Unix \texttt{tm} structure. We shall
{\em always} ignore the daylight savings time field, \verb+tm_isdst+.
</lalLaTeX> */
/*
* The standard Unix tm structure
*/
typedef struct typedef struct
tm tm
LALUnixDate; LALUnixDate;
/* This time object is exactly like LIGOTimeGPS, except for the name */ /* <lalLaTeX>
typedef struct
tagLIGOTimeUnix \subsubsection{Structure \texttt{LALTimeInterval}}
{ \idx[Type]{LALTimeInterval}
INT4 unixSeconds;
INT4 unixNanoSeconds; This structure is used for storing intervals of \texttt{LIGOTimeGPS}
} and \texttt{LIGOTimeUnix} times. The fields are:
LIGOTimeUnix;
\begin{description}
\item{\texttt{INT4 seconds}} Integral part of the time interval
\item{\texttt{INT8 nanoSeconds}} Residual nanoseconds (\textit{i.e.}
fractional part, in nanoseconds)
\end{description}
/* Encode timezone information */ </lalLaTeX> */
/*
* This time object is for time intervals, i.e. no reference epoch implied
*/
typedef struct typedef struct
tagLALTimezone tagLALTimeInterval
{ {
INT4 secondsWest; /* seconds West of UTC */ INT4 seconds;
INT4 dst; /* Daylight Savings Time correction to apply */ INT8 nanoSeconds;
} }
LALTimezone; LALTimeInterval;
/* <lalLaTeX>
\subsubsection{Structure \texttt{LALDate}}
\idx[Type]{LALDate}
/* Date and time structure */ This structure is an extension of \texttt{LALUnixDate} to include residual
nanosecond information. The fields are:
\begin{description}
\item{\texttt{LALUnixDate unixDate}} Unix date in \texttt{struct tm}
format
\item{\texttt{INT4 residualNanoSeconds}} Residual nanoseconds
\end{description}
</lalLaTeX> */
/*
* Date and time structure
*/
typedef struct typedef struct
tagLALDate tagLALDate
{ {
LALUnixDate unixDate; LALUnixDate unixDate;
INT4 residualNanoSeconds; /* residual nanoseconds */ INT4 residualNanoSeconds; /* residual nanoseconds */
LALTimezone timezone; /* timezone information */
} }
LALDate; LALDate;
/* <lalLaTeX>
\subsubsection{Structure \texttt{LALPlaceAndGPS}}
\idx[Type]{LALPlaceAndGPS}
This structure stores pointers to a \texttt{LALDetector} and a
\texttt{LIGOTimeGPS}. Its sole purpose is to aggregate these
structures for passing to functions. The fields are:
\begin{description}
\item{\verb+LALDetector *p_detector+} Pointer to a detector
\item{\verb+LIGOTimeGPS *p_gps+} Pointer to a GPS time structure
\end{description}
</lalLaTeX> */
/* /*
* 9. Functions Declarations (i.e., prototypes). * Place and time structures
*/ */
void LALJulianDay (LALStatus*, INT4*, const LALDate*); /* First, with GPS */
void LALModJulianDay(LALStatus*, REAL8*, const LALDate*); typedef struct
void LALJulianDate(LALStatus*, REAL8*, const LALDate*); tagLALPlaceAndGPS
void LALModJulianDate(LALStatus*, REAL8*, const LALDate*); {
void LALUtoGPS(LALStatus*, LIGOTimeGPS*, const LIGOTimeUnix*); LALDetector *p_detector; /* pointer to a detector */
void LALGPStoU(LALStatus*, LIGOTimeUnix*, const LIGOTimeGPS*); LIGOTimeGPS *p_gps; /* pointer to GPS time */
void LALUtime(LALStatus*, LALDate*, const LIGOTimeUnix*); }
void LALDateString(LALStatus*, CHARVector*, const LALDate*); LALPlaceAndGPS;
void LALGMST1(LALStatus*, REAL8*, const LALDate*, INT4);
void LALLMST1(LALStatus*, REAL8*, const LALDate*, REAL8, INT4); /* <lalLaTeX>
void LALSecsToLALDate(LALStatus*, LALDate*, REAL8);
\subsubsection{Structure \texttt{LALPlaceAndDate}}
\idx[Type]{LALPlaceAndDate}
Like \texttt{LALPlaceAndGPS}, this structure aggregates a pointer to a
detector and a pointer to a date. This is another convenience
structure, used in calling \texttt{LALLMST1()}. The fields are:
\begin{description}
\item{\verb+LALDetector *p_detector+} Pointer to a detector
\item{\verb+LALDate *p_date+} Pointer to a date
\end{description}
</lalLaTeX> */
/* Second, with Date-Time */
typedef struct
tagLALPlaceAndDate
{
LALDetector *p_detector; /* pointer to a detector */
LALDate *p_date; /* pointer to a date */
}
LALPlaceAndDate;
/*
* Function prototypes
*/
/* <lalLaTeX>
\newpage\input{JulianC}
</lalLaTeX> */
void LALJulianDay(LALStatus *status,
INT4 *jDay,
const LALDate *date);
void LALJulianDate (LALStatus *status,
REAL8 *jDateOut,
const LALDate *date);
void LALModJulianDate (LALStatus *status,
REAL8 *modJDate,
const LALDate *date);
/* <lalLaTeX>
\newpage\input{DateStringC}
</lalLaTeX> */
void LALDateString (LALStatus *status,
CHARVector *timestamp,
const LALDate *date);
/* <lalLaTeX>
\newpage\input{LMST1C}
</lalLaTeX> */
void LALGMST1 (LALStatus *status,
REAL8 *gmst, /* output - GMST1 */
const LALDate *date, /* input - date and time */
LALMSTUnits outunits); /* GMST1 units */
void LALGPStoGMST1( LALStatus *status,
REAL8 *gmst, /* output - GMST1 */
const LIGOTimeGPS *gps, /* input - GPS time */
LALMSTUnits outunits); /* GMST1 units */
void LALLMST1 (LALStatus *status,
REAL8 *lmst, /* output - LMST1 */
const LALPlaceAndDate *placeAndDate, /* input -
location
and date */
LALMSTUnits outunits); /* LMST1 units */
void LALGPStoLMST1( LALStatus *status,
REAL8 *lmst, /* output - LMST1 */
const LALPlaceAndGPS *placeAndGps, /* input -
location and
GPS */
LALMSTUnits outunits); /* LMST1 units
*/
/* <lalLaTeX>
\newpage\input{SecsToLALDateC}
</lalLaTeX> */
void LALSecsToLALDate(LALStatus*,
LALDate*,
REAL8);
/* <lalLaTeX>
\newpage\input{GPStoUTCC}
</lalLaTeX> */
void
LALGPStoUTC (LALStatus *status,
LALDate *pUtcDate,
const LIGOTimeGPS *pGpsTime,
const LALLeapSecAccuracy *pAccuracy);
void
LALUTCtoGPS (LALStatus *status,
LIGOTimeGPS *pGpsTime,
const LALDate *pUtcDate,
const LALLeapSecAccuracy *pAccuracy);
/* The following is from S.J. Berukoff, included at his request */
/* <lalLaTeX>
\newpage\input{GPStoFloatC}
</lalLaTeX> */
void LALGPStoFloat (LALStatus *,
REAL8 *,
LIGOTimeGPS *);
void LALFloatToGPS(LALStatus *,
LIGOTimeGPS *,
REAL8 *);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _DATE_H */ #endif /* _DATE_H */
 End of changes. 30 change blocks. 
121 lines changed or deleted 330 lines changed or added


 Dirichlet.h   Dirichlet.h 
/*----------------------------------------------------------------------- /************************************ <lalVerbatim file="DirichletHV">
* Author: UTB Relativity Group; contact whelan@oates.utb.edu
* File Name: Dirichlet.h $Id: Dirichlet.h,v 1.10 2001/12/09 04:24:18 whelan Exp $
* *********************************************************** </lalVerbatim>
* Author: UTB Relativity Group */
*
* Revision: $Id: Dirichlet.h,v 1.4 2000/07/23 01:14:47 jolien Exp $
*
*-----------------------------------------------------------------------
*
* NAME
* Dirichlet.h
*
* SYNOPSIS
* #include "Dirichlet.h"
*
* DESCRIPTION
* Error codes, typedefs, and prototype for function LALDirichlet()
*
* DIAGNOSTICS
*
*-----------------------------------------------------------------------
*/
#ifndef _DIRICHLET_H /********************************************************** <lalLaTeX>
#define _DIRICHLET_H \section{Header \texttt{Dirichlet.h}}
\label{stochastic:s:Dirichlet.h}
#include "LALStdlib.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
#define _DIRICHLET_H
#include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (DIRICHLETH, "$Id: Dirichlet.h,v 1.4 2000/07/23 01:14:47 jolien Exp $"); NRCSID (DIRICHLETH, "$Id: Dirichlet.h,v 1.10 2001/12/09 04:24:18 whelan Exp $");
#define DIRICHLET_ENULLIP 1 /******************************** <lalErrTable file="DirichletHErrTable"> *
#define DIRICHLET_ENVALUE 2 /
#define DIRICHLET_ESIZE 4
#define DIRICHLET_EDELTAX 8 #define DIRICHLETH_ENULLPIN 1
#define DIRICHLET_ENULLOP 16 #define DIRICHLETH_ENVALUE 2
#define DIRICHLET_ESIZEMM 32 #define DIRICHLETH_ESIZE 3
#define DIRICHLET_ENULLD 64 #define DIRICHLETH_EDELTAX 4
#define DIRICHLETH_ENULLPOUT 5
#define DIRICHLET_MSGENULLIP "Pointer to input parameters must be non-null #define DIRICHLETH_ESIZEMM 6
" #define DIRICHLETH_ENULLPDOUT 7
#define DIRICHLET_MSGENVALUE "LALDirichlet parameter N must be > 0"
#define DIRICHLET_MSGESIZE "Specified length of output vector must be > #define DIRICHLETH_MSGENULLPIN "Null pointer to input parameters"
0" #define DIRICHLETH_MSGENVALUE "Dirichlet parameter N less than or equal
#define DIRICHLET_MSGEDELTAX "Spacing of x values must be > 0" to zero"
#define DIRICHLET_MSGENULLOP "Pointer to ouput vector must be non-null" #define DIRICHLETH_MSGESIZE "Length parameter less than or equal to ze
#define DIRICHLET_MSGESIZEMM "Length of output vector must agree with leng ro"
th specified in input parameters" #define DIRICHLETH_MSGEDELTAX "Spacing of x values less than or equal to
#define DIRICHLET_MSGENULLD "Pointer to data member of output vector must zero"
be non-null" #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_MSGENULLPDOUT "Null pointer to data member of output vec
tor"
/************************************ </lalErrTable> */
typedef struct tagDirichletParameters{ typedef struct tagDirichletParameters{
INT4 n; /* LALDirichlet parameter N */ UINT4 n; /* LALDirichlet parameter N */
INT4 length; /* specified length of output vector */ UINT4 length; /* specified length of output vector */
REAL8 deltaX; /* spacing of x values */ REAL8 deltaX; /* spacing of x values */
} DirichletParameters; } DirichletParameters;
void void
LALDirichlet ( LALStatus*, REAL4Vector*, DirichletParameters* ); LALDirichlet(LALStatus*,
REAL4Vector*,
const DirichletParameters*);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif /* C++ protection */
#endif /* _DIRICHLET_H */ #endif /* _DIRICHLET_H */
 End of changes. 8 change blocks. 
51 lines changed or deleted 84 lines changed or added


 ExcessPower.h   ExcessPower.h 
/*----------------------------------------------------------------------- /********************************** <lalVerbatim file="ExcessPowerHV">
* Author: Flanagan, E
* File Name: ExcessPower.h $Id: ExcessPower.h,v 1.6 2001/08/19 22:40:57 patrick Exp $
* **************************************************** </lalVerbatim> */
* Author: Eanna Flanagan
*
* Revision: $Id: ExcessPower.h,v 1.2 2000/07/23 01:12:26 jolien Exp $
*
*-----------------------------------------------------------------------
*
* NAME
* ExcessPower.h
*
* SYNOPSIS
* #include "ExcessPower.h"
*
* DESCRIPTION
* Error codes, typedefs, and protypes for the functions chisqCdf() and
* related functions
*
* DIAGNOSTICS
*
*-----------------------------------------------------------------------
*/
#ifndef _EXCESSPOWER_H #ifndef _EXCESSPOWER_H
#define _EXCESSPOWER_H #define _EXCESSPOWER_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "TFTransform.h" #include <lal/TFTransform.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID (EXCESSPOWERH, "$Id: ExcessPower.h,v 1.2 2000/07/23 01:12:26 jolien Exp $"); NRCSID (EXCESSPOWERH, "$Id: ExcessPower.h,v 1.6 2001/08/19 22:40:57 patrick Exp $");
#define EXCESSPOWER_ENULLP 1 /******** <lalErrTable file="ExcessPowerHErrTab"> ********/
#define EXCESSPOWER_EPOSARG 2 #define EXCESSPOWERH_ENULLP 1
#define EXCESSPOWER_EPOW2 4 #define EXCESSPOWERH_EPOSARG 2
#define EXCESSPOWER_EMALLOC 8 #define EXCESSPOWERH_EPOW2 4
#define EXCESSPOWER_EINCOMP 16 #define EXCESSPOWERH_EMALLOC 8
#define EXCESSPOWER_EORDER 32 #define EXCESSPOWERH_EINCOMP 16
#define EXCESSPOWER_ENONNULL 64 #define EXCESSPOWERH_EORDER 32
#define EXCESSPOWERH_ENONNULL 64
#define EXCESSPOWER_MSGENULLP "Null pointer" #define EXCESSPOWERH_ETILES 65
#define EXCESSPOWER_MSGEPOSARG "Arguments must be non-negative"
#define EXCESSPOWER_MSGEPOW2 "Length of supplied data must be a power o #define EXCESSPOWERH_MSGENULLP "Null pointer"
f 2" #define EXCESSPOWERH_MSGEPOSARG "Arguments must be non-negative"
#define EXCESSPOWER_MSGEMALLOC "Malloc failure" #define EXCESSPOWERH_MSGEPOW2 "Length of supplied data must be a power
#define EXCESSPOWER_MSGEINCOMP "Incompatible arguments" of 2"
#define EXCESSPOWER_MSGEORDER "Routines called in illegal order" #define EXCESSPOWERH_MSGEMALLOC "Malloc failure"
#define EXCESSPOWER_MSGENONNULL "Null pointer expected" #define EXCESSPOWERH_MSGEINCOMP "Incompatible arguments"
#define EXCESSPOWERH_MSGEORDER "Routines called in illegal order"
#define EXCESSPOWERH_MSGENONNULL "Null pointer expected"
#define EXCESSPOWERH_MSGETILES "Malloc failed while assigning memory for
a tile"
/******** </lalErrTable> ********/
typedef struct typedef struct
tagTFTile tagTFTile
{ {
INT4 fstart; INT4 fstart;
INT4 fend; INT4 fend;
INT4 tstart; INT4 tstart;
INT4 tend; INT4 tend;
INT4 whichPlane; INT4 whichPlane;
REAL8 deltaT; /* deltaF will always be 1/ deltaT */
REAL8 excessPower; REAL8 excessPower;
REAL8 alpha; REAL8 alpha;
REAL8 weight; REAL8 weight;
BOOLEAN firstCutFlag; BOOLEAN firstCutFlag;
struct tagTFTile *nextTile; struct tagTFTile *nextTile;
} }
TFTile; TFTile;
typedef struct typedef struct
tagTFTiling tagTFTiling
 End of changes. 5 change blocks. 
45 lines changed or deleted 31 lines changed or added


 FindChirpExch.h   FindChirpExch.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
* *
* File Name: FindChirpExch.h * File Name: FindChirpExch.h
* *
* Author: Allen, B. and Creighton, J. D. E. * Author: Allen, B., Brown, D. A. and Creighton, J. D. E.
* *
* Revision: $Id: FindChirpExch.h,v 1.3 2000/07/23 01:13:31 jolien Exp $ * Revision: $Id: FindChirpExch.h,v 1.11 2001/05/09 17:35:54 duncan Exp $
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
#ifndef _FINDCHIRPEXCH_H #if 0
#define _FINDCHIRPEXCH_H <lalVerbatim file="FindChirpEngineHV">
Author: Allen, B., Brown, D. A. and Creighton, J. D. E.
$Id: FindChirpExch.h,v 1.11 2001/05/09 17:35:54 duncan Exp $
</lalVerbatim>
#include "LALDatatypes.h" <lalLaTeX>
#include "Comm.h"
#include "DataBuffer.h"
#ifdef __cplusplus \section{Header \texttt{FindChirpExch.h}}
extern "C" { \label{s:FindChirp.h}
#endif
NRCSID (FINDCHIRPEXCHH, "$Id: FindChirpExch.h,v 1.3 2000/07/23 01:13:31 jol Provides routines to filter IFO data for binary inspiral chirps.
ien Exp $");
#define FINDCHIRPEXCH_ENULL 1
#define FINDCHIRPEXCH_ENNUL 2
#define FINDCHIRPEXCH_ENOBJ 4
#define FINDCHIRPEXCH_EHAND 8
#define FINDCHIRPEXCH_MSGENULL "Null pointer"
#define FINDCHIRPEXCH_MSGENNUL "Non-null pointer"
#define FINDCHIRPEXCH_MSGENOBJ "Invalid number of objects"
#define FINDCHIRPEXCH_MSGEHAND "Wrong handshake"
typedef enum
{
ExchDataSegment,
ExchInspiralBankIn,
ExchInspiralTemplate,
ExchInspiralEvent,
ExchFinished
}
ExchObjectType;
typedef struct </lalLaTeX>
tagExchParams #endif
{
ExchObjectType exchObjectType;
INT4 send;
INT4 numObjects;
INT4 partnerProcNum;
}
ExchParams;
typedef enum
{
M1AndM2,
TotalMassAndEta,
TotalMassAndMu
}
InputMasses;
typedef enum #ifndef _FINDCHIRPEXCHH_H
{ #define _FINDCHIRPEXCHH_H
Best,
TaylorTime20,
TaylorFreq20,
Papprox20
}
InspiralMethod;
typedef struct #include <lal/LALDatatypes.h>
tagInspiralTemplate #include <lal/Comm.h>
{ #include <lal/DataBuffer.h>
INT4 number; #include <lal/LALInspiral.h>
REAL4 mass1; #include <lal/FindChirp.h>
REAL4 mass2;
REAL4 spin1[3];
REAL4 spin2[3];
REAL4 inclination;
REAL4 eccentricity;
REAL8 totalMass;
REAL8 mu;
REAL8 eta;
REAL8 fLower;
REAL8 fCutoff;
REAL8 tSampling;
REAL8 phaseShift;
INT4 nStartPad;
INT4 nEndPad;
InputMasses massChoice;
InspiralMethod method;
}
InspiralTemplate;
/* the various interferometer codes */
typedef enum
{
Caltech40m, Hanford4km, Hanford2km, Livingston4km, GEO600m, TAMA300m
}
Detector;
/* input for specifying a template bank */ #ifdef __cplusplus
typedef struct extern "C" {
tagInspiralBankIn #endif
{
REAL4 mMin;
REAL4 mMax;
REAL4 ffCoarse;
REAL4 ffFine;
Detector detector;
InspiralMethod method;
}
InspiralBankIn;
typedef struct NRCSID (FINDCHIRPEXCHH, "$Id: FindChirpExch.h,v 1.11 2001/05/09 17:35:54 du
tagInspiralEvent ncan Exp $");
{
LIGOTimeGPS time;
InspiralTemplate tmplt;
REAL4 snrsq;
REAL4 chisq;
REAL4 sigma;
}
InspiralEvent;
void #if 0
LALInitializeExchange ( <lalLaTeX>
LALStatus *status, \subsection*{Error codes}
ExchParams **exchParamsOut, </lalLaTeX>
ExchParams *exchParamsInp, #endif
INT4 myProcNum /* <lalErrTable> */
); #define FINDCHIRPEXCHH_ENULL 1
#define FINDCHIRPEXCHH_ENNUL 2
void #define FINDCHIRPEXCHH_ENOBJ 4
LALFinalizeExchange ( #define FINDCHIRPEXCHH_EHAND 8
LALStatus *status, #define FINDCHIRPEXCHH_MSGENULL "Null pointer"
ExchParams **exchParams #define FINDCHIRPEXCHH_MSGENNUL "Non-null pointer"
); #define FINDCHIRPEXCHH_MSGENOBJ "Invalid number of objects"
#define FINDCHIRPEXCHH_MSGEHAND "Wrong handshake"
/* </lalErrTable> */
void void
LALExchangeDataSegment ( LALExchangeDataSegment (
LALStatus *status, LALStatus *status,
DataSegment *segment, DataSegment *segment,
ExchParams *exchParams ExchParams *exchParams
); );
void void
LALExchangeInspiralBankIn (
LALStatus *status,
InspiralBankIn *bankIn,
ExchParams *exchParams
);
void
LALExchangeInspiralTemplate ( LALExchangeInspiralTemplate (
LALStatus *status, LALStatus *status,
InspiralTemplate *tmplt, InspiralTemplate *tmplt,
ExchParams *exchParams ExchParams *exchParams
); );
void void
LALExchangeInspiralEvent ( LALExchangeInspiralEvent (
LALStatus *status, LALStatus *status,
InspiralEvent *event, InspiralEvent *event,
ExchParams *exchParams ExchParams *exchParams
); );
void
LALExchangeInspiralEventList (
LALStatus *status,
InspiralEvent **eventHead,
ExchParams *exchParams
);
void
LALExchangeTemplateBank (
LALStatus *status,
InspiralTemplate **tmpltHead,
ExchParams *exchParms
);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FINDCHIRPEXCH_H */ #endif /* _FINDCHIRPEXCHH_H */
 End of changes. 15 change blocks. 
129 lines changed or deleted 54 lines changed or added


 FindRoot.h   FindRoot.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: FindRoot.h <lalVerbatim file="FindRootHV">
* $Id: FindRoot.h,v 1.6 2001/02/22 00:27:07 jolien Exp $
* Revision: $Id: FindRoot.h,v 1.4 2000/07/23 01:15:53 jolien Exp $ </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
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (FINDROOTH, "$Id: FindRoot.h,v 1.4 2000/07/23 01:15:53 jolien Exp $" NRCSID (FINDROOTH, "$Id: FindRoot.h,v 1.6 2001/02/22 00:27:07 jolien Exp $"
); );
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{FindRootHErrTab}
</lalLaTeX>
<lalErrTable file="FindRootHErrTab">
#endif /* autodoc block */
#define FINDROOTH_ENULL 1
#define FINDROOTH_EIDOM 2
#define FINDROOTH_EMXIT 4
#define FINDROOTH_EBRKT 8
#define FINDROOT_ENULL 1 #define FINDROOTH_MSGENULL "Null pointer"
#define FINDROOT_EIDOM 2 #define FINDROOTH_MSGEIDOM "Invalid initial domain"
#define FINDROOT_EMXIT 4 #define FINDROOTH_MSGEMXIT "Maximum iterations exceeded"
#define FINDROOT_EBRKT 8 #define FINDROOTH_MSGEBRKT "Root not bracketed"
#define FINDROOT_MSGENULL "Null pointer"
#define FINDROOT_MSGEIDOM "Invalid initial domain"
#define FINDROOT_MSGEMXIT "Maximum iterations exceeded"
#define FINDROOT_MSGEBRKT "Root not bracketed"
#if 0 /* autodoc block */
</lalErrTable>
<lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p); typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p);
typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p); typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p);
\end{verbatim}
These are function pointers to functions that map real numbers to real numb
ers.
\begin{verbatim}
typedef struct typedef struct
tagSFindRootIn tagSFindRootIn
{ {
REAL4LALFunction *function; REAL4LALFunction *function;
REAL4 xmax; REAL4 xmax;
REAL4 xmin; REAL4 xmin;
REAL4 xacc; REAL4 xacc;
} }
SFindRootIn; SFindRootIn;
typedef struct typedef struct
tagDFindRootIn tagDFindRootIn
{ {
REAL8LALFunction *function; REAL8LALFunction *function;
REAL8 xmax; REAL8 xmax;
REAL8 xmin; REAL8 xmin;
REAL8 xacc; REAL8 xacc;
} }
DFindRootIn; DFindRootIn;
\end{verbatim}
These are the input structures to the root finding routines. The fields ar
e:
\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>
#endif /* autodoc block */
typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p);
typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p);
typedef struct
tagSFindRootIn
{
REAL4LALFunction *function;
REAL4 xmax;
REAL4 xmin;
REAL4 xacc;
}
SFindRootIn;
typedef struct
tagDFindRootIn
{
REAL8LALFunction *function;
REAL8 xmax;
REAL8 xmin;
REAL8 xacc;
}
DFindRootIn;
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{FindRootC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALSBracketRoot ( LALSBracketRoot (
LALStatus *status, LALStatus *status,
SFindRootIn *inout, SFindRootIn *inout,
void *params void *params
); );
void void
LALDBracketRoot ( LALDBracketRoot (
skipping to change at line 84 skipping to change at line 168
); );
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. 9 change blocks. 
20 lines changed or deleted 116 lines changed or added


 FrameData.h   FrameData.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: FrameData.h <lalVerbatim file="FrameDataHV">
* $Id: FrameData.h,v 1.5 2001/02/23 23:46:25 jolien Exp $
* Author: Creighton, J. D. E. </lalVerbatim>
*
* Revision: $Id: FrameData.h,v 1.3 2000/07/23 01:13:42 jolien Exp $ <lalLaTeX>
*
*----------------------------------------------------------------------- \section{Header \texttt{FrameData.h}}
*/ \label{s:FrameData.h}
Root finding routines.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/FrameData.h>
\end{verbatim}
\noindent Gets IFO\_DMRO data from frame files.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _FRAMEDATA_H #ifndef _FRAMEDATA_H
#define _FRAMEDATA_H #define _FRAMEDATA_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (FRAMEDATAH, "$Id: FrameData.h,v 1.3 2000/07/23 01:13:42 jolien Exp $"); NRCSID (FRAMEDATAH, "$Id: FrameData.h,v 1.5 2001/02/23 23:46:25 jolien Exp $");
#define FRAMEDATA_ENULL 1 #if 0 /* autodoc block */
#define FRAMEDATA_ENNUL 2
#define FRAMEDATA_EREAD 4 <lalLaTeX>
#define FRAMEDATA_EOPEN 8 \subsection*{Error conditions}
#define FRAMEDATA_ENOSS 16 \input{FrameDataHErrTab}
#define FRAMEDATA_EDMRO 32 </lalLaTeX>
#define FRAMEDATA_ELOCK 64
#define FRAMEDATA_ELOHI 128 <lalErrTable file="FrameDataHErrTab">
#define FRAMEDATA_ESIZE 256
#define FRAMEDATA_ESSSZ 512 #endif /* autodoc block */
#define FRAMEDATA_MSGENULL "Null pointer" #define FRAMEDATAH_ENULL 1
#define FRAMEDATA_MSGENNUL "Non-null pointer" #define FRAMEDATAH_ENNUL 2
#define FRAMEDATA_MSGEREAD "Error reading frame directory" #define FRAMEDATAH_EREAD 4
#define FRAMEDATA_MSGEOPEN "Error opening frame file" #define FRAMEDATAH_EOPEN 8
#define FRAMEDATA_MSGENOSS "No sweptsine calibration data in frame" #define FRAMEDATAH_ENOSS 16
#define FRAMEDATA_MSGEDMRO "No IFO_DMRO data in frame" #define FRAMEDATAH_EDMRO 32
#define FRAMEDATA_MSGELOCK "No IFO_Lock data in frame" #define FRAMEDATAH_ELOCK 64
#define FRAMEDATA_MSGELOHI "No locklo/lockhi data in frame" #define FRAMEDATAH_ELOHI 128
#define FRAMEDATA_MSGESIZE "Invalid vector length" #define FRAMEDATAH_ESIZE 256
#define FRAMEDATA_MSGESSSZ "Bad sweptsine calibration data" #define FRAMEDATAH_ESSSZ 512
#define FRAMEDATAH_MSGENULL "Null pointer"
#define FRAMEDATAH_MSGENNUL "Non-null pointer"
#define FRAMEDATAH_MSGEREAD "Error reading frame directory"
#define FRAMEDATAH_MSGEOPEN "Error opening frame file"
#define FRAMEDATAH_MSGENOSS "No sweptsine calibration data in frame"
#define FRAMEDATAH_MSGEDMRO "No IFO-DMRO data in frame"
#define FRAMEDATAH_MSGELOCK "No IFO-Lock data in frame"
#define FRAMEDATAH_MSGELOHI "No locklo/lockhi data in frame"
#define FRAMEDATAH_MSGESIZE "Invalid vector length"
#define FRAMEDATAH_MSGESSSZ "Bad sweptsine calibration data"
#if 0 /* autodoc block */
</lalErrTable>
<lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
typedef struct
tagFrameData
{
INT4 inLock;
INT4 endOfData;
INT4 newLock;
INT4 newCalibration;
/* ... private data ... */
}
FrameData;
\end{verbatim}
This is the frame data parameter structure: think of it as something like a
file pointer to the frame data. The ``public'' fields are:
\begin{description}
\item[\texttt{inLock}] Boolean that user should set to non-zero if data tha
t
is not ``in lock'' according to the IFO\_Lock channel is desired.
\item[\texttt{endOfData}] Boolean that is non-zero if there is no more data
.
\item[\texttt{newLock}] Boolean that is non-zero if starting a new locked
section of data.
\item[\texttt{newCalibration}] Boolean that is non-zero if new calibration
data
is available.
\end{description}
</lalLaTeX>
#endif /* autodoc block */
typedef struct typedef struct
tagFrameData tagFrameData
{ {
/* /*
* *
* public data: * public data:
* *
*/ */
INT4 inLock; /* data aquisition mode */ INT4 inLock; /* data aquisition mode */
skipping to change at line 88 skipping to change at line 150
INT4 numLock; INT4 numLock;
INT4 curLock; INT4 curLock;
INT4 ratio; INT4 ratio;
REAL8 sampleRate; REAL8 sampleRate;
INT2 lockLow; INT2 lockLow;
INT2 lockHigh; INT2 lockHigh;
INT4 dataBreak; INT4 dataBreak;
} }
FrameData; FrameData;
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{FrameDataC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALInitializeFrameData ( LALInitializeFrameData (
LALStatus *status, LALStatus *status,
FrameData **frameData, FrameData **frameData,
CHAR *framePath CHAR *framePath
); );
void void
LALFinalizeFrameData ( LALFinalizeFrameData (
LALStatus *status, LALStatus *status,
skipping to change at line 115 skipping to change at line 185
FrameData *frameData FrameData *frameData
); );
void void
LALGetFrameDataResponse ( LALGetFrameDataResponse (
LALStatus *status, LALStatus *status,
COMPLEX8FrequencySeries *response, COMPLEX8FrequencySeries *response,
FrameData *frameData FrameData *frameData
); );
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{FrameDataTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _FRAMEDATA_H */ #endif /* _FRAMEDATA_H */
 End of changes. 6 change blocks. 
33 lines changed or deleted 114 lines changed or added


 IIRFilter.h   IIRFilter.h 
/************************************ <lalVerbatim file="IIRFilterHV"> /************************************ <lalVerbatim file="IIRFilterHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: IIRFilter.h,v 1.4 2000/07/23 01:15:14 jolien Exp $ $Id: IIRFilter.h,v 1.8 2001/08/21 04:19:53 jolien Exp $
************************************* </lalVerbatim> */ **************************************************** </lalVerbatim> */
/* <lalLaTeX> /********************************************************** <lalLaTeX>
\section{Header \texttt{IIRFilter.h}} \section{Header \texttt{IIRFilter.h}}
\label{s:IIRFilter.h} \label{s:IIRFilter.h}
Provides routines to make and apply IIR filters. Provides routines to make and apply IIR filters.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "IIRFilter.h" #include <lal/IIRFilter.h>
\end{verbatim} \end{verbatim}
\noindent This header covers routines that create, destroy, and apply \noindent 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 \verb@<datatype>IIRFilter@, where \verb@<datatype>@ is either
\verb@REAL4@ or \verb@REAL8@. \verb@REAL4@ or \verb@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 $y_n=y(t_n)$ at
any sampled time $t_n=t_0+n\Delta t$ is a linear combination of the any sampled time $t_n=t_0+n\Delta t$ is a linear combination of the
skipping to change at line 65 skipping to change at line 65
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 $M$ or $N$ (whichever is larger) values of
$w$, rather than remembering the previous $M$ values of $x$ \emph{and} $w$, rather than remembering the previous $M$ values of $x$ \emph{and}
the previous $N$ values of $y$. Second, when filtering a large stored the previous $N$ values of $y$. Second, when filtering a large stored
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 $x$ with $w$, and then
backward replacing $w$ with $y$. backward replacing $w$ with $y$.
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)=z^n$, where $X$ is a thus be written as $x_n=X\exp(2\pi ifn\Delta t)=Xz^n$, where $X$ is a
complex amplitude and $z=\exp(2\pi if\Delta t)$ is a complex complex amplitude and $z=\exp(2\pi if\Delta t)$ 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)=z^m$. Putting these into be sinusoidal: $y_m=Y\exp(2\pi ifm\Delta t)=Yz^m$. 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:
$$ $$
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}}
$$ $$
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 $T(z)$ as a factored
rational function of $z$. rational function of $z$.
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 $d_0$, in order to make the indexing more intuitive. For
formal correctness $d_0$ should be set to $-1$, although the filtering formal correctness $d_0$ should be set to $-1$, although the filtering
routines never actually use this coefficient. routines never actually use this coefficient.
</lalLaTeX> */ ******************************************************* </lalLaTeX> */
#ifndef _IIRFILTER_H #ifndef _IIRFILTER_H
#define _IIRFILTER_H #define _IIRFILTER_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "ZPGFilter.h" #include <lal/ZPGFilter.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID(IIRFILTERH,"$Id: IIRFilter.h,v 1.4 2000/07/23 01:15:14 jolien Exp $" NRCSID(IIRFILTERH,"$Id: IIRFilter.h,v 1.8 2001/08/21 04:19:53 jolien Exp $"
); );
/* <lalLaTeX>
/********************************************************** <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
****************************************** </lalLaTeX><lalErrTable> */
%\begin{tabular}{|c|l|l|} #define IIRFILTERH_ENUL 1
%\hline #define IIRFILTERH_EOUT 2
%status & status & Explanation \\ #define IIRFILTERH_EMEM 3
% code & description & \\ #define IIRFILTERH_EPAIR 4
%\hline
%\tt 1 & \tt Null pointer & Missing a required pointer. #define IIRFILTERH_MSGENUL "Unexpected null pointer in arguments"
\\ #define IIRFILTERH_MSGEOUT "Output handle points to a non-null pointer"
%\tt 2 & \tt Output already exists & Can't allocate to a non-null pointe #define IIRFILTERH_MSGEMEM "Memory allocation error"
r. \\ #define IIRFILTERH_MSGEPAIR "Input has unpaired nonreal poles or zeros"
%\tt 3 & \tt Memory allocation error & Could not allocate memory. /******************************************** </lalErrTable><lalLaTeX>
\\
%\tt 4 & \tt Input has unpaired & For real filters, complex poles or \subsection*{Types}
\\
% & \tt nonreal poles or zeros & zeros must come in conjugate pairs. \subsubsection*{Structure \texttt{<datatype>IIRFilter}}
\\ \idx[Type]{REAL4IIRFilter}
%\hline \idx[Type]{REAL8IIRFilter}
%\end{tabular}
This structure stores the direct and recursive filter coefficients, as
LALStatus codes are represented by the symbol well as the history of the auxiliary sequence $w$. \verb@<datatype>@
\verb@IIRFILTERH_E@\textit{name}. LALStatus descriptions are represented may be \verb@REAL4@ or \verb@REAL8@. The length of the history vector
by the symbol \verb@IIRFILTERH_MSGE@\textit{name}. gives the order of the filter. The fields are:
\begin{center}
\begin{tabular}{|lcp{4.5in}|}
\hline
\it name & code & description \\
\hline
\tt NUL & 1 & \vspace{-1.4ex}\tt "Arguments contain an unexpected null poi
nter" \\
\tt OUT & 2 & \vspace{-1.4ex}\tt "Output already exists; cannot allocate m
emory to a non-null pointer" \\
\tt MEM & 3 & \vspace{-1.4ex}\tt "Memory allocation failed" \\
\tt PAIR & 4 & \vspace{-1.4ex}\tt "Input contains nonreal poles or zeros th
at do not have complex conjugate pairs" \\
\hline
\end{tabular}
\end{center}
</lalLaTeX> */
/* <lalVerbati***> */
/* Missing a required pointer. */
#define IIRFILTER_ENUL 1
#define IIRFILTER_MSGENUL "Null pointer"
/* Can't allocate to a non-null pointer. */
#define IIRFILTER_EOUT 2
#define IIRFILTER_MSGEOUT "Output already exists"
/* Could not allocate memory. */
#define IIRFILTER_EMEM 3
#define IIRFILTER_MSGEMEM "Memory allocation error"
/* For real filters, complex poles or zeros must come in conjugate pairs. *
/
#define IIRFILTER_EPAIR 4
#define IIRFILTER_MSGEPAIR "Input has unpaired nonreal poles or zeros"
/* </lalVerbati***> */
/* <lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
<datatype>IIRFilter
\end{verbatim}
\index{\verb&REAL4IIRFilter&}
\index{\verb&REAL8IIRFilter&}
\noindent 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} \begin{description}
\item[\texttt{CHAR *name}] A user-assigned name. \item[\texttt{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 \item[\texttt{<datatype>Vector *directCoef}] The direct filter
coefficients. coefficients.
\item[\texttt{<datatype>Vector *recursCoef}] The recursive filter \item[\texttt{<datatype>Vector *recursCoef}] The recursive filter
coefficients. coefficients.
\item[\texttt{<datatype>Vector *history}] The previous values of $w$. \item[\texttt{<datatype>Vector *history}] The previous values of $w$.
\end{description} \end{description}
</lalLaTeX> */ ******************************************************* </lalLaTeX> */
typedef struct tagREAL4IIRFilter{ typedef struct tagREAL4IIRFilter{
CHAR *name; /* User assigned name. */ CHAR *name; /* User assigned name. */
REAL8 deltaT; /* Sampling time interval. */
REAL4Vector *directCoef; /* The direct filter coefficients. */ REAL4Vector *directCoef; /* The direct filter coefficients. */
REAL4Vector *recursCoef; /* The recursive filter coefficients. */ REAL4Vector *recursCoef; /* The recursive filter coefficients. */
REAL4Vector *history; /* The previous values of w. */ REAL4Vector *history; /* The previous values of w. */
} REAL4IIRFilter; } REAL4IIRFilter;
typedef struct tagREAL8IIRFilter{ typedef struct tagREAL8IIRFilter{
CHAR *name; /* User assigned name. */ CHAR *name; /* User assigned name. */
REAL8 deltaT; /* Sampling time interval. */
REAL8Vector *directCoef; /* The direct filter coefficients. */ REAL8Vector *directCoef; /* The direct filter coefficients. */
REAL8Vector *recursCoef; /* The recursive filter coefficients. */ REAL8Vector *recursCoef; /* The recursive filter coefficients. */
REAL8Vector *history; /* The previous values of w. */ REAL8Vector *history; /* The previous values of w. */
} REAL8IIRFilter; } REAL8IIRFilter;
/* <lalLaTeX> /* <lalLaTeX>
\vfill{\footnotesize\input{IIRFilterHV}} \vfill{\footnotesize\input{IIRFilterHV}}
</lalLaTeX> */ </lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{CreateIIRFilterC} \newpage\input{CreateIIRFilterC}
</lalLaTeX> */ </lalLaTeX> */
void LALCreateREAL4IIRFilter(LALStatus *stat, void
REAL4IIRFilter **output, LALCreateREAL4IIRFilter( LALStatus *stat,
COMPLEX8ZPGFilter *input); REAL4IIRFilter **output,
COMPLEX8ZPGFilter *input );
void LALCreateREAL8IIRFilter(LALStatus *stat,
REAL8IIRFilter **output, void
COMPLEX16ZPGFilter *input); LALCreateREAL8IIRFilter( LALStatus *stat,
REAL8IIRFilter **output,
COMPLEX16ZPGFilter *input );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{DestroyIIRFilterC} \newpage\input{DestroyIIRFilterC}
</lalLaTeX> */ </lalLaTeX> */
void LALDestroyREAL4IIRFilter(LALStatus *stat, void
REAL4IIRFilter **input); LALDestroyREAL4IIRFilter( LALStatus *stat,
REAL4IIRFilter **input );
void LALDestroyREAL8IIRFilter(LALStatus *stat,
REAL8IIRFilter **input); void
LALDestroyREAL8IIRFilter( LALStatus *stat,
REAL8IIRFilter **input );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{IIRFilterC} \newpage\input{IIRFilterC}
</lalLaTeX> */ </lalLaTeX> */
void LALIIRFilterREAL4(LALStatus *stat, void
REAL4 *output, LALIIRFilterREAL4( LALStatus *stat,
REAL4 input, REAL4 *output,
REAL4IIRFilter *filter); REAL4 input,
REAL4IIRFilter *filter );
void LALIIRFilterREAL8(LALStatus *stat,
REAL8 *output, void
REAL8 input, LALIIRFilterREAL8( LALStatus *stat,
REAL8IIRFilter *filter); REAL8 *output,
REAL8 input,
REAL8IIRFilter *filter );
REAL4 LALSIIRFilter(REAL4 x, REAL4IIRFilter *filter); REAL4
LALSIIRFilter( REAL4 x, REAL4IIRFilter *filter );
REAL8 LALDIIRFilter(REAL8 x, REAL8IIRFilter *filter); REAL8
LALDIIRFilter( REAL8 x, REAL8IIRFilter *filter );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{IIRFilterVectorC} \newpage\input{IIRFilterVectorC}
</lalLaTeX> */ </lalLaTeX> */
void LALIIRFilterREAL4Vector(LALStatus *stat, void
REAL4Vector *vector, LALIIRFilterREAL4Vector( LALStatus *stat,
REAL4IIRFilter *filter); REAL4Vector *vector,
REAL4IIRFilter *filter );
void LALIIRFilterREAL8Vector(LALStatus *stat,
REAL8Vector *vector, void
REAL8IIRFilter *filter); LALIIRFilterREAL8Vector( LALStatus *stat,
REAL8Vector *vector,
REAL8IIRFilter *filter );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{IIRFilterVectorRC} \newpage\input{IIRFilterVectorRC}
</lalLaTeX> */ </lalLaTeX> */
void LALIIRFilterREAL4VectorR(LALStatus *stat, void
REAL4Vector *vector, LALIIRFilterREAL4VectorR( LALStatus *stat,
REAL4IIRFilter *filter); REAL4Vector *vector,
REAL4IIRFilter *filter );
void LALIIRFilterREAL8VectorR(LALStatus *stat,
REAL8Vector *vector, void
REAL8IIRFilter *filter); LALIIRFilterREAL8VectorR( LALStatus *stat,
REAL8Vector *vector,
REAL8IIRFilter *filter );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{IIRFilterTestC} \newpage\input{IIRFilterTestC}
</lalLaTeX> */ </lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _IIRFILTER_H */ #endif /* _IIRFILTER_H */
 End of changes. 23 change blocks. 
124 lines changed or deleted 92 lines changed or added


 Integrate.h   Integrate.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: Integrate.h <lalVerbatim file="IntegrateHV">
* $Id: Integrate.h,v 1.6 2001/02/22 00:27:08 jolien Exp $
* Revision: $Id: Integrate.h,v 1.4 2000/07/23 01:15:53 jolien Exp $ </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
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (INTEGRATEH, "$Id: Integrate.h,v 1.4 2000/07/23 01:15:53 jolien Exp NRCSID (INTEGRATEH, "$Id: Integrate.h,v 1.6 2001/02/22 00:27:08 jolien Exp
$"); $");
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{IntegrateHErrTab}
</lalLaTeX>
<lalErrTable file="IntegrateHErrTab">
#endif /* autodoc block */
#define INTEGRATEH_ENULL 1
#define INTEGRATEH_ETYPE 2
#define INTEGRATEH_EIDOM 4
#define INTEGRATEH_EMXIT 8
#define INTEGRATEH_MSGENULL "Null pointer"
#define INTEGRATEH_MSGETYPE "Unknown integral type"
#define INTEGRATEH_MSGEIDOM "Invalid domain"
#define INTEGRATEH_MSGEMXIT "Maximum iterations exceeded"
#define INTEGRATE_ENULL 1 #if 0 /* autodoc block */
#define INTEGRATE_ETYPE 2
#define INTEGRATE_EIDOM 4 </lalErrTable>
#define INTEGRATE_EMXIT 8
<lalLaTeX>
#define INTEGRATE_MSGENULL "Null pointer"
#define INTEGRATE_MSGETYPE "Unknown integral type" \subsection*{Structures}
#define INTEGRATE_MSGEIDOM "Invalid domain"
#define INTEGRATE_MSGEMXIT "Maximum iterations exceeded" \begin{verbatim}
typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p);
typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p);
\end{verbatim}
These are function pointers to functions that map real numbers to real numb
ers.
\begin{verbatim}
typedef enum
{
ClosedInterval,
OpenInterval,
SingularLowerLimit,
SingularUpperLimit,
InfiniteDomainPow,
InfiniteDomainExp
}
IntegralType;
typedef struct
tagSIntegrateIn
{
REAL4LALFunction *function;
REAL4 xmax;
REAL4 xmin;
IntegralType type;
}
SIntegrateIn;
typedef struct
tagDIntegrateIn
{
REAL8LALFunction *function;
REAL8 xmax;
REAL8 xmin;
IntegralType type;
}
DIntegrateIn;
\end{verbatim}
These are input structures to the integration routines. The fields are:
\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
\begin{tabular}{|l|l|}
\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+
indicates that the integral should be computed on equal-spaced domain
intervals including the boundary. II.\@ \verb+OpenInterval+ indicates th
at
the integral should be computed on intervals of the domain not including
the
boundary. III.\@ \verb+SingularLowerLimit+ indicates that the integral
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
.\@
\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>
#endif /* autodoc block */
typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p); typedef void (REAL4LALFunction) (LALStatus *s, REAL4 *y, REAL4 x, void *p);
typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p); typedef void (REAL8LALFunction) (LALStatus *s, REAL8 *y, REAL8 x, void *p);
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 */
skipping to change at line 65 skipping to change at line 183
typedef struct typedef struct
tagDIntegrateIn tagDIntegrateIn
{ {
REAL8LALFunction *function; REAL8LALFunction *function;
REAL8 xmax; REAL8 xmax;
REAL8 xmin; REAL8 xmin;
IntegralType type; IntegralType type;
} }
DIntegrateIn; DIntegrateIn;
#if 0 /* autodoc block */
<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
); );
void void
LALDRombergIntegrate ( LALDRombergIntegrate (
LALStatus *status, LALStatus *status,
REAL8 *result, REAL8 *result,
DIntegrateIn *input, DIntegrateIn *input,
void *params void *params
); );
#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. 6 change blocks. 
20 lines changed or deleted 166 lines changed or added


 Interpolate.h   Interpolate.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: Interpolate.h <lalVerbatim file="InterpolateHV">
* $Id: Interpolate.h,v 1.6 2001/02/22 00:27:08 jolien Exp $
* Revision: $Id: Interpolate.h,v 1.4 2000/07/23 01:15:53 jolien Exp $ </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
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (INTERPOLATEH, "$Id: Interpolate.h"); NRCSID (INTERPOLATEH, "$Id: Interpolate.h");
#define INTERPOLATE_ENULL 1 #if 0 /* autodoc block */
#define INTERPOLATE_ESIZE 2
#define INTERPOLATE_EZERO 4 <lalLaTeX>
\subsection*{Error conditions}
#define INTERPOLATE_MSGENULL "Null pointer" \input{InterpolateHErrTab}
#define INTERPOLATE_MSGESIZE "Invalid size" </lalLaTeX>
#define INTERPOLATE_MSGEZERO "Zero divide"
<lalErrTable file="InterpolateHErrTab">
#endif /* autodoc block */
#define INTERPOLATEH_ENULL 1
#define INTERPOLATEH_ESIZE 2
#define INTERPOLATEH_EZERO 4
#define INTERPOLATEH_MSGENULL "Null pointer"
#define INTERPOLATEH_MSGESIZE "Invalid size"
#define INTERPOLATEH_MSGEZERO "Zero divide"
#if 0 /* autodoc block */
</lalErrTable>
<lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
typedef struct typedef struct
tagSInterpolateOut tagSInterpolateOut
{ {
REAL4 y; REAL4 y;
REAL4 dy; REAL4 dy;
} }
SInterpolateOut; SInterpolateOut;
typedef struct typedef struct
tagDInterpolateOut tagDInterpolateOut
{ {
REAL8 y; REAL8 y;
REAL8 dy; REAL8 dy;
} }
DInterpolateOut; DInterpolateOut;
\end{verbatim}
These structures contain the output of the interpolation. The two fields a
re:
\begin{description}
\item[\texttt{y}] The interpolated value.
\item[\texttt{dy}] The estimated error in the interpolated value.
\end{description}
\begin{verbatim}
typedef struct typedef struct
tagSInterpolatePar tagSInterpolatePar
{ {
UINT4 n; UINT4 n;
REAL4 *x; REAL4 *x;
REAL4 *y; REAL4 *y;
} }
SInterpolatePar; SInterpolatePar;
typedef struct typedef struct
tagDInterpolatePar tagDInterpolatePar
{ {
UINT4 n; UINT4 n;
REAL8 *x; REAL8 *x;
REAL8 *y; REAL8 *y;
} }
DInterpolatePar; DInterpolatePar;
\end{verbatim}
These structures contain the interpolation parameters. These are the array
s
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 */
typedef struct
tagSInterpolateOut
{
REAL4 y;
REAL4 dy;
}
SInterpolateOut;
typedef struct
tagDInterpolateOut
{
REAL8 y;
REAL8 dy;
}
DInterpolateOut;
typedef struct
tagSInterpolatePar
{
UINT4 n;
REAL4 *x;
REAL4 *y;
}
SInterpolatePar;
typedef struct
tagDInterpolatePar
{
UINT4 n;
REAL8 *x;
REAL8 *y;
}
DInterpolatePar;
#if 0 /* autodoc block */
<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
); );
void void
LALDPolynomialInterpolation ( LALDPolynomialInterpolation (
LALStatus *status, LALStatus *status,
DInterpolateOut *output, DInterpolateOut *output,
REAL8 target, REAL8 target,
DInterpolatePar *params DInterpolatePar *params
); );
#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. 8 change blocks. 
16 lines changed or deleted 126 lines changed or added


 LALAtomicDatatypes.h   LALAtomicDatatypes.h 
/*************************** <lalVerbatim file="LALAtomicDatatypesHV"> /*************************** <lalVerbatim file="LALAtomicDatatypesHV">
Author: Finn, L. S. Author: J. D. E. Creighton, T. D. Creighton
$Id: LALAtomicDatatypes.h,v 1.3 2000/06/29 22:42:06 jolien Exp $ $Id: LALAtomicDatatypes.h,v 1.5 2001/12/01 22:09:43 jolien Exp $
**************************** </lalVerbatim> */ **************************** </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\subsection{Primitive datatypes} \subsection{Primitive datatypes}
\label{ss:LALAtomicDatatypes.h} \label{ss:LALAtomicDatatypes.h}
The primitive datatypes are defined in a separate header The primitive datatypes are defined in a separate header
\verb@LALAtomicDatatypes.h@, which is included by \verb@LALAtomicDatatypes.h@, which is included by
\verb@LALDatatypes.h@. This is done in order to facilitate the \verb@LALDatatypes.h@. This is done in order to facilitate the
skipping to change at line 99 skipping to change at line 99
used to represent the binary number in decimal notation: the first is used to represent the binary number in decimal notation: the first is
the maximum number of digits that are guaranteed not to change upon the maximum number of digits that are guaranteed not to change upon
conversion to binary, the second is the number of digits required to conversion to binary, the second is the number of digits required to
represent a unique binary quantity. represent a unique binary quantity.
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALATOMICDATATYPES_H #ifndef _LALATOMICDATATYPES_H
#define _LALATOMICDATATYPES_H #define _LALATOMICDATATYPES_H
#ifdef LDAS_BUILD
#include "LDASConfig.h"
#else
#include "LALConfig.h"
#include "LALRCSID.h"
NRCSID( LALATOMICDATATYPESH, "$Id: LALAtomicDatatypes.h,v 1.3 2000/06/29 22
:42:06 jolien Exp $" );
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef char CHAR; typedef char CHAR;
typedef unsigned char UCHAR; typedef unsigned char UCHAR;
typedef unsigned char BOOLEAN; typedef unsigned char BOOLEAN;
#ifdef LDAS_BUILD
#include <lal/LDASConfig.h>
/* Integer types */ /* Integer types */
#if SIZEOF_SHORT == 2 #if SIZEOF_SHORT == 2
typedef short INT2; typedef short INT2;
typedef unsigned short UINT2; typedef unsigned short UINT2;
#elif SIZEOF_INT == 2 #elif SIZEOF_INT == 2
typedef int INT2; typedef int INT2;
typedef unsigned int UINT2; typedef unsigned int UINT2;
#else #else
# error "ERROR: NO 2 BYTE INTEGER FOUND" # error "ERROR: NO 2 BYTE INTEGER FOUND"
skipping to change at line 161 skipping to change at line 157
#else #else
# error "ERROR: NO 4 BYTE REAL FOUND" # error "ERROR: NO 4 BYTE REAL FOUND"
#endif #endif
#if SIZEOF_DOUBLE == 8 #if SIZEOF_DOUBLE == 8
typedef double REAL8; typedef double REAL8;
#else #else
# error "ERROR: NO 8 BYTE REAL FOUND" # error "ERROR: NO 8 BYTE REAL FOUND"
#endif #endif
#else /* ! LDAS_BUILD */
#include <lal/LALConfig.h>
#include <lal/LALRCSID.h>
NRCSID( LALATOMICDATATYPESH, "$Id: LALAtomicDatatypes.h,v 1.5 2001/12/01 22
:09:43 jolien Exp $" );
/* Integer types */
#if LAL_SIZEOF_SHORT == 2
typedef short INT2;
typedef unsigned short UINT2;
#elif LAL_SIZEOF_INT == 2
typedef int INT2;
typedef unsigned int UINT2;
#else
# error "ERROR: NO 2 BYTE INTEGER FOUND"
#endif
#if LAL_SIZEOF_INT == 4
typedef int INT4;
typedef unsigned int UINT4;
#elif LAL_SIZEOF_LONG == 4
typedef long INT4;
typedef unsigned long UINT4;
#else
# error "ERROR: NO 4 BYTE INTEGER FOUND"
#endif
#if LAL_SIZEOF_LONG == 8
typedef long INT8;
typedef unsigned long UINT8;
#elif LAL_SIZEOF_LONG_LONG == 8
typedef long long INT8;
typedef unsigned long long UINT8;
#else
# error "ERROR: NO 8 BYTE INTEGER FOUND"
#endif
/* Real types */
#if LAL_SIZEOF_FLOAT == 4
typedef float REAL4;
#else
# error "ERROR: NO 4 BYTE REAL FOUND"
#endif
#if LAL_SIZEOF_DOUBLE == 8
typedef double REAL8;
#else
# error "ERROR: NO 8 BYTE REAL FOUND"
#endif
#endif /* LDAS_BUILD */
/* <lalLaTeX> /* <lalLaTeX>
\subsubsection*{Complex datatypes} \subsubsection*{Complex datatypes}
LAL represents complex numbers as structures with two floating-point LAL represents complex numbers as structures with two floating-point
fields, storing the real and imaginary parts. These are considered fields, storing the real and imaginary parts. These are considered
primitive datatypes (rather than aggregate or structured datatypes) primitive datatypes (rather than aggregate or structured datatypes)
because they conceptually represent a single number. Furthermore, because they conceptually represent a single number. Furthermore,
atomic and complex datatypes are treated equivalently by LAL aggregate atomic and complex datatypes are treated equivalently by LAL aggregate
and structured datatypes. and structured datatypes.
 End of changes. 4 change blocks. 
11 lines changed or deleted 61 lines changed or added


 LALConfig.h   LALConfig.h 
/* include/lal/LALConfig.h. Generated automatically by configure. */
/* only include this file if LAL's config.h has not been included */
#ifndef CONFIG_H__LAL
#ifndef _LALCONFIG_H #ifndef _LALCONFIG_H
#define _LALCONFIG_H #define _LALCONFIG_H
#include "LALConfigure.h"
/* LAL Version */
#define LAL_VERSION "0.10"
/* LAL Version Major Number */
#define LAL_VERSION_MAJOR 0
/* LAL Version Minor Number */
#define LAL_VERSION_MINOR 10
/* LAL Configure Arguments */
#define LAL_CONFIGURE_ARGS " --enable-shared --prefix=/home/ut/testing/lal/
0.10 --exec-prefix=/home/ut/testing/lal/0.10 --sysconfdir=/home/ut/testing/
lal/0.10 --datadir=/home/ut/testing/lal/0.10/share"
/* LAL Configure Date */
#define LAL_CONFIGURE_DATE "2013/11/20 00:35:34 UTC"
/* The number of bytes in a double. */
#define LAL_SIZEOF_DOUBLE 8
/* The number of bytes in a float. */
#define LAL_SIZEOF_FLOAT 4
/* The number of bytes in a int. */
#define LAL_SIZEOF_INT 4
/* The number of bytes in a long. */
#define LAL_SIZEOF_LONG 4
/* The number of bytes in a long long. */
#define LAL_SIZEOF_LONG_LONG 8
/* The number of bytes in a short. */
#define LAL_SIZEOF_SHORT 2
/* Suppress debugging code */
/* #undef LAL_NDEBUG */
/* Use functions rather than macros */
/* #undef NOLALMACROS */
/* Use pthread mutex lock for threadsafety */
/* #undef LAL_PTHREAD_LOCK */
/* Define if using Frame library */
/* #undef LAL_FRAME_ENABLED */
/* Define if using MPI */
/* #undef LAL_MPI_ENABLED */
#endif /* _LALCONFIG_H */ #endif /* _LALCONFIG_H */
#endif /* CONFIG_H__LAL */
 End of changes. 3 change blocks. 
1 lines changed or deleted 55 lines changed or added


 LALConstants.h   LALConstants.h 
/********************************* <lalVerbatim file="LALConstantsHV"> /********************************* <lalVerbatim file="LALConstantsHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: LALConstants.h,v 1.4 2000/06/03 21:38:59 jolien Exp $ $Id: LALConstants.h,v 1.9 2001/08/21 04:19:52 jolien Exp $
********************************** </lalVerbatim> */ ********************************** </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALConstants.h}} \section{Header \texttt{LALConstants.h}}
\label{s:LALConstants.h} \label{s:LALConstants.h}
Provides standard numerical constants for LAL. Provides standard numerical constants for LAL.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALConstants.h" #include <lal/LALConstants.h>
\end{verbatim} \end{verbatim}
\noindent This header defines a number of useful numerical constants \noindent 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, unlike the other headers in the \verb@std@ package, this Note that, unlike the other headers in the \verb@std@ package, this
header is \emph{not} included automatically by the header header is \emph{not} included automatically by the header
\verb@LALStdlib.h@. Include it explicitly if you need any of these \verb@LALStdlib.h@. Include it explicitly if you need any of these
constants. constants.
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALCONSTANTS_H #ifndef _LALCONSTANTS_H
#define _LALCONSTANTS_H #define _LALCONSTANTS_H
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALCONSTANTSH, "$Id: LALConstants.h,v 1.4 2000/06/03 21:38:59 jolie n Exp $"); NRCSID (LALCONSTANTSH, "$Id: LALConstants.h,v 1.9 2001/08/21 04:19:52 jolie n Exp $");
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Mathematical constants} \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 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.
\begin{center} \begin{center}
\begin{tabular}{|lll|} \begin{tabular}{|lll|}
\hline \hline
Name & Value & Description \\ Name & Value & Description \\
\hline \hline
skipping to change at line 122 skipping to change at line 147
\tt LAL\_SQRT2 & 1.4142135623730950488016887242096981 & $\sqrt{2}$ \\ \tt LAL\_SQRT2 & 1.4142135623730950488016887242096981 & $\sqrt{2}$ \\
\tt LAL\_SQRT1\_2 & 0.7071067811865475244008443621048490 & $1/\sqrt{2}$ \\ \tt LAL\_SQRT1\_2 & 0.7071067811865475244008443621048490 & $1/\sqrt{2}$ \\
\tt LAL\_GAMMA & 0.5772156649015328606065120900824024 & $\gamma$ \\ \tt LAL\_GAMMA & 0.5772156649015328606065120900824024 & $\gamma$ \\
\tt LAL\_PI & 3.1415926535897932384626433832795029 & $\pi$ \\ \tt LAL\_PI & 3.1415926535897932384626433832795029 & $\pi$ \\
\tt LAL\_TWOPI & 6.2831853071795864769252867665590058 & $2\pi$ \\ \tt LAL\_TWOPI & 6.2831853071795864769252867665590058 & $2\pi$ \\
\tt LAL\_PI\_2 & 1.5707963267948966192313216916397514 & $\pi/2$ \\ \tt LAL\_PI\_2 & 1.5707963267948966192313216916397514 & $\pi/2$ \\
\tt LAL\_PI\_4 & 0.7853981633974483096156608458198757 & $\pi/4$ \\ \tt LAL\_PI\_4 & 0.7853981633974483096156608458198757 & $\pi/4$ \\
\tt LAL\_1\_PI & 0.3183098861837906715377675267450287 & $1/\pi$ \\ \tt LAL\_1\_PI & 0.3183098861837906715377675267450287 & $1/\pi$ \\
\tt LAL\_2\_PI & 0.6366197723675813430755350534900574 & $2/\pi$ \\ \tt LAL\_2\_PI & 0.6366197723675813430755350534900574 & $2/\pi$ \\
\tt LAL\_2\_SQRTPI & 1.1283791670955125738961589031215452 & $2/\sqrt{\pi}$ \\ \tt LAL\_2\_SQRTPI & 1.1283791670955125738961589031215452 & $2/\sqrt{\pi}$ \\
\tt LAL\_PI\_180 & 1.7453292519943295769236907684886127$\times10^{-2}$ &
$\pi/180$ \\
\tt LAL\_180\_PI & 57.295779513082320876798154814105170 & $180/\pi$ \\
\hline \hline
\end{tabular} \end{tabular}
\end{center} \end{center}
</lalLaTeX> */ </lalLaTeX> */
#define LAL_E 2.7182818284590452353602874713526625L /* e */ #define LAL_E 2.7182818284590452353602874713526625L /* e */
#define LAL_LOG2E 1.4426950408889634073599246810018922L /* log_2 e */ #define LAL_LOG2E 1.4426950408889634073599246810018922L /* log_2 e */
#define LAL_LOG10E 0.4342944819032518276511289189166051L /* log_10 e */ #define LAL_LOG10E 0.4342944819032518276511289189166051L /* log_10 e */
#define LAL_LN2 0.6931471805599453094172321214581766L /* log_e 2 */ #define LAL_LN2 0.6931471805599453094172321214581766L /* log_e 2 */
skipping to change at line 144 skipping to change at line 172
#define LAL_SQRT1_2 0.7071067811865475244008443621048490L /* 1/sqrt(2) * / #define LAL_SQRT1_2 0.7071067811865475244008443621048490L /* 1/sqrt(2) * /
#define LAL_GAMMA 0.5772156649015328606065120900824024L /* gamma */ #define LAL_GAMMA 0.5772156649015328606065120900824024L /* gamma */
/* Assuming we're not near a black hole or in Tennessee... */ /* Assuming we're not near a black hole or in Tennessee... */
#define LAL_PI 3.1415926535897932384626433832795029L /* pi */ #define LAL_PI 3.1415926535897932384626433832795029L /* pi */
#define LAL_TWOPI 6.2831853071795864769252867665590058L /* 2*pi */ #define LAL_TWOPI 6.2831853071795864769252867665590058L /* 2*pi */
#define LAL_PI_2 1.5707963267948966192313216916397514L /* pi/2 */ #define LAL_PI_2 1.5707963267948966192313216916397514L /* pi/2 */
#define LAL_PI_4 0.7853981633974483096156608458198757L /* pi/4 */ #define LAL_PI_4 0.7853981633974483096156608458198757L /* pi/4 */
#define LAL_1_PI 0.3183098861837906715377675267450287L /* 1/pi */ #define LAL_1_PI 0.3183098861837906715377675267450287L /* 1/pi */
#define LAL_2_PI 0.6366197723675813430755350534900574L /* 2/pi */ #define LAL_2_PI 0.6366197723675813430755350534900574L /* 2/pi */
#define LAL_2_SQRTPI 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */ #define LAL_2_SQRTPI 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */
#define LAL_PI_180 1.7453292519943295769236907684886127e-2L /* pi/180 */
#define LAL_180_PI 57.295779513082320876798154814105170L /* 180/pi */
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Physical constants} \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\_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 following physical constants are defined to have exact values.
The values of $c$ and $g$ are taken from~\cite{Barnet:1996}, The values of $c$ and $g$ are taken from~\cite{Barnet:1996},
$p_\mathrm{atm}$ is from~\cite{Lang:1992}, while $\epsilon_0$ and $p_\mathrm{atm}$ is from~\cite{Lang:1992}, while $\epsilon_0$ and
$\mu_0$ are computed from $c$ using exact formulae. They are given in $\mu_0$ are computed from $c$ using exact formulae. They are given in
the SI units shown. the SI units shown.
\begin{center} \begin{center}
\begin{tabular}{|lll|} \begin{tabular}{|lll|}
\hline \hline
skipping to change at line 262 skipping to change at line 318
#define LAL_ALPHA 7.297354677e-3 /* Fine structure constant, dimensionless */ #define LAL_ALPHA 7.297354677e-3 /* Fine structure constant, dimensionless */
#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> /* <lalLaTeX>
\subsection*{Astrophysical parameters} \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\_LYR\_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 The following parameters are derived from measured properties of the
Earth and Sun. The values are taken from~\cite{Barnet:1996}, except Earth and Sun. The values are taken from~\cite{Barnet:1996}, except
for the obliquity of the ecliptic plane and the eccentricity of for the obliquity of the ecliptic plane and the eccentricity of
Earth's orbit, which are taken from~\cite{Lang:1992}. All values are Earth's orbit, which are taken from~\cite{Lang:1992}. All values are
given in the SI units shown. given in the SI units shown.
\begin{center} \begin{center}
\begin{tabular}{|lll|} \begin{tabular}{|lll|}
\hline \hline
Name & Value & Description \\ Name & Value & Description \\
\hline \hline
\tt LAL\_REARTH\_SI & $6.378140\times10^6\,\mathrm{m}$ & \tt LAL\_REARTH\_SI & $6.378140\times10^6\,\mathrm{m}$ &
Earth equatorial radius \\ 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\_MEARTH\_SI & $5.97370\times10^{24}\,\mathrm{kg}$ & Earth mass \\
\tt LAL\_IEARTH & $0.409092804\,\mathrm{rad}$ & \tt LAL\_IEARTH & $0.409092804\,\mathrm{rad}$ &
Obliquity of the ecliptic (2000) \\ Obliquity of the ecliptic (2000) \\
\tt LAL\_EEARTH & 0.0167 & Earth orbital eccentricity \\ \tt LAL\_EEARTH & 0.0167 & Earth orbital eccentricity \\
\tt LAL\_RSUN\_SI & $6.960\times10^8\,\mathrm{m}$ & Solar equatorial radi us\\ \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\_MSUN\_SI & $1.98892\times10^{30}\,\mathrm{kg}$ & Solar mass \\
\tt LAL\_MRSUN\_SI & $1.47662504\times10^3\,\mathrm{m}$ & \tt LAL\_MRSUN\_SI & $1.47662504\times10^3\,\mathrm{m}$ &
Geometrized solar mass (length) \\ Geometrized solar mass (length) \\
\tt LAL\_MTSUN\_SI & $4.92549095\times10^{-6}\,\mathrm{s}$ & \tt LAL\_MTSUN\_SI & $4.92549095\times10^{-6}\,\mathrm{s}$ &
Geometrized solar mass (time) \\ Geometrized solar mass (time) \\
skipping to change at line 302 skipping to change at line 388
\tt LAL\_DAYSID\_SI & $86\,164.09053\,\mathrm{s}$ & Mean sidereal day \\ \tt LAL\_DAYSID\_SI & $86\,164.09053\,\mathrm{s}$ & Mean sidereal day \\
\tt LAL\_LYR\_SI & $9.46052817\times10^{15}\,\mathrm{m}$ & \tt LAL\_LYR\_SI & $9.46052817\times10^{15}\,\mathrm{m}$ &
$c\times$tropical year (1994) \\ $c\times$tropical year (1994) \\
\hline \hline
\end{tabular} \end{tabular}
\end{center} \end{center}
</lalLaTeX> */ </lalLaTeX> */
#define LAL_REARTH_SI 6.378140e6 /* Earth equatorial radius, m */ #define LAL_REARTH_SI 6.378140e6 /* Earth equatorial radius, m */
#define LAL_AWGS84_SI 6.378137e6 /* Semimajor axis of WGS-84 Reference
Ellipsoid, m */
#define LAL_BWGS84_SI 6.356752314e6 /* Semiminor axis of WGS-84 Reference
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), radians */ #define LAL_IEARTH 0.409092804 /* Earth inclination (2000), radians */
#define LAL_EEARTH 0.0167 /* Earth orbital eccentricity */ #define LAL_EEARTH 0.0167 /* Earth orbital eccentricity */
#define LAL_RSUN_SI 6.960e8 /* Solar equatorial radius, m */ #define LAL_RSUN_SI 6.960e8 /* Solar equatorial radius, m */
#define LAL_MSUN_SI 1.98892e30 /* Solar mass, kg */ #define LAL_MSUN_SI 1.98892e30 /* Solar mass, kg */
#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 */
 End of changes. 11 change blocks. 
4 lines changed or deleted 94 lines changed or added


 LALDatatypes.h   LALDatatypes.h 
/********************************* <lalVerbatim file="LALDatatypesHV"> /********************************* <lalVerbatim file="LALDatatypesHV">
Author: Finn, L. S. Author: J. D. E. Creighton, T. D. Creighton
$Id: LALDatatypes.h,v 1.8 2000/07/23 01:14:34 jolien Exp $ $Id: LALDatatypes.h,v 1.11 2001/12/01 22:09:43 jolien Exp $
********************************** </lalVerbatim> */ ********************************** </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALDatatypes.h}} \section{Header \texttt{LALDatatypes.h}}
\label{s:LALDatatypes.h} \label{s:LALDatatypes.h}
Provides the basic LAL datatypes. Provides the basic LAL datatypes.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
\end{verbatim} \end{verbatim}
\noindent This header defines the standard data types and data \noindent This header defines the standard data types and data
structures that are used throughout LAL. They fall into three general structures that are used throughout LAL. They fall into three general
categories: \emph{primitive} datatypes, \emph{aggregates} of primitive categories: \emph{primitive} datatypes, \emph{aggregates} of primitive
datatypes, and \emph{structured} datatypes. The LAL status structure datatypes, and \emph{structured} datatypes. The LAL status structure
is a special case of a structured datatype that is used in every is a special case of a structured datatype that is used in every
standard LAL function. standard LAL function.
This header file is automatically included by the header This header file is automatically included by the header
skipping to change at line 38 skipping to change at line 38
following section. following section.
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALDATATYPES_H #ifndef _LALDATATYPES_H
#define _LALDATATYPES_H #define _LALDATATYPES_H
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{LALAtomicDatatypesH} \newpage\input{LALAtomicDatatypesH}
</lalLaTeX> */ </lalLaTeX> */
#include "LALAtomicDatatypes.h" #include <lal/LALAtomicDatatypes.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.8 2000/07/23 01:14:34 jolie n Exp $"); NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.11 2001/12/01 22:09:43 joli en Exp $");
/* <lalLaTeX> /* <lalLaTeX>
\newpage \newpage
\subsection{Aggregate datatypes} \subsection{Aggregate datatypes}
\label{ss:aggregate-datatypes} \label{ss:aggregate-datatypes}
These datatypes store arbitrarily large sets or collections of These datatypes store arbitrarily large sets or collections of
primitive datatypes. At this level there is no physical primitive datatypes. At this level there is no physical
interpretation assigned to the objects (such as names or units); the interpretation assigned to the objects (such as names or units); the
aggregate datatypes simply collect and arrange the primitive aggregate datatypes simply collect and arrange the primitive
skipping to change at line 603 skipping to change at line 603
{ {
INT4 gpsSeconds; INT4 gpsSeconds;
INT4 gpsNanoSeconds; INT4 gpsNanoSeconds;
} }
LIGOTimeGPS; LIGOTimeGPS;
/* <lalLaTeX> /* <lalLaTeX>
\vspace{2ex} \vspace{2ex}
\begin{verbatim} \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> */
enum
{
LALUnitIndexMeter,
LALUnitIndexKiloGram,
LALUnitIndexSecond,
LALUnitIndexAmpere,
LALUnitIndexKelvin,
LALUnitIndexStrain,
LALUnitIndexADCCount,
LALNumUnits
};
typedef struct
tagLALUnit
{
INT2 powerOfTen;
INT2 unitNumerator[LALNumUnits];
UINT2 unitDenominatorMinusOne[LALNumUnits];
}
LALUnit;
/* <lalLaTeX>
\vspace{2ex}
\begin{verbatim}
<datatype>TimeSeries <datatype>TimeSeries
\end{verbatim} \end{verbatim}
This structure represents a sequence of data of type \verb@<datatype>@ This structure represents a sequence of data of type \verb@<datatype>@
(where \verb@<datatype>@ can be any primitive datatype), sampled over (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$. 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 Essentially this is a \verb@<datatype>Sequence@ with extra fields
defining the sample times and the type of data being sampled. The raw 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 data may also have been \emph{heterodyned}; that is, multiplied by a
sinusoid of some frequency $f_0$, low-pass filtered, and resampled, in 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 order to extract the behaviour in a small bandwidth about $f_0$. The
fields are: fields are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] The name of the data series (i.e.\ the type \item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
of data being sampled). the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time $t_0$ of the data \item[\texttt{LIGOTimeGPS epoch}] The start time $t_0$ of the data
series. series.
\item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$, in \item[\texttt{REAL8 deltaT}] The sampling interval $\Delta t$, in
seconds. seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency $f_0$, in hertz. \item[\texttt{REAL8 f0}] The heterodyning frequency $f_0$, in hertz.
\item[\texttt{CHARVector *sampleUnits}] The physical units of the \item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled. quantity being sampled.
\item[\texttt{<datatype>Sequence *data}] The sequence of sampled data. \item[\texttt{<datatype>Sequence *data}] The sequence of sampled data.
\end{description} \end{description}
</lalLaTeX> */ </lalLaTeX> */
enum { LALNameLength = 64 };
typedef struct typedef struct
tagINT2TimeSeries tagINT2TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT2Sequence *data; INT2Sequence *data;
} }
INT2TimeSeries; INT2TimeSeries;
typedef struct typedef struct
tagUINT2TimeSeries tagUINT2TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT2Sequence *data; UINT2Sequence *data;
} }
UINT2TimeSeries; UINT2TimeSeries;
typedef struct typedef struct
tagINT4TimeSeries tagINT4TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT4Sequence *data; INT4Sequence *data;
} }
INT4TimeSeries; INT4TimeSeries;
typedef struct typedef struct
tagUINT4TimeSeries tagUINT4TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT4Sequence *data; UINT4Sequence *data;
} }
UINT4TimeSeries; UINT4TimeSeries;
typedef struct typedef struct
tagINT8TimeSeries tagINT8TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT8Sequence *data; INT8Sequence *data;
} }
INT8TimeSeries; INT8TimeSeries;
typedef struct typedef struct
tagUINT8TimeSeries tagUINT8TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT8Sequence *data; UINT8Sequence *data;
} }
UINT8TimeSeries; UINT8TimeSeries;
typedef struct typedef struct
tagREAL4TimeSeries tagREAL4TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL4Sequence *data; REAL4Sequence *data;
} }
REAL4TimeSeries; REAL4TimeSeries;
typedef struct typedef struct
tagREAL8TimeSeries tagREAL8TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL8Sequence *data; REAL8Sequence *data;
} }
REAL8TimeSeries; REAL8TimeSeries;
typedef struct typedef struct
tagCOMPLEX8TimeSeries tagCOMPLEX8TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX8Sequence *data; COMPLEX8Sequence *data;
} }
COMPLEX8TimeSeries; COMPLEX8TimeSeries;
typedef struct typedef struct
tagCOMPLEX16TimeSeries tagCOMPLEX16TimeSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX16Sequence *data; COMPLEX16Sequence *data;
} }
COMPLEX16TimeSeries; COMPLEX16TimeSeries;
/* <lalLaTeX> /* <lalLaTeX>
\vspace{2ex} \vspace{2ex}
\begin{verbatim} \begin{verbatim}
<datatype>TimeVectorSeries <datatype>TimeVectorSeries
\end{verbatim} \end{verbatim}
Like \verb@<datatype>TimeSeries@, above, except that the sampled data Like \verb@<datatype>TimeSeries@, above, except that the sampled data
are of type type \verb@<datatype>Vector@ (where \verb@<datatype>@ can are of type type \verb@<datatype>Vector@ (where \verb@<datatype>@ can
be any primitive datatype). The fields are: be any primitive datatype). The fields are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] The name of the data series (i.e.\ the type \item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
of data being sampled). the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the data series. \item[\texttt{LIGOTimeGPS epoch}] The start time of the data series.
\item[\texttt{REAL8 deltaT}] The sampling interval, in seconds. \item[\texttt{REAL8 deltaT}] The sampling interval, in seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz. \item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz.
\item[\texttt{CHARVector *sampleUnits}] The physical units of the \item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled. quantity being sampled.
\item[\texttt{<datatype>VectorSequence *data}] The sequence of sampled \item[\texttt{<datatype>VectorSequence *data}] The sequence of sampled
data. data.
\end{description} \end{description}
</lalLaTeX> */ </lalLaTeX> */
typedef struct typedef struct
tagINT2TimeVectorSeries tagINT2TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT2VectorSequence *data; INT2VectorSequence *data;
} }
INT2TimeVectorSeries; INT2TimeVectorSeries;
typedef struct typedef struct
tagUINT2TimeVectorSeries tagUINT2TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT2VectorSequence *data; UINT2VectorSequence *data;
} }
UINT2TimeVectorSeries; UINT2TimeVectorSeries;
typedef struct typedef struct
tagINT4TimeVectorSeries tagINT4TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT4VectorSequence *data; INT4VectorSequence *data;
} }
INT4TimeVectorSeries; INT4TimeVectorSeries;
typedef struct typedef struct
tagUINT4TimeVectorSeries tagUINT4TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT4VectorSequence *data; UINT4VectorSequence *data;
} }
UINT4TimeVectorSeries; UINT4TimeVectorSeries;
typedef struct typedef struct
tagINT8TimeVectorSeries tagINT8TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT8VectorSequence *data; INT8VectorSequence *data;
} }
INT8TimeVectorSeries; INT8TimeVectorSeries;
typedef struct typedef struct
tagUINT8TimeVectorSeries tagUINT8TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT8VectorSequence *data; UINT8VectorSequence *data;
} }
UINT8TimeVectorSeries; UINT8TimeVectorSeries;
typedef struct typedef struct
tagREAL4TimeVectorSeries tagREAL4TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL4VectorSequence *data; REAL4VectorSequence *data;
} }
REAL4TimeVectorSeries; REAL4TimeVectorSeries;
typedef struct typedef struct
tagREAL8TimeVectorSeries tagREAL8TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL8VectorSequence *data; REAL8VectorSequence *data;
} }
REAL8TimeVectorSeries; REAL8TimeVectorSeries;
typedef struct typedef struct
tagCOMPLEX8TimeVectorSeries tagCOMPLEX8TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX8VectorSequence *data; COMPLEX8VectorSequence *data;
} }
COMPLEX8TimeVectorSeries; COMPLEX8TimeVectorSeries;
typedef struct typedef struct
tagCOMPLEX16TimeVectorSeries tagCOMPLEX16TimeVectorSeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX16VectorSequence *data; COMPLEX16VectorSequence *data;
} }
COMPLEX16TimeVectorSeries; COMPLEX16TimeVectorSeries;
/* <lalLaTeX> /* <lalLaTeX>
\vspace{2ex} \vspace{2ex}
\begin{verbatim} \begin{verbatim}
<datatype>TimeArraySeries <datatype>TimeArraySeries
\end{verbatim} \end{verbatim}
Like \verb@<datatype>TimeSeries@, above, except that the sampled data Like \verb@<datatype>TimeSeries@, above, except that the sampled data
are of type type \verb@<datatype>Array@ (where \verb@<datatype>@ can are of type type \verb@<datatype>Array@ (where \verb@<datatype>@ can
be any primitive datatype). The fields are: be any primitive datatype). The fields are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] The name of the data series (i.e.\ the type \item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
of data being sampled). the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the data series. \item[\texttt{LIGOTimeGPS epoch}] The start time of the data series.
\item[\texttt{REAL8 deltaT}] The sampling interval, in seconds. \item[\texttt{REAL8 deltaT}] The sampling interval, in seconds.
\item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz. \item[\texttt{REAL8 f0}] The heterodyning frequency, in hertz.
\item[\texttt{CHARVector *sampleUnits}] The physical units of the \item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled. quantity being sampled.
\item[\texttt{<datatype>ArraySequence *data}] The sequence of sampled \item[\texttt{<datatype>ArraySequence *data}] The sequence of sampled
data. data.
\end{description} \end{description}
</lalLaTeX> */ </lalLaTeX> */
typedef struct typedef struct
tagINT2TimeArraySeries tagINT2TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT2ArraySequence *data; INT2ArraySequence *data;
} }
INT2TimeArraySeries; INT2TimeArraySeries;
typedef struct typedef struct
tagUINT2TimeArraySeries tagUINT2TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT2ArraySequence *data; UINT2ArraySequence *data;
} }
UINT2TimeArraySeries; UINT2TimeArraySeries;
typedef struct typedef struct
tagINT4TimeArraySeries tagINT4TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT4ArraySequence *data; INT4ArraySequence *data;
} }
INT4TimeArraySeries; INT4TimeArraySeries;
typedef struct typedef struct
tagUINT4TimeArraySeries tagUINT4TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT4ArraySequence *data; UINT4ArraySequence *data;
} }
UINT4TimeArraySeries; UINT4TimeArraySeries;
typedef struct typedef struct
tagINT8TimeArraySeries tagINT8TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT8ArraySequence *data; INT8ArraySequence *data;
} }
INT8TimeArraySeries; INT8TimeArraySeries;
typedef struct typedef struct
tagUINT8TimeArraySeries tagUINT8TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT8ArraySequence *data; UINT8ArraySequence *data;
} }
UINT8TimeArraySeries; UINT8TimeArraySeries;
typedef struct typedef struct
tagREAL4TimeArraySeries tagREAL4TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL4ArraySequence *data; REAL4ArraySequence *data;
} }
REAL4TimeArraySeries; REAL4TimeArraySeries;
typedef struct typedef struct
tagREAL8TimeArraySeries tagREAL8TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL8ArraySequence *data; REAL8ArraySequence *data;
} }
REAL8TimeArraySeries; REAL8TimeArraySeries;
typedef struct typedef struct
tagCOMPLEX8TimeArraySeries tagCOMPLEX8TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX8ArraySequence *data; COMPLEX8ArraySequence *data;
} }
COMPLEX8TimeArraySeries; COMPLEX8TimeArraySeries;
typedef struct typedef struct
tagCOMPLEX16TimeArraySeries tagCOMPLEX16TimeArraySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 deltaT; REAL8 deltaT;
REAL8 f0; REAL8 f0;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX16ArraySequence *data; COMPLEX16ArraySequence *data;
} }
COMPLEX16TimeArraySeries; COMPLEX16TimeArraySeries;
/* <lalLaTeX> /* <lalLaTeX>
\vspace{2ex} \vspace{2ex}
\begin{verbatim} \begin{verbatim}
<datatype>FrequencySeries <datatype>FrequencySeries
\end{verbatim} \end{verbatim}
This structure represents a frequency spectrum of data of type This structure represents a frequency spectrum of data of type
\verb@<datatype>@ (where \verb@<datatype>@ can be any primitive \verb@<datatype>@ (where \verb@<datatype>@ can be any primitive
datatype), sampled over uniform frequency intervals $f_0, f_0+\Delta datatype), sampled over uniform frequency intervals $f_0, f_0+\Delta
f, \ldots , f_0+l\Delta f$. Essentially this is a f, \ldots , f_0+l\Delta f$. Essentially this is a
\verb@<datatype>Sequence@ with extra fields defining the sample \verb@<datatype>Sequence@ with extra fields defining the sample
frequencies, the timestamp of the spectrum, and the type of data being frequencies, the timestamp of the spectrum, and the type of data being
sampled. The fields are: sampled. The fields are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] The name of the data series (i.e.\ the type \item[\texttt{CHAR name[LALNameLength]}] The name of the data series (i.e.\
of data being sampled). the type of data being sampled).
\item[\texttt{LIGOTimeGPS epoch}] The start time of the \emph{time} \item[\texttt{LIGOTimeGPS epoch}] The start time of the \emph{time}
series from which the spectrum was calculated. series from which the spectrum was calculated.
\item[\texttt{REAL8 f0}] The lowest frequency $f_0$ being sampled, in \item[\texttt{REAL8 f0}] The lowest frequency $f_0$ being sampled, in
hertz. hertz.
\item[\texttt{REAL8 deltaF}] The frequency sampling interval $\Delta \item[\texttt{REAL8 deltaF}] The frequency sampling interval $\Delta
f$, in hertz. f$, in hertz.
\item[\texttt{CHARVector *sampleUnits}] The physical units of the \item[\texttt{LALUnit sampleUnits}] The physical units of the
quantity being sampled. quantity being sampled.
\item[\texttt{<datatype>Sequence *data}] The sequence of sampled data. \item[\texttt{<datatype>Sequence *data}] The sequence of sampled data.
\end{description} \end{description}
</lalLaTeX> */ </lalLaTeX> */
typedef struct typedef struct
tagINT2FrequencySeries tagINT2FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT2Sequence *data; INT2Sequence *data;
} }
INT2FrequencySeries; INT2FrequencySeries;
typedef struct typedef struct
tagUINT2FrequencySeries tagUINT2FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT2Sequence *data; UINT2Sequence *data;
} }
UINT2FrequencySeries; UINT2FrequencySeries;
typedef struct typedef struct
tagINT4FrequencySeries tagINT4FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT4Sequence *data; INT4Sequence *data;
} }
INT4FrequencySeries; INT4FrequencySeries;
typedef struct typedef struct
tagUINT4FrequencySeries tagUINT4FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT4Sequence *data; UINT4Sequence *data;
} }
UINT4FrequencySeries; UINT4FrequencySeries;
typedef struct typedef struct
tagINT8FrequencySeries tagINT8FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
INT8Sequence *data; INT8Sequence *data;
} }
INT8FrequencySeries; INT8FrequencySeries;
typedef struct typedef struct
tagUINT8FrequencySeries tagUINT8FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
UINT8Sequence *data; UINT8Sequence *data;
} }
UINT8FrequencySeries; UINT8FrequencySeries;
typedef struct typedef struct
tagREAL4FrequencySeries tagREAL4FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL4Sequence *data; REAL4Sequence *data;
} }
REAL4FrequencySeries; REAL4FrequencySeries;
typedef struct typedef struct
tagREAL8FrequencySeries tagREAL8FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
REAL8Sequence *data; REAL8Sequence *data;
} }
REAL8FrequencySeries; REAL8FrequencySeries;
typedef struct typedef struct
tagCOMPLEX8FrequencySeries tagCOMPLEX8FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX8Sequence *data; COMPLEX8Sequence *data;
} }
COMPLEX8FrequencySeries; COMPLEX8FrequencySeries;
typedef struct typedef struct
tagCOMPLEX16FrequencySeries tagCOMPLEX16FrequencySeries
{ {
CHAR *name; CHAR name[LALNameLength];
LIGOTimeGPS epoch; LIGOTimeGPS epoch;
REAL8 f0; REAL8 f0;
REAL8 deltaF; REAL8 deltaF;
CHARVector *sampleUnits; LALUnit sampleUnits;
COMPLEX16Sequence *data; COMPLEX16Sequence *data;
} }
COMPLEX16FrequencySeries; COMPLEX16FrequencySeries;
/* <lalLaTeX> /* <lalLaTeX>
\vspace{2ex} \vspace{2ex}
\begin{verbatim} \begin{verbatim}
<datatype>ZPGFilter <datatype>ZPGFilter
\end{verbatim} \end{verbatim}
skipping to change at line 1208 skipping to change at line 1266
$H(f)=g\times\prod_k(\zeta-z_k)/\prod_l(\zeta-p_l)$, where $z_k$ are $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$ the complex \emph{zeros}, $p_l$ are the complex \emph{poles}, and $g$
is the complex \emph{gain} of the response function. Some common is the complex \emph{gain} of the response function. Some common
complex frequency representations are the $z$-plane representation complex frequency representations are the $z$-plane representation
$\zeta(f\Delta t)=\exp(2\pi if\Delta t)$, which maps the Nyquist $\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 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 $\zeta$, and the $w$-plane representation $\zeta(f\Delta t)=\tan(\pi
f\Delta t)$, which maps the Nyquist interval onto the positive real f\Delta t)$, which maps the Nyquist interval onto the positive real
axis in $\zeta$. The fields of \verb@<datatype>ZPGFilter@ are: axis in $\zeta$. The fields of \verb@<datatype>ZPGFilter@ are:
\begin{description} \begin{description}
\item[\texttt{CHAR *name}] The name of the filter or transfer \item[\texttt{CHAR name[LALNameLength]}] The name of the filter or transfer
function. This should also mention its complex frequency function. This should also mention its complex frequency
representation. representation.
\item[\texttt{REAL8 deltaT}] The sampling time or reference timescale \item[\texttt{REAL8 deltaT}] The sampling time or reference timescale
$\Delta t$ for the filter, in seconds. If zero, it will be treated as $\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. being equal to the sampling interval of the data being filtered.
\item[\texttt{<datatype>Vector *zeros}] Pointer to a vector storing \item[\texttt{<datatype>Vector *zeros}] Pointer to a vector storing
the zeros $z_k$ of the filter. the zeros $z_k$ of the filter.
\item[\texttt{<datatype>Vector *poles}] Pointer to a vector storing \item[\texttt{<datatype>Vector *poles}] Pointer to a vector storing
the poles $p_k$ of the filter. the poles $p_k$ of the filter.
\item[\texttt{<datatype> gain}] The gain $g$ of the filter. \item[\texttt{<datatype> gain}] The gain $g$ of the filter.
\end{description} \end{description}
</lalLaTeX> */ </lalLaTeX> */
typedef struct typedef struct
tagCOMPLEX8ZPGFilter tagCOMPLEX8ZPGFilter
{ {
CHAR *name; CHAR name[LALNameLength];
REAL8 deltaT; REAL8 deltaT;
COMPLEX8Vector *zeros; COMPLEX8Vector *zeros;
COMPLEX8Vector *poles; COMPLEX8Vector *poles;
COMPLEX8 gain; COMPLEX8 gain;
} }
COMPLEX8ZPGFilter; COMPLEX8ZPGFilter;
typedef struct typedef struct
tagCOMPLEX16ZPGFilter tagCOMPLEX16ZPGFilter
{ {
CHAR *name; CHAR name[LALNameLength];
REAL8 deltaT; REAL8 deltaT;
COMPLEX16Vector *zeros; COMPLEX16Vector *zeros;
COMPLEX16Vector *poles; COMPLEX16Vector *poles;
COMPLEX16 gain; COMPLEX16 gain;
} }
COMPLEX16ZPGFilter; COMPLEX16ZPGFilter;
/* <lalLaTeX> /* <lalLaTeX>
\newpage \newpage
\subsection{The LAL universal status structure \texttt{LALStatus}} \subsection{The LAL universal status structure \texttt{LALStatus}}
 End of changes. 97 change blocks. 
101 lines changed or deleted 159 lines changed or added


 LALError.h   LALError.h 
/************************************ <lalVerbatim file="LALErrorHV"> /************************************ <lalVerbatim file="LALErrorHV">
$Id: LALError.h,v 1.6 2000/09/08 23:19:25 jolien Exp $ $Id: LALError.h,v 1.11 2001/11/27 01:55:24 jolien Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALError.h}} \section{Header \texttt{LALError.h}}
\label{s:LALError.h} \label{s:LALError.h}
Provides routines to report and handle errors. Provides routines to report and handle errors.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALError.h" #include <lal/LALError.h>
\end{verbatim} \end{verbatim}
\noindent This header covers routines that print status messages, and \noindent This header covers routines that print status messages, and
that allow functions to abort. that allow functions to abort.
\vfill{\footnotesize\input{LALErrorHV}} \vfill{\footnotesize\input{LALErrorHV}}
\newpage\input{LALErrorC} \newpage\input{LALErrorC}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALERROR_H #ifndef _LALERROR_H
#define _LALERROR_H #define _LALERROR_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALERRORH, "$Id: LALError.h,v 1.6 2000/09/08 23:19:25 jolien Exp $" ); NRCSID( LALERRORH, "$Id: LALError.h,v 1.11 2001/11/27 01:55:24 jolien Exp $ " );
/* 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,
LALMEMDBG = ~( -1U >> 1 ) /* any non-zero value that doesn't interfere w LALNMEMDBG = 32,
ith LALNMEMPAD = 64,
other bits: meaningless to combine this wit LALNMEMTRK = 128,
h LALMEMDBG = 16384 /* convenience: don't combine with other bits */
any other bit */
}; };
/* composite lalDebugLevels: */ /* composite lalDebugLevels: */
enum { LALMSGLVL1 = LALERROR }; enum { LALMSGLVL1 = LALERROR };
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 = ~0 }; enum { LALALLDBG = ~( LALNMEMDBG | LALNMEMPAD | LALNMEMTRK ) };
extern int ( *lalRaiseHook )( int, const char *, ... );
extern void ( *lalAbortHook )( const char *, ... );
int int
LALPrintError( const char *fmt, ... ); LALPrintError( const char *fmt, ... );
int
LALRaise( int sig, const char *fmt, ... );
void void
LALAbort( const char *fmt, ... ); LALAbort( const char *fmt, ... );
int int
LALError( LALStatus *status, const char *statement ); LALError( LALStatus *status, const char *statement );
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 exit ); 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 112 skipping to change at line 119
FREESTATUSPTR( LALStatus *status ); FREESTATUSPTR( LALStatus *status );
void void
REPORTSTATUS( LALStatus *status ); REPORTSTATUS( LALStatus *status );
#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, exit ) 0 #define LALTrace( statusptr, exitflg ) 0
#else #else
#ifndef NOLALMACROS #ifndef NOLALMACROS
#define LALError( statusptr, statement ) \ #define LALError( statusptr, statement ) \
( lalDebugLevel & LALERROR ? \ ( lalDebugLevel & LALERROR ? \
LALPrintError( "Error[%d] %d: function %s, file %s, line %d, %s\n" \ LALPrintError( "Error[%d] %d: function %s, file %s, line %d, %s\n" \
" %s %s\n", (statusptr)->level, (statusptr)->statusCode, \ " %s %s\n", (statusptr)->level, (statusptr)->statusCode, \
(statusptr)->function, (statusptr)->file, (statusptr)->line, \ (statusptr)->function, (statusptr)->file, (statusptr)->line, \
skipping to change at line 140 skipping to change at line 147
(statusptr)->file, (statusptr)->line, (statusptr)->Id, (warning) ) \ (statusptr)->file, (statusptr)->line, (statusptr)->Id, (warning) ) \
: 0 ) : 0 )
#define LALInfo( statusptr, info ) \ #define LALInfo( statusptr, info ) \
( lalDebugLevel & LALINFO ? \ ( lalDebugLevel & LALINFO ? \
LALPrintError( "Info[%d]: function %s, file %s, line %d, %s\n" \ LALPrintError( "Info[%d]: function %s, file %s, line %d, %s\n" \
" %s\n", (statusptr)->level, (statusptr)->function, \ " %s\n", (statusptr)->level, (statusptr)->function, \
(statusptr)->file, (statusptr)->line, (statusptr)->Id, (info) ) \ (statusptr)->file, (statusptr)->line, (statusptr)->Id, (info) ) \
: 0 ) : 0 )
#define LALTrace( statusptr, exit ) \ #define LALTrace( statusptr, exitflg ) \
( lalDebugLevel & LALTRACE ? \ ( lalDebugLevel & LALTRACE ? \
LALPrintError( "%s[%d]: function %s, file %s, line %d, %s\n", \ LALPrintError( "%s[%d]: function %s, file %s, line %d, %s\n", \
(exit) ? "Leave" : "Enter", (statusptr)->level, \ (exitflg) ? "Leave" : "Enter", (statusptr)->level, \
(statusptr)->function, (statusptr)->file, (statusptr)->line, \ (statusptr)->function, (statusptr)->file, (statusptr)->line, \
(statusptr)->Id ) \ (statusptr)->Id ) \
: 0 ) : 0 )
#endif /* NOLALMACROS */ #endif /* NOLALMACROS */
#endif /* NDEBUG */ #endif /* NDEBUG */
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 11 change blocks. 
14 lines changed or deleted 19 lines changed or added


 LALHello.h   LALHello.h 
/************************************ <lalVerbatim file="LALHelloHV"> /************************************ <lalVerbatim file="LALHelloHV">
$Id: LALHello.h,v 1.4 2000/07/23 01:13:57 jolien Exp $ $Id: LALHello.h,v 1.5 2000/11/09 23:37:19 jolien Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALHello.h}} \section{Header \texttt{LALHello.h}}
\label{s:LALHello.h} \label{s:LALHello.h}
Provides routines to print ``hello, LSC!'' Provides routines to print ``hello, LSC!''
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALHello.h" #include <lal/LALHello.h>
\end{verbatim} \end{verbatim}
\noindent This header covers the routine to print the greeting message. \noindent This header covers the routine to print the greeting message.
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALHELLO_H #ifndef _LALHELLO_H
#define _LALHELLO_H #define _LALHELLO_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALHELLOH, "$Id: LALHello.h,v 1.4 2000/07/23 01:13:57 jolien Exp $" ); NRCSID (LALHELLOH, "$Id: LALHello.h,v 1.5 2000/11/09 23:37:19 jolien Exp $" );
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
\input{LALHelloHErrTab} \input{LALHelloHErrTab}
</lalLaTeX> */ </lalLaTeX> */
/* /*
<lalErrTable file="LALHelloHErrTab"> <lalErrTable file="LALHelloHErrTab">
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 LALMalloc.h   LALMalloc.h 
/************************************ <lalVerbatim file="LALMallocHV"> /************************************ <lalVerbatim file="LALMallocHV">
$Id: LALMalloc.h,v 1.4 2000/06/29 21:20:49 jolien Exp $ $Id: LALMalloc.h,v 1.6 2001/11/27 01:55:24 jolien Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALMalloc.h}} \section{Header \texttt{LALMalloc.h}}
\label{s:LALMalloc.h} \label{s:LALMalloc.h}
Provides standard LAL memory allocation/deallocation routines. Provides standard LAL memory allocation/deallocation routines.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALMalloc.h" #include <lal/LALMalloc.h>
\end{verbatim} \end{verbatim}
\noindent This header covers routines that replace the standard \noindent This header covers routines that replace the standard
\verb+malloc()+, \verb+calloc()+, \verb+realloc()+, and \verb+free()+. \verb+malloc()+, \verb+calloc()+, \verb+realloc()+, and \verb+free()+.
All memory allocation and deallocation in LAL should use these All memory allocation and deallocation in LAL should use these
replacement functions. If the \verb+NDEBUG+ flag is set at compile 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 time, the LAL routines are \verb+#define+d to be the same as the
standard C routines. standard C routines.
\vfill{\footnotesize\input{LALMallocHV}} \vfill{\footnotesize\input{LALMallocHV}}
\newpage\input{LALMallocC} \newpage\input{LALMallocC}
\newpage\input{LALMallocTestC} \newpage\input{LALMallocTestC}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALMALLOC_H #ifndef _LALMALLOC_H
#define _LALMALLOC_H #define _LALMALLOC_H
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#include <lal/LALConfig.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( LALMALLOCH, "$Id: LALMalloc.h,v 1.4 2000/06/29 21:20:49 jolien Exp NRCSID( LALMALLOCH, "$Id: LALMalloc.h,v 1.6 2001/11/27 01:55:24 jolien Exp
$" ); $" );
#if defined NDEBUG || defined LAL_NDEBUG
#define LALMalloc malloc
#define LALMallocShort malloc
#define LALMallocLong( n, file, line ) malloc( n )
#define LALCalloc calloc
#define LALCallocShort calloc
#define LALCallocLong( m, n, file, line ) calloc( m, n )
#define LALRealloc realloc
#define LALReallocShort realloc
#define LALReallocLong( p, n, file, line ) realloc( p, n )
#define LALFree free
#define LALCheckMemoryLeaks()
#else
#define LALMalloc( n ) LALMallocLong( n, __FILE__, __LINE__ )
#define LALCalloc( m, n ) LALCallocLong( m, n, __FILE__, __LINE__ )
#define LALRealloc( p, n ) LALReallocLong( p, n, __FILE__, __LINE__ )
void *
LALMallocShort( size_t n );
void * void *
LALMalloc( size_t n ); LALMallocLong( size_t n, const char *file, int line );
void void
LALFree( void *p ); LALFree( void *p );
void * void *
LALCalloc( size_t m, size_t n ); LALCallocShort( size_t m, size_t n );
void *
LALCallocLong( size_t m, size_t n, const char *file, int line );
void * void *
LALRealloc( void *p, size_t n ); LALReallocShort( void *p, size_t n );
void *
LALReallocLong( void *p, size_t n, const char *file, int line );
void void
LALCheckMemoryLeaks( void ); LALCheckMemoryLeaks( void );
#ifdef NDEBUG #endif /* NDEBUG || LAL_NDEBUG */
#define LALMalloc( n ) malloc( n )
#define LALFree( p ) free( p )
#define LALCalloc( m, n ) calloc( m, n )
#define LALRealloc( p, n ) realloc( p, n )
#define LALCheckMemoryLeaks()
#endif /* NDEBUG */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALMALLOC_H */ #endif /* _LALMALLOC_H */
 End of changes. 8 change blocks. 
15 lines changed or deleted 39 lines changed or added


 LALRCSID.h   LALRCSID.h 
/********************************* <lalVerbatim file="LALRCSIDHV"> /********************************* <lalVerbatim file="LALRCSIDHV">
Author: Unknown? Provided by Stuart Anderson Author: Unknown? Provided by Stuart Anderson
$Id: LALRCSID.h,v 1.4 2000/07/23 01:14:37 jolien Exp $ $Id: LALRCSID.h,v 1.5 2000/11/09 23:37:20 jolien Exp $
********************************** </lalVerbatim> */ ********************************** </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALRCSID.h}} \section{Header \texttt{LALRCSID.h}}
\label{s:LALRCSID.h} \label{s:LALRCSID.h}
Provides macros for assigning an RCS ID string to a file. Provides macros for assigning an RCS ID string to a file.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALRCSID.h" #include <lal/LALRCSID.h>
\end{verbatim} \end{verbatim}
\noindent This header defines a pair of macros \verb@RCSID()@ and \noindent This header defines a pair of macros \verb@RCSID()@ and
\verb@NRCSID()@, which are used to assign Revision Control System \verb@NRCSID()@, which are used to assign Revision Control System
(RCS) ID strings to a given source file. Whenever a file is added or (RCS) ID strings to a given source file. Whenever a file is added or
changed in the central LAL distribution, the RCS software searches for changed in the central LAL distribution, the RCS software searches for
symbols of the form \texttt{\$Id\$} or \texttt{\$Id:} \ldots\ symbols of the form \texttt{\$Id\$} or \texttt{\$Id:} \ldots\
\texttt{\$}, and expands them into strings that give information about \texttt{\$}, and expands them into strings that give information about
the file's name, version number, when it was last modified and by the file's name, version number, when it was last modified and by
whom. For an example of an RCS ID string, look at the \texttt{\$Id:} whom. For an example of an RCS ID string, look at the \texttt{\$Id:}
skipping to change at line 95 skipping to change at line 95
# define RCSID(id) \ # define RCSID(id) \
static volatile const char __attribute__ ((unused)) *rcsid = (id) static volatile const char __attribute__ ((unused)) *rcsid = (id)
# define NRCSID(name,id) \ # define NRCSID(name,id) \
static volatile const char __attribute__ ((unused)) *name = (id) static volatile const char __attribute__ ((unused)) *name = (id)
# endif /* !__GNUC__ */ # endif /* !__GNUC__ */
#else #else
# define RCSID(id) typedef void useless # define RCSID(id) typedef void useless
# define NRCSID(name,id) typedef void useless # define NRCSID(name,id) typedef void useless
#endif /* !lint */ #endif /* !lint */
NRCSID (LALRCSIDH, "$Id: LALRCSID.h,v 1.4 2000/07/23 01:14:37 jolien Exp $" ); NRCSID (LALRCSIDH, "$Id: LALRCSID.h,v 1.5 2000/11/09 23:37:20 jolien Exp $" );
/* <lalLaTeX> /* <lalLaTeX>
\vfill{\footnotesize\input{LALRCSIDHV}} \vfill{\footnotesize\input{LALRCSIDHV}}
</lalLaTeX> */ </lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALRCSID_H */ #endif /* _LALRCSID_H */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 LALSample.h   LALSample.h 
/************************************ <lalVerbatim file="LALSampleHV"> /************************************ <lalVerbatim file="LALSampleHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: LALSample.h,v 1.2 2000/07/23 01:14:24 jolien Exp $ $Id: LALSample.h,v 1.3 2000/11/09 23:37:20 jolien Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/********************************************************** <lalLaTeX> /********************************************************** <lalLaTeX>
\section{Header \texttt{LALSample.h}} \section{Header \texttt{LALSample.h}}
\label{s:LALSample.h} \label{s:LALSample.h}
Example header for LAL. Example header for LAL.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALSample.h" #include <lal/LALSample.h>
\end{verbatim} \end{verbatim}
\noindent This header provides two trivial functions to divide real \noindent This header provides two trivial functions to divide real
numbers. It exists primarily to demonstrate documentation and coding numbers. It exists primarily to demonstrate documentation and coding
standards for LAL headers. standards for LAL headers.
******************************************************* </lalLaTeX> */ ******************************************************* </lalLaTeX> */
#ifndef _LALSAMPLE_H /* Double-include protection. */ #ifndef _LALSAMPLE_H /* Double-include protection. */
#define _LALSAMPLE_H #define _LALSAMPLE_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID( LALSAMPLEH, "$Id: LALSample.h,v 1.2 2000/07/23 01:14:24 jolien Exp $" ); NRCSID( LALSAMPLEH, "$Id: LALSample.h,v 1.3 2000/11/09 23:37:20 jolien Exp $" );
/********************************************************** <lalLaTeX> /********************************************************** <lalLaTeX>
\subsection*{Error codes} \subsection*{Error codes}
</lalLaTeX> </lalLaTeX>
***************************************************** <lalErrTable> */ ***************************************************** <lalErrTable> */
#define LALSAMPLEH_ENULL 1 #define LALSAMPLEH_ENULL 1
#define LALSAMPLEH_EDIV0 2 #define LALSAMPLEH_EDIV0 2
#define LALSAMPLEH_MSGENULL "Arguments contained an unexpected null pointer " #define LALSAMPLEH_MSGENULL "Arguments contained an unexpected null pointer "
#define LALSAMPLEH_MSGEDIV0 "Division by zero" #define LALSAMPLEH_MSGEDIV0 "Division by zero"
/*************************************************** </lalErrTable> */ /*************************************************** </lalErrTable> */
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 LALStatusMacros.h   LALStatusMacros.h 
/****************************** <lalVerbatim file="LALStatusMacrosHV"> /****************************** <lalVerbatim file="LALStatusMacrosHV">
Author: Creighton, J. D. E. and Creighton, T. D. Author: Creighton, J. D. E. and Creighton, T. D.
$Id: LALStatusMacros.h,v 1.13 2000/09/08 23:19:24 jolien Exp $ $Id: LALStatusMacros.h,v 1.22 2001/11/27 01:55:24 jolien Exp $
******************************* </lalVerbatim> */ ******************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALStatusMacros.h}} \section{Header \texttt{LALStatusMacros.h}}
\label{s:LALStatusMacros.h} \label{s:LALStatusMacros.h}
Provides macros for handling the LAL status structure. Provides macros for handling the LAL status structure.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALStatusMacros.h" #include <lal/LALStatusMacros.h>
\end{verbatim} \end{verbatim}
\noindent This header provides macros and functions for tracking and \noindent This header provides macros and functions for tracking and
reporting the runtime status of a program. The intent is reporting the runtime status of a program. 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.
\subsection{Status-reporting objects} \subsection{Status-reporting objects}
\label{ss:status-reporting-objects} \label{ss:status-reporting-objects}
LAL routines make use of two objects in reporting their current LAL routines make use of two objects in reporting their current
status: the status structure \verb@LALStatus@, and the global integer status: the status structure \verb@LALStatus@, and the global integer
\verb@lalDebugLevel@. These two objects are described in the following \verb@lalDebugLevel@. These two objects are described in the following
sections. sections.
\subsubsection{The \texttt{LALStatus} structure} \subsubsection{The \texttt{LALStatus} structure}
\idx[Type]{LALStatus}
LAL routines store their current execution status in a linked list of LAL routines store their current execution status in a linked list of
structures of type \verb@LALStatus@, with each node in the list structures of type \verb@LALStatus@, with each node in the list
representing a subroutine in the current calling sequence. The representing a subroutine in the current calling sequence. The
\verb@LALStatus@ structure is described in Sec.~\ref{ss:status-structure} \verb@LALStatus@ structure is described in Sec.~\ref{ss:status-structure}
of the header \verb@LALDatatypes.h@, but for completeness, we explain of the header \verb@LALDatatypes.h@, but for completeness, we explain
its fields below: its fields below:
\begin{description} \begin{description}
\item[\texttt{INT4 statusCode}] A code indicating the exit status of a \item[\texttt{INT4 statusCode}] A code indicating the exit status of a
function. 0 represents a normal exit. Negative values are reserved function. 0 represents a normal exit. Negative values are reserved
skipping to change at line 109 skipping to change at line 110
\tt -8 & \vspace{-1.4ex}\tt DETATCHSTATUSPTR: null status pointer & \tt -8 & \vspace{-1.4ex}\tt DETATCHSTATUSPTR: null status pointer &
The \verb@statusPtr@ field could not be deallocated at the end of all 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 subroutine calls; one of the subroutines must have lost it or set it
to \verb@NULL@. \\ to \verb@NULL@. \\
\hline \hline
\end{tabular} \end{tabular}
\end{center} \end{center}
\subsubsection{The \texttt{lalDebugLevel}} \subsubsection{The \texttt{lalDebugLevel}}
\idx[Variable]{lalDebugLevel}
The \verb@lalDebugLevel@ is a global variable, set at runtime, that The \verb@lalDebugLevel@ is a global variable, set at runtime, that
determines how much and what kind of debugging information will be determines how much and what kind of debugging information will be
reported. It is declared as an \verb@extern int@ in the header reported. It is declared as an \verb@extern int@ in the header
\verb@LALStatusMacros.h@, and is therefore accessible in any standard \verb@LALStatusMacros.h@, and is therefore accessible in any standard
LAL module that includes this header. Note, however, that it is 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 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). 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, The value of \verb@lalDebugLevel@ should be thought of not as a number,
skipping to change at line 159 skipping to change at line 161
is turned on by setting the corrsponding bit in \verb@lalDebugLevel@ to 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 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 \verb@#define@s flags with numerical values designed to switch on the
appropriate bits. Combinations of bits can be switched on by appropriate bits. Combinations of bits can be switched on by
combining these flags using the bitwise-\textit{or} operator, combining these flags using the bitwise-\textit{or} operator,
\verb@|@. The flags are defined as follows: \verb@|@. The flags are defined as follows:
\begin{center} \begin{center}
\begin{tabular}{|lccl|} \begin{tabular}{|lccl|}
\hline \hline
Flag & Binary & Decimal & Meaning \\ Flag & Octal & Decimal & Meaning \\
\hline \hline
\multicolumn{4}{|l|}{\it Primitive flags} \\ \multicolumn{4}{|l|}{\it Primitive flags} \\
\tt LALNDEBUG & 0\ldots00000 & 0 & No debugging or status messages \\ \tt LALNDEBUG & 000000 & 0 & No debugging or status messages \\
\tt LALERROR & 0\ldots00001 & 1 & Turn on error messages \\ \tt LALERROR & 000001 & 1 & Turn on error messages \\
\tt LALWARNING & 0\ldots00010 & 2 & Turn on warning messages \\ \tt LALWARNING & 000002 & 2 & Turn on warning messages \\
\tt LALINFO & 0\ldots00100 & 4 & Turn on info messages \\ \tt LALINFO & 000004 & 4 & Turn on info messages \\
\tt LALTRACE & 0\ldots01000 & 8 & Turn on tracing messages \\ \tt LALTRACE & 000010 & 8 & Turn on tracing messages \\
\tt LALMEMINFO & 0\ldots10000 & 16 & Turn on memory messages \\ \tt LALMEMINFO & 000020 & 16 & Turn on memory messages \\
\tt LALMEMDBG & 1\ldots00000 & $2^{N-1}$ & Turn on debugging without \tt LALNMEMDBG & 000040 & 32 & Turn off all memory debugging \\
messages \\ \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} \\ \multicolumn{4}{|l|}{\it Combination flags} \\
\tt LALMSGLVL1 & 0\ldots00001 & 1 & Error messages only \\ \tt LALMSGLVL1 & 000001 & 1 & Error messages only \\
\tt LALMSGLVL2 & 0\ldots00011 & 3 & Error and warning messages \\ \tt LALMSGLVL2 & 000003 & 3 & Error and warning messages \\
\tt LALMSGLVL3 & 0\ldots00111 & 7 & Error, warning, and info messages \\ \tt LALMSGLVL3 & 000007 & 7 & Error, warning, and info messages \\
\tt LALMEMTRACE & 0\ldots11000 & 24 & Memory and tracing messages \\ \tt LALMEMTRACE & 000030 & 24 & Memory and tracing messages \\
\tt LALALLDBG & 1\ldots11111 & $2^N-1$ & All messages and debugging \\ \tt LALALLDBG & 077437 & 32543 & All messages and debugging \\
\hline \hline
\end{tabular} \end{tabular}
\end{center} \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}
Here $N$ is the number of bits in the statndard C type \verb@int@ on The most significant bit
the particular system. The $N^\mathrm{th}$, or most significant, bit of \verb@lalDebugLevel@ has a special meaning in that it is not
of \verb@lalDebugLevel@ has a special meaning, in that it is not
associated with any type of status message. However, certain pieces associated with any type of status message. However, certain pieces
of debugging or error-tracking code --- such as the memory leak of debugging or error-tracking code --- such as the memory leak
detection code in \verb@LALMalloc.c@ --- do not write status messages detection code in \verb@LALMalloc.c@ --- do not write status messages
and are not associated with a \verb@lalDebugLevel@ bit; instead, these and are not associated with a \verb@lalDebugLevel@ bit; instead, these
pieces of code are turned on for \emph{any} nonzero value of pieces of code are turned on for \emph{any} nonzero value of
\verb@lalDebugLevel@. Switching on only the $N^\mathrm{th}$ bit with \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 \verb@LALMEMDBG@ activates this code without turning on any other
error reporting. error reporting.
To turn debugging code on or off at compile time (rather than To turn debugging code on or off at compile time (rather than
runtime), see Sec.~\ref{ss:compilation-flags}, below. runtime), see Sec.~\ref{ss:compilation-flags}, below.
\subsection{Using the status tools} \subsection{Using the status tools}
\label{ss:using-status-tools} \label{ss:using-status-tools}
The following summarizes everything the common programmer needs to The following summarizes everything the common programmer needs to
skipping to change at line 220 skipping to change at line 239
Since the function has no return code, it must report all errors or Since the function has no return code, it must report all errors or
failure through the status structure. A function that is passed a failure through the status structure. A function that is passed a
\verb@NULL@ pointer in place of the status pointer should terminate \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 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 report the error. However, this is one of the few circumstances under
which a function sould deliberately raise a signal. In all other which a function sould deliberately raise a signal. In all other
cases the error should be trapped, reported in the status structure, cases the error should be trapped, reported in the status structure,
and control returned to the calling routine. and control returned to the calling routine.
\subsubsection{Assigning an RCS \texttt{\$Id\$} string} \subsubsection{Assigning an RCS \texttt{\$Id\$} string}
\idx{NRCSID()}
Every source file should have a unique character string identifying Every source file should have a unique character string identifying
that version of that file. The standard convention, for a file 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 \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 the module using the macro \verb@NRCSID()@ (defined in the include
file \verb@LALRCSID.h@): file \verb@LALRCSID.h@):
\vspace{2ex} \vspace{2ex}
\noindent\texttt{NRCSID( MYFILEC, \$Id\$ );} \noindent\texttt{NRCSID( MYFILEC, \$Id\$ );}
\vspace{2ex} \vspace{2ex}
\noindent where \texttt{\$Id\$} is expanded by RCS to give the full \noindent where \texttt{\$Id\$} is expanded by RCS to give the full
name and version number of the source file. name and version number of the source file.
\subsubsection{Initializing the status structure} \subsubsection{Initializing the status structure}
\idx{INITSTATUS()}
The first instruction in any function, after variable declarations, The first instruction in any function, after variable declarations,
should be the macro \verb@INITSTATUS()@, which takes three arguments: should be the macro \verb@INITSTATUS()@, which takes three arguments:
the function's status pointer, the function name (a string literal) the function's status pointer, the function name (a string literal)
and the module's RCS \texttt{\$Id\$} string. and the module's RCS \texttt{\$Id\$} string.
\begin{verbatim} \begin{verbatim}
INITSTATUS( stat, "MyFunction", MYFILEC ); INITSTATUS( stat, "MyFunction", MYFILEC );
\end{verbatim} \end{verbatim}
This macro checks that a valid status pointer has been passed to the This macro checks that a valid status pointer has been passed to the
function, and if so, initializes the other fields to indicate (by function, and if so, initializes the other fields to indicate (by
default) nominal execution. If \verb@stat@ is null, the macro causes default) nominal execution. If \verb@stat@ is null, the macro causes
the program to terminate with a \verb@SIGABRT@ signal, as described the program to terminate with a \verb@SIGABRT@ signal, as described
above. above.
\subsubsection{Normal return from a function} \subsubsection{Normal return from a function}
\idx{RETURN()}
Upon completion, the function should issue the macro \verb@RETURN()@, Upon completion, the function should issue the macro \verb@RETURN()@,
which takes one argument: the function's status pointer. which takes one argument: the function's status pointer.
\begin{verbatim} \begin{verbatim}
RETURN( stat ); RETURN( stat );
\end{verbatim} \end{verbatim}
This takes the place of any return statements. If This takes the place of any return statements. If
\verb@stat->statusCode@ is non-zero, the macro calls \verb@LALError()@ \verb@stat->statusCode@ is non-zero, the macro calls \verb@LALError()@
(see \verb@LALError.c@) to log \verb@stat->statusDescription@ and (see \verb@LALError.c@) to log \verb@stat->statusDescription@ and
other information, depending on implementation and the value of other information, depending on implementation and the value of
\verb@lalDebugLevel@. Typically \verb@RETURN()@ is used only for \verb@lalDebugLevel@. Typically \verb@RETURN()@ is used only for
successful completion, with other macros \verb@ABORT()@, successful completion, with other macros \verb@ABORT()@,
\verb@ASSERT()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@ being used \verb@ASSERT()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@ being used
to report failure. However, it is possible for the programmer to to report failure. However, it is possible for the programmer to
assign the fields of \verb@*stat@ by hand, and then issue assign the fields of \verb@*stat@ by hand, and then issue
\verb@RETURN()@. \verb@RETURN()@.
\subsubsection{Abnormal return from a function} \subsubsection{Abnormal return from a function}
\idx{ABORT()}
The standard method to terminate a function unsuccessfully is with the The standard method to terminate a function unsuccessfully is with the
\verb@ABORT()@ macro, which takes three arguments: the status pointer, \verb@ABORT()@ macro, which takes three arguments: the status pointer,
the status code, and the status description string. Normally the the status code, and the status description string. Normally the
various error codes and descriptions will be constants defined in the various error codes and descriptions will be constants defined in the
function's header file \verb@MyHeader.h@: function's header file \verb@MyHeader.h@:
\begin{verbatim} \begin{verbatim}
ABORT( stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR ); ABORT( stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR );
\end{verbatim} \end{verbatim}
where the error code \verb@MYHEADERH_EMYERR@ and the error message where the error code \verb@MYHEADERH_EMYERR@ and the error message
\verb@MYHEADERH_MSGEMYERR@ are defined in \verb@MyHeader.h@. This \verb@MYHEADERH_MSGEMYERR@ are defined in \verb@MyHeader.h@. This
standard LAL naming convention for error messages prevents namespace standard LAL naming convention for error messages prevents namespace
conflicts between different header files. Like \verb@RETURN()@, conflicts between different header files. Like \verb@RETURN()@,
\verb@ABORT()@ correctly handles any status logging required by the \verb@ABORT()@ correctly handles any status logging required by the
implementation and the \verb@lalDebugLevel@. Note that \verb@ABORT()@ implementation and the \verb@lalDebugLevel@. Note that \verb@ABORT()@
does \emph{not} raise a \verb@SIGABRT@ signal, but instead returns does \emph{not} raise a \verb@SIGABRT@ signal, but instead returns
control to the calling routine. control to the calling routine.
\subsubsection{Error checking within a function} \subsubsection{Error checking within a function}
\idx{ASSERT()}
Another way to indicate an unsuccessful termination is with the macro Another way to indicate an unsuccessful termination is with the macro
\verb@ASSERT()@, which takes as arguments a test statement, a status \verb@ASSERT()@, which takes as arguments a test statement, a status
pointer, a status code, and a status description. The statement pointer, a status code, and a status description. The statement
\verb@ASSERT( assertion, ... );@ is in all ways equivalent to the \verb@ASSERT( assertion, ... );@ is in all ways equivalent to the
statement \verb@if ( !assertion ) ABORT( ... );@, except on a failure statement \verb@if ( !assertion ) ABORT( ... );@, except on a failure
the \verb@ASSERT()@ macro will also report the failed assertion. In the \verb@ASSERT()@ macro will also report the failed assertion. In
the above example, one might have: the above example, one might have:
\begin{verbatim} \begin{verbatim}
ASSERT( assertion, stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR ); ASSERT( assertion, stat, MYHEADERH_EMYERR, MYHEADERH_MSGEMYERR );
skipping to change at line 317 skipping to change at line 341
Programmers should also be aware that using \verb@ASSERT()@ to exit a Programmers should also be aware that using \verb@ASSERT()@ to exit a
function in normal runtime can have serious side effects. For function in normal runtime can have serious side effects. For
example, it is an error to allocate dynamic memory to local variables 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 in a function and then fail to free it before returning. Thus, if you
have dynamically allocated memory, you cannot then use \verb@ASSERT()@ have dynamically allocated memory, you cannot then use \verb@ASSERT()@
for runtime error checking, as this does not permit you to free the for runtime error checking, as this does not permit you to free the
memory before returning. Instead, you must explicitly check the memory before returning. Instead, you must explicitly check the
assertion, and, if it fails, free the memory and call \verb@ABORT()@. assertion, and, if it fails, free the memory and call \verb@ABORT()@.
\subsubsection{Calling subroutines} \subsubsection{Calling subroutines}
\idx{ATTATCHSTATUSPTR()}
\idx{DETATCHSTATUSPTR()}
\idx{CHECKSTATUSPTR()}
\idx[Macro]{TRY()}
If the function is to call other LAL functions as subroutines, four If the function is to call other LAL functions as subroutines, four
more macros are used to report possible errors arising in these more macros are used to report possible errors arising in these
routines. The macros are \verb@ATTATCHSTATUSPTR()@, routines. The macros are \verb@ATTATCHSTATUSPTR()@,
\verb@DETATCHSTATUSPTR()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@. \verb@DETATCHSTATUSPTR()@, \verb@CHECKSTATUSPTR()@, and \verb@TRY()@.
The usage of these macros is as follows. The usage of these macros is as follows.
\begin{enumerate} \begin{enumerate}
\item First, before any subroutines are called, the function must call \item First, before any subroutines are called, the function must call
skipping to change at line 408 skipping to change at line 436
\verb@RETURN()@. This macro also sets the status code and the status \verb@RETURN()@. This macro also sets the status code and the status
message to nominal values. message to nominal values.
Additionally, if a function successfully works around an error Additionally, if a function successfully works around an error
reported by a subroutine, it should call \verb@DETATCHSTATUSPTR()@ and reported by a subroutine, it should call \verb@DETATCHSTATUSPTR()@ and
\verb@ATTATCHSTATUSPTR()@ to create a fresh status pointer before \verb@ATTATCHSTATUSPTR()@ to create a fresh status pointer before
calling another subroutine. calling another subroutine.
\end{enumerate} \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} \subsubsection{Issuing status messages}
\idx{LALError()}
\idx{LALWarning()}
\idx{LALInfo()}
\idx{LALTrace()}
\idx{REPORTSTATUS()}
The module \verb@LALError.c@ defines the functions \verb@LALError()@, The module \verb@LALError.c@ defines the functions \verb@LALError()@,
\verb@LALWarning()@, \verb@LALInfo()@, and \verb@LALTrace()@ to issue \verb@LALWarning()@, \verb@LALInfo()@, and \verb@LALTrace()@ to issue
various types of status message. This is the preferred means of various types of status message. This is the preferred means of
printing status messages, since each type of message can be activated printing status messages, since each type of message can be activated
or suppressed by setting \verb@lalDebugLevel@ appropriately. In fact, or suppressed by setting \verb@lalDebugLevel@ appropriately. In fact,
\verb@LALError()@ and \verb@LALTrace()@ are called automatically by \verb@LALError()@ and \verb@LALTrace()@ are called automatically by
the status macros whenever they are required, so most LAL modules will the status macros whenever they are required, so most LAL modules will
explicitly invoke only the \verb@LALWarning()@ and \verb@LALInfo()@ explicitly invoke only the \verb@LALWarning()@ and \verb@LALInfo()@
functions. functions.
skipping to change at line 436 skipping to change at line 541
This macro iteratively prints the contents of \verb@stat@ and all This macro iteratively prints the contents of \verb@stat@ and all
subsequent structures in the list to the error log. subsequent structures in the list to the error log.
The action of \verb@REPORTSTATUS()@ is not suppressed by any value of The action of \verb@REPORTSTATUS()@ is not suppressed by any value of
\verb@lalDebugLevel@. Therefore, as a rule, it should only be called by \verb@lalDebugLevel@. Therefore, as a rule, it should only be called by
test programs, not by LAL routines intended for use in production test programs, not by LAL routines intended for use in production
code. code.
\subsubsection{Setting the initial \texttt{LALStatus} structure and \subsubsection{Setting the initial \texttt{LALStatus} structure and
global \texttt{lalDebugLevel}} global \texttt{lalDebugLevel}}
\idx[Type]{LALStatus}
\idx[Variable]{lalDebugLevel}
As mentioned above, any module including \verb@LALStatusMacros.h@ As mentioned above, any module including \verb@LALStatusMacros.h@
includes the global variable \verb@lalDebugLevel@ as an includes the global variable \verb@lalDebugLevel@ as an
\verb@extern int@. At least one module in the final executable \verb@extern int@. At least one module in the final executable
program must have a global \emph{declaration} of \verb@int lalDebugLevel@ program must have a global \emph{declaration} of \verb@int lalDebugLevel@
(not \verb@extern int@), and assign \verb@lalDebugLevel@ a value. In (not \verb@extern int@), and assign \verb@lalDebugLevel@ a value. In
most cases \verb@lalDebugLevel@ will be declared in the module containing most cases \verb@lalDebugLevel@ will be declared in the module containing
the \verb@main()@ function, and will be assigned a value on the \verb@main()@ function, and will be assigned a value on
declaration or from command-line arguments to \verb@main()@. declaration or from command-line arguments to \verb@main()@.
Alternatively, if the LAL functions are to be embedded in a non-LAL Alternatively, if the LAL functions are to be embedded in a non-LAL
skipping to change at line 499 skipping to change at line 606
LAL provides two flags that can be used to exclude or modify debugging LAL provides two flags that can be used to exclude or modify debugging
code at compile time. Although these flags are typically code at compile time. Although these flags are typically
\verb@#define@d or \verb@#undef@ined globally and can affect many \verb@#define@d or \verb@#undef@ined globally and can affect many
modules (notably modules in the \verb@support@ package), their primary modules (notably modules in the \verb@support@ package), their primary
effect is on the debugging and status-reporting tools defined in this effect is on the debugging and status-reporting tools defined in this
header. The two flags are named \verb@NDEBUG@ and \verb@NOLALMACROS@. header. The two flags are named \verb@NDEBUG@ and \verb@NOLALMACROS@.
\subsubsection{The \texttt{NDEBUG} flag} \subsubsection{The \texttt{NDEBUG} flag}
Setting the \verb@NDEBUG@ flag turns off debugging and error-reporting Setting the \verb@NDEBUG@ (or \verb@LAL_NDEBUG@) flag turns off debugging a
code, in order to get condensed production-line programs. As far as nd
error reporting is concerned, setting the \verb@NDEBUG@ flag at error-reporting code, in order to get condensed production-line programs.
compile time is similar to setting \verb@lalDebugLevel@ equal to zero at As
runtime, in that it suppresses all status messages and memory leak far as error reporting is concerned, setting the \verb@NDEBUG@ flag at comp
detection. However, the \verb@NDEBUG@ flag accoplishes this by ile
telling the compiler preprocessor to remove the relevant code from the time is similar to setting \verb@lalDebugLevel@ equal to zero at runtime, i
object file, thus eliminating frequent and unnecessary tests on n
\verb@lalDebugLevel@. 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 Compiling with the \verb@NDEBUG@ flag set also removes all
\verb@ASSERT()@ macros from the object code, in keeping with the \verb@ASSERT()@ macros from the object code, in keeping with the
philosophy that \verb@ASSERT()@ statements should only be used to philosophy that \verb@ASSERT()@ statements should only be used to
catch coding bugs, not runtime errors. catch coding bugs, not runtime errors.
\subsubsection{The \texttt{NOLALMACROS} flag} \subsubsection{The \texttt{NOLALMACROS} flag}
Setting the \verb@NOLALMACROS@ flag replaces the status-handling Setting the \verb@NOLALMACROS@ flag replaces the status-handling
macros described above with actual functions that accomplish the same macros described above with actual functions that accomplish the same
skipping to change at line 635 skipping to change at line 743
\newpage\subsection{Sample program: \texttt{LALPrimerTest.c}} \newpage\subsection{Sample program: \texttt{LALPrimerTest.c}}
\vspace{3ex} \vspace{3ex}
\input{LALPrimerTestC} \input{LALPrimerTestC}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALSTATUSMACROS_H #ifndef _LALSTATUSMACROS_H
#define _LALSTATUSMACROS_H #define _LALSTATUSMACROS_H
#include "LALConfig.h" #include <lal/LALConfig.h>
#ifdef NDEBUG
#ifndef LAL_NDEBUG
#define LAL_NDEBUG
#endif
#endif
#ifdef STDC_HEADERS #include <stdlib.h>
#include <string.h> #include <string.h>
#else
#error "ERROR: non ansi standard headers"
#endif
#include "LALMalloc.h" #include <lal/LALMalloc.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "LALError.h" #include <lal/LALError.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALSTATUSMACROSH, "$Id: LALStatusMacros.h,v 1.13 2000/09/08 23:19:2 4 jolien Exp $"); NRCSID (LALSTATUSMACROSH, "$Id: LALStatusMacros.h,v 1.22 2001/11/27 01:55:2 4 jolien Exp $");
extern int lalDebugLevel; extern int lalDebugLevel;
extern const int lalNoDebug;
#ifndef NOLALMACROS #ifndef NOLALMACROS
#define INITSTATUS( statusptr, funcname, id ) \ #define INITSTATUS( statusptr, funcname, id ) \
if ( (statusptr) ) \ 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 = (funcname); \
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 \ else \
LALAbort( "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) ) (funcname), __FILE__, __LINE__, (id) )
#define RETURN( statusptr ) \ #define RETURN( statusptr ) \
if ( 1 ) \ 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 ); \
return; \ return; \
} \ } \
else else (void)(0)
#define ATTATCHSTATUSPTR(statusptr) \ #define ATTATCHSTATUSPTR(statusptr) \
if ( !(statusptr)->statusPtr ) \ if ( !(statusptr)->statusPtr ) \
{ \ { \
(statusptr)->statusPtr = (LALStatus *) LALCalloc( 1, sizeof( LALStatus ) ); \ (statusptr)->statusPtr = (LALStatus *)LALCalloc( 1, sizeof( LALStatus ) );\
if ( !(statusptr)->statusPtr ) \ if ( !(statusptr)->statusPtr ) \
{ \ { \
ABORT( statusptr, -4, "ATTATCHSTATUSPTR: memory allocation error" ); \ ABORT( statusptr, -4, "ATTATCHSTATUSPTR: memory allocation error" ); \
} \ } \
(statusptr)->statusPtr->level = (statusptr)->level + 1; \ (statusptr)->statusPtr->level = (statusptr)->level + 1; \
} \ } \
else \ else \
ABORT( statusptr, -2, "ATTATCHSTATUSPTR: non-null status pointer" ) ABORT( statusptr, -2, "ATTATCHSTATUSPTR: non-null status pointer" )
#define DETATCHSTATUSPTR( statusptr ) \ #define DETATCHSTATUSPTR( statusptr ) \
skipping to change at line 723 skipping to change at line 834
#define ABORT( statusptr, code, mesg ) \ #define ABORT( statusptr, code, mesg ) \
if ( 1 ) \ if ( 1 ) \
{ \ { \
if ( statusptr->statusPtr ) FREESTATUSPTR( statusptr ); \ if ( statusptr->statusPtr ) FREESTATUSPTR( statusptr ); \
SETSTATUS( statusptr, code, mesg ); \ SETSTATUS( statusptr, code, mesg ); \
if ( code ) \ if ( code ) \
(void) LALError( statusptr, "ABORT:" ); \ (void) LALError( statusptr, "ABORT:" ); \
(void) LALTrace( statusptr, 1 ); \ (void) LALTrace( statusptr, 1 ); \
return; \ return; \
} \ } \
else else (void)(0)
#ifdef NDEBUG #ifdef LAL_NDEBUG
#define ASSERT( assertion, statusptr, code, mesg ) #define ASSERT( assertion, statusptr, code, mesg )
#else #else
#define ASSERT( assertion, statusptr, code, mesg ) \ #define ASSERT( assertion, statusptr, code, mesg ) \
if ( !(assertion) ) \ if ( !(assertion) ) \
{ \ { \
if ( statusptr->statusPtr ) \ if ( statusptr->statusPtr ) \
FREESTATUSPTR( statusptr ); \ FREESTATUSPTR( statusptr ); \
SETSTATUS( statusptr, code, mesg ); \ SETSTATUS( statusptr, code, mesg ); \
(void) LALError( statusptr, "Assertion \"" #assertion "\" failed:" ); \ (void) LALError( statusptr, "Assertion \"" #assertion "\" failed:" ); \
(void) LALTrace( statusptr, 1 ); \ (void) LALTrace( statusptr, 1 ); \
return; \ return; \
} \ } \
else else (void)(0)
#endif #endif
#define TRY( func, statusptr ) \ #define TRY( func, statusptr ) \
if ( (func), (statusptr)->statusPtr->statusCode ) \ if ( (func), (statusptr)->statusPtr->statusCode ) \
{ \ { \
SETSTATUS( statusptr, -1, "Recursive error" ); \ SETSTATUS( statusptr, -1, "Recursive error" ); \
(void) LALError( statusptr, "Function call \"" #func "\" failed:" ); \ (void) LALError( statusptr, "Function call \"" #func "\" failed:" ); \
(void) LALTrace( statusptr, 1 ); \ (void) LALTrace( statusptr, 1 ); \
return; \ return; \
} \ } \
else else (void)(0)
#define CHECKSTATUSPTR( statusptr ) \ #define CHECKSTATUSPTR( statusptr ) \
if ( (statusptr)->statusPtr->statusCode ) \ if ( (statusptr)->statusPtr->statusCode ) \
{ \ { \
SETSTATUS( statusptr, -1, "Recursive error" ); \ SETSTATUS( statusptr, -1, "Recursive error" ); \
(void) LALError( statusptr, "CHECKSTATUSPTR:" ); \ (void) LALError( statusptr, "CHECKSTATUSPTR:" ); \
(void) LALTrace( statusptr, 1 ); \ (void) LALTrace( statusptr, 1 ); \
return; \ return; \
} \ } \
else else (void)(0)
#define FREESTATUSPTR( statusptr ) \ #define FREESTATUSPTR( statusptr ) \
do \ do \
{ \ { \
LALStatus *next = (statusptr)->statusPtr->statusPtr; \ LALStatus *next = (statusptr)->statusPtr->statusPtr; \
LALFree( (statusptr)->statusPtr ); \ LALFree( (statusptr)->statusPtr ); \
(statusptr)->statusPtr = next; \ (statusptr)->statusPtr = next; \
} \ } \
while ( (statusptr)->statusPtr ) while ( (statusptr)->statusPtr )
#define SETSTATUSFILELINE( statusptr ) \
( ( void ) ( (statusptr)->file = __FILE__, (statusptr)->line = __LINE__ )
)
#define SETSTATUS( statusptr, code, mesg )
\
( SETSTATUSFILELINE( statusptr ),
\
(statusptr)->statusDescription = (mesg),
\
(statusptr)->statusCode = (code) )
#define REPORTSTATUS( statusptr ) \ #define REPORTSTATUS( statusptr ) \
do \ do \
{ \ { \
LALStatus *ptr; \ LALStatus *ptr; \
for ( ptr = (statusptr); ptr; ptr = ptr->statusPtr ) \ for ( ptr = (statusptr); ptr; ptr = ptr->statusPtr ) \
{ \ { \
LALPrintError( "\nLevel %i: %s\n", ptr->level, ptr->Id ); \ LALPrintError( "\nLevel %i: %s\n", ptr->level, ptr->Id ); \
if ( ptr->statusCode ) \ if ( ptr->statusCode ) \
{ \ { \
LALPrintError( "\tStatus code %i: %s\n", ptr->statusCode, \ LALPrintError( "\tStatus code %i: %s\n", ptr->statusCode, \
ptr->statusDescription ); \ ptr->statusDescription ); \
} \ } \
else \ else \
{ \ { \
skipping to change at line 816 skipping to change at line 919
#define ATTATCHSTATUSPTR( statusptr ) \ #define ATTATCHSTATUSPTR( statusptr ) \
if ( LALAttatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return if ( LALAttatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return
#define DETATCHSTATUSPTR( statusptr ) \ #define DETATCHSTATUSPTR( statusptr ) \
if ( LALDetatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return if ( LALDetatchStatusPtr( statusptr, __FILE__, __LINE__ ) ) return
#define ABORT( statusptr, code, mesg ) \ #define ABORT( statusptr, code, mesg ) \
if ( LALPrepareAbort( statusptr, code, mesg, __FILE__, __LINE__ ), 1 ) re turn if ( LALPrepareAbort( statusptr, code, mesg, __FILE__, __LINE__ ), 1 ) re turn
#ifdef NDEBUG #ifdef LAL_NDEBUG
#define ASSERT( assertion, statusptr, code, mesg ) #define ASSERT( assertion, statusptr, code, mesg )
#else #else
#define ASSERT( assertion, statusptr, code, mesg ) \ #define ASSERT( assertion, statusptr, code, mesg ) \
if ( !(assertion) ) \ if ( !(assertion) ) \
{ \ { \
LALPrepareAssertFail( statusptr, code, mesg, \ LALPrepareAssertFail( statusptr, code, mesg, \
"Assertion \"" #assertion "\" failed:", \ "Assertion \"" #assertion "\" failed:", \
__FILE__, __LINE__ ); \ __FILE__, __LINE__ ); \
return; \ return; \
} \ } \
else else (void)(0)
#endif #endif
#define TRY( func, statusptr ) \ #define TRY( func, statusptr ) \
do \ do \
{ \ { \
(func); \ (func); \
if ( LALCheckStatusPtr( statusptr, "Function call \"" #func "\" failed: ", \ if ( LALCheckStatusPtr( statusptr, "Function call \"" #func "\" failed: ", \
__FILE__, __LINE__ ) ) \ __FILE__, __LINE__ ) ) \
return; \ return; \
} \ } \
while ( 0 ) while ( 0 )
#define CHECKSTATUSPTR( statusptr ) \ #define CHECKSTATUSPTR( statusptr ) \
if ( LALCheckStatusPtr( statusptr, "CHECKSTATUSPTR:", __FILE__, __LINE__ ) )\ if ( LALCheckStatusPtr( statusptr, "CHECKSTATUSPTR:", __FILE__, __LINE__ ) )\
return return
#endif /* NOLALMACROS */ #endif /* NOLALMACROS */
/* these just have to be macros... */
#define BEGINFAIL( statusptr )
\
do {
\
if ( !(statusptr) ) {
\
ABORT( statusptr, -8, "BEGINFAIL: null status pointer" );
\
}
\
if ( !( (statusptr)->statusPtr ) ) {
\
ABORT( statusptr, -8, "BEGINFAIL: null status pointer pointer" );
\
}
\
if ( (statusptr)->statusPtr->statusCode ) {
\
LALStatus *statusPtrSave = (statusptr)->statusPtr;
\
(statusptr)->statusPtr = NULL;
\
ATTATCHSTATUSPTR( statusptr );
\
do
#define ENDFAIL( statusptr )
\
while ( 0 );
\
DETATCHSTATUSPTR( statusptr );
\
(statusptr)->statusPtr = statusPtrSave;
\
SETSTATUS( statusptr, -1, "Recursive error" );
\
(void) LALError( statusptr, "ENDFAIL:" );
\
(void) LALTrace( statusptr, 1 );
\
return;
\
}
\
} while ( 0 )
#define SETSTATUSFILELINE( statusptr ) \
( ( void ) ( (statusptr)->file = __FILE__, (statusptr)->line = __LINE__ )
)
#define SETSTATUS( statusptr, code, mesg )
\
( SETSTATUSFILELINE( statusptr ),
\
(statusptr)->statusDescription = (mesg),
\
(statusptr)->statusCode = (code) )
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALSTATUSMACROS_H */ #endif /* _LALSTATUSMACROS_H */
 End of changes. 41 change blocks. 
68 lines changed or deleted 234 lines changed or added


 LALStdlib.h   LALStdlib.h 
/************************************ <lalVerbatim file="LALStdlibHV"> /************************************ <lalVerbatim file="LALStdlibHV">
Author: Finn, L. S. Author: J. D. E. Creighton, T. D. Creighton
$Id: LALStdlib.h,v 1.3 2000/06/03 21:39:01 jolien Exp $ $Id: LALStdlib.h,v 1.10 2001/12/01 22:09:43 jolien Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{LALStdlib.h}} \section{Header \texttt{LALStdlib.h}}
\label{s:LALStdlib.h} \label{s:LALStdlib.h}
Includes the standard LAL header files. Includes the standard LAL header files.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "LALStdlib.h" #include <lal/LALStdlib.h>
\end{verbatim} \end{verbatim}
\noindent This header is the overall header for the \verb@std@ \noindent This header is the overall header for the \verb@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: \verb@std@ package:
\vspace{1ex} \vspace{1ex}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _LALSTDLIB_H #ifndef _LALSTDLIB_H
#define _LALSTDLIB_H #define _LALSTDLIB_H
/* <lalVerbatim> */ /* <lalVerbatim> */
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "LALStatusMacros.h" #include <lal/LALStatusMacros.h>
/* </lalVerbatim> /* </lalVerbatim>
<lalLaTeX> <lalLaTeX>
\noindent\verb@LALStdlib.h@ also includes function prototype headers \noindent\verb@LALStdlib.h@ also includes function prototype headers
for certain standard modules used by many LAL routines: for certain standard modules used by many LAL routines:
\vspace{1ex} \vspace{1ex}
</lalLaTeX> </lalLaTeX>
<lalVerbatim> */ <lalVerbatim> */
#include <stdio.h> #include <stdio.h>
#include "LALMalloc.h" #include <stdarg.h>
#include <lal/LALMalloc.h>
/* </lalVerbatim> /* </lalVerbatim>
<lalLaTeX> <lalLaTeX>
\vfill{\footnotesize\input{LALStdlibHV}} \vfill{\footnotesize\input{LALStdlibHV}}
</lalLaTeX> */ </lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (LALSTDLIBH, "$Id: LALStdlib.h,v 1.3 2000/06/03 21:39:01 jolien Exp $"); NRCSID (LALSTDLIBH, "$Id: LALStdlib.h,v 1.10 2001/12/01 22:09:43 jolien Exp $");
#define LALFopen fopen /* will be replaced by custom unit */ /* These are non-ANSI standard routines that will be allowed in LAL */
#define LALFclose fclose /* will be replaced by custom unit */ int getopt( int, char * const *, const char * );
FILE *popen( const char *, const char * );
int pclose( FILE * );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _LALSTDLIB_H */ #endif /* _LALSTDLIB_H */
 End of changes. 6 change blocks. 
10 lines changed or deleted 13 lines changed or added


 LALTemplate.h   LALTemplate.h 
/********************************** <lalVerbatim file="LALTemplateHV"> /********************************** <lalVerbatim file="LALTemplateHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: LALTemplate.h,v 1.2 2000/07/23 01:14:25 jolien Exp $ $Id: LALTemplate.h,v 1.3 2000/11/09 23:37:20 jolien Exp $
*********************************** </lalVerbatim> */ *********************************** </lalVerbatim> */
/* Description goes here */ /* Description goes here */
#ifndef _IIRFILTER_H /* Protect against double-inclusion */ #ifndef _IIRFILTER_H /* Protect against double-inclusion */
#define _IIRFILTER_H #define _IIRFILTER_H
#include "LALStdlib.h" /* Include any other headers */ #include <lal/LALStdlib.h> /* Include any other headers */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { /* Protect against C++ name mangling */ extern "C" { /* Protect against C++ name mangling */
#endif #endif
/* Define the RCS ID string */ /* Define the RCS ID string */
NRCSID(LALTEMPLATEH,"$Id: LALTemplate.h,v 1.2 2000/07/23 01:14:25 jolien Ex p $"); NRCSID(LALTEMPLATEH,"$Id: LALTemplate.h,v 1.3 2000/11/09 23:37:20 jolien Ex p $");
/* Define error codes and messages. These must be auto-extracted for /* Define error codes and messages. These must be auto-extracted for
inclusion into the documentation */ inclusion into the documentation */
/***************************************************** <lalErrTable> */ /***************************************************** <lalErrTable> */
#define LALTEMPLATEH_EONE 1 #define LALTEMPLATEH_EONE 1
#define LALTEMPLATEH_ETWO 2 #define LALTEMPLATEH_ETWO 2
#define LALTEMPLATEH_MSGEONE "An error condition" #define LALTEMPLATEH_MSGEONE "An error condition"
#define LALTEMPLATEH_MSGETWO "Another error condition" #define LALTEMPLATEH_MSGETWO "Another error condition"
/*************************************************** </lalErrTable> */ /*************************************************** </lalErrTable> */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 PrintVector.h   PrintVector.h 
/************************************ <lalVerbatim file="PrintVectorHV"> /************************************ <lalVerbatim file="PrintVectorHV">
Author: Allen, B. Author: Allen, B.; generalized by J. T. Whelan <whelan@oates.utb.edu>
$Id: PrintVector.h,v 1.4 2000/07/23 01:15:02 jolien Exp $ $Id: PrintVector.h,v 1.7 2001/12/09 04:24:18 whelan Exp $
************************************* </lalVerbatim> */ ************************************* </lalVerbatim> */
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{PrintVector.h}} \section{Header \texttt{PrintVector.h}}
\label{s:PrintVector.h} \label{s:PrintVector.h}
This is a simple utility to print vectors into a file. This is a simple utility to print vectors into a file.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "PrintVector.h" #include <lal/PrintVector.h>
\end{verbatim} \end{verbatim}
\noindent Defines LALPrintVector interface. \noindent Contains the prototypes for the
LAL$\langle\mbox{DT}\rangle$PrintVector functions
\vfill{\footnotesize\input{PrintVectorHV}} \vfill{\footnotesize\input{PrintVectorHV}}
\newpage\input{PrintVectorC} \newpage\input{PrintVectorC}
\newpage\input{PrintVectorTestC}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _PRINTVECTOR_H #ifndef _PRINTVECTOR_H
#define _PRINTVECTOR_H #define _PRINTVECTOR_H
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifndef _LALSTDLIB_H
#include <lal/LALStdlib.h>
#ifndef _LALSTDLIB_H
#define _LALSTDLIB_H
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID( PRINTVECTORH, "$Id: PrintVector.h,v 1.4 2000/07/23 01:15:02 jolien Exp $" ); NRCSID( PRINTVECTORH, "$Id: PrintVector.h,v 1.7 2001/12/09 04:24:18 whelan Exp $" );
void LALCHARPrintVector( CHARVector *vector );
void LALI2PrintVector( INT2Vector *vector );
void LALI4PrintVector( INT4Vector *vector );
void LALI8PrintVector( INT8Vector *vector );
void LALU2PrintVector( UINT2Vector *vector );
void LALU4PrintVector( UINT4Vector *vector );
void LALU8PrintVector( UINT8Vector *vector );
void LALPrintVector( REAL4Vector *vector ); void LALPrintVector( REAL4Vector *vector );
void LALSPrintVector( REAL4Vector *vector );
void LALDPrintVector( REAL8Vector *vector );
void LALCPrintVector( COMPLEX8Vector *vector );
void LALZPrintVector( COMPLEX16Vector *vector );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _PRINTVECTOR_H */ #endif /* _PRINTVECTOR_H */
 End of changes. 8 change blocks. 
6 lines changed or deleted 26 lines changed or added


 Random.h   Random.h 
/*----------------------------------------------------------------------- /**** <lalVerbatim file="RandomHV">
* Author: Creighton, J. D. E. and Tibbits, M. M.
* $Id: Random.h,v 1.6 2001/08/23 03:27:33 jolien Exp $
**** </lalVerbatim> */
/**** <lalLaTeX>
*
* \section{Header \texttt{Random.h}}
* \label{s:Random.h}
* *
* File Name: Random.h * Generates random numbers.
* *
* Revision: $Id: Random.h,v 1.3 2000/07/23 01:15:54 jolien Exp $ * \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
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (RANDOMH, "$Id: Random.h,v 1.3 2000/07/23 01:15:54 jolien Exp $"); NRCSID (RANDOMH, "$Id: Random.h,v 1.6 2001/08/23 03:27:33 jolien Exp $");
/**** <lalLaTeX>
*
* \subsection*{Error conditions}
*
**** </lalLaTeX> */
#define RANDOM_ENULL 1 /* <lalErrTable> */
#define RANDOM_ENNUL 2 #define RANDOMH_ENULL 1
#define RANDOM_ESIZE 4 #define RANDOMH_ENNUL 2
#define RANDOMH_ESIZE 4
#define RANDOM_MSGENULL "Null pointer" #define RANDOMH_ELNTH 8
#define RANDOM_MSGENNUL "Non-null pointer" #define RANDOMH_ESEGZ 16
#define RANDOM_MSGESIZE "Invalid size" #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_MSGENNUL "Non-null pointer"
#define RANDOMH_MSGESIZE "Invalid size"
#define RANDOMH_MSGELNTH "Must have more than one data point"
#define RANDOMH_MSGESEGZ "Invalid number of segments"
#define RANDOMH_MSGENUMZ "Invalid number of points in segment"
#define RANDOMH_MSGEALOC "Memory Allocation Error"
#define RANDOMH_MSGEINIT "Params must be initialized with CreateParams firs
t"
#define RANDOMH_MSGEZERO "Output Vector length must be greater than zero"
#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> */
typedef struct typedef struct
tagRandomParams tagRandomParams
{ {
INT4 i; INT4 i;
INT4 y; INT4 y;
INT4 v[32]; INT4 v[32];
} }
RandomParams; RandomParams;
typedef struct tagMTRandomParams MTRandomParams;
/**** <lalLaTeX>
*
* \newpage\input{RandomC}
* \newpage\input{RandomTestC}
* \newpage\input{MersenneRandomC}
* \newpage\input{MersenneRandomTestC}
*
**** </lalLaTeX> */
void void
LALCreateRandomParams ( LALCreateRandomParams (
LALStatus *status, LALStatus *status,
RandomParams **params, RandomParams **params,
INT4 seed INT4 seed
); );
void void
LALDestroyRandomParams ( LALDestroyRandomParams (
LALStatus *status, LALStatus *status,
RandomParams **params RandomParams **params
); );
void void
LALUniformDeviate ( LALUniformDeviate (
LALStatus *status, LALStatus *status,
REAL4 *deviate, REAL4 *deviate,
RandomParams *params RandomParams *params
); );
void void
LALNormalDeviates ( LALNormalDeviates (
LALStatus *status, LALStatus *status,
REAL4Vector *deviates, REAL4Vector *deviates,
RandomParams *params RandomParams *params
); );
void LALMersenneRandom(
LALStatus *status,
REAL8 *output,
MTRandomParams *params
);
void LALMersenneRandomVector(
LALStatus *status,
REAL8Vector *output,
MTRandomParams *params
);
void LALCreateMTRandomParams(
LALStatus *status,
REAL8 seed,
MTRandomParams **params
);
void LALDestroyMTRandomParams(
LALStatus *status,
MTRandomParams **params
);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _RANDOM_H */ #endif /* _RANDOM_H */
 End of changes. 11 change blocks. 
16 lines changed or deleted 112 lines changed or added


 RealFFT.h   RealFFT.h 
/*----------------------------------------------------------------------- /**** <lalVerbatim file="RealFFTHV">
* * $Id: RealFFT.h,v 1.11 2001/08/22 00:42:04 jolien Exp $
* File Name: RealFFT.h **** </lalVerbatim> */
*
* Author: Creighton, J. D. E. /**** <lalLaTeX>
*
* Revision: $Id: RealFFT.h,v 1.5 2000/07/23 01:13:20 jolien Exp $
*
*-----------------------------------------------------------------------
* *
* NAME * \section{Header \texttt{RealFFT.h}}
* RealFFT.h * \label{s:RealFFT.h}
* *
* SYNOPSIS * Performs real-to-complex and complex-to-real FFTs.
* #include "RealFFT.h"
* *
* DESCRIPTION * \subsection*{Synopsis}
* \begin{verbatim}
* #include <lal/RealFFT.h>
* \end{verbatim}
* *
* DIAGNOSTICS * \noindent Perform real-to-complex and complex-to-real fast Fourier
* transforms of vectors, and sequences of vectors using the package
* FFTW~\cite{fj:1998}.
* *
*----------------------------------------------------------------------- **** </lalLaTeX> */
*/
#ifndef _REALFFT_H #ifndef _REALFFT_H
#define _REALFFT_H #define _REALFFT_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID (REALFFTH, "$Id: RealFFT.h,v 1.5 2000/07/23 01:13:20 jolien Exp $"); NRCSID( REALFFTH, "$Id: RealFFT.h,v 1.11 2001/08/22 00:42:04 jolien Exp $" );
#define REALFFT_ENULL 1 /**** <lalLaTeX>
#define REALFFT_ENNUL 2 * \subsection*{Error conditions}
#define REALFFT_ESIZE 4 **** </lalLaTeX> */
#define REALFFT_ESZMM 8 /**** <lalErrTable> */
#define REALFFT_ESLEN 16
#define REALFFT_ESAME 32 #define REALFFTH_ENULL 1
#define REALFFT_ESIGN 64 #define REALFFTH_ENNUL 2
#define REALFFT_EDATA 128 #define REALFFTH_ESIZE 4
#define REALFFTH_ESZMM 8
#define REALFFT_MSGENULL "Null pointer" #define REALFFTH_ESLEN 16
#define REALFFT_MSGENNUL "Non-null pointer" #define REALFFTH_ESAME 32
#define REALFFT_MSGESIZE "Invalid input size" #define REALFFTH_ESIGN 64
#define REALFFT_MSGESZMM "Size mismatch" #define REALFFTH_EDATA 128
#define REALFFT_MSGESLEN "Invalid/mismatched sequence lengths" #define REALFFTH_EALOC 256
#define REALFFT_MSGESAME "Input/Output data vectors are the same" #define REALFFTH_EFFTW 512
#define REALFFT_MSGESIGN "Incorrect plan sign"
#define REALFFT_MSGEDATA "Bad input data: DC/Nyquist should be real" #define REALFFTH_MSGENULL "Null pointer"
#define REALFFTH_MSGENNUL "Non-null pointer"
typedef struct #define REALFFTH_MSGESIZE "Invalid input size"
tagRealFFTPlan #define REALFFTH_MSGESZMM "Size mismatch"
{ #define REALFFTH_MSGESLEN "Invalid/mismatched sequence lengths"
INT4 sign; #define REALFFTH_MSGESAME "Input/Output data vectors are the same"
UINT4 size; #define REALFFTH_MSGESIGN "Incorrect plan sign"
void *plan; #define REALFFTH_MSGEDATA "Bad input data: DC/Nyquist should be real"
} #define REALFFTH_MSGEALOC "Memory allocation failed"
RealFFTPlan; #define REALFFTH_MSGEFFTW "Error in FFTW"
/**** </lalErrTable> */
/**** <lalLaTeX>
*
* \subsection*{Structures}
*
**** </lalLaTeX> */
/**** <lalVerbatim> */
typedef struct tagRealFFTPlan RealFFTPlan;
/**** </lalVerbatim> */
/**** <lalLaTeX>
*
* This structure contains the parameters necessary for performing an FFT o
f a
* given size and direction. The contents should not be manually adjusted.
*
* \newpage\input{RealFFTC}
* \newpage\input{RealFFTTestC}
**** </lalLaTeX> */
/* #define KEEP_OLD_REAL_FFT */
void
LALCreateForwardRealFFTPlan(
LALStatus *status,
RealFFTPlan **plan,
UINT4 size,
INT4 measure
);
void
LALCreateReverseRealFFTPlan(
LALStatus *status,
RealFFTPlan **plan,
UINT4 size,
INT4 measure
);
void
LALDestroyRealFFTPlan(
LALStatus *status,
RealFFTPlan **plan
);
void
LALForwardRealFFT(
LALStatus *status,
COMPLEX8Vector *output,
REAL4Vector *input,
RealFFTPlan *plan
);
void
LALReverseRealFFT(
LALStatus *status,
REAL4Vector *output,
COMPLEX8Vector *input,
RealFFTPlan *plan
);
void
LALRealPowerSpectrum (
LALStatus *status,
REAL4Vector *spec,
REAL4Vector *data,
RealFFTPlan *plan
);
void
LALREAL4VectorFFT(
LALStatus *status,
REAL4Vector *output,
REAL4Vector *input,
RealFFTPlan *plan
);
/** OLD ROUTINES **/
#ifdef KEEP_OLD_FFT
#define KEEP_OLD_REAL_FFT
#endif
#ifdef KEEP_OLD_REAL_FFT
void void
LALEstimateFwdRealFFTPlan ( LALEstimateFwdRealFFTPlan (
LALStatus *stat, LALStatus *stat,
RealFFTPlan **plan, RealFFTPlan **plan,
UINT4 size UINT4 size
); );
void void
LALEstimateInvRealFFTPlan ( LALEstimateInvRealFFTPlan (
skipping to change at line 91 skipping to change at line 172
); );
void void
LALMeasureInvRealFFTPlan ( LALMeasureInvRealFFTPlan (
LALStatus *stat, LALStatus *stat,
RealFFTPlan **plan, RealFFTPlan **plan,
UINT4 size UINT4 size
); );
void void
LALDestroyRealFFTPlan (
LALStatus *stat,
RealFFTPlan **plan
);
void
LALREAL4VectorFFT (
LALStatus *stat,
REAL4Vector *vout,
REAL4Vector *vinp,
RealFFTPlan *plan
);
void
LALREAL4VectorSequenceFFT ( LALREAL4VectorSequenceFFT (
LALStatus *stat, LALStatus *stat,
REAL4VectorSequence *vout, REAL4VectorSequence *vout,
REAL4VectorSequence *vinp, REAL4VectorSequence *vinp,
RealFFTPlan *plan RealFFTPlan *plan
); );
void void
LALFwdRealFFT ( LALFwdRealFFT (
LALStatus *stat, LALStatus *stat,
skipping to change at line 129 skipping to change at line 196
void void
LALInvRealFFT ( LALInvRealFFT (
LALStatus *stat, LALStatus *stat,
REAL4Vector *vout, REAL4Vector *vout,
COMPLEX8Vector *vinp, COMPLEX8Vector *vinp,
RealFFTPlan *plan RealFFTPlan *plan
); );
void void
LALRealPowerSpectrum (
LALStatus *stat,
REAL4Vector *vout,
REAL4Vector *vinp,
RealFFTPlan *plan
);
void
LALFwdRealSequenceFFT ( LALFwdRealSequenceFFT (
LALStatus *stat, LALStatus *stat,
COMPLEX8VectorSequence *vout, COMPLEX8VectorSequence *vout,
REAL4VectorSequence *vinp, REAL4VectorSequence *vinp,
RealFFTPlan *plan RealFFTPlan *plan
); );
void void
LALInvRealSequenceFFT ( LALInvRealSequenceFFT (
LALStatus *stat, LALStatus *stat,
skipping to change at line 160 skipping to change at line 219
); );
void void
LALRealSequencePowerSpectrum ( LALRealSequencePowerSpectrum (
LALStatus *stat, LALStatus *stat,
REAL4VectorSequence *vout, REAL4VectorSequence *vout,
REAL4VectorSequence *vinp, REAL4VectorSequence *vinp,
RealFFTPlan *plan RealFFTPlan *plan
); );
#endif /* KEEP_OLD_REAL_FFT */
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _REALFFT_H */ #endif /* _REALFFT_H */
 End of changes. 14 change blocks. 
67 lines changed or deleted 130 lines changed or added


 SeqFactories.h   SeqFactories.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
File Name: SeqFactories.h File Name: SeqFactories.h
<lalVerbatim file="SeqFactoriesHV"> <lalVerbatim file="SeqFactoriesHV">
Revision: $Id: SeqFactories.h,v 1.5 2000/07/23 01:13:06 jolien Exp $ Revision: $Id: SeqFactories.h,v 1.8 2001/08/21 04:19:49 jolien Exp $
</lalVerbatim> </lalVerbatim>
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
/* <lalLaTeX> /* <lalLaTeX>
\section{Header \texttt{SeqFactories.h}} \section{Header \texttt{SeqFactories.h}}
\label{s:SeqFactories.h} \label{s:SeqFactories.h}
Provides prototype and status code information for use of CreateVectorSeque nce Provides prototype and status code information for use of CreateVectorSeque nce
and DestroyVectorSequence. and DestroyVectorSequence.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "SeqFactories.h" #include <lal/SeqFactories.h>
\end{verbatim} \end{verbatim}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _SEQFACTORIES_H #ifndef _SEQFACTORIES_H
#define _SEQFACTORIES_H #define _SEQFACTORIES_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "AVFactories.h" #include <lal/AVFactories.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (SEQFACTORIESH, "$Id: SeqFactories.h,v 1.5 2000/07/23 01:13:06 jolie n Exp $"); NRCSID (SEQFACTORIESH, "$Id: SeqFactories.h,v 1.8 2001/08/21 04:19:49 jolie n Exp $");
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
\input{SeqFactoriesHErrTab} \input{SeqFactoriesHErrTab}
</lalLaTeX> */ </lalLaTeX> */
/* /*
<lalErrTable file="SeqFactoriesHErrTab"> <lalErrTable file="SeqFactoriesHErrTab">
skipping to change at line 76 skipping to change at line 76
</lalErrTable> </lalErrTable>
*/ */
/* Structures. */ /* Structures. */
/* <lalLaTeX> /* <lalLaTeX>
\subsection*{Structures} \subsection*{Structures}
\begin{verbatim} \begin{verbatim}
CreateVectorSequenceIn CreateVectorSequenceIn
\end{verbatim} \end{verbatim}
\index{\verb&CreateVectorSequenceIn&} \idx[Type]{CreateVectorSequenceIn}
\noindent This structure stores the input required for creating a vector \noindent This structure stores the input required for creating a vector
sequence. This input includes the length of the sequence (i.e., the number of sequence. This input includes the length of the sequence (i.e., the number of
vectors) and the length of each vector. The fields are: vectors) and the length of each vector. The fields are:
\begin{description} \begin{description}
\item[\texttt{UINT4 length}] The sequence length. \item[\texttt{UINT4 length}] The sequence length.
\item[\texttt{UINT4 vectorLength}] The length of each vector in the sequenc e. \item[\texttt{UINT4 vectorLength}] The length of each vector in the sequenc e.
\end{description} \end{description}
 End of changes. 5 change blocks. 
6 lines changed or deleted 6 lines changed or added


 Sort.h   Sort.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
* *
* File Name: Sort.h * File Name: Sort.h
* *
* Author: Creighton, T. D. * Author: Creighton, T. D.
* *
* Revision: $Id: Sort.h,v 1.3 2000/07/23 01:15:54 jolien Exp $ * Revision: $Id: Sort.h,v 1.6 2001/02/22 00:27:08 jolien Exp $
* *
*-----------------------------------------------------------------------*/ *-----------------------------------------------------------------------*/
/* <lalLaTeX> /*
<lalVerbatim file="SortHV">
$Id: Sort.h,v 1.6 2001/02/22 00:27:08 jolien Exp $
</lalVerbatim>
<lalLaTeX>
\section{Header \texttt{Sort.h}} \section{Header \texttt{Sort.h}}
\label{s:Sort.h}
Provides routines for sorting, indexing, and ranking real vector Provides routines for sorting, indexing, and ranking real vector
elements. elements.
\subsection{Synopsis} \subsection{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "Sort.h" #include <lal/Sort.h>
\end{verbatim} \end{verbatim}
</lalLaTeX> */ </lalLaTeX> */
#ifndef _SORT_H #ifndef _SORT_H
#define _SORT_H #define _SORT_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID(SORTH,"$Id: Sort.h,v 1.3 2000/07/23 01:15:54 jolien Exp $"); NRCSID(SORTH,"$Id: Sort.h,v 1.6 2001/02/22 00:27:08 jolien Exp $");
/* <lalLaTeX> /* <lalLaTeX>
\subsection{Error conditions} \subsection*{Error conditions}
\begin{tabular}{|c|l|l|} \input{SortHErrTab}
\hline </lalLaTeX>
status & status & Explanation \\
code & description & \\
\hline
\tt 1 & \tt Null pointer & Missing a required pointer. \\
\tt 2 & \tt Length mismatch & Vectors are of different length. \\
\tt 3 & \tt Memory allocation error & Could not allocate memory. \\
\hline
\end{tabular}
</lalLaTeX> */ <lalErrTable file="SortHErrTab"> */
#define SORT_ENUL 1 #define SORTH_ENUL 1
#define SORT_ELEN 2 #define SORTH_ELEN 2
#define SORT_EMEM 3 #define SORTH_EMEM 3
#define SORT_MSGENUL "Null pointer"
#define SORT_MSGELEN "Length mismatch"
#define SORT_MSGEMEM "Memory allocation error"
/* <lalLaTeX> #define SORTH_MSGENUL "Null pointer"
\subsection{Structures} #define SORTH_MSGELEN "Length mismatch"
#define SORTH_MSGEMEM "Memory allocation error"
/* </lalErrTable>
<lalLaTeX>
\subsection*{Structures}
</lalLaTeX> */ </lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{HeapSortC} \newpage\input{HeapSortC}
</lalLaTeX> */ </lalLaTeX> */
void LALSHeapSort(LALStatus *stat, void LALSHeapSort(LALStatus *stat,
REAL4Vector *vector); REAL4Vector *vector);
void LALSHeapIndex(LALStatus *stat, void LALSHeapIndex(LALStatus *stat,
INT4Vector *index, INT4Vector *indx,
REAL4Vector *vector); REAL4Vector *vector);
void LALSHeapRank(LALStatus *stat, void LALSHeapRank(LALStatus *stat,
INT4Vector *rank, INT4Vector *rank,
REAL4Vector *vector); REAL4Vector *vector);
void LALDHeapSort(LALStatus *stat, void LALDHeapSort(LALStatus *stat,
REAL8Vector *vector); REAL8Vector *vector);
void LALDHeapIndex(LALStatus *stat, void LALDHeapIndex(LALStatus *stat,
INT4Vector *index, INT4Vector *indx,
REAL8Vector *vector); REAL8Vector *vector);
void LALDHeapRank(LALStatus *stat, void LALDHeapRank(LALStatus *stat,
INT4Vector *rank, INT4Vector *rank,
REAL8Vector *vector); REAL8Vector *vector);
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{SortTestC} \newpage\input{SortTestC}
</lalLaTeX> */ </lalLaTeX> */
 End of changes. 12 change blocks. 
28 lines changed or deleted 29 lines changed or added


 SpecBuffer.h   SpecBuffer.h 
/*----------------------------------------------------------------------- #if 0 /* autodoc block */
*
* File Name: SpecBuffer.h <lalVerbatim file="SpecBufferHV">
* $Id: SpecBuffer.h,v 1.5 2001/02/23 23:46:26 jolien Exp $
* Author: Creighton, J. D. E. </lalVerbatim>
*
* Revision: $Id: SpecBuffer.h,v 1.3 2000/07/23 01:13:42 jolien Exp $ <lalLaTeX>
*
*----------------------------------------------------------------------- \section{Header \texttt{SpecBuffer.h}}
*/ \label{s:SpecBuffer.h}
Root finding routines.
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/SpecBuffer.h>
\end{verbatim}
\noindent
Generates and stores a buffer of spectra and returns an average spectrum.
</lalLaTeX>
#endif /* autodoc block */
#ifndef _SPECBUFFER_H #ifndef _SPECBUFFER_H
#define _SPECBUFFER_H #define _SPECBUFFER_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "RealFFT.h" #include <lal/RealFFT.h>
#include "Window.h" #include <lal/Window.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (SPECBUFFERH, "$Id: SpecBuffer.h,v 1.3 2000/07/23 01:13:42 jolien Ex NRCSID (SPECBUFFERH, "$Id: SpecBuffer.h,v 1.5 2001/02/23 23:46:26 jolien Ex
p $"); p $");
#if 0 /* autodoc block */
<lalLaTeX>
\subsection*{Error conditions}
\input{SpecBufferHErrTab}
</lalLaTeX>
<lalErrTable file="SpecBufferHErrTab">
#endif /* autodoc block */
#define SPECBUFFERH_ENULL 1
#define SPECBUFFERH_ENNUL 2
#define SPECBUFFERH_ESIZE 4
#define SPECBUFFERH_ESZMM 8
#define SPECBUFFERH_EZERO 16
#define SPECBUFFERH_ENONE 32
#define SPECBUFFERH_MSGENULL "Null pointer"
#define SPECBUFFERH_MSGENNUL "Non-null pointer"
#define SPECBUFFERH_MSGESIZE "Invalid input size"
#define SPECBUFFERH_MSGESZMM "Size mismatch"
#define SPECBUFFERH_MSGEZERO "Zero divide"
#define SPECBUFFERH_MSGENONE "No stored spectra"
#if 0 /* autodoc block */
</lalErrTable>
<lalLaTeX>
\subsection*{Structures}
\begin{verbatim}
typedef struct
tagSpectrumBufferPar
{
INT4 numSpec;
INT4 numPoints;
WindowType windowType;
RealFFTPlan *plan;
}
SpectrumBufferPar;
\end{verbatim}
The parameter structure for creating the spectrum buffer. The fields are:
\begin{description}
\item[\texttt{numSpec}] The number of spectra to hold in the buffer.
\item[\texttt{numPoints}] The number of points of data used to generate eac
h
spectrum in the buffer (note: this is not the number of points in the
spectrum).
\item[\texttt{windowType}] The type of window used in generating the spectr
um
(see the package \texttt{window}).
\item[\texttt{plan}] The FFT plan to use in generating the spectrum
(see the package \texttt{fft}).
\end{description}
\begin{verbatim}
typedef struct tagSpectrumBuffer SpectrumBuffer;
\end{verbatim}
#define SPECBUFFER_ENULL 1 The structure that holds the spectrum buffer. The user should not modify
#define SPECBUFFER_ENNUL 2 the fields of this structure.
#define SPECBUFFER_ESIZE 4
#define SPECBUFFER_ESZMM 8 \begin{verbatim}
#define SPECBUFFER_EZERO 16 typedef struct
#define SPECBUFFER_ENONE 32 tagComputeSpectrumPar
{
#define SPECBUFFER_MSGENULL "Null pointer" WindowType windowType;
#define SPECBUFFER_MSGENNUL "Non-null pointer" REAL4Vector *window;
#define SPECBUFFER_MSGESIZE "Invalid input size" REAL4 wss;
#define SPECBUFFER_MSGESZMM "Size mismatch" RealFFTPlan *plan;
#define SPECBUFFER_MSGEZERO "Zero divide" }
#define SPECBUFFER_MSGENONE "No stored spectra" ComputeSpectrumPar;
\end{verbatim}
The parameter structure for computing a windowed power spectrum from a segm
ent
of data. (This is for use in a lower-level function.) The fields are:
\begin{description}
\item[\texttt{windowType}] The type of window to be used (see the package
\texttt{window}).
\item[\texttt{window}] The actual window data.
\item[\texttt{wss}] The sum-of-squares of the window data (needed for
normalization).
\item[\texttt{plan}] The FFT plan to use in constructing the power spectrum
(see the package \texttt{fft}).
\end{description}
</lalLaTeX>
#endif /* autodoc block */
typedef struct typedef struct
tagComputeSpectrumPar tagComputeSpectrumPar
{ {
WindowType windowType; WindowType windowType;
REAL4Vector *window; REAL4Vector *window;
REAL4 wss; REAL4 wss;
RealFFTPlan *plan; RealFFTPlan *plan;
} }
ComputeSpectrumPar; ComputeSpectrumPar;
skipping to change at line 69 skipping to change at line 161
typedef struct typedef struct
tagSpectrumBufferPar tagSpectrumBufferPar
{ {
INT4 numSpec; INT4 numSpec;
INT4 numPoints; INT4 numPoints;
WindowType windowType; WindowType windowType;
RealFFTPlan *plan; RealFFTPlan *plan;
} }
SpectrumBufferPar; SpectrumBufferPar;
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{SpecBufferC}
</lalLaTeX>
#endif /* autodoc block */
void void
LALComputeSpectrum ( LALComputeSpectrum (
LALStatus *status, LALStatus *status,
REAL4FrequencySeries *spectrum, REAL4FrequencySeries *spectrum,
INT2TimeSeries *timeSeries, INT2TimeSeries *timeSeries,
ComputeSpectrumPar *parameters ComputeSpectrumPar *parameters
); );
void void
LALCreateSpectrumBuffer ( LALCreateSpectrumBuffer (
LALStatus *status, LALStatus *status,
SpectrumBuffer **buffer, SpectrumBuffer **buffer,
SpectrumBufferPar *params SpectrumBufferPar *params
); );
void void
LALDestroySpectrumBuffer ( LALDestroySpectrumBuffer (
LALStatus *status, LALStatus *status,
SpectrumBuffer **buffer SpectrumBuffer **buffer
); );
void void
LALAddSpectrum ( LALAddSpectrum (
LALStatus *status, LALStatus *status,
SpectrumBuffer *specBuffer, SpectrumBuffer *specBuffer,
INT2TimeSeries *timeSeries INT2TimeSeries *timeSeries
); );
void void
LALAverageSpectrum ( LALAverageSpectrum (
LALStatus *status, LALStatus *status,
REAL4FrequencySeries *spectrum, REAL4FrequencySeries *spectrum,
SpectrumBuffer *buffer SpectrumBuffer *buffer
); );
#if 0 /* autodoc block */
<lalLaTeX>
\newpage\input{SpecBufferTestC}
</lalLaTeX>
#endif /* autodoc block */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SPECBUFFER_H */ #endif /* _SPECBUFFER_H */
 End of changes. 11 change blocks. 
33 lines changed or deleted 144 lines changed or added


 TFTransform.h   TFTransform.h 
/*----------------------------------------------------------------------- /********************************** <lalVerbatim file="TFTransformHV">
* Author: Flanagan, E
* File Name: TFTransform.h $Id: TFTransform.h,v 1.5 2001/11/16 19:40:21 patrick Exp $
* **************************************************** </lalVerbatim> */
* Author: Eanna Flanagan
*
* Revision: $Id: TFTransform.h,v 1.2 2000/07/23 01:12:27 jolien Exp $
*
*-----------------------------------------------------------------------
*
* NAME
* TFTransform.h
*
* SYNOPSIS
* #include "TFTransform.h"
*
* DESCRIPTION
* Function to create a time frequency (TF) plane from a segment of data
* either (i) by stacking Fourier transforms of subsegments of the data
* in the time domain, or (ii) FFTing the entire data segment and performin
g
* inverse FFTs of subsegments of the data in the frequency domain.
*
* DIAGNOSTICS
*
*-----------------------------------------------------------------------
*/
#ifndef _TFTRANSFORM_H #ifndef _TFTRANSFORM_H
#define _TFTRANSFORM_H #define _TFTRANSFORM_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "Window.h" #include <lal/Window.h>
#include "RealFFT.h" #include <lal/RealFFT.h>
#include "ComplexFFT.h" #include <lal/ComplexFFT.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID (TFTRANSFORMH, "$Id: TFTransform.h,v 1.2 2000/07/23 01:12:27 jolien Exp $"); NRCSID (TFTRANSFORMH, "$Id: TFTransform.h,v 1.5 2001/11/16 19:40:21 patrick Exp $");
#define TFTRANSFORM_ENULLP 1 /******** <lalErrTable file="TFTransformHErrTab"> ********/
#define TFTRANSFORM_EPOSARG 2 #define TFTRANSFORMH_ENULLP 1
#define TFTRANSFORM_EALLOCP 4 #define TFTRANSFORMH_EPOSARG 2
#define TFTRANSFORM_EMALLOC 8 #define TFTRANSFORMH_EALLOCP 4
#define TFTRANSFORM_EINCOMP 16 #define TFTRANSFORMH_EMALLOC 8
#define TFTRANSFORMH_EINCOMP 16
#define TFTRANSFORM_MSGENULLP "Null pointer"
#define TFTRANSFORM_MSGEPOSARG "Argument must be positive" #define TFTRANSFORMH_MSGENULLP "Null pointer"
#define TFTRANSFORM_MSGEALLOCP "Pointer has already been allocated, sho #define TFTRANSFORMH_MSGEPOSARG "Argument must be positive"
uld be null" #define TFTRANSFORMH_MSGEALLOCP "Pointer has already been allocated, sh
#define TFTRANSFORM_MSGEMALLOC "Malloc failure" ould be null"
#define TFTRANSFORM_MSGEINCOMP "Incompatible arguments" #define TFTRANSFORMH_MSGEMALLOC "Malloc failure"
#define TFTRANSFORMH_MSGEINCOMP "Incompatible arguments"
/******** </lalErrTable> ********/
typedef enum { typedef enum {
verticalPlane, verticalPlane,
/* /*
* Constructed by dividing time domain data into chunks * Constructed by dividing time domain data into chunks
* and FFTing each chunk, thus producing a vertical line (the FFT) * and FFTing each chunk, thus producing a vertical line (the FFT)
* in the TF plane for each chunk in the time domain * in the TF plane for each chunk in the time domain
* *
*/ */
horizontalPlane horizontalPlane
 End of changes. 4 change blocks. 
46 lines changed or deleted 25 lines changed or added


 Thresholds.h   Thresholds.h 
/*----------------------------------------------------------------------- /********************************** <lalVerbatim file="ThresholdsHV">
* Author: Flanagan, E
* File Name: Thresholds.h $Id: Thresholds.h,v 1.4 2001/02/14 21:53:50 jolien Exp $
* **************************************************** </lalVerbatim> */
* Author: Eanna Flanagan
*
* Revision: $Id: Thresholds.h,v 1.2 2000/07/23 01:12:27 jolien Exp $
*
*-----------------------------------------------------------------------
*
* NAME
* Thresholds.h
*
* SYNOPSIS
* #include "Thresholds.h"
*
* DESCRIPTION
* Error codes, typedefs, and protypes for the functions related
* to thresholds for chi-squared and non-central chi-squared
* distributions
*
*
* DIAGNOSTICS
*
*-----------------------------------------------------------------------
*/
#ifndef _THRESHOLDS_H #ifndef _THRESHOLDS_H
#define _THRESHOLDS_H #define _THRESHOLDS_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#include "LALRCSID.h" #include <lal/LALRCSID.h>
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID (THRESHOLDSH, "$Id: Thresholds.h,v 1.2 2000/07/23 01:12:27 jolien Ex p $"); NRCSID (THRESHOLDSH, "$Id: Thresholds.h,v 1.4 2001/02/14 21:53:50 jolien Ex p $");
#define THRESHOLDS_ENULLP 1 /******** <lalErrTable file="ThresholdsHErrTab"> ********/
#define THRESHOLDS_EPOSARG 2 #define THRESHOLDSH_ENULLP 1
#define THRESHOLDS_EMXIT 4 #define THRESHOLDSH_EPOSARG 2
#define THRESHOLDS_EBADPROB 8 #define THRESHOLDSH_EMXIT 4
#define THRESHOLDS_ERANGE 16 #define THRESHOLDSH_EBADPROB 8
#define THRESHOLDSH_ERANGE 16
#define THRESHOLDS_MSGENULLP "Null pointer"
#define THRESHOLDS_MSGEPOSARG "Arguments must be non-negative" #define THRESHOLDSH_MSGENULLP "Null pointer"
#define THRESHOLDS_MSGEMXIT "Maximum iterations exceeded" #define THRESHOLDSH_MSGEPOSARG "Arguments must be non-negative"
#define THRESHOLDS_MSGEBADPROB "Supplied probability must be between 0 and #define THRESHOLDSH_MSGEMXIT "Maximum iterations exceeded"
1" #define THRESHOLDSH_MSGEBADPROB "Supplied probability must be between 0 an
#define THRESHOLDS_MSGERANGE "Arguments too large, cannot obtain finite d 1"
probability" #define THRESHOLDSH_MSGERANGE "Arguments too large, cannot obtain finite
probability"
/******** </lalErrTable> ********/
typedef struct tagChisqCdfIn typedef struct tagChisqCdfIn
{ {
REAL8 chi2; /* value of chi squared */ REAL8 chi2; /* value of chi squared */
REAL8 dof; /* number of degrees of freedom */ REAL8 dof; /* number of degrees of freedom */
REAL8 nonCentral; /* non-centrality parameter */ REAL8 nonCentral; /* non-centrality parameter */
} }
ChisqCdfIn; ChisqCdfIn;
typedef struct tagChi2ThresholdIn typedef struct tagChi2ThresholdIn
 End of changes. 4 change blocks. 
43 lines changed or deleted 23 lines changed or added


 TimeFreq.h   TimeFreq.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
* *
* File Name: TimeFreq.h * File Name: TimeFreq.h
* *
* Author: * Author:
* *
* Revision: $Id: TimeFreq.h,v 1.3 2000/07/23 01:15:28 jolien Exp $ * Revision: $Id: TimeFreq.h,v 1.4 2000/11/09 23:37:21 jolien Exp $
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
* *
* NAME * NAME
* TimeFreq.h * TimeFreq.h
* *
* SYNOPSIS * SYNOPSIS
* #include "TimeFreq.h" * #include <lal/TimeFreq.h>
* *
* DESCRIPTION * DESCRIPTION
* Header file for the TFR package (computation of time-frequency * Header file for the TFR package (computation of time-frequency
* representation for the detection of gravitational waves from * representation for the detection of gravitational waves from
* unmodeled astrophysical sources) * unmodeled astrophysical sources)
* *
* DIAGNOSTICS * DIAGNOSTICS
* ?? * ??
*----------------------------------------------------------------------- * / *----------------------------------------------------------------------- * /
skipping to change at line 45 skipping to change at line 45
* after include-loop protection. Includes should appear in the followin g * after include-loop protection. Includes should appear in the followin g
* order: * order:
* a. Standard library includes * a. Standard library includes
* b. LDAS includes * b. LDAS includes
* c. LAL includes * c. LAL includes
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "LALConstants.h" #include <lal/LALConstants.h>
#include "RealFFT.h" #include <lal/RealFFT.h>
#include "AVFactories.h" #include <lal/AVFactories.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (TIMEFREQH, "$Id: TimeFreq.h,v 1.3 2000/07/23 01:15:28 jolien Exp $" ); NRCSID (TIMEFREQH, "$Id: TimeFreq.h,v 1.4 2000/11/09 23:37:21 jolien Exp $" );
/* /*
* 5. Macros. But, note that macros are deprecated. * 5. Macros. But, note that macros are deprecated.
*/ */
/* /*
* 8. Structure, enum, union, etc., typdefs. * 8. Structure, enum, union, etc., typdefs.
*/ */
#define CREATETFR_ENULL 1 #define CREATETFR_ENULL 1
 End of changes. 4 change blocks. 
7 lines changed or deleted 7 lines changed or added


 TrackSearch.h   TrackSearch.h 
/*----------------------------------------------------------------------- /*-----------------------------------------------------------------------
* *
* File Name: LALTrackSearch.h * File Name: LALTrackSearch.h
* *
* Origin: Balasubramanian, R. (Cardiff University, UK) * Origin: Balasubramanian, R. (Cardiff University, UK)
* *
* Revision: $Id: TrackSearch.h,v 1.2 2000/07/23 01:15:42 jolien Exp $ * Revision: $Id: TrackSearch.h,v 1.3 2000/11/09 23:37:22 jolien Exp $
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
* *
* NAME * NAME
* TrackSearch.h * TrackSearch.h
* *
* SYNOPSIS * SYNOPSIS
* #include "TrackSearch.h" * #include <lal/TrackSearch.h>
* *
* DESCRIPTION * DESCRIPTION
* Defines Structures function prototypes and macros for use by the * Defines Structures function prototypes and macros for use by the
* curve tracking algorithm to find curves in time frequency maps. * curve tracking algorithm to find curves in time frequency maps.
* This header file and the other source files for curve tracking are adapt ed * This header file and the other source files for curve tracking are adapt ed
* from Carsten Steger's detect-lines package. * from Carsten Steger's detect-lines package.
* *
* DIAGNOSTICS * DIAGNOSTICS
* *
*----------------------------------------------------------------------- *-----------------------------------------------------------------------
*/ */
#ifndef _TRACKSEARCH_H #ifndef _TRACKSEARCH_H
#define _TRACKSEARCH_H #define _TRACKSEARCH_H
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#include "LALConstants.h" #include <lal/LALConstants.h>
#include "TimeFreq.h" #include <lal/TimeFreq.h>
#ifdef __cplusplus /* C++ protection. */ #ifdef __cplusplus /* C++ protection. */
extern "C" { extern "C" {
#endif #endif
NRCSID (TRACKSEARCHH, "$Id: TrackSearch.h,v 1.2 2000/07/23 01:15:42 jolien Exp $"); NRCSID (TRACKSEARCHH, "$Id: TrackSearch.h,v 1.3 2000/11/09 23:37:22 jolien Exp $");
/* Mathematical constants */ /* Mathematical constants */
#ifndef SQRT_2_PI_INV #ifndef SQRT_2_PI_INV
#define SQRT_2_PI_INV 0.39894228040143272L /* (1.0 / sqrt(2.0 * pi)) */ #define SQRT_2_PI_INV 0.39894228040143272L /* (1.0 / sqrt(2.0 * pi)) */
#endif #endif
#define MAX_ANGLE_DIFFERENCE (LAL_PI/6.0) /* the max angle differene betwee n 2 adjacent line points */ #define MAX_ANGLE_DIFFERENCE (LAL_PI/6.0) /* the max angle differene betwee n 2 adjacent line points */
#define MASK_SIZE 4 /* size of the Gaussian mask in units of sigma (st d. deviation) */ #define MASK_SIZE 4 /* size of the Gaussian mask in units of sigma (st d. deviation) */
#define PIXEL_BOUNDARY (0.6) #define PIXEL_BOUNDARY (0.6)
#define MAX_ANGLE_DIFF (LAL_PI/6.0) /* maximum one sided angle within which to search #define MAX_ANGLE_DIFF (LAL_PI/6.0) /* maximum one sided angle within which to search
for a continuation of the line */ for a continuation of the line */
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added


 VectorOps.h   VectorOps.h 
/*----------------------------------------------------------------------- /**** <lalVerbatim file="VectorOpsHV">
* * Author: J. D. E. Creighton, T. D. Creighton, A. M. Sintes
* File Name: VectorOps.h * $Id: VectorOps.h,v 1.7 2001/11/29 20:09:16 jolien Exp $
* **** </lalVerbatim> */
* Authors: Creighton, J. D. E., Creighton, T. D., Sintes, A. M.
* /**** <lalLaTeX>
* Revision: $Id: VectorOps.h,v 1.5 2000/07/23 01:16:06 jolien Exp $
* *
*----------------------------------------------------------------------- * \section{Header \texttt{VectorOps.h}}
* *
* NAME * Basic vector manipulation operations.
* VectorOps.h
* *
* SYNOPSIS * \subsection*{Synopsis}
* #include "VectorOps.h" * \begin{verbatim}
* #include <lal/VectorOps.h>
* \end{verbatim}
* *
* DESCRIPTION * \subsection*{Error conditions}
* \input{VectorOpsHE}
* *
* DIAGNOSTICS * \vfill{\footnotesize\input{VectorOpsHV}}
* \newpage\input{VectorMultiplyC}
* \newpage\input{VectorPolarC}
* \newpage\input{VectorOpsTestC}
* *
*----------------------------------------------------------------------- **** </lalLaTeX> */
*/
#ifndef _VECTOROPS_H #ifndef _VECTOROPS_H
#define _VECTOROPS_H #define _VECTOROPS_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID (VECTOROPSH, "$Id: VectorOps.h,v 1.5 2000/07/23 01:16:06 jolien Exp $"); NRCSID (VECTOROPSH, "$Id: VectorOps.h,v 1.7 2001/11/29 20:09:16 jolien Exp $");
#define VECTOROPS_ENULL 1 /**** <lalErrTable file="VectorOpsHE"> */
#define VECTOROPS_ESIZE 2 #define VECTOROPSH_ENULL 1
#define VECTOROPS_ESZMM 4 #define VECTOROPSH_ESIZE 2
#define VECTOROPS_ESAME 8 #define VECTOROPSH_ESZMM 4
#define VECTOROPSH_ESAME 8
#define VECTOROPS_MSGENULL "Null pointer"
#define VECTOROPS_MSGESIZE "Invalid input size" #define VECTOROPSH_MSGENULL "Null pointer"
#define VECTOROPS_MSGESZMM "Size mismatch" #define VECTOROPSH_MSGESIZE "Invalid input size"
#define VECTOROPS_MSGESAME "Input/Output data vectors are the same" #define VECTOROPSH_MSGESZMM "Size mismatch"
#define VECTOROPSH_MSGESAME "Input/Output data vectors are the same"
/**** </lalErrTable> */
void void
LALCCVectorMultiply ( LALCCVectorMultiply (
LALStatus *, LALStatus *,
COMPLEX8Vector *, COMPLEX8Vector *,
const COMPLEX8Vector *, const COMPLEX8Vector *,
const COMPLEX8Vector * const COMPLEX8Vector *
); );
void void
skipping to change at line 168 skipping to change at line 174
void void
LALDDVectorMultiply( LALDDVectorMultiply(
LALStatus *, LALStatus *,
REAL8Vector *, REAL8Vector *,
const REAL8Vector *, const REAL8Vector *,
const REAL8Vector * const REAL8Vector *
); );
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _VECTOROPS_H */ #endif /* _VECTOROPS_H */
 End of changes. 12 change blocks. 
27 lines changed or deleted 34 lines changed or added


 Window.h   Window.h 
/*----------------------------------------------------------------------- /*************************************************** <lalVerbatim file="Win
* dowHV">
* File Name: Window.h Author:Bruce Allen
* $Id: Window.h,v 1.10 2001/12/04 22:51:25 jolien Exp $
* Author: Allen, Bruce ballen@dirac.phys.uwm.edu **************************************************** </lalVerbatim> */
* /*************************************************** <lalLaTeX>
* Revision: $Id: Window.h,v 1.4 2000/07/23 01:16:19 jolien Exp $
* \section{Header \texttt{Window.h}}
*----------------------------------------------------------------------- \label{s:Window.h}
* \idx[Constant]{Rectangular}
* NAME \idx[Constant]{Hann}
* Window.h \idx[Constant]{Welch}
* \idx[Constant]{Bartlett}
* SYNOPSIS \idx[Constant]{Parzen}
* #include "Window.h" \idx[Constant]{Papoulis}
* \index{Apodize}
* DESCRIPTION \index{Taper}
* Error codes, typedefs and prototypes required for use of the Window \index{Power Spectrum}
* family of LAL functions \index{Bias in power spectrum}
* \index{Spectral Estimation}
* DIAGNOSTICS
* This header file contains enums that define the different types
*----------------------------------------------------------------------- of windows, and a parameter block which is used as input to
*/ the window-making function. This allows you to
dreate a REAL4 vector structure containing a window (also called
a taper, lag window, or apodization function).
\subsection*{Synopsis}
\begin{verbatim}
#include <lal/Window.h>
\end{verbatim}
\noindent
The routine prototyped in this header file
creates REAL4 vector structure containing a window (also called
a taper, lag window, or apodization function). The choices
currently available are:
\begin{itemize}
\item Rectangular
\item Hann
\item Welch
\item Bartlett
\item Parzen
\item Papoulis
\item Hamming
\end{itemize}
It should be straighforward to add additional window functions if
they are desired.
The window functions are defined for $j=0,\cdots,N-1$ by the following
formulae. Note that $N$ is the length of the vector. In these formulae, l
et
$x=2 \pi j/N$, and $y=|2j/N-1|$,
\begin{eqnarray*}
{\rm Rectangular:\ } w_j &=& 1 \\
{\rm Hann:\ } w_j &=& {1 \over 2} ( 1 - \cos x ) \\
{\rm Welch:\ } w_j &=& 1 - y^2 \\
{\rm Bartlett:\ } w_j &=& 1 - y \\
{\rm Parzen:\ } w_j &=& 1 - 6 y^2 + 6 y^3 {\rm\ if\ } y\le 1/2\\
&=& 2 (1-y)^3 {\rm\ if\ } y>1/2\\
{\rm Papoulis:\ } w_j &=& {1 \over \pi} \sin (\pi y ) + ( 1 - y ) \cos
(\pi y )\\
{\rm Hamming:\ } w_j &=& 1-0.46 (1 + \cos x ) \\
\end{eqnarray*}
These window functions are shown in Fig.~\ref{f:window} for $N=1024$.
A couple of comments and warnings may be useful. First, the
definitions given here are taken from {\it Numerical Recipes in C} \cite{nu
mrec} and
{\it Spectral Analysis for Physical Applications} \cite{pw}.
The definitions of windows are {\it not standard}. In particular,
some authors (e.g. J.G. Proakis and D.G. Manolakis, {\it Digital
Signal Processing} \cite{pm}) and some standard computer applications (e.g.
{\tt
MatLab}) use definitions in which $N$ is replaced by $N-1$ in the
definitions of $x$ and $y$, with $j$ covering the range
$j=0,\cdots,N-1$. This has the advantage of making the window
function ``more symmetric'', typically be appending an extra ``0'' to
the end of the array. It has the disadvantage that it throws out more
of your precious data.
If you want to get a window function that agrees with either Proakis
\& Manolakis, or with MatLab, just call {\tt LALWindow()} with length
parameter $M-1$. Then create an array of length $M$, copy the
$M-1$ elements of the array returned by {\tt LALWindow()}, into it,
and finally copy the {\it first} element of the array returned by {\tt
LALWindow()} into the last element of your new array.
**********************************************************************</lal
LaTeX> */
#ifndef _WINDOW_H #ifndef _WINDOW_H
#define _WINDOW_H #define _WINDOW_H
#include "LALDatatypes.h" #include <lal/LALDatatypes.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
NRCSID (WINDOWH, "$Id: Window.h,v 1.4 2000/07/23 01:16:19 jolien Exp $"); NRCSID (WINDOWH, "$Id: Window.h,v 1.10 2001/12/04 22:51:25 jolien Exp $");
#define WINDOW_NULLPARAM 1 /********************************************************** <lalLaTeX>
#define WINDOW_NULLVECTOR 2 \subsection*{Error conditions}
#define WINDOW_EALLOCATE 4 *********************************************************** </lalLaTeX>*/
#define WINDOW_ELENGTH 8 /* <lalErrTable> */
#define WINDOW_TYPEUNKNOWN 16 #define WINDOWH_ENULLPARAM 1
#define WINDOW_NULLHANDLE 32 #define WINDOWH_ENULLVECTOR 2
#define WINDOW_WRONGLENGTH 64 #define WINDOWH_EEALLOCATE 4
#define WINDOW_NULLDATA 128 #define WINDOWH_EELENGTH 8
#define WINDOWH_ETYPEUNKNOWN 16
#define WINDOW_MSGNULLPARAM "null input parameter structure pointer" #define WINDOWH_ENULLHANDLE 32
#define WINDOW_MSGNULLVECTOR "null output vector pointer" #define WINDOWH_EWRONGLENGTH 64
#define WINDOW_MSGEALLOCATE "unable to allocate vector to store window" #define WINDOWH_ENULLDATA 128
#define WINDOW_MSGELENGTH "length of window is <=0, must be positive"
#define WINDOW_MSGTYPEUNKNOWN "window is of unknown type" #define WINDOWH_MSGENULLPARAM "null input parameter structure pointer"
#define WINDOW_MSGNULLHANDLE "input vector is null" #define WINDOWH_MSGENULLVECTOR "null output vector pointer"
#define WINDOW_MSGWRONGLENGTH "input vector is the wrong length" #define WINDOWH_MSGEEALLOCATE "unable to allocate vector to store window
#define WINDOW_MSGNULLDATA "data area of input vector is null" "
#define WINDOWH_MSGEELENGTH "length of window is <=0, must be positive
"
#define WINDOWH_MSGETYPEUNKNOWN "window is of unknown type"
#define WINDOWH_MSGENULLHANDLE "input vector is null"
#define WINDOWH_MSGEWRONGLENGTH "input vector is the wrong length"
#define WINDOWH_MSGENULLDATA "data area of input vector is null"
/*********************************************************** </lalErrTabl
e>*/
/*<lalLaTeX>
\subsection*{Types}
\subsubsection*{\texttt{enum WindowType}}
\idx[Type]{WindowType}
\idx[Constant]{WINDOWNAMELIST}
This enum defines the different possible types of windows that can be gener
ated.
Any code should take into account that this list may grow if someone adds t
heir
favorite window to the list. {\bf WARNING:} additional window types must b
e added just before
\texttt{NumberWindowTypes} and after the existing window types. Note that
since an enum by default gives integers starting at zero and incrementing
by one, the enum \texttt{NumberWindowTypes}
will always give the correct number of window types, even if the list is ex
tended
in the future. The definition of the enum is:
\begin{verbatim}
typedef enum {Rectangular,
Hann,
Welch,
Bartlett,
Parzen,
Papoulis,
Hamming,
NumberWindowTypes} WindowType;
\end{verbatim}
For convenience, the following macro is also defined
\begin{verbatim}
#define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P
apoulis",
"Hamming"}
\end{verbatim}
This string can be used to print out the name of any of the windows (see th
e
test program for an example of this). If a new window
is added, be sure to put its name onto the end of the array.
*************************************************************************** </lalLaTeX> */
/* Define the types of available windows */ /* Define the types of available windows */
/* WARNING: additional window types must be added just before */ /* WARNING: additional window types must be added just before */
/* NumberWindowTypes, and after the existing window types */ /* NumberWindowTypes, and after the existing window types */
typedef enum
{
Rectangular,Hann,Welch,Bartlett,Parzen,Papoulis,Hamming,
/* add any new window types just before this comment */
NumberWindowTypes
}
WindowType;
typedef enum {Rectangular,
Hann,
Welch,
Bartlett,
Parzen,
Papoulis,
Hamming,
/* add any new window types just before this comment */
NumberWindowTypes} WindowType;
/* if you add new windows above, be sure to add a descriptive name below.
*/
#define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P apoulis","Hamming"} #define WINDOWNAMELIST {"Rectangular","Hann","Welch","Bartlett","Parzen","P apoulis","Hamming"}
typedef struct /**************************************************************************
tagLALWindowParams *<lalLaTeX>
{
INT4 length; /* length of window */
WindowType type; /* type of window */
REAL8 sumofsquares; /* sum of window squared (returned) */
CHAR* windowname; /* pointer to a char string with win
dow name */
}
LALWindowParams;
void LALWindow(LALStatus * ,REAL4Vector *, LALWindowParams *); \subsubsection*{\texttt{Structure LALWindowParams}}
\idx[Type]{LALWindowParams}
This structure stores the parameters used to call the window function.
It is also used to return the sum of the vector squared.
The structure is defined by
\begin{verbatim}
typedef struct tagLALWindowParams {
INT4 length; <==> length of window (input)
WindowType type; <==> type of window (input)
REAL8 sumofsquares; <==> sum of window squared (output)
CHAR* windowname; <==> pointer to a char string with window name
(output)
} LALWindowParams;
\end{verbatim}
The four fields are:
\begin{description}
\item[\texttt{INT4 length}] The length of the window. This is used as input
.
\item[\texttt{WindowType type}] The type of the window. This is used as inp
ut.
\item[\texttt{REAL8 sumofsquares}] The sum of the squares of the window vec
tor. This is used as output.
\item[\texttt{CHAR* windowname}] A pointer to a character string containing
the window name. This is used as output.
\end{description}
***************************************************************************
</lalLaTeX> */
typedef struct tagLALWindowParams {
INT4 length; /* length of window (input) */
WindowType type; /* type of window (input) */
REAL8 sumofsquares; /* sum of window squared (output) */
const CHAR* windowname; /* pointer to a char string with window name (o
utput) */
} LALWindowParams;
void LALWindow (LALStatus *,
REAL4Vector *,
LALWindowParams *);
/**************************************************************************
** <lalLaTeX>
\vfill{\footnotesize\input{WindowHV}}
\newpage
\input{WindowC}
\newpage
\input{WindowTestC}
***************************************************************************
* </lalLaTeX> */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _WINDOW_H */ #endif /* _WINDOW_H */
 End of changes. 9 change blocks. 
61 lines changed or deleted 222 lines changed or added


 ZPGFilter.h   ZPGFilter.h 
/************************************ <lalVerbatim file="ZPGFilterHV"> /************************************ <lalVerbatim file="ZPGFilterHV">
Author: Creighton, T. D. Author: Creighton, T. D.
$Id: ZPGFilter.h,v 1.4 2000/07/23 01:15:14 jolien Exp $ $Id: ZPGFilter.h,v 1.6 2001/05/03 04:53:50 teviet Exp $
************************************* </lalVerbatim> */ **************************************************** </lalVerbatim> */
/* <lalLaTeX> /********************************************************** <lalLaTeX>
\section{Header \texttt{ZPGFilter.h}} \section{Header \texttt{ZPGFilter.h}}
\label{s:ZPGFilter.h} \label{s:ZPGFilter.h}
Provides routines to manipulate ZPG filters. Provides routines to manipulate ZPG filters.
\subsection*{Synopsis} \subsection*{Synopsis}
\begin{verbatim} \begin{verbatim}
#include "ZPGFilter.h" #include <lal/ZPGFilter.h>
\end{verbatim} \end{verbatim}
\noindent This header covers routines that create, destroy, and \noindent This header covers routines that create, destroy, and
transform objects of type \verb@<datatype>ZPGFilter@, where transform objects of type \verb@<datatype>ZPGFilter@, where
\verb@<datatype>@ is either \verb@COMPLEX8@ or \verb@COMPLEX16@. \verb@<datatype>@ is either \verb@COMPLEX8@ or \verb@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'' $T(z)$, expressed in terms
of a complex frequency parameter $z=\exp(2\pi if\Delta t)$, where of a complex frequency parameter $z=\exp(2\pi if\Delta t)$, where
$\Delta t$ is the sampling interval. The rational function is $\Delta t$ is the sampling interval. The rational function is
skipping to change at line 58 skipping to change at line 58
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 \verb@<datatype>ZPGFilter@ 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 \verb@<datatype>ZPGFilter@ data types should document which complex
variable is assumed. variable is assumed.
</lalLaTeX> */ ******************************************************* </lalLaTeX> */
#ifndef _ZPGFILTER_H #ifndef _ZPGFILTER_H
#define _ZPGFILTER_H #define _ZPGFILTER_H
#include "LALStdlib.h" #include <lal/LALStdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#pragma }
#endif #endif
NRCSID(ZPGFILTERH,"$Id: ZPGFilter.h,v 1.4 2000/07/23 01:15:14 jolien Exp $" NRCSID(ZPGFILTERH,"$Id: ZPGFilter.h,v 1.6 2001/05/03 04:53:50 teviet Exp $"
); );
/* <lalLaTeX>
/********************************************************** <lalLaTeX>
\subsection*{Error conditions} \subsection*{Error conditions}
\begin{tabular}{|c|l|l|} ****************************************** </lalLaTeX><lalErrTable> */
\hline #define ZPGFILTERH_ENUL 1
status & status & Explanation \\ #define ZPGFILTERH_EOUT 2
code & description & \\ #define ZPGFILTERH_EMEM 3
\hline #define ZPGFILTERH_EBAD 4
\tt 1 & \tt Null pointer & Missing a required pointer.
\\ #define ZPGFILTERH_MSGENUL "Unexpected null pointer in arguments"
\tt 2 & \tt Output already exists & Can't allocate to a non-null pointer #define ZPGFILTERH_MSGEOUT "Output handle points to a non-null pointer"
. \\ #define ZPGFILTERH_MSGEMEM "Memory allocation error"
\tt 3 & \tt Memory allocation error & Could not allocate memory. #define ZPGFILTERH_MSGEBAD "Bad filter parameters"
\\ /******************************************** </lalErrTable><lalLaTeX>
\tt 4 & \tt Bad filter parameters & Filter creation parameters outside o
f \\
& & acceptable ranges.
\\
\hline
\end{tabular}
</lalLaTeX> */
#define ZPGFILTER_ENUL 1
#define ZPGFILTER_EOUT 2
#define ZPGFILTER_EMEM 3
#define ZPGFILTER_EBAD 4
#define ZPGFILTER_MSGENUL "Null pointer"
#define ZPGFILTER_MSGEOUT "Output already exists"
#define ZPGFILTER_MSGEMEM "Memory allocation error"
#define ZPGFILTER_MSGEBAD "Bad filter parameters"
/* <lalLaTeX>
\subsection*{Structures} \subsection*{Structures}
</lalLaTeX> */
********************************************************</lalLaTeX> */
/* <lalLaTeX> /* <lalLaTeX>
\vfill{\footnotesize\input{ZPGFilterHV}} \vfill{\footnotesize\input{ZPGFilterHV}}
</lalLaTeX> */ </lalLaTeX> */
/* Function prototypes. */ /* Function prototypes. */
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{CreateZPGFilterC} \newpage\input{CreateZPGFilterC}
</lalLaTeX> */ </lalLaTeX> */
void LALCreateCOMPLEX8ZPGFilter(LALStatus *stat, void
COMPLEX8ZPGFilter **output, LALCreateCOMPLEX8ZPGFilter( LALStatus *stat,
INT4 numZeros, COMPLEX8ZPGFilter **output,
INT4 numPoles); INT4 numZeros,
INT4 numPoles );
void LALCreateCOMPLEX16ZPGFilter(LALStatus *stat,
COMPLEX16ZPGFilter **output, void
INT4 numZeros, LALCreateCOMPLEX16ZPGFilter( LALStatus *stat,
INT4 numPoles); COMPLEX16ZPGFilter **output,
INT4 numZeros,
INT4 numPoles );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{DestroyZPGFilterC} \newpage\input{DestroyZPGFilterC}
</lalLaTeX> */ </lalLaTeX> */
void LALDestroyCOMPLEX8ZPGFilter(LALStatus *stat, void
COMPLEX8ZPGFilter **input); LALDestroyCOMPLEX8ZPGFilter( LALStatus *stat,
COMPLEX8ZPGFilter **input );
void LALDestroyCOMPLEX16ZPGFilter(LALStatus *stat,
COMPLEX16ZPGFilter **input); void
LALDestroyCOMPLEX16ZPGFilter( LALStatus *stat,
COMPLEX16ZPGFilter **input );
/* <lalLaTeX> /* <lalLaTeX>
\newpage\input{BilinearTransformC} \newpage\input{BilinearTransformC}
</lalLaTeX> */ </lalLaTeX> */
void LALWToZCOMPLEX8ZPGFilter(LALStatus *stat, void
COMPLEX8ZPGFilter *filter); LALWToZCOMPLEX8ZPGFilter( LALStatus *stat,
COMPLEX8ZPGFilter *filter );
void LALWToZCOMPLEX16ZPGFilter(LALStatus *stat,
COMPLEX16ZPGFilter *filter); void
LALWToZCOMPLEX16ZPGFilter( LALStatus *stat,
COMPLEX16ZPGFilter *filter );
#ifdef __cplusplus #ifdef __cplusplus
#pragma {
} }
#endif #endif
#endif /* _ZPGFILTER_H */ #endif /* _ZPGFILTER_H */
 End of changes. 15 change blocks. 
60 lines changed or deleted 49 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/