next up previous contents index
Next: LALStochasticHeterodynedCrossCorrelationStatistic() Up: Module StochasticCrossCorrelation.c Previous: Description   Contents   Index

LALStochasticCrossCorrelationStatistic()

The default version of the function, for handling non-heterodyned data, calculates the value of the standard optimally-filtered cross-correlation statistic

$\displaystyle Y$ $\textstyle :=$ $\displaystyle \int_{t_0}^{t_0+T} dt_1\int_{t_0}^{t_0+T} dt_2 
w_1(t_1)  h_1(t_1)  Q(t_1-t_2)  w_2(t_2)  h_2(t_2)$  
  $\textstyle \approx$ $\displaystyle \sum_{j=0}^{N-1}\delta t\sum_{k=0}^{N-1}\delta t 
w_1[j]  h_1[j]  Q[j-k]  w_2[j]  h_2[k]$  
  $\textstyle =$ $\displaystyle \sum_{\ell=0}^{M-1} \delta f 
\widetilde{\bar{h}}_{1}[\ell]^*  \widetilde{Q}[\ell] 
\widetilde{\bar{h}}_{2}[\ell],$ (35.1)

where the sampling period is $\delta t=T/N$, the frequency spacing is $\delta f = [M\delta t]^{-1}$, the tilde indicates a discrete Fourier transform normalized to approximate the continuous Fourier transform:
\begin{displaymath}
\widetilde{Q}[\ell] := \sum_{k=0}^{N-1} \delta t 
Q[k]  e^{-i2\pi k\ell/M}
\end{displaymath} (35.2)

the asterisk indicates complex conjugation, and the overbar indicates windowing and zero-padding:
\begin{displaymath}
\bar{h}[k]=\left\{ \begin{array}{cl}
w[k] h[k] & k = 0, \ldots, N-1 \0 & k = N, \ldots, M-1
\end{array}
\right.
\end{displaymath} (35.3)

which is needed because the range of indices for $h[k]$ and $Q[k]$ do not match. $M$ should be at least $2N-1$, but may be chosen to be, e.g., $2M$ for convenience. The inputs to LALStochasticCrossCorrelationStatistic() are the (windowed) zero-padded, FFTed data streams $\widetilde{\bar{h}}_{1}[\ell]$ and $\widetilde{\bar{h}}_{2}[\ell]$, along with the optimal filter $\widetilde{Q}[\ell]$. Since the underlying time series are real, the input series only need to include the values for $\ell=0,\ldots,P-1$ (where $P=\left[\frac{M+1}{2}\right]$ is the number of independent elements in the frequency series) with the elements corresponding to negative frequencies determined by complex conjugation. This allows $Y$ to be computed as
\begin{displaymath}
Y=\delta f\left(
\widetilde{\bar{h}}_{1}[0]\wideti...
...Q}[\ell]\widetilde{\bar{h}}_{2}[\ell]
\right\}
\right) .
\end{displaymath} (35.4)

The routine LALStochasticCrossCorrelationStatistic() is designed for analyzing non-heterodyned data, so if the input FFTed datasets have a positive start frequency, and thus represent a range of frequencies $f_0\le f< f_0 + (P-1)\delta f$, it is assumed that they were produced by discarding frequencies below $f_0$ from a longer frequency series, which was still the Fourier transform of a real time series. In this case the cross-correlation statistic is calculated as35.1

$\displaystyle Y$ $\textstyle =$ $\displaystyle \delta f2\sum_{\ell=0}^{P-1}{\mathrm{Re}} \left\{
\widet...
...h}}_{1}[\ell]^* \widetilde{Q}[\ell]\widetilde{\bar{h}}_{2}[\ell]
\right\}$  
  $\textstyle \approx$ $\displaystyle \int_{-f_0-P\delta f}^{-f_0} df\widetilde{h}_1(f)^* \widetild...
...{f_0+P\delta f} df\widetilde{h}_1(f)^* \widetilde{Q}(f) \widetilde{h}_2(f)$ (35.5)

The frequency sampling parameters (start frequency, frequency spacing, and number of points) must be the same for both data streams, but if the optimal filter is more coarsely sampled (for instance, if it varies in frequency too slowly to warrant the finer resolution), the data streams will be multiplied in the frequency domain and their product coarse-grained (cf. Sec. [*]) to the optimal filter resolution before calculating ([*]).

If the epochsMatch boolean variable is set to a true value, the function will confirm that the start times for both time series agree. It can be set to false to allow for cross-correlation of time-shifted data as a control case.


next up previous contents index
Next: LALStochasticHeterodynedCrossCorrelationStatistic() Up: Module StochasticCrossCorrelation.c Previous: Description   Contents   Index
LAL test account 2003-10-23