next up previous contents
Next: Function: receiver1() Up: Binary Inspiral Search on Previous: Function: strain_spec()   Contents


Function: corr_coef()

void corr_coef(float *a0, float *a1, float *r, int n,
	       float *r00, float *r11, float *r01)

This routine computes the correlation coefficients, $r_{00}$, $r_{11}$, and $r_{01}$, of two vectors of data, $a_0$ and $a_1$:

\begin{displaymath}
r_{ij} = \left[
\begin{array}{cc}
(a_0,a_0) & (a_1,a_0) \\ [6pt]
(a_0,a_1) & (a_1,a_1)
\end{array} \right].
\end{displaymath} (13.4.312)

The arguments are:
a0: Input. The vector $\tilde{a}_0(f)$.
a1: Input. The vector $\tilde{a}_1(f)$.
r: Input. Twice the inverse noise $2/(\alpha S_h(f))$, as returned by, e.g., strain_spec().
n: Input. The length of the arrays a0[1..n-1], a1[1..n-1], and r[0..n/2].
r00: Output. The correlation coefficient $r_{00}=(a_0,a_0)$.
r00: Output. The correlation coefficient $r_{11}=(a_1,a_1)$.
r00: Output. The correlation coefficient $r_{01}=(a_0,a_1)$.

Author: Jolien Creighton, jolien@tapir.caltech.edu
Comments: The inner product $(a_0,a_1)$ is equal to the value c[0] of the output of correlate(c,a0,a1,r,n); thus, it differs by a factor of two from the Cutler and Flanagan inner product. The constant $\alpha=\texttt{n}\times\texttt{srate}$ is explained in section [*].



Bruce Allen 2000-11-19