| LALDatatypes.h | | LALDatatypes.h | |
| /********************************* <lalVerbatim file="LALDatatypesHV"> | | /********************************* <lalVerbatim file="LALDatatypesHV"> | |
| Author: J. D. E. Creighton, T. D. Creighton | | Author: J. D. E. Creighton, T. D. Creighton | |
|
| $Id: LALDatatypes.h,v 1.11 2001/12/01 22:09:43 jolien Exp $ | | $Id: LALDatatypes.h,v 1.12 2002/05/30 16:16:30 jolien Exp $ | |
| ********************************** </lalVerbatim> */ | | ********************************** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALDatatypes.h}} | | \section{Header \texttt{LALDatatypes.h}} | |
| \label{s:LALDatatypes.h} | | \label{s:LALDatatypes.h} | |
| | | | |
| Provides the basic LAL datatypes. | | Provides the basic LAL datatypes. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| | | | |
| </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 <lal/LALAtomicDatatypes.h> | | #include <lal/LALAtomicDatatypes.h> | |
|
| | | | |
| | | /**** <lalLaTeX> | |
| | | * \newpage | |
| | | * \subsection{Atomic datatypes codes} | |
| | | * \label{ss:atomic-datatype-codes} | |
| | | * \idx[Constant]{LAL\_1\_BYTE\_TYPE\_SIZE} | |
| | | * \idx[Constant]{LAL\_2\_BYTE\_TYPE\_SIZE} | |
| | | * \idx[Constant]{LAL\_4\_BYTE\_TYPE\_SIZE} | |
| | | * \idx[Constant]{LAL\_8\_BYTE\_TYPE\_SIZE} | |
| | | * \idx[Constant]{LAL\_16\_BYTE\_TYPE\_SIZE} | |
| | | * \idx[Constant]{LAL\_TYPE\_SIZE\_MASK} | |
| | | * \idx[Constant]{LAL\_FLTPT\_TYPE\_FLAG} | |
| | | * \idx[Constant]{LAL\_CMPLX\_TYPE\_FLAG} | |
| | | * \idx[Constant]{LAL\_UNSGN\_TYPE\_FLAG} | |
| | | * \idx[Constant]{LAL\_CHAR\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_I2\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_I4\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_I8\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_UCHAR\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_U2\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_U4\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_U8\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_S\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_D\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_C\_TYPE\_CODE} | |
| | | * \idx[Constant]{LAL\_Z\_TYPE\_CODE} | |
| | | * \idx[Type]{LALTYPECODE} | |
| | | * | |
| | | * The following constants specify the size, in bytes, of the atomic dataty | |
| | | pe. | |
| | | * | |
| | | * \begin{center} | |
| | | * \begin{tabular}{|lcl|} | |
| | | * \hline | |
| | | * Name & Octal Value & Description \\ | |
| | | * \hline | |
| | | * \tt LAL\_1\_BYTE\_TYPE\_SIZE & 000 & 1 byte type \\ | |
| | | * \tt LAL\_2\_BYTE\_TYPE\_SIZE & 001 & 2 byte type \\ | |
| | | * \tt LAL\_4\_BYTE\_TYPE\_SIZE & 002 & 4 byte type \\ | |
| | | * \tt LAL\_8\_BYTE\_TYPE\_SIZE & 003 & 8 byte type \\ | |
| | | * \tt LAL\_16\_BYTE\_TYPE\_SIZE & 004 & 16 byte type \\ | |
| | | * \tt LAL\_TYPE\_SIZE\_MASK & 007 & Mask for byte type size fields \\ | |
| | | * \hline | |
| | | * \end{tabular} | |
| | | * \end{center} | |
| | | * | |
| | | * \noindent | |
| | | * The constant \verb+LAL_TYPE_SIZE_MASK+ is useful in extracting the size | |
| | | * information from other type attributes. For example, the size, in bytes | |
| | | , | |
| | | * of an atomic datatype can be found using something like the following: | |
| | | * \begin{verbatim} | |
| | | * UINT4 code = LAL_S_TYPE_CODE; | |
| | | * UINT4 size = 1U << ( code & LAL_TYPE_SIZE_MASK ); | |
| | | * \end{verbatim} | |
| | | * | |
| | | * \vspace{3ex} | |
| | | * | |
| | | * The following constants are flags describing the type attributes. A typ | |
| | | e | |
| | | * is either an integer or a floating-point, either purely real or complex, | |
| | | * and, if integer, is either signed or unsigned. | |
| | | * | |
| | | * \begin{center} | |
| | | * \begin{tabular}{|lcl|} | |
| | | * \hline | |
| | | * Name & Octal Value & Description \\ | |
| | | * \hline | |
| | | * \tt LAL\_FLTPT\_TYPE\_FLAG & 010 & Floating-point (not integer) type \\ | |
| | | * \tt LAL\_CMPLX\_TYPE\_FLAG & 020 & Complex (not purely real) type \\ | |
| | | * \tt LAL\_UNSGN\_TYPE\_FLAG & 040 & Unsigned (no sign info) type \\ | |
| | | * \hline | |
| | | * \end{tabular} | |
| | | * \end{center} | |
| | | * | |
| | | * To get the actual type, these flags are combined together and with the | |
| | | * type size constants using the bitwise-or operator (\verb+|+). For examp | |
| | | le, | |
| | | * an eight-byte floating point number would be | |
| | | * \verb+LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG+. | |
| | | * Conceivably you could have a complex type made from a pair of unsigned | |
| | | * one-byte integers that would be specified as | |
| | | * \verb+LAL_1_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_UNSGN_TYPE_FLAG+. | |
| | | * Fortunately, there are none of these in LAL. Attribues of a particular | |
| | | * type can be extracted using the bitwise-and operator. For example: | |
| | | * \begin{verbatim} | |
| | | * UINT4 code = LAL_S_TYPE_CODE; | |
| | | * UINT4 isfloat = ( code & LAL_FLTPT_TYPE_FLAG ); | |
| | | * UINT4 iscmplx = ( code & LAL_CMPLX_TYPE_FLAG ); | |
| | | * \end{verbatim} | |
| | | * | |
| | | * \vspace{3ex} | |
| | | * | |
| | | * The following constants correspond to the types that actually exist in L | |
| | | AL. | |
| | | * Their enumeration is the type \verb+LALTYPECODE+. | |
| | | * \begin{center} | |
| | | * \begin{tabular}{|lcl|} | |
| | | * \hline | |
| | | * Name & Octal Value & Corresponding Type \\ | |
| | | * \hline | |
| | | * \tt LAL\_CHAR\_TYPE\_CODE & 000 & \tt CHAR \\ | |
| | | * \tt LAL\_I2\_TYPE\_CODE & 001 & \tt INT2 \\ | |
| | | * \tt LAL\_I4\_TYPE\_CODE & 002 & \tt INT4 \\ | |
| | | * \tt LAL\_I8\_TYPE\_CODE & 003 & \tt INT8 \\ | |
| | | * \tt LAL\_UCHAR\_TYPE\_CODE & 040 & \tt UCHAR \\ | |
| | | * \tt LAL\_U2\_TYPE\_CODE & 041 & \tt UINT2 \\ | |
| | | * \tt LAL\_U4\_TYPE\_CODE & 042 & \tt UINT4 \\ | |
| | | * \tt LAL\_U8\_TYPE\_CODE & 043 & \tt UINT8 \\ | |
| | | * \tt LAL\_S\_TYPE\_CODE & 012 & \tt REAL4 \\ | |
| | | * \tt LAL\_D\_TYPE\_CODE & 013 & \tt REAL8 \\ | |
| | | * \tt LAL\_C\_TYPE\_CODE & 033 & \tt COMPLEX8 \\ | |
| | | * \tt LAL\_Z\_TYPE\_CODE & 034 & \tt COMPLEX16 \\ | |
| | | * \hline | |
| | | * \end{tabular} | |
| | | * \end{center} | |
| | | * | |
| | | **** </lalLaTeX> */ | |
| | | | |
| | | /* constants */ | |
| | | /* type size constants */ | |
| | | enum | |
| | | { | |
| | | LAL_1_BYTE_TYPE_SIZE = 000, /* 0 = 0 */ | |
| | | LAL_2_BYTE_TYPE_SIZE = 001, /* 1 = 1 */ | |
| | | LAL_4_BYTE_TYPE_SIZE = 002, /* 10 = 2 */ | |
| | | LAL_8_BYTE_TYPE_SIZE = 003, /* 11 = 3 */ | |
| | | LAL_16_BYTE_TYPE_SIZE = 004, /* 100 = 4 */ | |
| | | LAL_TYPE_SIZE_MASK = 007 /* 111 = 7 */ | |
| | | }; | |
| | | | |
| | | /* type flag constants */ | |
| | | enum | |
| | | { | |
| | | LAL_FLTPT_TYPE_FLAG = 010, /* 1000 = 8 */ | |
| | | LAL_CMPLX_TYPE_FLAG = 020, /* 10000 = 16 */ | |
| | | LAL_UNSGN_TYPE_FLAG = 040, /* 100000 = 32 */ | |
| | | }; | |
| | | | |
| | | /* type codes */ | |
| | | typedef enum | |
| | | { | |
| | | LAL_CHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE, /* 0 */ | |
| | | LAL_I2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE, /* 1 */ | |
| | | LAL_I4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE, /* 2 */ | |
| | | LAL_I8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE, /* 3 */ | |
| | | LAL_UCHAR_TYPE_CODE = LAL_1_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | |
| | | 32 */ | |
| | | LAL_U2_TYPE_CODE = LAL_2_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | |
| | | 33 */ | |
| | | LAL_U4_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | |
| | | 34 */ | |
| | | LAL_U8_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_UNSGN_TYPE_FLAG, /* | |
| | | 35 */ | |
| | | LAL_S_TYPE_CODE = LAL_4_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /* | |
| | | 18 */ | |
| | | LAL_D_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_FLTPT_TYPE_FLAG, /* | |
| | | 19 */ | |
| | | LAL_C_TYPE_CODE = LAL_8_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL_ | |
| | | FLTPT_TYPE_FLAG, /* 27 */ | |
| | | LAL_Z_TYPE_CODE = LAL_16_BYTE_TYPE_SIZE | LAL_CMPLX_TYPE_FLAG | LAL | |
| | | _FLTPT_TYPE_FLAG, /* 28 */ | |
| | | } | |
| | | LALTYPECODE; | |
| | | | |
| #include <lal/LALRCSID.h> | | #include <lal/LALRCSID.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.11 2001/12/01 22:09:43 joli
en Exp $"); | | NRCSID (LALDATATYPESH, "$Id: LALDatatypes.h,v 1.12 2002/05/30 16:16:30 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 | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 167 lines changed or added | |
|
| LALDemod.h | | LALDemod.h | |
| /*** <lalVerbatim file="LALDemodHV"> | | /*** <lalVerbatim file="LALDemodHV"> | |
| Author: Berukoff, S.J., Papa, M.A. | | Author: Berukoff, S.J., Papa, M.A. | |
|
| $Id: LALDemod.h,v 1.5 2001/10/08 13:55:46 sberukoff Exp $ | | $Id: LALDemod.h,v 1.7 2002/05/22 09:27:36 sberukoff Exp $ | |
| *** </lalVerbatim> */ | | *** </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \section{Header \texttt{LALDemod.h}} | | \section{Header \texttt{LALDemod.h}} | |
| \label{s:LALDemod.h} | | \label{s:LALDemod.h} | |
| Computes a demodulated transform. | | Computes a demodulated transform. | |
| | | | |
| \subsection*{Synopsis} | | \subsection*{Synopsis} | |
| \begin{verbatim} | | \begin{verbatim} | |
| #include <lal/LALDemod.h> | | #include <lal/LALDemod.h> | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
|
| \noindent The following is a brief background to the idea behind the demodu
lation procedure. | | \noindent The following is a brief synopsis of the demodulation, or 'Cohere
nt Transform', procedure. | |
| | | | |
|
| Given a set of time series data $x_a$ and a phase model $\Phi$ for the unde | | In order to remove frequency and amplitude modulation of a time series $x_a | |
| sirable frequency modulation that one wants to remove from the data set, th | | $, we need two basic components: | |
| e long-time baseline demodulated Fourier Transform (DeFT) in the $b^{th}$ f | | \begin{description} | |
| requency bin is | | \item[\bf{Frequency modulation information}] This is given through a phase | |
| | | model $\Phi$. | |
| | | \item[\bf{Amplitude modulation information}] This is given through two fun | |
| | | ctions $\hat{a}$ and $\hat{b}$, which are derived from the beam-pattern fun | |
| | | ctions $F_{+}$ and $F_{\times}$. | |
| | | \end{description} | |
| | | Given these, the long time baseline demodulated Fourier Transform (DeFT) in | |
| | | the $b^{th}$ frequency bin is | |
| \begin{equation} | | \begin{equation} | |
|
| \hat{x}_b({\vec{\lambda}})=\sum_{a=0}^{\it{NM-1}}x_ae^{-2{\pi}i{\Phi}_{ab}( | | \mathcal{F}_{b} = \frac{4}{S_{h}(f_{0})T_{0}} \frac{B|\hat{F_{a}}|^{2}+A|F_ | |
| \vec{\lambda})}. | | {b}|^{2} - 2C \Re(F_{a}F_{b}^{*})}{D} | |
| \label{e1} | | | |
| \end{equation} | | \end{equation} | |
|
| | | | |
| | | where | |
| | | | |
| | | \begin{eqnarray} | |
| | | \label{e1} | |
| | | \hat{F_{\hat{a}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{a} e^{-2{\pi}i{\Phi}_{a | |
| | | b}(\vec{\lambda})} \\ | |
| | | \hat{F_{\hat{b}}}=\sum_{a=0}^{\it{NM-1}} x_{a} \hat{b} e^{-2{\pi}i{\Phi}_{a | |
| | | b}(\vec{\lambda})} | |
| | | \end{eqnarray} | |
| | | $T_{0}$ is the observation time, $S_{h}$ is the noise power spectral densit | |
| | | y, and $A$, $B$, $C$, and $D$ are constants. | |
| | | | |
| In writing the previous equation we have assumed that there is a total of $
M\cdot N$ data samples and $0\leq a<MN$. $\Phi_{ab}$ is the expected phase
at time $a$ for an | | In writing the previous equation we have assumed that there is a total of $
M\cdot N$ data samples and $0\leq a<MN$. $\Phi_{ab}$ is the expected phase
at time $a$ for an | |
| intrinsic emission frequency $b\over T_{DeFT}$ (where the denominator is th
e DeFT time baseline). $\Phi$ | | intrinsic emission frequency $b\over T_{DeFT}$ (where the denominator is th
e DeFT time baseline). $\Phi$ | |
| depends on $\vec\lambda$, a vector of parameters that defines the phase mod
el. Typically these are the source location and the spin-down parameter va
lues of the template source for which one is | | depends on $\vec\lambda$, a vector of parameters that defines the phase mod
el. Typically these are the source location and the spin-down parameter va
lues of the template source for which one is | |
|
| demodulating. Let us now suppose that the time series $x_a$ is composed of | | demodulating. For simplicity, we will focus only on $F_{a}$; the analysis | |
| $M$ chunks, each of $N$ samples. If we introduce a short-time index $0\le | | for $F_{b}$ is identical. | |
| q j<N-1$ and a short time-series index $0\leq \alpha <M-1$, so that $a=N\al | | Let us now suppose that the time series $x_a$ is composed of $M$ chunks, ea | |
| pha+j$, we can rewrite the above sum as | | ch of $N$ samples. If we introduce a short-time index $0\leq j<N-1$ and a | |
| | | short time-series index $0\leq \alpha <M-1$, so that $a=N\alpha+j$, we can | |
| | | rewrite the above sum as | |
| \begin{equation} | | \begin{equation} | |
|
| \hat{x}_{b}({\vec{\lambda}})=\sum_{\alpha=0}^{M-1}\sum_{j=0}^{N-1}x_{\alpha
j}e^{-2{\pi}i{\Phi}_{ab}(\vec{\lambda})} | | \hat{F_{\hat{a}}}({\vec{\lambda}})=\sum_{\alpha=0}^{M-1}\sum_{j=0}^{N-1}x_{
\alpha j}a_{\alpha j}e^{-2{\pi}i{\Phi}_{ab}(\vec{\lambda})} | |
| \label{e2} | | \label{e2} | |
| \end{equation} | | \end{equation} | |
|
| \noindent If $\tilde{x}_{\alpha k}$ is the matrix of FTs formed along the s
hort time index $j$ | | \noindent Note that $\hat{a}(t)$ is a periodic function with period equal t
o one sidereal day. Since the sum over $N$ is on a timescale much shorter
than that (say, 1 hour), then $\hat{a}(t)$ won't change significantly, and
thus can be taken outside of that summation, and then is evaluated at the m
idpoint of each SFT time. Now, If $\tilde{x}_{\alpha k}$ is the matrix of
FTs formed along the short time index $j$ | |
| \begin{equation} | | \begin{equation} | |
| x_{\alpha j}=\frac{1}{N}\sum_{k=0}^{N-1}\tilde{x}_{\alpha k}e^{2\pi{i}\frac
{jk}{N}}, | | x_{\alpha j}=\frac{1}{N}\sum_{k=0}^{N-1}\tilde{x}_{\alpha k}e^{2\pi{i}\frac
{jk}{N}}, | |
| \label{e3} | | \label{e3} | |
| \end{equation} | | \end{equation} | |
| \noindent making the appropriate substitutions, Eq.\ref{e1} becomes | | \noindent making the appropriate substitutions, Eq.\ref{e1} becomes | |
| \begin{equation} | | \begin{equation} | |
|
| \hat{x}_b({\vec{\lambda}})=\sum_{\alpha=0}^{M-1}\sum_{k=0}^{N-1}\tilde{x}_{
\alpha k}\left[\frac{1}{N}\sum_{j=0}^{N-1}e^{-2\pi i(\Phi_{\alpha jb}(\vec{
\lambda})-\frac{jk}{N})}\right] | | \hat{F_{\hat{a}}}({\vec{\lambda}})=\sum_{\alpha=0}^{M-1}\hat{a}_{\alpha}\su
m_{k=0}^{N-1}\tilde{x}_{\alpha k}\left[\frac{1}{N}\sum_{j=0}^{N-1}e^{-2\pi
i(\Phi_{\alpha jb}(\vec{\lambda})-\frac{jk}{N})}\right] | |
| \label{e4} | | \label{e4} | |
| \end{equation} | | \end{equation} | |
|
| If the phase evolution can be described as linear in $t$ during the time du | | We assume that the phase evolution can be described as linear in $t$ during | |
| ration | | the time duration | |
| $T_{SFT}$, a linear Taylor expansion of $\Phi$ around the temporal midpoint | | $T_{SFT}$; thus we can Taylor-expand $\Phi$ around the temporal midpoint of | |
| of every SFT time data chunk can be composed. For large values of $N$, | | every SFT time data chunk. For large values of $N$, | |
| the summation over $j$ in eq. (\ref{e4}) can be expressed in closed form, t
hus saving computations, and eq. (\ref{e4}) can be rewritten as | | the summation over $j$ in eq. (\ref{e4}) can be expressed in closed form, t
hus saving computations, and eq. (\ref{e4}) can be rewritten as | |
| \begin{equation} | | \begin{equation} | |
|
| \hat x_b=\sum_{\alpha=0}^{M-1}e^{i y_\alpha}\sum_{k=0}^{N-1}\tilde x_{\alph
a\beta} P_{\alpha k}(b,\vec{\lambda}), | | \hat{F_{\hat{a}}}=\sum_{\alpha=0}^{M-1}\hat{a}_{\alpha}e^{i y_\alpha}\sum_{
k=0}^{N-1}\tilde{x}_{\alpha\beta} P_{\alpha k}(b,\vec{\lambda}), | |
| \label{DeFT2} | | \label{DeFT2} | |
| \end{equation} | | \end{equation} | |
| with | | with | |
| \begin{eqnarray} | | \begin{eqnarray} | |
| \label{DeFT_defs} | | \label{DeFT_defs} | |
| P_{\alpha k}(b,\vec{\lambda})={\sin{x'}\over x'}-i{1-\cos{x'}\over x'}\\ | | P_{\alpha k}(b,\vec{\lambda})={\sin{x'}\over x'}-i{1-\cos{x'}\over x'}\\ | |
|
| x'=2\pi(\sum_{s} f_s B_{s\alpha} - k)\\ | | x'=\sum_{s} f_s B_{s\alpha} - k\\ | |
| y_\alpha=2\pi\sum_{s} f_s A_{s\alpha}. | | y_\alpha=\sum_{s} f_s A_{s\alpha}. | |
| \end{eqnarray} | | \end{eqnarray} | |
|
| In the previous expressions $f_s$ indicate the spin-down parameters of the | | In the previous expressions $f_s$ indicate the spin-down parameters of diff | |
| different orders | | erent orders (labeled | |
| (labeled | | | |
| by the index $s$\footnote{Note that when $s=0$ the values computed are coef
ficients of the intrinsic frequency and thus must be computed for the value
corresponding to the index $b$.}), and $A_{s\alpha}$ and $B_{s\alpha}$ | | by the index $s$\footnote{Note that when $s=0$ the values computed are coef
ficients of the intrinsic frequency and thus must be computed for the value
corresponding to the index $b$.}), and $A_{s\alpha}$ and $B_{s\alpha}$ | |
| are functions that depend on the phase evolution, whose values depend on $\
alpha$ and on $\vec\lambda$. The values of these functions are calculated
by the \verb@ComputeSky()@ routine, also in this package. Incidentally, in
the code, these are the values contained in the variable \verb@skyConst@. | | are functions that depend on the phase evolution, whose values depend on $\
alpha$ and on $\vec\lambda$. The values of these functions are calculated
by the \verb@ComputeSky()@ routine, also in this package. Incidentally, in
the code, these are the values contained in the variable \verb@skyConst@. | |
| Note that the function $P_{\alpha k}$ is peaked around $x'=0$. Thus in the
summation | | Note that the function $P_{\alpha k}$ is peaked around $x'=0$. Thus in the
summation | |
| over $k$ in eq. (\ref{DeFT2}) one only needs to consider a few values (NTER
MS) of $k$ around $k^*$ such | | over $k$ in eq. (\ref{DeFT2}) one only needs to consider a few values (NTER
MS) of $k$ around $k^*$ such | |
| that $x'(k^*)\approx 0$. This approximation again saves computations. Eq.
(\ref{DeFT2}) can then be rewritten as | | that $x'(k^*)\approx 0$. This approximation again saves computations. Eq.
(\ref{DeFT2}) can then be rewritten as | |
| \begin{equation} | | \begin{equation} | |
| \label{DeFT_algo} | | \label{DeFT_algo} | |
|
| \hat x_b=\sum_{\alpha=0}^{M-1}e^{i y_\alpha}\sum_{k=k^*\pm NTERMS} \tilde x
_{\alpha\beta} | | \hat{F_{\hat{a}}}=\sum_{\alpha=0}^{M-1}\hat{a}_{\alpha}e^{i y_\alpha}\sum_{
k=k^*\pm NTERMS} \tilde x_{\alpha\beta} | |
| P_{\alpha k}(b,\vec{\lambda}). | | P_{\alpha k}(b,\vec{\lambda}). | |
| \end{equation} | | \end{equation} | |
| If $NTERMS$ is 8 the power loss due to this approximation is less than $\si
m 5\%$. | | If $NTERMS$ is 8 the power loss due to this approximation is less than $\si
m 5\%$. | |
| | | | |
|
| | | Now, computing $\hat{F_{\hat{a}}}$ and $\hat{F_{\hat{b}}}$ can be done in p | |
| | | arallel; given the approximations we have made, for each iteration of the $ | |
| | | \alpha$ loop, one computes first $P_{\alpha k}$ (through the k-loop), multi | |
| | | plies by $\tilde{x}_{\alpha k}$, and then forms the statistics of \ref{e1} | |
| | | at the same time. After all the iterations of the $\alpha$ loop are comple | |
| | | te, that is, when all SFTs have been exhausted, the final statistic is comp | |
| | | uted. | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifndef _LALDEMOD_H | | #ifndef _LALDEMOD_H | |
| #define _LALDEMOD_H | | #define _LALDEMOD_H | |
| | | | |
| #include <math.h> | | #include <math.h> | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #include <stdio.h> | | #include <stdio.h> | |
| #include <string.h> | | #include <string.h> | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/AVFactories.h> | | #include <lal/AVFactories.h> | |
| #include <lal/Random.h> | | #include <lal/Random.h> | |
|
| #include <lal/ComplexFFT.h> | | #include <lal/RealFFT.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
|
| | | #include <lal/DetResponse.h> | |
| | | #include <lal/DetectorSite.h> | |
| | | #include <lal/SimulateCoherentGW.h> | |
| | | #include <lal/GenerateTaylorCW.h> | |
| | | #include <lal/LALComputeAM.h> | |
| #include <lal/ComputeSky.h> | | #include <lal/ComputeSky.h> | |
|
| | | #include <lal/LALBarycenter.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #extern "C" { | | #extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (LALDEMODH, "$Id: LALDemod.h,v 1.5 2001/10/08 13:55:46 sberukoff Exp
$"); | | NRCSID (LALDEMODH, "$Id: LALDemod.h,v 1.7 2002/05/22 09:27:36 sberukoff Exp
$"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| \vspace{0.1in} | | \vspace{0.1in} | |
| \input{LALDemodHErrorTable} | | \input{LALDemodHErrorTable} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| /* *****<lalErrTable file="LALDemodHErrorTable">*/ | | /* *****<lalErrTable file="LALDemodHErrorTable">*/ | |
| #define LALDEMODH_ENULL 1 | | #define LALDEMODH_ENULL 1 | |
| #define LALDEMODH_ENNEG 2 | | #define LALDEMODH_ENNEG 2 | |
| #define LALDEMODH_EORDR 4 | | #define LALDEMODH_EORDR 4 | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 142 | |
| #define SMALL 0.000000001 | | #define SMALL 0.000000001 | |
| #define SFTOVERLAP 0.05 | | #define SFTOVERLAP 0.05 | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Structures} | | \subsection*{Structures} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct DemodPar | | struct DemodPar | |
| \end{verbatim} | | \end{verbatim} | |
|
| \idx[Type]{DemodPar} | | \index{\texttt{DemodPar}} | |
| | | | |
| \noindent This structure contains the parameters for the demodulation routi
ne. The parameters are: | | \noindent This structure contains the parameters for the demodulation routi
ne. The parameters are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT4 if0Max}] The maximum search frequency index in coarse-gr
ained frequency resolution. | | \item[\texttt{INT4 if0Max}] The maximum search frequency index in coarse-gr
ained frequency resolution. | |
| \item[\texttt{INT4 if0Min}] The minimum search frequency index in coarse-gr
ained frequency resolution. | | \item[\texttt{INT4 if0Min}] The minimum search frequency index in coarse-gr
ained frequency resolution. | |
| \item[\texttt{INT4 mCohSFT}] The number of SFTs in coherent timescale. In
other words, the number of SFTs which make up one DeFT. | | \item[\texttt{INT4 mCohSFT}] The number of SFTs in coherent timescale. In
other words, the number of SFTs which make up one DeFT. | |
| \item[\texttt{INT4 mObsCoh}] The number of coherent timescale in observatio
n time. In other words, this quantifies how many DeFTs will be produced. | | \item[\texttt{INT4 mObsCoh}] The number of coherent timescale in observatio
n time. In other words, this quantifies how many DeFTs will be produced. | |
| \item[\texttt{INT4 ifMin}] The index of the minimum frequency of the SFT fr
equency band. | | \item[\texttt{INT4 ifMin}] The index of the minimum frequency of the SFT fr
equency band. | |
| \item[\texttt{INT4 iCoh}] The index of the DeFT being computed (0 $\leq$ iC
oh \verb@<@ mObsCoh). | | \item[\texttt{INT4 iCoh}] The index of the DeFT being computed (0 $\leq$ iC
oh \verb@<@ mObsCoh). | |
| \item[\texttt{REAL8 *skyConst}] The array of sky constants. | | \item[\texttt{REAL8 *skyConst}] The array of sky constants. | |
| \item[\texttt{REAL8 *spinDwn}] The set of template spindown parameters. | | \item[\texttt{REAL8 *spinDwn}] The set of template spindown parameters. | |
|
| | | \item[\texttt{AMCoeffs *amcoe}] The values of the function $a$ and $b$, plu
s their scalar products. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct SkyPos | | struct SkyPos | |
| \end{verbatim} | | \end{verbatim} | |
|
| \idx[Type]{SkyPos} | | \index{\texttt{SkyPos}} | |
| \noindent This structure contains the basic parameters of a sky position.
These are: | | \noindent This structure contains the basic parameters of a sky position.
These are: | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL8 alpha}] The inclination, in radians. | | \item[\texttt{REAL8 alpha}] The inclination, in radians. | |
| \item[\texttt{REAL8 delta}] The declination, in radians. | | \item[\texttt{REAL8 delta}] The declination, in radians. | |
| \item[\texttt{CHAR type}] Coordinate system used. | | \item[\texttt{CHAR type}] Coordinate system used. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct Spindown | | struct Spindown | |
| \end{verbatim} | | \end{verbatim} | |
|
| \idx[Type]{Spindown} | | \index{\texttt{Spindown}} | |
| \noindent This structure contains the values of the spindown parameters. I
ncluded are | | \noindent This structure contains the values of the spindown parameters. I
ncluded are | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{INT4 m}] The maximum order of spindown parameter employed, o
r the number of spindown parameters per spindown parameter set. | | \item[\texttt{INT4 m}] The maximum order of spindown parameter employed, o
r the number of spindown parameters per spindown parameter set. | |
| \item[\texttt{REAL8 *spParams}] An array containing the values. | | \item[\texttt{REAL8 *spParams}] An array containing the values. | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct ParameterSet | | struct ParameterSet | |
| \end{verbatim} | | \end{verbatim} | |
|
| \idx[Type]{ParameterSet} | | \index{\texttt{ParameterSet}} | |
| \noindent This is a structure which contains all the parameters that descri
be a source. Included are | | \noindent This is a structure which contains all the parameters that descri
be a source. Included are | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{SkyPos *skyP}] | | \item[\texttt{SkyPos *skyP}] | |
| \item[\texttt{Spindown *spind}] | | \item[\texttt{Spindown *spind}] | |
| \end{description} | | \end{description} | |
| | | | |
| \begin{verbatim} | | \begin{verbatim} | |
| struct FFT | | struct FFT | |
| \end{verbatim} | | \end{verbatim} | |
|
| \idx[Type]{FFT} | | \index{\texttt{FFT}} | |
| \noindent This structure is used to hold all Fourier domain data. Note tha
t it is different from the LAL definition of a \verb@SequenceOfFrequencySer
ies@ variable in that the \verb@FFT@ structure allows one to record informa
tion specific to each individual FFT; the LAL structure does not allow this
functionality at present. The fields contained within are | | \noindent This structure is used to hold all Fourier domain data. Note tha
t it is different from the LAL definition of a \verb@SequenceOfFrequencySer
ies@ variable in that the \verb@FFT@ structure allows one to record informa
tion specific to each individual FFT; the LAL structure does not allow this
functionality at present. The fields contained within are | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{COMPLEX16FrequencySeries *fft}] Holds the data (within \verb
@fft->data->data@) and other parameters relevant to each transform. | | \item[\texttt{COMPLEX8FrequencySeries *fft}] Holds the data (within \verb@
fft->data->data@) and other parameters relevant to each transform. | |
| \item[\texttt{ParameterSet par}] Holds source parameters that might be rel
evant to the data in the previous field. For example, if the \verb@*fft@ s
tructure above contains DeFTs, this field will contain the demodulation par
ameters. | | \item[\texttt{ParameterSet par}] Holds source parameters that might be rel
evant to the data in the previous field. For example, if the \verb@*fft@ s
tructure above contains DeFTs, this field will contain the demodulation par
ameters. | |
| \end{description} | | \end{description} | |
| | | | |
|
| | | \begin{verbatim} | |
| | | struct DeFTPeriodogram | |
| | | \end{verbatim} | |
| | | \index{\texttt{DeFTPeriodogram}} | |
| | | \noindent This structure contains the statistic we wanted to compute: \ref | |
| | | {e1}, and information regarding its parameters. | |
| | | \begin{description} | |
| | | \item[\texttt{REAL8FrequencySeries *fft}] The periodogram. | |
| | | \item[\texttt{ParameterSer par}] The parameter set used in the demodulatio | |
| | | n. | |
| | | \end{description} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* PARAMETERS */ | | /* PARAMETERS */ | |
| typedef struct DemodParTag{ | | typedef struct DemodParTag{ | |
|
| INT4 if0Max; /* Index of maximum freq. of search on this | | INT4 if0Max; /* Index of maximum freq. of search on this | |
| proc. */ | | proc. */ | |
| INT4 if0Min; /* Index of minimum freq. of search on this | | INT4 if0Min; /* Index of minimum freq. of search on this | |
| proc. */ | | proc. */ | |
| INT4 mCohSFT; /* This is G_Mcoh_sft */ | | INT4 mCohSFT; /* This is G_Mcoh_sft */ | |
| INT4 mObsCoh; /* This is G_Mobs_sft */ | | INT4 mObsCoh; /* This is G_Mobs_sft */ | |
| INT4 ifMin; /* Index of minimum freq. of search */ | | INT4 ifMin; /* Index of minimum freq. of search | |
| INT4 iCoh; /* Index of coherent timescale */ | | */ | |
| INT4 spinDwnOrder; /* Maximum order of spdwn parameter */ | | INT4 iCoh; /* Index of coherent timescale */ | |
| REAL8 *skyConst; /* Constants computed in ComputeSky.c */ | | INT4 spinDwnOrder; /* Maximum order of spdwn parameter */ | |
| REAL8 *spinDwn; /* Spindown parameter set */ | | REAL8 *skyConst; /* Constants computed in ComputeSky. | |
| | | c */ | |
| | | REAL8 *spinDwn; /* Spindown parameter set */ | |
| | | AMCoeffs *amcoe; | |
| }DemodPar; | | }DemodPar; | |
| | | | |
|
| typedef struct SkyPosTag { | | typedef struct SkyPosTag | |
| | | { | |
| REAL8 alpha; | | REAL8 alpha; | |
| REAL8 delta; | | REAL8 delta; | |
| CHAR type; | | CHAR type; | |
| }SkyPos; | | }SkyPos; | |
| | | | |
|
| typedef struct SpindownTag { | | typedef struct SpindownTag | |
| | | { | |
| INT4 m; | | INT4 m; | |
| REAL8 *spParams; | | REAL8 *spParams; | |
| }Spindown; | | }Spindown; | |
| | | | |
|
| typedef struct ParameterSetTag { | | typedef struct ParameterSetTag | |
| | | { | |
| SkyPos *skyP; | | SkyPos *skyP; | |
| Spindown *spind; | | Spindown *spind; | |
| }ParameterSet; | | }ParameterSet; | |
| | | | |
| /*This structure will hold a single FFT*/ | | /*This structure will hold a single FFT*/ | |
|
| typedef struct FFTTag { | | typedef struct FFTTag | |
| COMPLEX16FrequencySeries *fft; | | { | |
| | | COMPLEX8FrequencySeries *fft; | |
| ParameterSet par; | | ParameterSet par; | |
| } FFT; | | } FFT; | |
| | | | |
|
| | | typedef struct DeFTPeriodogramTag | |
| | | { | |
| | | REAL8FrequencySeries *fft; | |
| | | COMPLEX16FrequencySeries *fA; | |
| | | COMPLEX16FrequencySeries *fB; | |
| | | ParameterSet par; | |
| | | } DeFTPeriodogram; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \input{LALDemodHV} | | \input{LALDemodHV} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALDemodC} | | \newpage\input{LALDemodC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void LALDemod (LALStatus *stat, | | void LALDemod (LALStatus *stat, | |
| FFT **xHatCoh, | | DeFTPeriodogram *xHatCoh, | |
| FFT **input, | | FFT **input, | |
| DemodPar *params); | | DemodPar *params); | |
| | | | |
|
| /* MODIFIED BY JOLIEN: repaced tdb with lalTDBHook */ | | | |
| extern void ( *lalTDBHook )( REAL8 , REAL8 , REAL8, REAL8 *, REAL8 *); | | | |
| | | | |
| void times(REAL8 , | | void times(REAL8 , | |
|
| int, | | INT4, | |
| LIGOTimeGPS *, | | LIGOTimeGPS *, | |
|
| int ); | | INT4 ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALDemodTestC} | | \newpage\input{LALDemodTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| #endif /* _LALDEMOD_H */ | | #endif /* _LALDEMOD_H */ | |
| | | | |
End of changes. 37 change blocks. |
| 58 lines changed or deleted | | 117 lines changed or added | |
|
| LALInspiral.h | | LALInspiral.h | |
| /* <lalVerbatim file="LALInspiralHV"> | | /* <lalVerbatim file="LALInspiralHV"> | |
| | | | |
| Author: Churches, D. K and B. S. Sathyaprakash. | | Author: Churches, D. K and B. S. Sathyaprakash. | |
|
| $Id: LALInspiral.h,v 1.15 2002/04/11 17:03:53 dchurches Exp $ | | $Id: LALInspiral.h,v 1.17 2002/06/07 15:11:01 dchurches Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALInspiral.h}} | | \section{Header \texttt{LALInspiral.h}} | |
| \label{s:LALInspiral.h} | | \label{s:LALInspiral.h} | |
| | | | |
| Header file for the template generation codes. | | Header file for the template generation codes. | |
| | | | |
| | | | |
| skipping to change at line 37 | | skipping to change at line 37 | |
| # include <math.h> | | # include <math.h> | |
| # include <stdio.h> | | # include <stdio.h> | |
| # include <stdlib.h> | | # include <stdlib.h> | |
| # include <lal/LALStdlib.h> | | # include <lal/LALStdlib.h> | |
| # include <lal/LALConstants.h> | | # include <lal/LALConstants.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( LALINSPIRALH, "$Id: LALInspiral.h,v 1.15 2002/04/11 17:03:53 dchurc
hes Exp $" ); | | NRCSID( LALINSPIRALH, "$Id: LALInspiral.h,v 1.17 2002/06/07 15:11:01 dchurc
hes Exp $" ); | |
| | | | |
| # define oneby3 0.333333333333333333333333333 | | # define oneby3 0.333333333333333333333333333 | |
| # define twoby3 0.666666666666666666666666667 | | # define twoby3 0.666666666666666666666666667 | |
| # define fourby3 1.333333333333333333333333333 | | # define fourby3 1.333333333333333333333333333 | |
| # define fiveby3 1.666666666666666666666666667 | | # define fiveby3 1.666666666666666666666666667 | |
| # define sevenby3 2.333333333333333333333333333 | | # define sevenby3 2.333333333333333333333333333 | |
| # define eightby3 2.666666666666666666666666667 | | # define eightby3 2.666666666666666666666666667 | |
| # define tenby3 3.333333333333333333333333333 | | # define tenby3 3.333333333333333333333333333 | |
| # define elevenby3 3.666666666666666666666666666 | | # define elevenby3 3.666666666666666666666666666 | |
| # define threeby8 0.375 | | # define threeby8 0.375 | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 76 | |
| #define LALINSPIRALH_MSGEMEM "Memory allocation error" | | #define LALINSPIRALH_MSGEMEM "Memory allocation error" | |
| #define LALINSPIRALH_MSGEDIV0 "Division by zero" | | #define LALINSPIRALH_MSGEDIV0 "Division by zero" | |
| #define LALINSPIRALH_MSGESIZE "Invalid input range" | | #define LALINSPIRALH_MSGESIZE "Invalid input range" | |
| #define LALINSPIRALH_MSGECHOICE "Invalid choice for an input parameter" | | #define LALINSPIRALH_MSGECHOICE "Invalid choice for an input parameter" | |
| | | | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section*{Structures} | | \section*{Structures} | |
|
| \input{LALInspiralHS} | | | |
| </lalLaTeX> */ | | | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | \begin{enumerate} | |
| typedef struct | | | |
| tagEtaTau04In | | | |
| { | | | |
| REAL8 t4; | | | |
| REAL8 A4; | | | |
| REAL8 B4; | | | |
| REAL8 C4; | | | |
| } EtaTau04In; | | | |
| /* </lalVerbatim> */ | | | |
| | | | |
|
| /* <lalLaTeX> | | \item \texttt{EtaTau02In, EtaTau04In:} | |
| \idx[Type]{EtaTau04In} | | These are the input structures needed in solving for the mass | |
| | | ratio $\eta$ given the chirptimes $\tau_0$ and $\tau_2,$ or | |
| | | to solve for $\eta$ given the chirptimes $\tau_2$ and $\tau_4.$ | |
| | | | |
| | | \input{LALEtaTau0Tau2InH} | |
| | | | |
| | | Here, \texttt{t2}~$ = \tau_2,$ \texttt{A2}~$ = A_2 ({\tau_0}/{A_0})^{3/5},$ | |
| | | and | |
| | | \texttt{B2}~$=B_2$, | |
| | | where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ $A_2 = 3715 / [64512 (\pi f_s)^2] | |
| | | ,$ | |
| | | $B_2 = 4620/3715.$ | |
| | | | |
| | | Similarly, \texttt{t4}~$ = \tau_4,$ \texttt{A4}~$ = A_4 ({\tau_0}/{A_0})^{1 | |
| | | /5},$ | |
| | | \texttt{B4}~$=B_4$ and \texttt{C4}~$=C_4,$ where | |
| | | where $A_0 = 5/[256 (\pi f_{s} )^{8/3}],$ | |
| | | $A_4 = 5 \times 3058673/ [128 \times 1016064 (\pi f_s)^{4/3}],$ | |
| | | $B_4 = 5429 \times 1016064 /(1008 \times 3058673),$ and $C_4 = 617 \times | |
| | | 1016064/(144 \times 3058673).$ | |
| | | | |
| | | \item \texttt{InputMasses:} | |
| | | This structure is one of the members of the \texttt{InspiralTemplate} | |
| | | structure. | |
| | | | |
| | | \input{LALInputMassesH} | |
| | | | |
| | | A user can specify the parameters of a binary using any two of the | |
| | | following combination of masses | |
| | | \begin{itemize} | |
| | | \item \texttt{m1Andm2:} component masses | |
| | | \item \texttt{totalMassAndEta:} total mass and symmetric mass ratio | |
| | | \item \texttt{totalMassAndMu:} total mass and reduced mass | |
| | | \item \texttt{t01:} unused; shouldn't be used. | |
| | | \item \texttt{t02:} chirp times $\tau_0$ and $\tau_2$ | |
| | | \item \texttt{t03:} chirp times $\tau_0$ and $\tau_3$, and | |
| | | \item \texttt{t04:} chirp times $\tau_0$ and $\tau_4$ | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InputMasses:} | |
| | | Enum that tells which post-Newtonian order is being used. | |
| | | \input{LALInspiralOrderH} | |
| | | \begin{itemize} | |
| | | \item \texttt{newtonian:} Newtonain order, flux and enrgy both to the lowes | |
| | | t order. | |
| | | \item \texttt{oneHalfPN:} same as before | |
| | | \item \texttt{onePN:} Both energy and flux to order $O(v^2)$ beyond the New | |
| | | tonian order. | |
| | | \item \texttt{onePointFivePN:} Energy to order $O(v^2)$ and flux to order $ | |
| | | O(v^3)$ | |
| | | \item \texttt{twoPN:} Both energy and flux to order $O(v^4)$ | |
| | | \item \texttt{twoPointFivePN:} Energy to order $O(v^4)$ and flux to order $ | |
| | | O(v^5)$ | |
| | | \item \texttt{threePN:} Both energy and flux to order $O(v^6)$ | |
| | | \item \texttt{threePointFivePN:} Energy to order $O(v^6)$ and flux to order | |
| | | $O(v^7)$ | |
| | | \end{itemize} | |
| | | In all cases, the gravitational wave phase (also frequency and time) | |
| | | as an expansion of the gauge invariant parameter $v$ is given up to | |
| | | the order specified by flux. Note that there are certain undetermined | |
| | | parameters at \texttt{threePN} and \texttt{threePointFivePN.} The waveform | |
| | | generation codes use a specific | |
| | | value of those parameters while generating the wave. | |
| | | | |
| | | \item \texttt{Approximant:} | |
| | | \input{LALInspiralApproximantH} | |
| | | \begin{itemize} | |
| | | \item \texttt{TaylorT1:} Time domain Taylor approximant in which | |
| | | the energy and flux are both kept as Taylor expansions | |
| | | and a first order ordinary differential equation is solved | |
| | | for the GW phase as a function of $t.$ | |
| | | \item \texttt{TaylorT2:} Time domain Taylor approximant in which | |
| | | the phase evolution $\varphi(t)$ is obtained by iteratively | |
| | | solving post-Newtonian expansions $\varphi(v)$ and $t(v).$ | |
| | | \item \texttt{TaylorT3:} Time domain Taylor approximant in which | |
| | | phase is explicitly given as a function of time. | |
| | | \item \texttt{TaylorF1:} The standard stationary phase approximation. | |
| | | \item \texttt{TaylorF2:} The stationary phase approximation that | |
| | | correctly represents, in the Fourier domain, the waveform given | |
| | | by \texttt{TaylorT1} approximant (see Damour, Iyer, Sathyaprakash, | |
| | | Phys. Rev. D . 63, 44023 (2001) for details). | |
| | | \item \texttt{PadeT1:} Time-domain P-approximant. | |
| | | \item \texttt{PadeF1:} Frequency-domain P-approximant (not yet implemented) | |
| | | . | |
| | | \item \texttt{EOB:} Effective one-body waveform | |
| | | \item \texttt{DJS:} Effective one-body waveform to 3.5 PN order | |
| | | \item \texttt{INSPA:} Improved stationary phase approximation (not implemen | |
| | | ted yet) | |
| | | \item \texttt{IRSPA:} Improved relativistic stationary phase approximation | |
| | | (not implemented yet) | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralTemplate:} | |
| | | The inspiral waveform parameter structure containing information about the | |
| | | waveform to be generated. | |
| | | \input{LALInspiralTemplateH} | |
| | | | |
| | | \begin{itemize} | |
| | | \item \texttt { ieta:} parameter that tells whether the symmetric mass ra | |
| | | tio $\eta$ | |
| | | should be set to zero in the PN expansions of GW flux and binding | |
| | | energy. | |
| | | If \texttt{ieta=0} $\eta$ will be set to zero, otherwise the appro | |
| | | priate | |
| | | value of $\eta$ from the given parameters will be used. | |
| | | | |
| | | \item \texttt { level:} (introduced by Duncan Brown?) | |
| | | \item \texttt { *segmentIdVec:} (introduced by Duncan Brown?) | |
| | | \item \texttt { number:} (introduced by Duncan Brown?) | |
| | | \item \texttt { nStartPad:} Number of leading elements to be set to zero. | |
| | | \item \texttt { nEndPad:} Number of trailing bins to be set to zero, the | |
| | | resulting waveform will have at least this many bins zero at the end, pro | |
| | | bably | |
| | | more since we always deal with an integer power of 2 array. | |
| | | \item \texttt { mass1:} Mass of the primary in solar mass. | |
| | | \item \texttt { mass2:} Mass of the secondary in solar mass | |
| | | (\texttt{mass1} need not be larger than \texttt{mass2}. | |
| | | \item \texttt { spin1[3]:} Spin vector of the primary (currently not in u | |
| | | se) | |
| | | \item \texttt { spin2[3]:} Spin vector of the secondary (currently not in | |
| | | use) | |
| | | \item \texttt { inclination:} Inclination of the orbit (currently not in | |
| | | use) | |
| | | \item \texttt { eccentricity:} initial eccentricity of the orbit (curren | |
| | | tly not in use) | |
| | | \item \texttt { totalMass:} total mass of the binary $m=m_1+m_2$ in solar | |
| | | mass. | |
| | | \item \texttt { eta:} symmetric mass ratio $\eta=m_1m_2/m^2.$ | |
| | | \item \texttt { chirpMass:} chirp mass of the binary $=\eta^{3/5} m$ in s | |
| | | olar mass | |
| | | \item \texttt { t0:} Newtonain chirp time in seconds. | |
| | | \item \texttt { t2:} first post-Newtonian chirp time in seconds. | |
| | | \item \texttt { t3:} 1.5 post-Newtonian chirp time in seconds. | |
| | | \item \texttt { t4:} second post-Newtonian chirp time in seconds. | |
| | | \item \texttt { t5:} 2.5 post-Newtonian chirp time in seconds. | |
| | | \item \texttt { tC:} total chirp time seconds. | |
| | | \item \texttt { mu:} reduced mass (in solar mass) | |
| | | \item \texttt { fLower:} lower frequency cutoff of the detector in Hz | |
| | | \item \texttt { fCutoff:} upper frequency cutoff in Hz to be used in gene | |
| | | rating the waveform. | |
| | | If the last stable orbit frequency is smaller than the upper cutoff it wi | |
| | | ll be used | |
| | | in terminating the waveform instead of fCutoff. | |
| | | \item \texttt { tSampling:} Sampling rate in Hz | |
| | | \item \texttt { startPhase:} starting phase of the waveform in radians | |
| | | \item \texttt { startTime:} starting time of the waveform (in sec); if di | |
| | | fferent from zero, the | |
| | | waveform will start with an instantaneous frequency different from fLower | |
| | | and reach | |
| | | fLower at time (approximately) zero | |
| | | \item \texttt { signalAmplitude:} dimensionless amplitude of the signal ( | |
| | | currently unused.) | |
| | | \item \texttt { rInitial:} initial radial separation of the two, in units | |
| | | of total mass | |
| | | bodies (used only in EOB waveforms) | |
| | | \item \texttt { vInitial:} initial velocity parameter, in units of the sp | |
| | | eed of light | |
| | | \item \texttt { rFinal:} final 'separation' between the bodies, in units | |
| | | of total mass | |
| | | \item \texttt { vFinal:} final velocity parameter, in units of the speed | |
| | | of light | |
| | | \item \texttt { rLightRing:} radial coordinate at the light ring, in unit | |
| | | s of total mass | |
| | | \item \texttt { OmegaS:} The 3PN (unknown) parameter; calculated to be eq | |
| | | ual to zero | |
| | | by Damour, Jaranowski and Schaffer. | |
| | | \item \texttt { Theta:} The 3PN unknown flux parameter; likely to be arou | |
| | | nd unity; | |
| | | most waveform generation routines take theta to be zero. Robustness of th | |
| | | e EOB waveform | |
| | | has been demonstrated for $-2 < $ \texttt{Theta} $< 2.$ | |
| | | \item \texttt { massChoice:} The pair of (mass) parameters given (see str | |
| | | ucture | |
| | | defining this member for more details). | |
| | | \item \texttt { order:} Post-Newtonain order to be used in generating the | |
| | | wave. | |
| | | \item \texttt { approximant:} Post-Newtonain approximant to be used in ge | |
| | | nerating the wave. | |
| | | \item \texttt { tagInspiralTemplate *next:} Linked list to the next coars | |
| | | e bank template | |
| | | (currently not filled by inspiral or bank codes) | |
| | | \item \texttt { tagInspiralTemplate *fine:} Linked list to the next fine | |
| | | bank template | |
| | | (currently not filled by inspiral or bank codes) | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralToffInput:} | |
| | | \input{LALInspiralToffInputH} | |
| | | This is a structure needed by the inner workings of the inspiral wave gener | |
| | | ation code. | |
| | | | |
| | | \item \texttt{expnCoeffs:} | |
| | | This structure contains various post-Newtonian and P-approximant expansion | |
| | | coefficients; the meanings of the coefficients is indicated as comme | |
| | | nts | |
| | | before each list. | |
| | | \input{LALExpnCoeffsH} | |
| | | | |
| | | \item {Energy, flux, phase, time and frequency functions:} The following | |
| | | functions are generic function definitions that will be used in | |
| | | template generation. The function \texttt{LALInspiralChooseModel,} | |
| | | which is called by wave generation interface code, points these | |
| | | functions to the appropriate specific functions depending on the | |
| | | choices made by the user. | |
| | | \input{LALEnergyAndFluxFunctionsH} | |
| | | | |
| | | \item \texttt{expnFunc:} Structure to hold all the pointer to generic | |
| | | functions defined above. | |
| | | \input{LALexpnFuncH} | |
| | | | |
| | | \item {Misc structures:} | |
| | | The rest of the structures below define other structures needed by wave | |
| | | generation codes. (Will produce a documentation some day so that future cod | |
| | | e | |
| | | maintainers can understand what precisely has been done.) | |
| | | | |
| | | \end{enumerate} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALEtaTau0Tau2InH"> */ | |
| typedef struct | | typedef struct | |
| tagEtaTau02In | | tagEtaTau02In | |
| { | | { | |
| REAL8 t2; | | REAL8 t2; | |
| REAL8 A2; | | REAL8 A2; | |
| REAL8 B2; | | REAL8 B2; | |
| } EtaTau02In; | | } EtaTau02In; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{EtaTau02In} | | \idx[Type]{EtaTau02In} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALEtaTau0Tau2InH"> */ | |
| | | typedef struct | |
| | | tagEtaTau04In | |
| | | { | |
| | | REAL8 t4; | |
| | | REAL8 A4; | |
| | | REAL8 B4; | |
| | | REAL8 C4; | |
| | | } EtaTau04In; | |
| | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{EtaTau04In} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInputMassesH"> */ | |
| typedef enum { | | typedef enum { | |
| m1Andm2, | | m1Andm2, | |
| totalMassAndEta, | | totalMassAndEta, | |
| totalMassAndMu, | | totalMassAndMu, | |
| t01, | | t01, | |
| t02, | | t02, | |
| t03, | | t03, | |
| t04 | | t04 | |
| } InputMasses; | | } InputMasses; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InputMasses} | | \idx[Type]{InputMasses} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralOrderH"> */ | |
| typedef enum { | | typedef enum { | |
| newtonian, | | newtonian, | |
| oneHalfPN, | | oneHalfPN, | |
| onePN, | | onePN, | |
| onePointFivePN, | | onePointFivePN, | |
| twoPN, | | twoPN, | |
| twoPointFivePN, | | twoPointFivePN, | |
| threePN, | | threePN, | |
| threePointFivePN | | threePointFivePN | |
| } Order; | | } Order; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{Order} | | \idx[Type]{Order} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralApproximantH"> */ | |
| typedef enum { | | typedef enum { | |
| TaylorT1, | | TaylorT1, | |
| TaylorT2, | | TaylorT2, | |
| TaylorT3, | | TaylorT3, | |
| TaylorF1, | | TaylorF1, | |
| TaylorF2, | | TaylorF2, | |
| PadeT1, | | PadeT1, | |
| PadeF1, | | PadeF1, | |
| EOB, | | EOB, | |
| DJS, | | DJS, | |
| INSPA, | | INSPA, | |
| IRSPA | | IRSPA | |
| } Approximant; | | } Approximant; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralTemplateH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralTemplate | | tagInspiralTemplate | |
| { | | { | |
| INT4 ieta; | | INT4 ieta; | |
| INT4 level; | | INT4 level; | |
| INT4Vector *segmentIdVec; | | INT4Vector *segmentIdVec; | |
| INT4 number; | | INT4 number; | |
| INT4 nStartPad; | | INT4 nStartPad; | |
| INT4 nEndPad; | | INT4 nEndPad; | |
| REAL8 mass1; | | REAL8 mass1; | |
| | | | |
| skipping to change at line 194 | | skipping to change at line 372 | |
| REAL8 fCutoff; | | REAL8 fCutoff; | |
| REAL8 tSampling; | | REAL8 tSampling; | |
| REAL8 startPhase; | | REAL8 startPhase; | |
| REAL8 startTime; | | REAL8 startTime; | |
| REAL8 signalAmplitude; | | REAL8 signalAmplitude; | |
| REAL8 rInitial; | | REAL8 rInitial; | |
| REAL8 vInitial; | | REAL8 vInitial; | |
| REAL8 rFinal; | | REAL8 rFinal; | |
| REAL8 vFinal; | | REAL8 vFinal; | |
| REAL8 rLightRing; | | REAL8 rLightRing; | |
|
| REAL8 OmegaS, Theta; | | REAL8 OmegaS; | |
| | | REAL8 Theta; | |
| InputMasses massChoice; | | InputMasses massChoice; | |
| Order order; | | Order order; | |
| Approximant approximant; | | Approximant approximant; | |
| struct tagInspiralTemplate *next; | | struct tagInspiralTemplate *next; | |
| struct tagInspiralTemplate *fine; | | struct tagInspiralTemplate *fine; | |
| } | | } | |
| InspiralTemplate; | | InspiralTemplate; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{InspiralTemplate}} | | \index{\texttt{InspiralTemplate}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALInspiralToffInputH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralToffInput | | tagInspiralToffInput | |
| { | | { | |
| REAL8 tN; | | REAL8 tN; | |
| REAL8 t2; | | REAL8 t2; | |
| REAL8 t3; | | REAL8 t3; | |
| REAL8 t4; | | REAL8 t4; | |
| REAL8 t5; | | REAL8 t5; | |
| REAL8 t6; | | REAL8 t6; | |
| REAL8 t7; | | REAL8 t7; | |
| | | | |
| skipping to change at line 231 | | skipping to change at line 410 | |
| REAL8 tc; | | REAL8 tc; | |
| REAL8 t; | | REAL8 t; | |
| } | | } | |
| InspiralToffInput; | | InspiralToffInput; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralToffInput} | | \idx[Type]{InspiralToffInput} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* <lalVerbatim file="LALExpnCoeffsH"> */ | |
| typedef struct { | | typedef struct { | |
| int ieta; | | int ieta; | |
|
| | | /* coefficients in the Taylor expansion of new energy function*/ | |
| double eTaN, eTa1, eTa2, eTa3; | | double eTaN, eTa1, eTa2, eTa3; | |
|
| | | /* coefficients in the Pade expression of new energy function*/ | |
| double ePaN, ePa1, ePa2, ePa3; | | double ePaN, ePa1, ePa2, ePa3; | |
|
| | | /* coefficients in the Taylor expansion of usual energy function*/ | |
| double ETaN, ETa1, ETa2, ETa3; | | double ETaN, ETa1, ETa2, ETa3; | |
|
| | | /* coefficients in the Taylor expansion of the derivative of the | |
| | | usual energy function*/ | |
| double dETaN, dETa1, dETa2, dETa3; | | double dETaN, dETa1, dETa2, dETa3; | |
| | | | |
|
| | | /* Taylor expansion coefficients of energy flux*/ | |
| | | double FTaN, FTa1, FTa2, FTa3, FTa4, FTa5, FTa6, FTa7, FTl6; | |
| | | /* Taylor expansion coefficients of factored flux*/ | |
| double fTaN, fTa1, fTa2, fTa3, fTa4, fTa5, fTa6, fTa7; | | double fTaN, fTa1, fTa2, fTa3, fTa4, fTa5, fTa6, fTa7; | |
|
| | | /* Coefficients of the corresponding P-approximant*/ | |
| double fPaN, fPa1, fPa2, fPa3, fPa4, fPa5, fPa6, fPa7; | | double fPaN, fPa1, fPa2, fPa3, fPa4, fPa5, fPa6, fPa7; | |
|
| double FTaN, FTa1, FTa2, FTa3, FTa4, FTa5, FTa6, FTa7, FTl6; | | | |
| | | | |
|
| | | /* Taylor expansion coefficents in t(v)*/ | |
| double tvaN, tva2, tva3, tva4, tva5, tva6, tva7, tvl6; | | double tvaN, tva2, tva3, tva4, tva5, tva6, tva7, tvl6; | |
|
| | | /* Taylor expansion coefficents in phi(v)*/ | |
| double pvaN, pva2, pva3, pva4, pva5, pva6, pva7, pvl6; | | double pvaN, pva2, pva3, pva4, pva5, pva6, pva7, pvl6; | |
|
| | | /* Taylor expansion coefficents in phi(t)*/ | |
| double ptaN, pta2, pta3, pta4, pta5, pta6, pta7, ptl6; | | double ptaN, pta2, pta3, pta4, pta5, pta6, pta7, ptl6; | |
|
| | | /* Taylor expansion coefficents in f(t)*/ | |
| double ftaN, fta2, fta3, fta4, fta5, fta6, fta7, ftl6; | | double ftaN, fta2, fta3, fta4, fta5, fta6, fta7, ftl6; | |
| | | | |
|
| | | /* Taylor expansion coefficents in f(t)*/ | |
| double samplingrate, samplinginterval; | | double samplingrate, samplinginterval; | |
|
| | | /* symmetric mass ratio, total mass, component masses*/ | |
| double eta, totalmass, m1, m2; | | double eta, totalmass, m1, m2; | |
|
| | | /* unknown 3PN parameters, euler constant*/ | |
| double lambda, theta, EulerC, omegaS; | | double lambda, theta, EulerC, omegaS; | |
|
| | | | |
| | | /* initial and final values of frequency, time, velocity; lso | |
| | | values of velocity and frequency; final phase.*/ | |
| double f0, fn, t0, tn, v0, vn, vf, vlso, flso, phiC; | | double f0, fn, t0, tn, v0, vn, vf, vlso, flso, phiC; | |
|
| | | | |
| | | /* last stable orbit and pole defined by various Taylor and P-approximan | |
| | | ts*/ | |
| double vlsoT0, vlsoT2, vlsoT4, vlsoT6; | | double vlsoT0, vlsoT2, vlsoT4, vlsoT6; | |
| double vlsoP0, vlsoP2, vlsoP4, vlsoP6; | | double vlsoP0, vlsoP2, vlsoP4, vlsoP6; | |
| double vpoleP4, vpoleP6; | | double vpoleP4, vpoleP6; | |
| } expnCoeffs; | | } expnCoeffs; | |
| | | | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{expnCoeffs} | | \idx[Type]{expnCoeffs} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /* <lalVerbatim file="LALEnergyAndFluxFunctionsH"> */ | |
| | | | |
| typedef double EnergyFunction( | | typedef double EnergyFunction( | |
| double v, | | double v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| typedef double FluxFunction( | | typedef double FluxFunction( | |
| double v, | | double v, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| typedef void (TestFunction)( | | typedef void (TestFunction)( | |
| REAL8Vector *vector1, | | REAL8Vector *vector1, | |
| | | | |
| skipping to change at line 300 | | skipping to change at line 501 | |
| REAL8 *f, | | REAL8 *f, | |
| REAL8 td, | | REAL8 td, | |
| expnCoeffs *ak); | | expnCoeffs *ak); | |
| | | | |
| typedef void (InspiralTiming2) ( | | typedef void (InspiralTiming2) ( | |
| LALStatus *status, | | LALStatus *status, | |
| REAL8 *toff, | | REAL8 *toff, | |
| REAL8 f, | | REAL8 f, | |
| void *params); | | void *params); | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralHS"> */ | | /* </lalVerbatim> */ | |
| | | | |
| | | /* <lalVerbatim file="LALexpnFuncH"> */ | |
| typedef struct | | typedef struct | |
| tagexpnFunc | | tagexpnFunc | |
| { | | { | |
| EnergyFunction *dEnergy; | | EnergyFunction *dEnergy; | |
| FluxFunction *flux; | | FluxFunction *flux; | |
| InspiralTiming2 *timing2; | | InspiralTiming2 *timing2; | |
| InspiralPhasing2 *phasing2; | | InspiralPhasing2 *phasing2; | |
| InspiralPhasing3 *phasing3; | | InspiralPhasing3 *phasing3; | |
| InspiralFrequency3 *frequency3; | | InspiralFrequency3 *frequency3; | |
| } | | } | |
| | | | |
End of changes. 31 change blocks. |
| 26 lines changed or deleted | | 272 lines changed or added | |
|
| LALInspiralBank.h | | LALInspiralBank.h | |
| /* <lalVerbatim file="LALInspiralBankHV"> | | /* <lalVerbatim file="LALInspiralBankHV"> | |
| | | | |
| Author: Churches, D.K. and Sathyaprakash, B.S. | | Author: Churches, D.K. and Sathyaprakash, B.S. | |
|
| $Id: LALInspiralBank.h,v 1.12 2002/03/27 20:27:29 duncan Exp $ | | $Id: LALInspiralBank.h,v 1.13 2002/06/05 11:11:27 dchurches Exp $ | |
| | | | |
| </lalVerbatim> */ | | </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{LALInspiralBank.h}} | | \section{Header \texttt{LALInspiralBank.h}} | |
| \label{s:LALInspiralBank.h} | | \label{s:LALInspiralBank.h} | |
| | | | |
| Header file for the template placement codes. | | Header file for the template placement codes. | |
| | | | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/LALConstants.h> | | #include <lal/LALConstants.h> | |
| #include <lal/LALInspiral.h> | | #include <lal/LALInspiral.h> | |
| #include <lal/RealFFT.h> | | #include <lal/RealFFT.h> | |
| #include <lal/LALNoiseModels.h> | | #include <lal/LALNoiseModels.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID( LALINSPIRALBANKH, "$Id: LALInspiralBank.h,v 1.12 2002/03/27 20:27:2
9 duncan Exp $" ); | | NRCSID( LALINSPIRALBANKH, "$Id: LALInspiralBank.h,v 1.13 2002/06/05 11:11:2
7 dchurches Exp $" ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Error codes} | | \subsection*{Error codes} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalErrTable> */ | | /* <lalErrTable> */ | |
| | | | |
| #define LALINSPIRALBANKH_ENULL 1 | | #define LALINSPIRALBANKH_ENULL 1 | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| #define LALINSPIRALBANKH_MSGENULL "Arguments contained an unexpected null p
ointer" | | #define LALINSPIRALBANKH_MSGENULL "Arguments contained an unexpected null p
ointer" | |
| #define LALINSPIRALBANKH_MSGEMEM "Memory allocation failure" | | #define LALINSPIRALBANKH_MSGEMEM "Memory allocation failure" | |
| #define LALINSPIRALBANKH_MSGECHOICE "Invalid choice for an input parameter" | | #define LALINSPIRALBANKH_MSGECHOICE "Invalid choice for an input parameter" | |
| #define LALINSPIRALBANKH_MSGEDIV0 "Division by zero" | | #define LALINSPIRALBANKH_MSGEDIV0 "Division by zero" | |
| #define LALINSPIRALBANKH_MSGESIZE "Invalid input range" | | #define LALINSPIRALBANKH_MSGESIZE "Invalid input range" | |
| | | | |
| /* </lalErrTable> */ | | /* </lalErrTable> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
|
| \section*{Structures} | | \subsection*{Enums} | |
| \input{LALInspiralBankHS} | | | |
| </lalLaTeX> */ | | \begin{enumerate} | |
| | | \item \texttt{CoordinateSpace:} | |
| | | \input{LALCoordinateSpaceH} | |
| | | This enum allows users to choose template bank either in the $(\tau_0, \tau | |
| | | _2)$ | |
| | | space of chirptimes (the choice made by \texttt{Tau0Tau2}) or in the | |
| | | $(\tau_0, \tau_3)$ space of chirptimes (the choice made by \texttt{Tau0Tau3 | |
| | | }). | |
| | | This was implemented in releases before May 25. On May 25 we migrated to a | |
| | | new, slightly faster, computation of the metric in which, at present, only | |
| | | the | |
| | | choice \texttt{Tau0Tau3} can be made. | |
| | | | |
| | | Choose templates either in the $(\tau_0,\tau_2)$ or $(\tau_0,\tau_3)$ | |
| | | space. This is one of the members of the InspiralCoarseBankIn structure. | |
| | | | |
| | | \item\texttt{InspiralBankMassRange:} | |
| | | | |
| | | \input{LALInspiralBankMassRangeH} | |
| | | | |
| | | An enum that appears in the \texttt{InspiralCoarseBankIn} structure | |
| | | which fixes the way templates are chosen: The choice | |
| | | \texttt{MinComponentMassMaxTotalMass} means the minimum of the | |
| | | component masses will be given by \texttt{mMin} and maximum total | |
| | | mass is given by \texttt{MMax} of the \texttt{InspiralBankCoarseIn} structu | |
| | | re. | |
| | | The choice \texttt{MinMaxComponentMass} means the minimum of the | |
| | | components masses will be again fixed by \texttt{mMin} and the | |
| | | maximum of the component masses is fixed by \texttt{mMax} of the | |
| | | \texttt{InspiralCoarseIn} structure below. | |
| | | \end{enumerate} | |
| | | | |
| | | \subsection*{Structures} | |
| | | \begin {enumerate} | |
| | | \item \texttt{InspiralMetric} | |
| | | Structure to store metric at various points the signal manifold. | |
| | | \input{LALInspiralMetricH} | |
| | | We store the diagonalized metric together with the angle theta | |
| | | between the $\tau_0$-axis and the semi-major axis of the ambiguity ellipse. | |
| | | The members of this structure are: | |
| | | \begin{itemize} | |
| | | \item \texttt{g00}: 00-component of the diagonalised metric. | |
| | | \item \texttt{g11}: 11-component of the diagonalised metric. | |
| | | \item \texttt{theta}: Angle from tau0 to semi-major axis of the ellipse. | |
| | | \item \texttt{space}: The enum describing the coordinate space in which | |
| | | the metric is computed. | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralCoarseBankIn:} | |
| | | Input for choosing a template bank. This is the structure that must | |
| | | be filled by a routine calling the code \texttt{InspiralCreateCoarse | |
| | | Bank} | |
| | | \input{LALInspiralCoarseBankH} | |
| | | | |
| | | \begin{itemize} | |
| | | \item \texttt{massRange}: enum that determines whether templates should b | |
| | | e | |
| | | chosen using fixed ranges for component masses or | |
| | | to use minimum component mass and maximum totalmass. | |
| | | \item \texttt{space}: enum that decides whether to use $(\tau_0,\tau_2)$ | |
| | | or $(\tau_0,\tau_3)$ in constructing the template bank | |
| | | \item \texttt{mMin}: minimum mass of components to search for | |
| | | \item \texttt{mMax}: maximum mass of components to search for | |
| | | \item \texttt{MMax}: alternatively, maximum total mass of binary to searc | |
| | | h for | |
| | | \item \texttt{mmCoarse}: Coarse grid minimal match | |
| | | \item \texttt{mmFine}: Fine grid minimal match | |
| | | \item \texttt{fLower}: Lower frequency cutoff | |
| | | \item \texttt{fUpper}: Upper frequency cutoff | |
| | | \item \texttt{tSampling}: Sampling rate | |
| | | \item \texttt{etamin}: minimum value of eta in our search | |
| | | \item \texttt{shf}: Frequency series containing the PSD | |
| | | \item \texttt{iflso}: (currently not implemented) flso will be used as an | |
| | | upper limit in moments integrals if iflso!=0; else fUpper will be used | |
| | | | |
| | | The next two members are used in setting up the InspiralTemplate | |
| | | parameter structure but not in creating the template bank. | |
| | | | |
| | | \item \texttt{order}: Post-Newtonian order of the waveform | |
| | | \item \texttt{approximant}: Approximant of the waveform | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralFineBankIn} | |
| | | Structre needed by the function \texttt{LALInspiralCreateFineBank}. | |
| | | which computes a finer mesh around a given lattice point | |
| | | using the value of the fine-mesh minimal match, coarse-mesh | |
| | | minimal match and the metric at the current lattice point. | |
| | | \input{LALInspiralFineBankInH} | |
| | | \begin{itemize} | |
| | | \item {templateList:} A list contianing all the fine-mesh templates | |
| | | \item {coarseIn:} input structure that contains useful necessary parameters | |
| | | to construct a fine-mesh. | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralTemplateList} | |
| | | A grid of inspiral templates (i.e., a template list). | |
| | | | |
| | | \input{LALInspiralTemplateListH} | |
| | | Structure returned by the coarse and fine bank generation routines. | |
| | | Currently we generate an array of type \texttt{InspiralTemplateList} | |
| | | which contains the coordinate markers (the parameter structure | |
| | | \texttt{InspiralTemplate} defined in the \texttt{inspiral} package) | |
| | | and the metric at each of those points. There is a desire to make this | |
| | | a truly linked list at some time in the future. The member of this | |
| | | structure are: | |
| | | \begin{itemize} | |
| | | \item \texttt{ID}: An unique integer ID of the template | |
| | | \item \texttt{params}: Value of the parameters at the lattice point | |
| | | \item \texttt{metric}: metric at the lattice point | |
| | | \item \texttt{*next}: pointer to next lattice point; but this is currently | |
| | | not filled by the bank code. | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralBankParams:} | |
| | | This is a structure needed in the inner workings | |
| | | of the \texttt{LALInspiralCreateCoarseBank} code. | |
| | | \input{LALInspiralParamsH} | |
| | | \begin{itemize} | |
| | | \item \texttt{nparams}: Number of parameters (currently fixed at 2, so this | |
| | | is as of now unused) | |
| | | \item \texttt{x0}: the first coordinate, chosen to be always $\tau_0$ | |
| | | \item \texttt{x1}: the second coordinate, chosen to be either $\tau_2$ or $ | |
| | | \tau_3$ | |
| | | \item \texttt{dx0}: increment in the x0-direction | |
| | | \item \texttt{dx1}: increment in the x1-direction | |
| | | \item \texttt{x0Min}: minimum value of the first coordinate as | |
| | | defined by the search region | |
| | | \item \texttt{x0Max}: maximum value of the first coordinate as | |
| | | defined by the search region | |
| | | \item \texttt{x1Min}: minimum value of the second coordinate as | |
| | | defined by the search region | |
| | | \item \texttt{x1Max}: maximum value of the second coordinate as | |
| | | defined by the search region | |
| | | \item \texttt{*metric}: pointer to the metric at the current location. | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralMomentsIn} | |
| | | Inputs to the function that computes the moments of the PSD. | |
| | | The moment is defined as: | |
| | | $$\int_{x_{\rm min}}^{x_{\rm max}} | |
| | | \frac{x^{-{p}/3}}{S_h(x)} dx,$$ | |
| | | where $x=f/f_0$ is a scaled frequency, $f_0$ | |
| | | being a fiducial frequency, taken in these routines | |
| | | as the user supplied lower cutoff of the detector | |
| | | response. | |
| | | \input{LALInspiralMomentsInH} | |
| | | \begin{itemize} | |
| | | \item \texttt{xmin}: lower limit of the integral $x_{\rm min}$ | |
| | | \item \texttt{xmax}: upper limit of the integral $x_{\rm max}$ | |
| | | \item \texttt{ndx}: index $p/3$ (without the negative sign) in the moment i | |
| | | ntegral as above | |
| | | (please note that \texttt{ndx} is $\mathbf p/3$ and {\it not} just $p.$) | |
| | | \item \texttt{norm}: norm to be used in computing, the returned value is | |
| | | the above integral divided by the norm. | |
| | | \item \texttt{*shf}: the frequency series containing the noise psd. | |
| | | \end{itemize} | |
| | | | |
| | | \item \texttt{InspiralMomentsEtc} | |
| | | Parameter structure that holds the moments of the PSD and other useful | |
| | | constants required in the computation of the metric. | |
| | | \input{LALInspiralMomentsEtcH} | |
| | | \begin{itemize} | |
| | | \item {a01, a21, \ldots:} Coefficients in the expansion of the phase | |
| | | of the Fourier transform of an inspiral waveform computed | |
| | | in the stationary phase approximation. See documentation under | |
| | | the function \texttt{LALInspiralComputeMetric} later in this | |
| | | Section for a description of these coefficients. | |
| | | \item\texttt{j[18]:} The required moments are all computed once and | |
| | | stored in this array. The required moments are from J(1) to J(17) | |
| | | (except J(2), J(3) and J(16) that are not required at 2PN order, | |
| | | however, they are computed since future extensions, planned in the | |
| | | near future, will require them). However, in C we need an array size | |
| | | 18 to use an array that has an index 18. To ease the notation we have | |
| | | therefore defined an oversized (by one element) array. | |
| | | \end{itemize} | |
| | | | |
| | | \item {\texttt{RectangleIn} and \texttt{RectangleOut}:} | |
| | | Input and ouput structures to function LALRectangleVertices. | |
| | | \input{LALRectangleInH} | |
| | | \input{LALRectangleOutH} | |
| | | | |
| | | \end{enumerate} | |
| | | | |
|
| /* <lalLaTeX> | | | |
| \idx[Type]{Detector} | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALCoordinateSpaceH"> */ | |
| typedef enum | | typedef enum | |
| { | | { | |
|
| Tau0Tau2, Tau0Tau3 | | Tau0Tau2, Tau0Tau3 | |
| } | | } | |
| CoordinateSpace; | | CoordinateSpace; | |
|
| /* </lalVerbatim> */ | | | |
| | | | |
|
| | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{CoordinateSpace} | | \idx[Type]{CoordinateSpace} | |
|
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralBankMassRangeH"> */ | |
| | | typedef enum | |
| | | { | |
| | | MinComponentMassMaxTotalMass, | |
| | | MinMaxComponentMass | |
| | | } | |
| | | InspiralBankMassRange; | |
| | | | |
| | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \idx[Type]{LALInspiralMetric} | | \idx[Type]{InspiralBankMassRange} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* Metric and its dimension */ | | /* <lalVerbatim file="LALInspiralMetricH"> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | | |
| typedef struct | | typedef struct | |
| tagInspiralMetric | | tagInspiralMetric | |
| { | | { | |
|
| REAL8 g00; /* 00-component of the diagonalised metric. */ | | REAL8 g00; | |
| REAL8 g11; /* 11-component of the diagonalised metric. */ | | REAL8 g11; | |
| REAL8 theta; /* Angle from t0 to x0 */ | | REAL8 theta; | |
| CoordinateSpace space; /* Coordinate space in which metric is compute | | CoordinateSpace space; | |
| d */ | | | |
| INT4 iflso; | | | |
| REAL8FrequencySeries *shf; /* one sided strain power spectral density */ | | | |
| } | | } | |
| InspiralMetric; | | InspiralMetric; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralMetric} | | \idx[Type]{InspiralMetric} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALInspiralTemplateListH"> */ | |
| /* a grid of inspiral templates (i.e., a template list) */ | | | |
| | | | |
| typedef struct | | typedef struct | |
| tagInspiralTemplateList | | tagInspiralTemplateList | |
| { | | { | |
|
| INT4 ID; | | INT4 ID; | |
| InspiralTemplate params; /* Pointer to parameter vectors */ | | InspiralTemplate params; | |
| InspiralMetric metric; /* Pointer to metric at every poin | | InspiralMetric metric; | |
| t */ | | struct tagInspiralTemplateList *next; | |
| struct tagInspiralTemplateList *next; /* to create linked list */ | | | |
| } | | } | |
| InspiralTemplateList; | | InspiralTemplateList; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralTemplateList} | | \idx[Type]{InspiralTemplateList} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALInspiralParamsH"> */ | |
| /* Parameters needed in InspiralCreateCoarseBank */ | | | |
| typedef struct | | typedef struct | |
| tagInspiralBankParams | | tagInspiralBankParams | |
| { | | { | |
|
| INT4 nparams; /* for future use, presently 2-dimensional */ | | INT4 nparams; | |
| REAL8 x0; /* coordinates and increments at current locati | | REAL8 x0; | |
| on */ | | REAL8 x1; | |
| REAL8 x1; | | REAL8 dx0; | |
| REAL8 dx0; | | REAL8 dx1; | |
| REAL8 dx1; | | REAL8 x0Min; | |
| REAL8 x0Min; /* min and max values of parameters */ | | REAL8 x0Max; | |
| REAL8 x0Max; | | REAL8 x1Min; | |
| REAL8 x1Min; | | REAL8 x1Max; | |
| REAL8 x1Max; | | InspiralMetric *metric; | |
| InspiralMetric *metric; /* metric at current location */ | | | |
| } | | } | |
| InspiralBankParams; | | InspiralBankParams; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralBankParams} | | \idx[Type]{InspiralBankParams} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALInspiralCoarseBankH"> */ | |
| /* input for specifying a template bank */ | | | |
| | | | |
| typedef struct | | typedef struct | |
| tagInspiralCoarseBankIn | | tagInspiralCoarseBankIn | |
| { | | { | |
|
| REAL8 mMin; /* minimum mass of components to search f | | InspiralBankMassRange massRange; | |
| or */ | | CoordinateSpace space; | |
| REAL8 MMax; /* maximum total mass of binary to search | | | |
| for */ | | REAL8 mMin; | |
| REAL8 mmCoarse; /* Coarse grid minimal match */ | | REAL8 mMax; | |
| REAL8 mmFine; /* Fine grid minimal match */ | | REAL8 MMax; | |
| REAL8 fLower; /* Lower frequency cutoff */ | | REAL8 mmCoarse; | |
| REAL8 fUpper; /* Upper frequency cutoff */ | | REAL8 mmFine; | |
| REAL8 tSampling; /* Sampling rate */ | | REAL8 fLower; | |
| REAL8FrequencySeries shf; | | REAL8 fUpper; | |
| Order order; /* Post-Newtonian order of the waveform | | REAL8 tSampling; | |
| */ | | REAL8 etamin; | |
| Approximant approximant; /* Approximant of the waveform */ | | | |
| CoordinateSpace space; /* which of t0-t2 or t0-t3 coordinates */ | | REAL8FrequencySeries shf; | |
| REAL8 etamin; /* minimum value of eta in our search */ | | | |
| INT4 iflso; /* flso will be used as an upper limit in | | INT4 iflso; | |
| moments integrals if iflso!=0; else | | | |
| fUpper will be used */ | | Order order; | |
| | | Approximant approximant; | |
| } | | } | |
| InspiralCoarseBankIn; | | InspiralCoarseBankIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralCoarseBankIn} | | \idx[Type]{InspiralCoarseBankIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALInspiralMomentsInH"> */ | |
| typedef struct { | | typedef struct | |
| REAL8 xmin, xmax, ndx, norm; | | { | |
| REAL8FrequencySeries *shf; | | REAL8 xmin; | |
| } InspiralMomentsIn; | | REAL8 xmax; | |
| | | REAL8 ndx; | |
| | | REAL8 norm; | |
| | | REAL8FrequencySeries *shf; | |
| | | } | |
| | | InspiralMomentsIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralMomentsIn} | | \idx[Type]{InspiralMomentsIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALInspiralFineBankInH"> */ | |
| typedef struct | | typedef struct | |
| tagInspiralFineBankIn | | tagInspiralFineBankIn | |
| { | | { | |
|
| InspiralTemplateList templateList; | | InspiralTemplateList templateList; | |
| InspiralCoarseBankIn coarseIn; | | InspiralCoarseBankIn coarseIn; | |
| } InspiralFineBankIn; | | } | |
| | | InspiralFineBankIn; | |
| | | /* </lalVerbatim> */ | |
| | | /* <lalLaTeX> | |
| | | \idx[Type]{InspiralFineBankIn} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | /* <lalVerbatim file="LALInspiralMomentsEtcH"> */ | |
| | | typedef struct | |
| | | tagInspiralMomentsEtc | |
| | | { | |
| | | REAL8 a01, a21, a22, a31, a41, a42, a43; | |
| | | REAL8 j[18]; | |
| | | } | |
| | | InspiralMomentsEtc; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \idx[Type]{InspiralFineBankIn} | | \idx[Type]{InspiralFineBankIn} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALRectangleInH"> */ | |
| typedef struct | | typedef struct | |
| tagRectangleIn | | tagRectangleIn | |
|
| {REAL8 x0, y0, dx, dy, theta;} | | { | |
| | | REAL8 x0, y0, dx, dy, theta; | |
| | | } | |
| RectangleIn; | | RectangleIn; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{RectangleIn}} | | \index{\texttt{RectangleIn}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| /* <lalVerbatim file="LALInspiralBankHS"> */ | | /* <lalVerbatim file="LALRectangleOutH"> */ | |
| typedef struct | | typedef struct | |
| tagRectangleOut | | tagRectangleOut | |
|
| {REAL8 x1, y1, x2, y2, x3, y3, x4, y4, x5, y5;} | | { | |
| | | REAL8 x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; | |
| | | } | |
| RectangleOut; | | RectangleOut; | |
| /* </lalVerbatim> */ | | /* </lalVerbatim> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \index{\texttt{RectangleOut}} | | \index{\texttt{RectangleOut}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{LALInspiralBankHV}} | | \vfill{\footnotesize\input{LALInspiralBankHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes */ | | /* Function prototypes */ | |
| | | | |
|
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralComputeParamsC} | | \newpage\input{LALInspiralCreateCoarseBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralComputeParams( | | LALInspiralCreateCoarseBank( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplate *pars, | | InspiralTemplateList **list, | |
| InspiralBankParams bankParams, | | INT4 *nlist, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn bankIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralValidParamsC} | | \newpage\input{LALInspiralCreateFineBankC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralValidParams( | | LALInspiralCreateFineBank( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4 *valid, | | InspiralTemplateList **outlist, | |
| InspiralBankParams bankParams, | | INT4 *nlist, | |
| InspiralCoarseBankIn coarseIn | | InspiralFineBankIn fineIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralValidTemplateC} | | \newpage\input{LALInspiralComputeMetricC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralValidTemplate( | | LALInspiralComputeMetric( | |
| LALStatus *status, | | LALStatus *status, | |
| INT4 *valid, | | InspiralMetric *metric, | |
| InspiralBankParams bankParams, | | InspiralTemplate *params, | |
| InspiralCoarseBankIn coarseIn | | InspiralMomentsEtc *moments | |
| ); | | ); | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralMomentsC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralMoments( | |
| | | LALStatus *status, | |
| | | REAL8 *moment, | |
| | | InspiralMomentsIn pars); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{LALInspiralMomentsIntegrandC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void | |
| | | LALInspiralMomentsIntegrand( | |
| | | LALStatus *status, | |
| | | REAL8 *integrand, | |
| | | REAL8 f, | |
| | | void *pars); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralSetSearchLimitsC} | | \newpage\input{LALInspiralSetSearchLimitsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
| LALInspiralSetSearchLimits( | | LALInspiralSetSearchLimits( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralBankParams *bankParams, | | InspiralBankParams *bankParams, | |
| InspiralCoarseBankIn coarseIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralCreateCoarseBankC} | | \newpage\input{LALInspiralNextTemplateC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralCreateCoarseBank( | | LALInspiralNextTemplate( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplateList **list, | | InspiralBankParams *bankPars, | |
| INT4 *nlist, | | InspiralMetric metric); | |
| InspiralCoarseBankIn bankIn | | | |
| ); | | | |
| | | | |
|
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralCreateFineBankC} | | \newpage\input{LALInspiralComputeParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralCreateFineBank( | | LALInspiralComputeParams( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplateList **outlist, | | InspiralTemplate *pars, | |
| INT4 *nlist, | | InspiralBankParams bankParams, | |
| InspiralFineBankIn fineIn | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralComputeMetricC} | | \newpage\input{LALInspiralValidParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralComputeMetric( | | LALInspiralValidParams( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralMetric *metric, | | INT4 *valid, | |
| InspiralTemplate params, | | InspiralBankParams bankParams, | |
| INT4 pass | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralUpdateParamsC} | | \newpage\input{LALInspiralValidTemplateC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
|
| LALInspiralUpdateParams( | | LALInspiralValidTemplate( | |
| LALStatus *status, | | LALStatus *status, | |
|
| InspiralBankParams *bankParams, | | INT4 *valid, | |
| InspiralMetric metric, | | InspiralBankParams bankParams, | |
| REAL8 minimalMatch | | InspiralCoarseBankIn coarseIn | |
| ); | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| % TAKEN OUT BY JOLIEN: THIS IS NOT IN BANK | | \newpage\input{LALInspiralUpdateParamsC} | |
| %\newpage\input{LALInspiralWaveLengthC} | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | void | |
| | | LALInspiralUpdateParams( | |
| | | LALStatus *status, | |
| | | InspiralBankParams *bankParams, | |
| | | InspiralMetric metric, | |
| | | REAL8 minimalMatch | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALMatrixTransformC} | | \newpage\input{LALMatrixTransformC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
| LALMatrixTransform ( | | LALMatrixTransform ( | |
| LALStatus *status, | | LALStatus *status, | |
|
| INT4 Dim, | | INT4 Dim, | |
| REAL8 **trans, | | REAL8 **trans, | |
| REAL8 **buff1, | | REAL8 **buff1, | |
| REAL8 **mm3); | | REAL8 **mm3 | |
| | | ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALInspiralMomentsC} | | \newpage\input{LALInspiralMomentsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| void | | | |
| LALInspiralMoments( | | | |
| LALStatus *status, | | | |
| REAL8 *moment, | | | |
| InspiralMomentsIn pars); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALInspiralMomentsIntegrandC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void | | | |
| LALInspiralMomentsIntegrand( | | | |
| LALStatus *status, | | | |
| REAL8 *integrand, | | | |
| REAL8 f, | | | |
| void *pars); | | | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{LALDeterminant3C} | | \newpage\input{LALDeterminant3C} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
| LALDeterminant3(LALStatus *status, | | LALDeterminant3(LALStatus *status, | |
| REAL8 *determinant, | | REAL8 *determinant, | |
| REAL8 **matrix) ; | | REAL8 **matrix) ; | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| skipping to change at line 393 | | skipping to change at line 604 | |
| \newpage\input{LALInspiralSetParamsC} | | \newpage\input{LALInspiralSetParamsC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
| LALInspiralSetParams( | | LALInspiralSetParams( | |
| LALStatus *status, | | LALStatus *status, | |
| InspiralTemplate *tempPars, | | InspiralTemplate *tempPars, | |
| InspiralCoarseBankIn coarseIn); | | InspiralCoarseBankIn coarseIn); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{LALInspiralNextTemplateC} | | | |
| </lalLaTeX> */ | | | |
| | | | |
| void | | | |
| LALInspiralNextTemplate( | | | |
| LALStatus *status, | | | |
| InspiralBankParams *bankPars, | | | |
| InspiralMetric metric); | | | |
| | | | |
| /* <lalLaTeX> | | | |
| \newpage\input{LALRectangleVerticesC} | | \newpage\input{LALRectangleVerticesC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void | | void | |
| LALRectangleVertices( | | LALRectangleVertices( | |
| LALStatus *status, | | LALStatus *status, | |
| RectangleOut *out, | | RectangleOut *out, | |
| RectangleIn *in | | RectangleIn *in | |
| ); | | ); | |
| | | | |
| | | | |
End of changes. 47 change blocks. |
| 151 lines changed or deleted | | 355 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.8 2001/08/21 04:19:49 jolien Exp $ | | Revision: $Id: SeqFactories.h,v 1.9 2002/05/21 17:14:37 teviet Exp $ | |
| </lalVerbatim> | | </lalVerbatim> | |
| | | | |
| -------------------------------------------------------------------------*/ | | -------------------------------------------------------------------------*/ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \section{Header \texttt{SeqFactories.h}} | | \section{Header \texttt{SeqFactories.h}} | |
| \label{s:SeqFactories.h} | | \label{s:SeqFactories.h} | |
| | | | |
| Provides prototype and status code information for use of CreateVectorSeque
nce | | Provides prototype and status code information for use of CreateVectorSeque
nce | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| #ifndef _SEQFACTORIES_H | | #ifndef _SEQFACTORIES_H | |
| #define _SEQFACTORIES_H | | #define _SEQFACTORIES_H | |
| | | | |
| #include <lal/LALDatatypes.h> | | #include <lal/LALDatatypes.h> | |
| #include <lal/AVFactories.h> | | #include <lal/AVFactories.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID (SEQFACTORIESH, "$Id: SeqFactories.h,v 1.8 2001/08/21 04:19:49 jolie
n Exp $"); | | NRCSID (SEQFACTORIESH, "$Id: SeqFactories.h,v 1.9 2002/05/21 17:14:37 tevie
t Exp $"); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| | | | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| \input{SeqFactoriesHErrTab} | | \input{SeqFactoriesHErrTab} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* | | /* | |
| <lalErrTable file="SeqFactoriesHErrTab"> | | <lalErrTable file="SeqFactoriesHErrTab"> | |
| */ | | */ | |
| | | | |
| #define SEQFACTORIESH_ESLENGTH 1 | | #define SEQFACTORIESH_ESLENGTH 1 | |
| #define SEQFACTORIESH_EVLENGTH 2 | | #define SEQFACTORIESH_EVLENGTH 2 | |
|
| #define SEQFACTORIESH_EVPTR 4 | | #define SEQFACTORIESH_EALENGTH 4 | |
| #define SEQFACTORIESH_EUPTR 8 | | #define SEQFACTORIESH_EVPTR 8 | |
| #define SEQFACTORIESH_EDPTR 16 | | #define SEQFACTORIESH_EUPTR 16 | |
| #define SEQFACTORIESH_EINPTR 32 | | #define SEQFACTORIESH_EDPTR 32 | |
| #define SEQFACTORIESH_EMALLOC 64 | | #define SEQFACTORIESH_EINPTR 64 | |
| | | #define SEQFACTORIESH_EMALLOC 128 | |
| | | | |
| #define SEQFACTORIESH_MSGESLENGTH "Illegal sequence length." | | #define SEQFACTORIESH_MSGESLENGTH "Illegal sequence length." | |
| #define SEQFACTORIESH_MSGEVLENGTH "Illegal vector length." | | #define SEQFACTORIESH_MSGEVLENGTH "Illegal vector length." | |
|
| | | #define SEQFACTORIESH_MSGEALENGTH "Illegal array dimension." | |
| #define SEQFACTORIESH_MSGEVPTR "Null sequence handle." | | #define SEQFACTORIESH_MSGEVPTR "Null sequence handle." | |
| #define SEQFACTORIESH_MSGEUPTR "Non-null sequence pointer." | | #define SEQFACTORIESH_MSGEUPTR "Non-null sequence pointer." | |
| #define SEQFACTORIESH_MSGEDPTR "Null sequence data." | | #define SEQFACTORIESH_MSGEDPTR "Null sequence data." | |
| #define SEQFACTORIESH_MSGEINPTR "Null input pointer." | | #define SEQFACTORIESH_MSGEINPTR "Null input pointer." | |
| #define SEQFACTORIESH_MSGEMALLOC "Malloc failure." | | #define SEQFACTORIESH_MSGEMALLOC "Malloc failure." | |
| | | | |
| /* | | /* | |
| </lalErrTable> | | </lalErrTable> | |
| */ | | */ | |
| | | | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 96 | |
| \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} | |
| | | | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| typedef struct tagCreateVectorSequenceIn { | | typedef struct tagCreateVectorSequenceIn { | |
| UINT4 length; | | UINT4 length; | |
| UINT4 vectorLength; | | UINT4 vectorLength; | |
| } CreateVectorSequenceIn; | | } CreateVectorSequenceIn; | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | | |
| | | \begin{verbatim} | |
| | | CreateArraySequenceIn | |
| | | \end{verbatim} | |
| | | \idx[Type]{CreateArraySequenceIn} | |
| | | | |
| | | \noindent This structure stores the input required for creating an array | |
| | | sequence. This input includes the length of the sequence (i.e., the number | |
| | | of | |
| | | array) and the dimensions of each array index. The fields are: | |
| | | | |
| | | \begin{description} | |
| | | \item[\texttt{UINT4 length}] The sequence length. | |
| | | \item[\texttt{UINT4Vector *dimLength}] The dimensions of each array | |
| | | index (the same for every array in the sequence). | |
| | | \end{description} | |
| | | | |
| | | </lalLaTeX> */ | |
| | | | |
| | | typedef struct tagCreateArraySequenceIn { | |
| | | UINT4 length; | |
| | | UINT4Vector *dimLength; | |
| | | } CreateArraySequenceIn; | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorSequenceFactoriesC} | | \newpage\input{VectorSequenceFactoriesC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| void LALCreateSequence(LALStatus *, REAL4Sequence **, UINT4); | | void LALCreateSequence(LALStatus *, REAL4Sequence **, UINT4); | |
| void LALCHARCreateSequence(LALStatus *, CHARSequence **, UINT4); | | void LALCHARCreateSequence(LALStatus *, CHARSequence **, UINT4); | |
| void LALI2CreateSequence(LALStatus *, INT2Sequence **, UINT4); | | void LALI2CreateSequence(LALStatus *, INT2Sequence **, UINT4); | |
| void LALI4CreateSequence(LALStatus *, INT4Sequence **, UINT4); | | void LALI4CreateSequence(LALStatus *, INT4Sequence **, UINT4); | |
| void LALI8CreateSequence(LALStatus *, INT8Sequence **, UINT4); | | void LALI8CreateSequence(LALStatus *, INT8Sequence **, UINT4); | |
| | | | |
| skipping to change at line 187 | | skipping to change at line 213 | |
| UINT8VectorSequence **); | | UINT8VectorSequence **); | |
| void LALSDestroyVectorSequence(LALStatus *, | | void LALSDestroyVectorSequence(LALStatus *, | |
| REAL4VectorSequence **); | | REAL4VectorSequence **); | |
| void LALDDestroyVectorSequence(LALStatus *, | | void LALDDestroyVectorSequence(LALStatus *, | |
| REAL8VectorSequence **); | | REAL8VectorSequence **); | |
| void LALCDestroyVectorSequence(LALStatus *, | | void LALCDestroyVectorSequence(LALStatus *, | |
| COMPLEX8VectorSequence **); | | COMPLEX8VectorSequence **); | |
| void LALZDestroyVectorSequence(LALStatus *, | | void LALZDestroyVectorSequence(LALStatus *, | |
| COMPLEX16VectorSequence **); | | COMPLEX16VectorSequence **); | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{ArraySequenceFactoriesC} | |
| | | </lalLaTeX> */ | |
| | | | |
| | | void LALCreateArraySequence(LALStatus *, | |
| | | REAL4ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALI2CreateArraySequence(LALStatus *, | |
| | | INT2ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALI4CreateArraySequence(LALStatus *, | |
| | | INT4ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALI8CreateArraySequence(LALStatus *, | |
| | | INT8ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALU2CreateArraySequence(LALStatus *, | |
| | | UINT2ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALU4CreateArraySequence(LALStatus *, | |
| | | UINT4ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALU8CreateArraySequence(LALStatus *, | |
| | | UINT8ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALSCreateArraySequence(LALStatus *, | |
| | | REAL4ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALDCreateArraySequence(LALStatus *, | |
| | | REAL8ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALCCreateArraySequence(LALStatus *, | |
| | | COMPLEX8ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | void LALZCreateArraySequence(LALStatus *, | |
| | | COMPLEX16ArraySequence **, | |
| | | CreateArraySequenceIn *); | |
| | | | |
| | | void LALDestroyArraySequence (LALStatus *, | |
| | | REAL4ArraySequence **); | |
| | | void LALI2DestroyArraySequence(LALStatus *, | |
| | | INT2ArraySequence **); | |
| | | void LALI4DestroyArraySequence(LALStatus *, | |
| | | INT4ArraySequence **); | |
| | | void LALI8DestroyArraySequence(LALStatus *, | |
| | | INT8ArraySequence **); | |
| | | void LALU2DestroyArraySequence(LALStatus *, | |
| | | UINT2ArraySequence **); | |
| | | void LALU4DestroyArraySequence(LALStatus *, | |
| | | UINT4ArraySequence **); | |
| | | void LALU8DestroyArraySequence(LALStatus *, | |
| | | UINT8ArraySequence **); | |
| | | void LALSDestroyArraySequence(LALStatus *, | |
| | | REAL4ArraySequence **); | |
| | | void LALDDestroyArraySequence(LALStatus *, | |
| | | REAL8ArraySequence **); | |
| | | void LALCDestroyArraySequence(LALStatus *, | |
| | | COMPLEX8ArraySequence **); | |
| | | void LALZDestroyArraySequence(LALStatus *, | |
| | | COMPLEX16ArraySequence **); | |
| | | | |
| /* Test program. */ | | /* Test program. */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{VectorSequenceFactoriesTestC} | | \newpage\input{VectorSequenceFactoriesTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
|
| | | /* <lalLaTeX> | |
| | | \newpage\input{ArraySequenceFactoriesTestC} | |
| | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _SEQFACTORIES_H */ | | #endif /* _SEQFACTORIES_H */ | |
| | | | |
End of changes. 7 change blocks. |
| 7 lines changed or deleted | | 99 lines changed or added | |
|
| StochasticCrossCorrelation.h | | StochasticCrossCorrelation.h | |
| /*********************** <lalVerbatim file="StochasticCrossCorrelationHV"> | | /*********************** <lalVerbatim file="StochasticCrossCorrelationHV"> | |
| Author: UTB Relativity Group; contact whelan@phys.utb.edu (original by S. D
rasco) | | Author: UTB Relativity Group; contact whelan@phys.utb.edu (original by S. D
rasco) | |
|
| $Id: StochasticCrossCorrelation.h,v 1.22 2002/02/26 20:32:27 whelan Exp $ | | $Id: StochasticCrossCorrelation.h,v 1.25 2002/06/10 05:46:24 whelan Exp $ | |
| *********************************************************** </lalVerbatim>
*/ | | *********************************************************** </lalVerbatim>
*/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \section{Header \texttt{StochasticCrossCorrelation.h}} | | \section{Header \texttt{StochasticCrossCorrelation.h}} | |
| \label{stochastic:s:StochasticCrossCorrelation.h} | | \label{stochastic:s:StochasticCrossCorrelation.h} | |
| | | | |
| Provides prototype and error code information for the modules needed | | Provides prototype and error code information for the modules needed | |
| to calculate the standard optimally-filtered cross-correlation | | to calculate the standard optimally-filtered cross-correlation | |
| statistic for stochastic background searches, given a pair of data | | statistic for stochastic background searches, given a pair of data | |
| segments, along with appropriate representations of the detector | | segments, along with appropriate representations of the detector | |
|
| transfer function and the (whitened) power spectral density of the | | transfer function and the (uncalibrated) power spectral density of the | |
| noise in each detector. The relationship among these modules is | | noise in each detector. The relationship among these modules is | |
| illustrated in Fig.~\ref{stochastic:f:CrossCorrFlowchart}. | | illustrated in Fig.~\ref{stochastic:f:CrossCorrFlowchart}. | |
| | | | |
| \begin{figure}[htb!] | | \begin{figure}[htb!] | |
| \begin{center} | | \begin{center} | |
| \begin{picture}(410,250)(-32,-110) | | \begin{picture}(410,250)(-32,-110) | |
| \put(168,123){\vector(1,0){15}} | | \put(168,123){\vector(1,0){15}} | |
| \put(168,123){\line(1,0){25}} | | \put(168,123){\line(1,0){25}} | |
| \put(195,120){$Y$} | | \put(195,120){$Y$} | |
| \put(65,110) | | \put(65,110) | |
| { | | { | |
| \framebox(100,30) | | \framebox(100,30) | |
| { | | { | |
| \texttt{CrossCorr} | | \texttt{CrossCorr} | |
| } | | } | |
| } | | } | |
| \put(80,85){\vector(0,1){15}} | | \put(80,85){\vector(0,1){15}} | |
| \put(80,85){\line(0,1){25}} | | \put(80,85){\line(0,1){25}} | |
|
| \put(82,95){$\widetilde{\bar{h}}{}^{\scriptstyle{\rm W}}_{1,2}$} | | \put(82,95){$\widetilde{\bar{h}}{}_{1,2}$} | |
| \put(-37,65){$h^{\scriptstyle{\rm W}}_{1,2}$} | | \put(-37,65){$h_{1,2}$} | |
| \put(-17,68){\vector(1,0){15}} | | \put(-17,68){\vector(1,0){15}} | |
| \put(-17,68){\line(1,0){25}} | | \put(-17,68){\line(1,0){25}} | |
| \put(5,55) | | \put(5,55) | |
| { | | { | |
| \framebox(90,30) | | \framebox(90,30) | |
| { | | { | |
| \texttt{ZeroPadAndFFT} | | \texttt{ZeroPadAndFFT} | |
| } | | } | |
| } | | } | |
| \put(150,85){\vector(0,1){15}} | | \put(150,85){\vector(0,1){15}} | |
| \put(150,85){\line(0,1){25}} | | \put(150,85){\line(0,1){25}} | |
|
| \put(152,95){$\widetilde{Q}^{\scriptstyle{\rm W}}$} | | \put(152,95){$\widetilde{Q}$} | |
| \put(100,55) | | \put(100,55) | |
| { | | { | |
| \framebox(190,30) | | \framebox(190,30) | |
| { | | { | |
| \texttt{OptimalFilter} | | \texttt{OptimalFilter} | |
| } | | } | |
| } | | } | |
| \put(260,30){\vector(0,1){15}} | | \put(260,30){\vector(0,1){15}} | |
| \put(260,30){\line(0,1){25}} | | \put(260,30){\line(0,1){25}} | |
| \put(262,40){$\lambda$} | | \put(262,40){$\lambda$} | |
| | | | |
| skipping to change at line 97 | | skipping to change at line 97 | |
| \put(152,30){$\gamma$} | | \put(152,30){$\gamma$} | |
| \put(250,-60) | | \put(250,-60) | |
| { | | { | |
| \framebox(70,30) | | \framebox(70,30) | |
| { | | { | |
| \texttt{Overlap} | | \texttt{Overlap} | |
| } | | } | |
| } | | } | |
| \put(125,-80){\line(0,1){135}} | | \put(125,-80){\line(0,1){135}} | |
| \put(125,-80){\vector(0,1){100}} | | \put(125,-80){\vector(0,1){100}} | |
|
| %\put(107,40){$({P^{\scriptstyle{\rm HW}}_{1,2}})^{-1}$} | | %\put(107,40){$({P^{\scriptstyle{\rm HC}}_{1,2}})^{-1}$} | |
| \put(127,20){$\frac{1}{P^{\scriptstyle{\rm HW}}_{1,2}}$} | | \put(127,20){$\frac{1}{P^{\scriptstyle{\rm HC}}_{1,2}}$} | |
| %\put(117,40){$\frac{\tilde{R}_{1,2}}{P_{1,2}}$} | | %\put(117,40){$\frac{\tilde{R}_{1,2}}{P^{\scriptstyle{\rm C}}_{1,2}}$} | |
| \put(330,-80){\line(0,1){80}} | | \put(330,-80){\line(0,1){80}} | |
| \put(330,-80){\vector(0,1){45}} | | \put(330,-80){\vector(0,1){45}} | |
|
| % \put(142,40){${P_{1,2}}^{-1}$} | | % \put(142,40){${P^{\scriptstyle{\rm C}}_{1,2}}^{-1}$} | |
| \put(332,-35){$\frac{1}{P_{1,2}}$} | | \put(332,-35){$\frac{1}{P^{\scriptstyle{\rm C}}_{1,2}}$} | |
| %\put(142,40){$\frac{|\tilde{R}_{1,2}|^2}{P_{1,2}}$} | | %\put(142,40){$\frac{|\tilde{R}_{1,2}|^2}{P^{\scriptstyle{\rm C}}_{1,2}}$} | |
| \put(115,-110) | | \put(115,-110) | |
| { | | { | |
| \framebox(225,30) | | \framebox(225,30) | |
| { | | { | |
| \texttt{InverseNoise} | | \texttt{InverseNoise} | |
| } | | } | |
| } | | } | |
| \put(73,-108){$\tilde{R}_{1,2}$} | | \put(73,-108){$\tilde{R}_{1,2}$} | |
| \put(93,-105){\vector(1,0){15}} | | \put(93,-105){\vector(1,0){15}} | |
| \put(93,-105){\line(1,0){25}} | | \put(93,-105){\line(1,0){25}} | |
|
| \put(73,-90){$P^{\scriptstyle{\rm W}}_{1,2}$} | | \put(73,-90){$P_{1,2}$} | |
| \put(93,-87){\vector(1,0){15}} | | \put(93,-87){\vector(1,0){15}} | |
| \put(93,-87){\line(1,0){25}} | | \put(93,-87){\line(1,0){25}} | |
| \end{picture} | | \end{picture} | |
| \end{center} | | \end{center} | |
| \caption{\label{stochastic:f:CrossCorrFlowchart} Relationship among | | \caption{\label{stochastic:f:CrossCorrFlowchart} Relationship among | |
| the modules dependent on \texttt{StochasticCrossCorrelation.h}, | | the modules dependent on \texttt{StochasticCrossCorrelation.h}, | |
| which are used to calculate the cross-correlation statistic $Y$ | | which are used to calculate the cross-correlation statistic $Y$ | |
| and its theoretical variance per unit time $\sigma^2/T$ from | | and its theoretical variance per unit time $\sigma^2/T$ from | |
|
| (whitened) stretches of data $h^{\scriptstyle{\rm W}}_1(t)$, | | (uncalibrated) stretches of data $h_1(t)$, | |
| $h^{\scriptstyle{\rm W}}_2(t)$, from two detectors, using metadata | | $h_2(t)$, from two detectors, using metadata | |
| on the power spectral densities $P^{\scriptstyle{\rm W}}_1(f)$, | | on the power spectral densities $P_1(f)$, | |
| $P^{\scriptstyle{\rm W}}_2(f)$ and transfer functions (whitening | | $P_2(f)$ and transfer functions $\tilde{R}_1(f)$, | |
| filters) $\tilde{R}_1(f)$, $\tilde{R}_2(f)$ for each detector. | | $\tilde{R}_2(f)$ for each detector. | |
| \texttt{CrossCorr} represents the module | | \texttt{CrossCorr} represents the module | |
| \texttt{StochasticCrossCorrelation.c} | | \texttt{StochasticCrossCorrelation.c} | |
| (Sec.~\ref{stochastic:ss:StochasticCrossCorrelation.c}) | | (Sec.~\ref{stochastic:ss:StochasticCrossCorrelation.c}) | |
| containing the functions | | containing the functions | |
| \texttt{LALStochasticCrossCorrelationStatistic()}, | | \texttt{LALStochasticCrossCorrelationStatistic()}, | |
| \texttt{LALStochasticHeterodynedCrossCorrelationStatistic()}, | | \texttt{LALStochasticHeterodynedCrossCorrelationStatistic()}, | |
| and \texttt{LALStochasticCrossCorrelationSpectrum()}, | | and \texttt{LALStochasticCrossCorrelationSpectrum()}, | |
| \texttt{ZeroPadAndFFT} represents the module | | \texttt{ZeroPadAndFFT} represents the module | |
| \texttt{ZeroPadAndFFT.c} (Sec.~\ref{stochastic:ss:ZeroPadAndFFT.c}) | | \texttt{ZeroPadAndFFT.c} (Sec.~\ref{stochastic:ss:ZeroPadAndFFT.c}) | |
| containing the functions | | containing the functions | |
| | | | |
| skipping to change at line 195 | | skipping to change at line 195 | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| #include <lal/DetectorSite.h> | | #include <lal/DetectorSite.h> | |
| #include <lal/Units.h> | | #include <lal/Units.h> | |
| #include <lal/TimeFreqFFT.h> | | #include <lal/TimeFreqFFT.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| NRCSID( STOCHASTICCROSSCORRELATIONH, | | NRCSID( STOCHASTICCROSSCORRELATIONH, | |
|
| "$Id: StochasticCrossCorrelation.h,v 1.22 2002/02/26 20:32:27 whela
n Exp $" ); | | "$Id: StochasticCrossCorrelation.h,v 1.25 2002/06/10 05:46:24 whela
n Exp $" ); | |
| | | | |
| /****************** <lalErrTable file="StochasticCrossCorrelationHE"> */ | | /****************** <lalErrTable file="StochasticCrossCorrelationHE"> */ | |
| | | | |
| #define STOCHASTICCROSSCORRELATIONH_ENULLPTR 1 | | #define STOCHASTICCROSSCORRELATIONH_ENULLPTR 1 | |
| #define STOCHASTICCROSSCORRELATIONH_ESAMEPTR 2 | | #define STOCHASTICCROSSCORRELATIONH_ESAMEPTR 2 | |
| #define STOCHASTICCROSSCORRELATIONH_EZEROLEN 3 | | #define STOCHASTICCROSSCORRELATIONH_EZEROLEN 3 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAF 4 | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAF 4 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAT 5 | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSDELTAT 5 | |
| #define STOCHASTICCROSSCORRELATIONH_ENEGFMIN 6 | | #define STOCHASTICCROSSCORRELATIONH_ENEGFMIN 6 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMTIME 7 | | #define STOCHASTICCROSSCORRELATIONH_EMMTIME 7 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMHETERO 8 | | #define STOCHASTICCROSSCORRELATIONH_EMMHETERO 8 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMFMIN 9 | | #define STOCHASTICCROSSCORRELATIONH_EMMFMIN 9 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMDELTAF 10 | | #define STOCHASTICCROSSCORRELATIONH_EMMDELTAF 10 | |
| #define STOCHASTICCROSSCORRELATIONH_EMMLEN 11 | | #define STOCHASTICCROSSCORRELATIONH_EMMLEN 11 | |
| #define STOCHASTICCROSSCORRELATIONH_EOORFREF 12 | | #define STOCHASTICCROSSCORRELATIONH_EOORFREF 12 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONPOSOMEGA 13 | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSOMEGA 13 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONSYMDIJ 14 | | #define STOCHASTICCROSSCORRELATIONH_ENONSYMDIJ 14 | |
| #define STOCHASTICCROSSCORRELATIONH_ENONZEROHETERO 15 | | #define STOCHASTICCROSSCORRELATIONH_ENONZEROHETERO 15 | |
| #define STOCHASTICCROSSCORRELATIONH_EWRONGUNITS 16 | | #define STOCHASTICCROSSCORRELATIONH_EWRONGUNITS 16 | |
|
| | | #define STOCHASTICCROSSCORRELATIONH_ENONPOSWIN 17 | |
| | | #define STOCHASTICCROSSCORRELATIONH_EMEMORY 18 | |
| #define STOCHASTICCROSSCORRELATIONH_ENOTYETHETERO 255 | | #define STOCHASTICCROSSCORRELATIONH_ENOTYETHETERO 255 | |
| | | | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENULLPTR "Null pointer" | | #define STOCHASTICCROSSCORRELATIONH_MSGENULLPTR "Null pointer" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGESAMEPTR "Input and Output pointe
rs the same" | | #define STOCHASTICCROSSCORRELATIONH_MSGESAMEPTR "Input and Output pointe
rs the same" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEZEROLEN "Zero length for data me
mber of series" | | #define STOCHASTICCROSSCORRELATIONH_MSGEZEROLEN "Zero length for data me
mber of series" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSDELTAF "Negative or zero freq
uency spacing" | | #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSDELTAF "Negative or zero freq
uency spacing" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSDELTAT "Negative or zero time
spacing" | | #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSDELTAT "Negative or zero time
spacing" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENEGFMIN "Negative start frequency" | | #define STOCHASTICCROSSCORRELATIONH_MSGENEGFMIN "Negative start frequency" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEMMTIME "Mismatch in epochs" | | #define STOCHASTICCROSSCORRELATIONH_MSGEMMTIME "Mismatch in epochs" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEMMHETERO "Mismatch in heterodynin
g frequencies" | | #define STOCHASTICCROSSCORRELATIONH_MSGEMMHETERO "Mismatch in heterodynin
g frequencies" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEMMFMIN "Mismatch in start frequ
encies" | | #define STOCHASTICCROSSCORRELATIONH_MSGEMMFMIN "Mismatch in start frequ
encies" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEMMDELTAF "Mismatch in frequency s
pacings" | | #define STOCHASTICCROSSCORRELATIONH_MSGEMMDELTAF "Mismatch in frequency s
pacings" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEMMLEN "Mismatch in sequence le
ngths" | | #define STOCHASTICCROSSCORRELATIONH_MSGEMMLEN "Mismatch in sequence le
ngths" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEOORFREF "Out of range reference
frequency" | | #define STOCHASTICCROSSCORRELATIONH_MSGEOORFREF "Out of range reference
frequency" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSOMEGA "Negative stochastic ba
ckground strength" | | #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSOMEGA "Negative stochastic ba
ckground strength" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENONSYMDIJ "Non-symmetric response
tensor" | | #define STOCHASTICCROSSCORRELATIONH_MSGENONSYMDIJ "Non-symmetric response
tensor" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENONZEROHETERO "Non-zero heterodynin
g frequency specified for real time series" | | #define STOCHASTICCROSSCORRELATIONH_MSGENONZEROHETERO "Non-zero heterodynin
g frequency specified for real time series" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGEWRONGUNITS "Inconsistent input unit
s" | | #define STOCHASTICCROSSCORRELATIONH_MSGEWRONGUNITS "Inconsistent input unit
s" | |
|
| | | #define STOCHASTICCROSSCORRELATIONH_MSGENONPOSWIN "Zero or negative total | |
| | | for window functions" | |
| | | #define STOCHASTICCROSSCORRELATIONH_MSGEMEMORY "Memory error" | |
| #define STOCHASTICCROSSCORRELATIONH_MSGENOTYETHETERO "Non-zero heterodyni
ng frequency not yet implemented" | | #define STOCHASTICCROSSCORRELATIONH_MSGENOTYETHETERO "Non-zero heterodyni
ng frequency not yet implemented" | |
| | | | |
| /************************************ </lalErrTable> */ | | /************************************ </lalErrTable> */ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with * | | * Structures and prototypes associated with * | |
| * StochasticCrossCorrelation.c * | | * StochasticCrossCorrelation.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| skipping to change at line 368 | | skipping to change at line 372 | |
| /********** </lalVerbatim> *********/ | | /********** </lalVerbatim> *********/ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with ZeroPadAndFFT.c * | | * Structures and prototypes associated with ZeroPadAndFFT.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
|
| | | \subsubsection*{\texttt{struct SZeroPadAndFFTParameters}} | |
| | | \idx[Type]{SZeroPadAndFFTParameters} | |
| | | | |
| | | \noindent | |
| | | Contains the parameters of \texttt{LALSZeroPadAndFFT()}. | |
| | | The fields are: | |
| | | | |
| | | \begin{description} | |
| | | \item[\texttt{RealFFTPlan *fftPlan}] | |
| | | The FFT plan to be used by FFTW | |
| | | \item[\texttt{REAL4Vector *window}] | |
| | | The window which is to be applied to the data | |
| | | \item[\texttt{UINT4 length}] | |
| | | The length of the data after zero-padding | |
| | | \end{description} | |
| | | | |
| | | \subsubsection*{\texttt{struct CZeroPadAndFFTParameters}} | |
| | | \idx[Type]{CZeroPadAndFFTParameters} | |
| | | | |
| | | \noindent | |
| | | Contains the parameters of \texttt{LALCZeroPadAndFFT()}. | |
| | | The fields are: | |
| | | | |
| | | \begin{description} | |
| | | \item[\texttt{ComplexFFTPlan *fftPlan}] | |
| | | The FFT plan to be used by FFTW | |
| | | \item[\texttt{REAL4Vector *window}] | |
| | | The window which is to be applied to the data | |
| | | \item[\texttt{UINT4 length}] | |
| | | The length of the data after zero-padding | |
| | | \end{description} | |
| | | | |
| | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| | | typedef struct tagSZeroPadAndFFTParameters { | |
| | | RealFFTPlan *fftPlan; | |
| | | REAL4Vector *window; | |
| | | UINT4 length; | |
| | | } SZeroPadAndFFTParameters; | |
| | | | |
| | | typedef struct tagCZeroPadAndFFTParameters { | |
| | | ComplexFFTPlan *fftPlan; | |
| | | REAL4Vector *window; | |
| | | UINT4 length; | |
| | | } CZeroPadAndFFTParameters; | |
| | | | |
| | | /********************************************************** <lalLaTeX> | |
| | | | |
| \subsubsection*{Prototypes associated with | | \subsubsection*{Prototypes associated with | |
| \texttt{ZeroPadAndFFT.c} | | \texttt{ZeroPadAndFFT.c} | |
| (Sec.~\ref{stochastic:ss:ZeroPadAndFFT.c})} | | (Sec.~\ref{stochastic:ss:ZeroPadAndFFT.c})} | |
| | | | |
| \idx{LALSZeroPadAndFFT()} | | \idx{LALSZeroPadAndFFT()} | |
| \idx{LALCZeroPadAndFFT()} | | \idx{LALCZeroPadAndFFT()} | |
| \input{StochasticCrossCorrelationHPZP} | | \input{StochasticCrossCorrelationHPZP} | |
| | | | |
| ********** </lalLaTeX> *********/ | | ********** </lalLaTeX> *********/ | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPZP"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPZP"> *********/ | |
| | | | |
| void | | void | |
| LALSZeroPadAndFFT(LALStatus *status, | | LALSZeroPadAndFFT(LALStatus *status, | |
| COMPLEX8FrequencySeries *output, | | COMPLEX8FrequencySeries *output, | |
| const REAL4TimeSeries *input, | | const REAL4TimeSeries *input, | |
|
| RealFFTPlan *fftPlan); | | SZeroPadAndFFTParameters *parameters); | |
| | | | |
| void | | void | |
| LALCZeroPadAndFFT(LALStatus *status, | | LALCZeroPadAndFFT(LALStatus *status, | |
| COMPLEX8FrequencySeries *output, | | COMPLEX8FrequencySeries *output, | |
| const COMPLEX8TimeSeries *input, | | const COMPLEX8TimeSeries *input, | |
|
| ComplexFFTPlan *fftPlan); | | CZeroPadAndFFTParameters *parameters); | |
| | | | |
| /********** </lalVerbatim> *********/ | | /********** </lalVerbatim> *********/ | |
| | | | |
| /************************************************************* | | /************************************************************* | |
| * * | | * * | |
| * Structures and prototypes associated with * | | * Structures and prototypes associated with * | |
| * StochasticOptimalFilter.c * | | * StochasticOptimalFilter.c * | |
| * * | | * * | |
| *************************************************************/ | | *************************************************************/ | |
| | | | |
| | | | |
| skipping to change at line 426 | | skipping to change at line 478 | |
| Contains the inputs of \texttt{LALStochasticOptimalFilter()}. | | Contains the inputs of \texttt{LALStochasticOptimalFilter()}. | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL4FrequencySeries *overlapReductionFunction}] | | \item[\texttt{REAL4FrequencySeries *overlapReductionFunction}] | |
| The overlap reduction function $\gamma(f)$ describing the pair of detector | | The overlap reduction function $\gamma(f)$ describing the pair of detector | |
| sites. | | sites. | |
| \item[\texttt{REAL4FrequencySeries *omegaGW}] The spectrum | | \item[\texttt{REAL4FrequencySeries *omegaGW}] The spectrum | |
| $\Omega_{\scriptstyle{\rm GW}}(f)$ of the stochastic gravitational-wave | | $\Omega_{\scriptstyle{\rm GW}}(f)$ of the stochastic gravitational-wave | |
| background. | | background. | |
|
| \item[\texttt{COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD1}] | | \item[\texttt{COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD1}] | |
| The reciprocal | | The reciprocal | |
|
| $1/P_1^{\scriptstyle{\rm HW}}(f) | | $1/P_1^{\scriptstyle{\rm HC}}(f) | |
| =1/(\tilde{R_1}(f)P_1(f)) | | =1/(\tilde{R_1}(f)P_1(f)) | |
|
| =\tilde{R_1}(f)^* / P_1^{\scriptstyle{\rm W}}(f)$ of the | | =\tilde{R_1}(f)^* / P_1(f)$ of the | |
| half-whitened noise power spectral density for the first detector. | | half-calibrated noise power spectral density for the first detector. | |
| \item[\texttt{COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD2}] | | \item[\texttt{COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD2}] | |
| The reciprocal | | The reciprocal | |
|
| $1/P_2^{\scriptstyle{\rm HW}}(f) | | $1/P_2^{\scriptstyle{\rm HC}}(f) | |
| =1/(\tilde{R_2}(f)P_2(f)) | | =1/(\tilde{R_2}(f)P_2(f)) | |
|
| =\tilde{R_2}(f)^* / P_2^{\scriptstyle{\rm W}}(f)$ of the | | =\tilde{R_2}(f)^* / P_2(f)$ of the | |
| half-whitened noise power spectral density for the second detector. | | half-calibrated noise power spectral density for the second detector. | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticOptimalFilterInput { | | typedef struct tagStochasticOptimalFilterInput { | |
| REAL4FrequencySeries *overlapReductionFunction; | | REAL4FrequencySeries *overlapReductionFunction; | |
| REAL4FrequencySeries *omegaGW; | | REAL4FrequencySeries *omegaGW; | |
|
| COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD1; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD1; | |
| COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD2; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD2; | |
| } StochasticOptimalFilterInput; | | } StochasticOptimalFilterInput; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPOF"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPOF"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticOptimalFilter( | | LALStochasticOptimalFilter( | |
| LALStatus *status, | | LALStatus *status, | |
| COMPLEX8FrequencySeries *optimalFilter, | | COMPLEX8FrequencySeries *optimalFilter, | |
| const StochasticOptimalFilterInput *input, | | const StochasticOptimalFilterInput *input, | |
| const REAL4WithUnits *lambda); | | const REAL4WithUnits *lambda); | |
| | | | |
| skipping to change at line 517 | | skipping to change at line 569 | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL4FrequencySeries *overlapReductionFunction}] | | \item[\texttt{REAL4FrequencySeries *overlapReductionFunction}] | |
| The overlap reduction function $\gamma(f)$ describing the pair of detector | | The overlap reduction function $\gamma(f)$ describing the pair of detector | |
| sites. | | sites. | |
| \item[\texttt{REAL4FrequencySeries *omegaGW}] The spectrum | | \item[\texttt{REAL4FrequencySeries *omegaGW}] The spectrum | |
| $\Omega_{\scriptstyle{\rm GW}}(f)$ of the stochastic gravitational-wave | | $\Omega_{\scriptstyle{\rm GW}}(f)$ of the stochastic gravitational-wave | |
| background. | | background. | |
| \item[\texttt{REAL4FrequencySeries *inverseNoisePSD1}] | | \item[\texttt{REAL4FrequencySeries *inverseNoisePSD1}] | |
| The reciprocal | | The reciprocal | |
|
| $1/P_1(f)=|\tilde{R_1}(f)|^2/P_1^{\scriptstyle{\rm W}}(f)$ of the | | $1/P_1(f)=|\tilde{R_1}(f)|^2/P_1(f)$ of the | |
| unwhitened noise power spectral density for the first detector. | | ununcalibrated noise power spectral density for the first detector. | |
| \item[\texttt{REAL4FrequencySeries *inverseNoisePSD2}] | | \item[\texttt{REAL4FrequencySeries *inverseNoisePSD2}] | |
| The reciprocal | | The reciprocal | |
|
| $1/P_2(f)=|\tilde{R_2}(f)|^2/P_2^{\scriptstyle{\rm W}}(f)$ of the | | $1/P_2(f)=|\tilde{R_2}(f)|^2/P_2(f)$ of the | |
| unwhitened noise power spectral density for the second detector. | | ununcalibrated noise power spectral density for the second detector. | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticOptimalFilterNormalizationInput { | | typedef struct tagStochasticOptimalFilterNormalizationInput { | |
| REAL4FrequencySeries *overlapReductionFunction; | | REAL4FrequencySeries *overlapReductionFunction; | |
| REAL4FrequencySeries *omegaGW; | | REAL4FrequencySeries *omegaGW; | |
| REAL4FrequencySeries *inverseNoisePSD1; | | REAL4FrequencySeries *inverseNoisePSD1; | |
| REAL4FrequencySeries *inverseNoisePSD2; | | REAL4FrequencySeries *inverseNoisePSD2; | |
| } StochasticOptimalFilterNormalizationInput; | | } StochasticOptimalFilterNormalizationInput; | |
| | | | |
| skipping to change at line 548 | | skipping to change at line 600 | |
| | | | |
| \noindent | | \noindent | |
| Contains the parameters of \texttt{LALStochasticOptimalFilterNormalization(
)}. | | Contains the parameters of \texttt{LALStochasticOptimalFilterNormalization(
)}. | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
| \item[\texttt{REAL8 fRef}] | | \item[\texttt{REAL8 fRef}] | |
| The reference frequency used in defining the normalization. | | The reference frequency used in defining the normalization. | |
| \item[\texttt{BOOLEAN heterodyned}] | | \item[\texttt{BOOLEAN heterodyned}] | |
| Indicates whether the filter is to be used on heterodyned data or not. | | Indicates whether the filter is to be used on heterodyned data or not. | |
|
| | | \item[\texttt{REAL4Vector window1}] | |
| | | The windowing function with which the first data stream was windowed | |
| | | \item[\texttt{REAL4Vector window2}] | |
| | | The windowing function with which the second data stream was windowed | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticOptimalFilterNormalizationParameters { | | typedef struct tagStochasticOptimalFilterNormalizationParameters { | |
| REAL8 fRef; | | REAL8 fRef; | |
| BOOLEAN heterodyned; | | BOOLEAN heterodyned; | |
|
| | | REAL4Vector *window1; | |
| | | REAL4Vector *window2; | |
| } StochasticOptimalFilterNormalizationParameters; | | } StochasticOptimalFilterNormalizationParameters; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPON"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPON"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticOptimalFilterNormalization( | | LALStochasticOptimalFilterNormalization( | |
| LALStatus *status, | | LALStatus *status, | |
| StochasticOptimalFilterNormalizationOutput *output, | | StochasticOptimalFilterNormalizationOutput *output, | |
| const StochasticOptimalFilterNormalizationInput *input, | | const StochasticOptimalFilterNormalizationInput *input, | |
| const StochasticOptimalFilterNormalizationParameters *parameter
s); | | const StochasticOptimalFilterNormalizationParameters *parameter
s); | |
| | | | |
| skipping to change at line 593 | | skipping to change at line 651 | |
| \input{StochasticCrossCorrelationHPIN} | | \input{StochasticCrossCorrelationHPIN} | |
| | | | |
| \subsubsection*{\texttt{struct StochasticInverseNoiseOutput}} | | \subsubsection*{\texttt{struct StochasticInverseNoiseOutput}} | |
| \idx[Type]{StochasticInverseNoiseOutput} | | \idx[Type]{StochasticInverseNoiseOutput} | |
| | | | |
| \noindent | | \noindent | |
| Contains the outputs of \texttt{LALStochasticInverseNoise()}. | | Contains the outputs of \texttt{LALStochasticInverseNoise()}. | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{REAL4FrequencySeries *unWhitenedInverseNoisePSD}] | | \item[\texttt{REAL4FrequencySeries *calibratedInverseNoisePSD}] | |
| The reciprocal | | The reciprocal | |
|
| $1/P(f)=|\tilde{R}(f)|^2/P^{\scriptstyle{\rm W}}(f)$ of the | | $1/P^{\scriptstyle{\rm C}}(f)=|\tilde{R}(f)|^2/P(f)$ of the | |
| unwhitened noise power spectral density. | | ununcalibrated noise power spectral density. | |
| | | | |
|
| \item[\texttt{COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD}] | | \item[\texttt{COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD}] | |
| The reciprocal \\ | | The reciprocal \\ | |
|
| $1/P^{\scriptstyle{\rm HW}}(f)=\tilde{R}(f)^* / P^{\scriptstyle{\rm W}}(f)$ | | $1/P^{\scriptstyle{\rm HC}}(f)=\tilde{R}(f)^* / P(f)$ | |
| of the half-whitened noise power spectral density. | | of the half-calibrated noise power spectral density. | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticInverseNoiseOutput { | | typedef struct tagStochasticInverseNoiseOutput { | |
|
| REAL4FrequencySeries *unWhitenedInverseNoisePSD; | | REAL4FrequencySeries *calibratedInverseNoisePSD; | |
| COMPLEX8FrequencySeries *halfWhitenedInverseNoisePSD; | | COMPLEX8FrequencySeries *halfCalibratedInverseNoisePSD; | |
| } StochasticInverseNoiseOutput; | | } StochasticInverseNoiseOutput; | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsubsection*{\texttt{struct StochasticInverseNoiseInput}} | | \subsubsection*{\texttt{struct StochasticInverseNoiseInput}} | |
| \idx[Type]{StochasticInverseNoiseInput} | | \idx[Type]{StochasticInverseNoiseInput} | |
| | | | |
| \noindent | | \noindent | |
| Contains the inputs to \texttt{LALStochasticInverseNoise()}. | | Contains the inputs to \texttt{LALStochasticInverseNoise()}. | |
| The fields are: | | The fields are: | |
| | | | |
| \begin{description} | | \begin{description} | |
|
| \item[\texttt{REAL4FrequencySeries *whitenedNoisePSD}] | | \item[\texttt{REAL4FrequencySeries *unCalibratedNoisePSD}] | |
| The power spectral density $P^{\scriptstyle{\rm W}}(f)$ of the noise | | The power spectral density $P(f)$ of the noise | |
| contribution to the detector output. | | contribution to the detector output. | |
| | | | |
|
| \item[\texttt{COMPLEX8FrequencySeries *whiteningFilter}] | | \item[\texttt{COMPLEX8FrequencySeries *responseFunction}] | |
| The frequency-domain reponse function $\tilde{R}(f)$. | | The frequency-domain reponse function $\tilde{R}(f)$. | |
| \end{description} | | \end{description} | |
| | | | |
| *********************************************************** </lalLaTeX> */ | | *********************************************************** </lalLaTeX> */ | |
| | | | |
| typedef struct tagStochasticInverseNoiseInput { | | typedef struct tagStochasticInverseNoiseInput { | |
|
| REAL4FrequencySeries *whitenedNoisePSD ; | | REAL4FrequencySeries *unCalibratedNoisePSD ; | |
| COMPLEX8FrequencySeries *whiteningFilter; | | COMPLEX8FrequencySeries *responseFunction; | |
| } StochasticInverseNoiseInput; | | } StochasticInverseNoiseInput; | |
| | | | |
| /********** <lalVerbatim file="StochasticCrossCorrelationHPIN"> *********/ | | /********** <lalVerbatim file="StochasticCrossCorrelationHPIN"> *********/ | |
| | | | |
| void | | void | |
| LALStochasticInverseNoise( | | LALStochasticInverseNoise( | |
| LALStatus *status, | | LALStatus *status, | |
| StochasticInverseNoiseOutput *output, | | StochasticInverseNoiseOutput *output, | |
| const StochasticInverseNoiseInput *input); | | const StochasticInverseNoiseInput *input); | |
| | | | |
| | | | |
End of changes. 32 change blocks. |
| 47 lines changed or deleted | | 106 lines changed or added | |
|
| StreamInput.h | | StreamInput.h | |
| /********************************** <lalVerbatim file="StreamInputHV"> | | /********************************** <lalVerbatim file="StreamInputHV"> | |
| Author: Creighton, T. D. | | Author: Creighton, T. D. | |
|
| $Id: StreamInput.h,v 1.1 2001/08/24 22:47:59 teviet Exp $ | | $Id: StreamInput.h,v 1.4 2002/06/05 00:20:31 teviet Exp $ | |
| **************************************************** </lalVerbatim> */ | | **************************************************** </lalVerbatim> */ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| \section{Header \texttt{StreamInput.h}} | | \section{Header \texttt{StreamInput.h}} | |
| \label{s:StreamInput.h} | | \label{s:StreamInput.h} | |
| | | | |
| Provides routines to read data from an open stream and store it in LAL | | Provides routines to read data from an open stream and store it in LAL | |
| data structures. | | data structures. | |
| | | | |
| | | | |
| skipping to change at line 27 | | skipping to change at line 27 | |
| \end{verbatim} | | \end{verbatim} | |
| | | | |
| \noindent This header provides prototypes for routines that construct | | \noindent This header provides prototypes for routines that construct | |
| LAL data structures using the data from a file (or other I/O) stream. | | LAL data structures using the data from a file (or other I/O) stream. | |
| The routines do not provide a system-level interface to create files | | The routines do not provide a system-level interface to create files | |
| and open or close file streams; they simply assume that they have been | | and open or close file streams; they simply assume that they have been | |
| passed an open, readable stream. Nonetheless, because they involve | | passed an open, readable stream. Nonetheless, because they involve | |
| I/O stream manipulation, these routines are placed in the | | I/O stream manipulation, these routines are placed in the | |
| \verb@lalsupport@ library rather than in \verb@lal@ proper. | | \verb@lalsupport@ library rather than in \verb@lal@ proper. | |
| | | | |
|
| These routines are compartmentalized in such a way that they can | | The routines in \verb@StreamVectorInput.c@ and | |
| easily be converted if the LAL specification later changes the way in | | \verb@StreamVectorSequenceInput.c@ are compartmentalized in such a way | |
| which I/O streams are handled. In partucular, the only file I/O | | that they can easily be converted if the LAL specification later | |
| commands used are \verb@fgets()@ and \verb@feof()@. Thus the upgrade | | changes the way in which I/O streams are handled. In partucular, the | |
| would involve only the following global changes: | | only file I/O commands used are \verb@fgets()@ and \verb@feof()@. | |
| | | Thus the upgrade would involve only the following global changes: | |
| \begin{enumerate} | | \begin{enumerate} | |
| \item Replace all occurrences of \verb@FILE *@ with the name of the | | \item Replace all occurrences of \verb@FILE *@ with the name of the | |
| LAL I/O stream pointer type. | | LAL I/O stream pointer type. | |
| \item Replace all occurrences of \verb@fgets()@ and \verb@feof()@ with | | \item Replace all occurrences of \verb@fgets()@ and \verb@feof()@ with | |
| equivalent LAL functions. | | equivalent LAL functions. | |
| \end{enumerate} | | \end{enumerate} | |
| In particular, there is no need to translate routines such as | | In particular, there is no need to translate routines such as | |
| \verb@fscanf()@; one should simply read data into a LAL | | \verb@fscanf()@; one should simply read data into a LAL | |
| \verb@CHARVector@ and then use \verb@sscanf()@ to format the input. | | \verb@CHARVector@ and then use \verb@sscanf()@ to format the input. | |
|
| This is the philosophy adopted in the following modules. | | This is the approach used in the numerical input routines in | |
| | | \verb@StreamVectorInput.c@ and \verb@StreamVectorSequenceInput.c@. | |
| | | | |
| | | The routines in \verb@StreamSequenceInput.c@ are less robust but much | |
| | | more efficient: they use \verb@fscanf()@ to parse the input stream | |
| | | directly. They are intended primarily for test programs that may need | |
| | | to read large datafiles of undetermined length. | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| #ifndef _STREAMINPUT_H | | #ifndef _STREAMINPUT_H | |
| #define _STREAMINPUT_H | | #define _STREAMINPUT_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| NRCSID(STREAMINPUTH,"$Id: StreamInput.h,v 1.1 2001/08/24 22:47:59 teviet Ex
p $"); | | NRCSID(STREAMINPUTH,"$Id: StreamInput.h,v 1.4 2002/06/05 00:20:31 teviet Ex
p $"); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| ****************************************** </lalLaTeX><lalErrTable> */ | | ****************************************** </lalLaTeX><lalErrTable> */ | |
|
| #define STREAMINPUTH_ENUL 1 | | #define STREAMINPUTH_ENUL 1 | |
| #define STREAMINPUTH_EOUT 2 | | #define STREAMINPUTH_EOUT 2 | |
| #define STREAMINPUTH_EMEM 3 | | #define STREAMINPUTH_EMEM 3 | |
| #define STREAMINPUTH_ELEN 4 | | #define STREAMINPUTH_ELEN 4 | |
| | | #define STREAMINPUTH_ESLEN 5 | |
| #define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments" | | #define STREAMINPUTH_EVLEN 6 | |
| #define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer" | | #define STREAMINPUTH_EDLEN 7 | |
| #define STREAMINPUTH_MSGEMEM "Memory allocation error" | | #define STREAMINPUTH_EDIM 8 | |
| #define STREAMINPUTH_MSGELEN "No numbers were read" | | #define STREAMINPUTH_EFMT 9 | |
| | | #define STREAMINPUTH_EBUF 10 | |
| | | | |
| | | #define STREAMINPUTH_MSGENUL "Unexpected null pointer in arguments" | |
| | | #define STREAMINPUTH_MSGEOUT "Output handle points to a non-null pointer" | |
| | | #define STREAMINPUTH_MSGEMEM "Memory allocation error" | |
| | | #define STREAMINPUTH_MSGELEN "No numbers were read" | |
| | | #define STREAMINPUTH_MSGESLEN "Not enough numbers read to fill sequence" | |
| | | #define STREAMINPUTH_MSGEVLEN "Could not determine complex vectorLength" | |
| | | #define STREAMINPUTH_MSGEDLEN "No dimLength given" | |
| | | #define STREAMINPUTH_MSGEDIM "Inconsistent or non-positive arrayDim value" | |
| | | #define STREAMINPUTH_MSGEFMT "Badly formatted number" | |
| | | #define STREAMINPUTH_MSGEBUF "BUFFSIZE not a multiple of largest complex t | |
| | | ype size" | |
| /******************************************** </lalErrTable><lalLaTeX> | | /******************************************** </lalErrTable><lalLaTeX> | |
| | | | |
| \subsection*{Types} | | \subsection*{Types} | |
| | | | |
| ******************************************************* </lalLaTeX> */ | | ******************************************************* </lalLaTeX> */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \vfill{\footnotesize\input{StreamInputHV}} | | \vfill{\footnotesize\input{StreamInputHV}} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| /* Function prototypes. */ | | /* Function prototypes. */ | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamVectorInputC} | | \newpage\input{StreamVectorInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
| LALCHARReadVector( LALStatus *stat, CHARVector **vector, FILE *stream ); | | LALCHARReadVector( LALStatus *stat, CHARVector **vector, FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadVector( LALStatus *stat, INT2Vector **vector, FILE *stream ); | | LALI2ReadVector( LALStatus *stat, INT2Vector **vector, FILE *stream, BOOLE | |
| | | AN strict ); | |
| | | | |
| | | void | |
| | | LALI4ReadVector( LALStatus *stat, INT4Vector **vector, FILE *stream, BOOLE | |
| | | AN strict ); | |
| | | | |
| | | void | |
| | | LALI8ReadVector( LALStatus *stat, INT8Vector **vector, FILE *stream, BOOLE | |
| | | AN strict ); | |
| | | | |
| | | void | |
| | | LALU2ReadVector( LALStatus *stat, UINT2Vector **vector, FILE *stream, BOOL | |
| | | EAN strict ); | |
| | | | |
| | | void | |
| | | LALU4ReadVector( LALStatus *stat, UINT4Vector **vector, FILE *stream, BOOL | |
| | | EAN strict ); | |
| | | | |
| void | | void | |
|
| LALI4ReadVector( LALStatus *stat, INT4Vector **vector, FILE *stream ); | | LALU8ReadVector( LALStatus *stat, UINT8Vector **vector, FILE *stream, BOOL | |
| | | EAN strict ); | |
| | | | |
| | | void | |
| | | LALSReadVector( LALStatus *stat, REAL4Vector **vector, FILE *stream, BOOLE | |
| | | AN strict ); | |
| | | | |
| | | void | |
| | | LALDReadVector( LALStatus *stat, REAL8Vector **vector, FILE *stream, BOOLE | |
| | | AN strict ); | |
| | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{StreamVectorSequenceInputC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALCHARReadVectorSequence( LALStatus *stat, CHARVectorSequence **sequence, | |
| | | FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI8ReadVector( LALStatus *stat, INT8Vector **vector, FILE *stream ); | | LALI2ReadVectorSequence( LALStatus *stat, INT2VectorSequence **sequence, F
ILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU2ReadVector( LALStatus *stat, UINT2Vector **vector, FILE *stream ); | | LALI4ReadVectorSequence( LALStatus *stat, INT4VectorSequence **sequence, F
ILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU4ReadVector( LALStatus *stat, UINT4Vector **vector, FILE *stream ); | | LALI8ReadVectorSequence( LALStatus *stat, INT8VectorSequence **sequence, F
ILE *stream ); | |
| | | | |
| void | | void | |
|
| LALU8ReadVector( LALStatus *stat, UINT8Vector **vector, FILE *stream ); | | LALU2ReadVectorSequence( LALStatus *stat, UINT2VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI2ReadVector( LALStatus *stat, INT2Vector **vector, FILE *stream ); | | LALU4ReadVectorSequence( LALStatus *stat, UINT4VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALI4ReadVector( LALStatus *stat, INT4Vector **vector, FILE *stream ); | | LALU8ReadVectorSequence( LALStatus *stat, UINT8VectorSequence **sequence,
FILE *stream ); | |
| | | | |
| void | | void | |
|
| LALSReadVector( LALStatus *stat, REAL4Vector **vector, FILE *stream ); | | LALSReadVectorSequence( LALStatus *stat, REAL4VectorSequence **sequence, F
ILE *stream ); | |
| | | | |
| void | | void | |
|
| LALDReadVector( LALStatus *stat, REAL8Vector **vector, FILE *stream ); | | LALDReadVectorSequence( LALStatus *stat, REAL8VectorSequence **sequence, F
ILE *stream ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
|
| \newpage\input{StreamVectorSequenceInputC} | | \newpage\input{StreamSequenceInputC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| void | | void | |
|
| LALCHARReadVectorSequence( LALStatus *stat, | | LALCHARReadSequence( LALStatus *stat, CHARSequence **sequence, FILE *stream | |
| CHARVectorSequence **sequence, | | ); | |
| FILE *stream ); | | | |
| | | void | |
| | | LALI2ReadSequence( LALStatus *stat, INT2Sequence **sequence, FILE *stream ) | |
| | | ; | |
| | | | |
| | | void | |
| | | LALI4ReadSequence( LALStatus *stat, INT4Sequence **sequence, FILE *stream ) | |
| | | ; | |
| | | | |
| void | | void | |
|
| LALI2ReadVectorSequence( LALStatus *stat, | | LALI8ReadSequence( LALStatus *stat, INT8Sequence **sequence, FILE *stream ) | |
| INT2VectorSequence **sequence, | | ; | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALI4ReadVectorSequence( LALStatus *stat, | | LALU2ReadSequence( LALStatus *stat, UINT2Sequence **sequence, FILE *stream | |
| INT4VectorSequence **sequence, | | ); | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALI8ReadVectorSequence( LALStatus *stat, | | LALU4ReadSequence( LALStatus *stat, UINT4Sequence **sequence, FILE *stream | |
| INT8VectorSequence **sequence, | | ); | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALU2ReadVectorSequence( LALStatus *stat, | | LALU8ReadSequence( LALStatus *stat, UINT8Sequence **sequence, FILE *stream | |
| UINT2VectorSequence **sequence, | | ); | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALU4ReadVectorSequence( LALStatus *stat, | | LALSReadSequence( LALStatus *stat, REAL4Sequence **sequence, FILE *stream ) | |
| UINT4VectorSequence **sequence, | | ; | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALU8ReadVectorSequence( LALStatus *stat, | | LALDReadSequence( LALStatus *stat, REAL8Sequence **sequence, FILE *stream ) | |
| UINT8VectorSequence **sequence, | | ; | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALSReadVectorSequence( LALStatus *stat, | | LALCReadSequence( LALStatus *stat, COMPLEX8Sequence **sequence, FILE *strea | |
| REAL4VectorSequence **sequence, | | m ); | |
| FILE *stream ); | | | |
| | | | |
| void | | void | |
|
| LALDReadVectorSequence( LALStatus *stat, | | LALZReadSequence( LALStatus *stat, COMPLEX16Sequence **sequence, FILE *stre | |
| REAL8VectorSequence **sequence, | | am ); | |
| FILE *stream ); | | | |
| | | /* <lalLaTeX> | |
| | | \newpage\input{StreamSeriesInputC} | |
| | | </lalLaTeX> */ | |
| | | void | |
| | | LALI2ReadTSeries( LALStatus *stat, INT2TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALI4ReadTSeries( LALStatus *stat, INT4TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALI8ReadTSeries( LALStatus *stat, INT8TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALU2ReadTSeries( LALStatus *stat, UINT2TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALU4ReadTSeries( LALStatus *stat, UINT4TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALU8ReadTSeries( LALStatus *stat, UINT8TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALSReadTSeries( LALStatus *stat, REAL4TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALDReadTSeries( LALStatus *stat, REAL8TimeSeries *series, FILE *stream ); | |
| | | void | |
| | | LALCReadTSeries( LALStatus *stat, COMPLEX8TimeSeries *series, FILE *stream | |
| | | ); | |
| | | void | |
| | | LALZReadTSeries( LALStatus *stat, COMPLEX16TimeSeries *series, FILE *stream | |
| | | ); | |
| | | | |
| | | void | |
| | | LALI2ReadTVectorSeries( LALStatus *stat, INT2TimeVectorSeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALI4ReadTVectorSeries( LALStatus *stat, INT4TimeVectorSeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALI8ReadTVectorSeries( LALStatus *stat, INT8TimeVectorSeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALU2ReadTVectorSeries( LALStatus *stat, UINT2TimeVectorSeries *series, FIL | |
| | | E *stream ); | |
| | | void | |
| | | LALU4ReadTVectorSeries( LALStatus *stat, UINT4TimeVectorSeries *series, FIL | |
| | | E *stream ); | |
| | | void | |
| | | LALU8ReadTVectorSeries( LALStatus *stat, UINT8TimeVectorSeries *series, FIL | |
| | | E *stream ); | |
| | | void | |
| | | LALSReadTVectorSeries( LALStatus *stat, REAL4TimeVectorSeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALDReadTVectorSeries( LALStatus *stat, REAL8TimeVectorSeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALCReadTVectorSeries( LALStatus *stat, COMPLEX8TimeVectorSeries *series, F | |
| | | ILE *stream ); | |
| | | void | |
| | | LALZReadTVectorSeries( LALStatus *stat, COMPLEX16TimeVectorSeries *series, | |
| | | FILE *stream ); | |
| | | | |
| | | void | |
| | | LALI2ReadTArraySeries( LALStatus *stat, INT2TimeArraySeries *series, FILE * | |
| | | stream ); | |
| | | void | |
| | | LALI4ReadTArraySeries( LALStatus *stat, INT4TimeArraySeries *series, FILE * | |
| | | stream ); | |
| | | void | |
| | | LALI8ReadTArraySeries( LALStatus *stat, INT8TimeArraySeries *series, FILE * | |
| | | stream ); | |
| | | void | |
| | | LALU2ReadTArraySeries( LALStatus *stat, UINT2TimeArraySeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALU4ReadTArraySeries( LALStatus *stat, UINT4TimeArraySeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALU8ReadTArraySeries( LALStatus *stat, UINT8TimeArraySeries *series, FILE | |
| | | *stream ); | |
| | | void | |
| | | LALSReadTArraySeries( LALStatus *stat, REAL4TimeArraySeries *series, FILE * | |
| | | stream ); | |
| | | void | |
| | | LALDReadTArraySeries( LALStatus *stat, REAL8TimeArraySeries *series, FILE * | |
| | | stream ); | |
| | | void | |
| | | LALCReadTArraySeries( LALStatus *stat, COMPLEX8TimeArraySeries *series, FIL | |
| | | E *stream ); | |
| | | void | |
| | | LALZReadTArraySeries( LALStatus *stat, COMPLEX16TimeArraySeries *series, FI | |
| | | LE *stream ); | |
| | | | |
| | | void | |
| | | LALI2ReadFSeries( LALStatus *stat, INT2FrequencySeries *series, FILE *strea | |
| | | m ); | |
| | | void | |
| | | LALI4ReadFSeries( LALStatus *stat, INT4FrequencySeries *series, FILE *strea | |
| | | m ); | |
| | | void | |
| | | LALI8ReadFSeries( LALStatus *stat, INT8FrequencySeries *series, FILE *strea | |
| | | m ); | |
| | | void | |
| | | LALU2ReadFSeries( LALStatus *stat, UINT2FrequencySeries *series, FILE *stre | |
| | | am ); | |
| | | void | |
| | | LALU4ReadFSeries( LALStatus *stat, UINT4FrequencySeries *series, FILE *stre | |
| | | am ); | |
| | | void | |
| | | LALU8ReadFSeries( LALStatus *stat, UINT8FrequencySeries *series, FILE *stre | |
| | | am ); | |
| | | void | |
| | | LALSReadFSeries( LALStatus *stat, REAL4FrequencySeries *series, FILE *strea | |
| | | m ); | |
| | | void | |
| | | LALDReadFSeries( LALStatus *stat, REAL8FrequencySeries *series, FILE *strea | |
| | | m ); | |
| | | void | |
| | | LALCReadFSeries( LALStatus *stat, COMPLEX8FrequencySeries *series, FILE *st | |
| | | ream ); | |
| | | void | |
| | | LALZReadFSeries( LALStatus *stat, COMPLEX16FrequencySeries *series, FILE *s | |
| | | tream ); | |
| | | | |
| /* <lalLaTeX> | | /* <lalLaTeX> | |
| \newpage\input{StreamInputTestC} | | \newpage\input{StreamInputTestC} | |
|
| | | \newpage\input{StreamSeriesInputTestC} | |
| </lalLaTeX> */ | | </lalLaTeX> */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _STREAMINPUT_H */ | | #endif /* _STREAMINPUT_H */ | |
| | | | |
End of changes. 26 change blocks. |
| 55 lines changed or deleted | | 227 lines changed or added | |
|
| TwoDMesh.h | | TwoDMesh.h | |
| /************************************* <lalVerbatim file="TwoDMeshHV"> | | /************************************* <lalVerbatim file="TwoDMeshHV"> | |
| Author: Creighton, T. D. | | Author: Creighton, T. D. | |
|
| $Id: TwoDMesh.h,v 1.3 2001/08/21 04:19:51 jolien Exp $ | | $Id: TwoDMesh.h,v 1.4 2002/05/06 22:01:10 teviet Exp $ | |
| **************************************************** </lalVerbatim> */ | | **************************************************** </lalVerbatim> */ | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| | | | |
| \providecommand{\lessim}{\stackrel{<}{\scriptstyle\sim}} | | \providecommand{\lessim}{\stackrel{<}{\scriptstyle\sim}} | |
| | | | |
| \section{Header \texttt{TwoDMesh.h}} | | \section{Header \texttt{TwoDMesh.h}} | |
| \label{s:TwoDMesh.h} | | \label{s:TwoDMesh.h} | |
| | | | |
| Provides routines to place search meshes for two-dimensional parameter | | Provides routines to place search meshes for two-dimensional parameter | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| the other, as shown in Fig.~\ref{fig:tiling}(b). As the metric | | the other, as shown in Fig.~\ref{fig:tiling}(b). As the metric | |
| changes over space, the vertical height and tilt of the tiles in a | | changes over space, the vertical height and tilt of the tiles in a | |
| column may change, so long as their width remains fixed; we note that | | column may change, so long as their width remains fixed; we note that | |
| if the tilt changes, the tiles will overlap slightly to ensure | | if the tilt changes, the tiles will overlap slightly to ensure | |
| complete coverage. Finally, the boundary of the parameter space may | | complete coverage. Finally, the boundary of the parameter space may | |
| extend outside the ``corners'' of the column, crossing the end of a | | extend outside the ``corners'' of the column, crossing the end of a | |
| tile between its centre and its edge, as shown in | | tile between its centre and its edge, as shown in | |
| Fig.~\ref{fig:tiling}(c). These triangular corners can be covered | | Fig.~\ref{fig:tiling}(c). These triangular corners can be covered | |
| with one or more extra overlapping tiles of reduced width. | | with one or more extra overlapping tiles of reduced width. | |
| | | | |
|
| | | In a parameter space with constant metric, the tile area is maximized | |
| | | (and the number of covering tiles minimized) when the column width is | |
| | | $\sqrt{2}$ times smaller than the projected horizontal width of the | |
| | | ellipses. When the ellipses vary, it is generally best to determine | |
| | | the column width from the \emph{narrowest} ellipse in a column, to | |
| | | avoid singular effects when tile widths approach the ellipse widths | |
| | | and become infinitesimally high. | |
| | | | |
| For the column-placement algorithm to work effectively, we require | | For the column-placement algorithm to work effectively, we require | |
| that the parameter space be representable as a range | | that the parameter space be representable as a range | |
| $y\in[y_1(x),y_2(x)]$ between two single-valued functions defined on a | | $y\in[y_1(x),y_2(x)]$ between two single-valued functions defined on a | |
| domain $x\in[x_\mathrm{min},x_\mathrm{max}]$. If a desired search | | domain $x\in[x_\mathrm{min},x_\mathrm{max}]$. If a desired search | |
| region is too complicated to express this way (e.g.\ it has | | region is too complicated to express this way (e.g.\ it has | |
| disconnected regions, or ``branches'' where a vertical line intersects | | disconnected regions, or ``branches'' where a vertical line intersects | |
| the boundary more than twice), then one should divide the region up | | the boundary more than twice), then one should divide the region up | |
| into subregions with well-behaved boundary functions and tile these | | into subregions with well-behaved boundary functions and tile these | |
| subregions separately. | | subregions separately. | |
| | | | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 98 | |
| #ifndef _TWODMESH_H | | #ifndef _TWODMESH_H | |
| #define _TWODMESH_H | | #define _TWODMESH_H | |
| | | | |
| #include <lal/LALStdlib.h> | | #include <lal/LALStdlib.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #pragma } | | #pragma } | |
| #endif | | #endif | |
| | | | |
|
| NRCSID(TWODMESHH,"$Id: TwoDMesh.h,v 1.3 2001/08/21 04:19:51 jolien Exp $"); | | NRCSID(TWODMESHH,"$Id: TwoDMesh.h,v 1.4 2002/05/06 22:01:10 teviet Exp $"); | |
| | | | |
| /********************************************************** <lalLaTeX> | | /********************************************************** <lalLaTeX> | |
| \subsection*{Error conditions} | | \subsection*{Error conditions} | |
| ****************************************** </lalLaTeX><lalErrTable> */ | | ****************************************** </lalLaTeX><lalErrTable> */ | |
| #define TWODMESHH_ENUL 1 | | #define TWODMESHH_ENUL 1 | |
| #define TWODMESHH_EOUT 2 | | #define TWODMESHH_EOUT 2 | |
| #define TWODMESHH_EMEM 3 | | #define TWODMESHH_EMEM 3 | |
| #define TWODMESHH_EMETRIC 4 | | #define TWODMESHH_EMETRIC 4 | |
| #define TWODMESHH_EWIDTH 5 | | #define TWODMESHH_EWIDTH 5 | |
| | | | |
| | | | |
| skipping to change at line 186 | | skipping to change at line 194 | |
| argument. The fourth argument can be used to pass function-specific | | argument. The fourth argument can be used to pass function-specific | |
| parameters. | | parameters. | |
| | | | |
| \item[\texttt{void *metricParams}] The parameters to be passed as the | | \item[\texttt{void *metricParams}] The parameters to be passed as the | |
| fourth argument of \verb@*getMetric()@, above. | | fourth argument of \verb@*getMetric()@, above. | |
| | | | |
| \item[\texttt{REAL4 mThresh}] The maximum mismatch $m_\mathrm{thresh}$ | | \item[\texttt{REAL4 mThresh}] The maximum mismatch $m_\mathrm{thresh}$ | |
| desired between any point in the region and the nearest mesh point; | | desired between any point in the region and the nearest mesh point; | |
| note that the maximum mismatch is equal to 1 minus the minimum match. | | note that the maximum mismatch is equal to 1 minus the minimum match. | |
| | | | |
|
| \item[\texttt{REAL4 widthMaxFac}] The minimum factor by which the | | \item[\texttt{REAL4 widthMaxFac}] The minimum ratio of mismatch | |
| projected width of the local mismatch ellipse must exceed the column | | ellipse width (projected onto the horizontal axis) to column width | |
| width, before the mesh placement routine will try a narrower column. | | that must be maintained throughout the column: if an ellipse falls | |
| If set to $\leq1$, the default value | | below this ratio due to shrinkage or rotation, as in Fig 29.1.b, the | |
| \verb@TWODMESHINTERNALC_WMAXFAC@=1.2 will be used. | | code will try a narrower column. If set to $\leq1$, the default value | |
| | | \verb@TWODMESHINTERNALC_WMAXFAC@=$\sqrt[4]{2}$ will be used. | |
| | | | |
| \item[\texttt{REAL4 widthRetryFac}] If the column is determined to be | | \item[\texttt{REAL4 widthRetryFac}] If the column is determined to be | |
| too wide (e.g.\ due to the value of \verb@widthMaxFac@, above), the | | too wide (e.g.\ due to the value of \verb@widthMaxFac@, above), the | |
| column width will be reduced by the factor \verb@widthRetryFac@. If | | column width will be reduced by the factor \verb@widthRetryFac@. If | |
|
| set to $\leq1$, the default value \verb@TWODMESHINTERNALC_WRETRYFAC@=2 | | set to $\leq1$, the default value | |
| will be used. | | \verb@TWODMESHINTERNALC_WRETRYFAC@=$\sqrt{2}$ will be used. | |
| | | | |
| \item[\texttt{UINT4 maxColumns}] The maximum number of columns the | | \item[\texttt{UINT4 maxColumns}] The maximum number of columns the | |
| mesh placement routine will try before giving up. If zero, this | | mesh placement routine will try before giving up. If zero, this | |
| number is ignored. | | number is ignored. | |
| | | | |
| \item[\texttt{UINT4 nIn}] The maximum number of mesh points allowed, | | \item[\texttt{UINT4 nIn}] The maximum number of mesh points allowed, | |
| after which the placement routine will quit. If zero, this number is | | after which the placement routine will quit. If zero, this number is | |
| ignored. | | ignored. | |
| | | | |
| \item[\texttt{UINT4 nOut}] The number of mesh points added by the | | \item[\texttt{UINT4 nOut}] The number of mesh points added by the | |
| | | | |
End of changes. 5 change blocks. |
| 9 lines changed or deleted | | 18 lines changed or added | |
|