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


Function: receiver2()

int receiver2(float *input, float *filter0, float *filter1,
	      float *twice_inv_noise, float var,
	      float *output0, float *output1, int n, int presafe, int postsafe,
	      float threshold, float *snrsq, int *ind)

This function computes the maximum signal-to-noise ratio $\rho$ for a matched filter of known form but unknown phase and arrival time, and returns the number of times in the data segment that the signal-to-noise ratio exceeded some specified threshold $\rho_\ast$. The arguments are:

input: Input. The vector input[0..n-1] containing the input data $\tilde{h}(f)$, in frequency domain, to be filtered.
signal0: Input. The vector signal0[0..n-1] containing the expected waveform  $\tilde{s}_0(f)$, in frequency domain.
signal1: Input. The vector signal1[0..n-1] containing the expected waveform  $\tilde{s}_1(f)$, in frequency domain.
twice_inv_noise: Input. The vector twice_inv_noise[0..n/2], containing twice the inverse power spectrum  $2/(\alpha S_h(f))$ of the noise.
var: Input. The ``variance,'' $\frac{1}{2}(r_{00}+r_{11})=\frac{1}{2}[(s_0,s_0)+(s_1,s_1)]$, of the expected waveform.
output0: Output. The vector output0[0..n-1] corresponding to the result of correlating the input with the expected waveform $s_0(t)$. This quantity is computed by the call:
correlate(output0,input,signal0,twice_inv_noise,n).
output1: Output. The vector output1[0..n-1] corresponding to the result of correlating the input with the expected waveform $s_1(t)$. This quantity is computed by the call:
correlate(output1,input,signal1,twice_inv_noise,n).
n: Input. The integer that defines the lengths of the previous arrays.
presafe: Input. The number of points to skip at the beginning of the correlation in order to avoid wrap-around errors.
postsafe: Input. The number of points to skip at the end of the correlation in order to avoid wrap-around errors. This should be longer than the length of the signal $s(t)$ in the time domain.
threshold: Input. The signal-to-noise ratio threshold $\rho_\ast$ used in counting the number of times that the filter output exceeded $\rho_\ast$.
snrsq: Output. The vector snrsq[0..n-1] corresponding to the squared signal-to-noise ratios

\begin{displaymath}
\texttt{snrsq[i]} = 2\times
\frac{(\texttt{output0[i]})^2 + (\texttt{output1[i]})^2}{\texttt{var}}.
\end{displaymath}

ind: Output. A table of indices ind[0..n-presafe-postsafe-1] giving the offsets between presafe and $\texttt{n}-\texttt{postsafe}$ of the signal-to-noise ratios sorted into decreasing order. Thus, snrsq[ind[0]] is the largest squared signal-to-noise ratio (between the pre- and post-safety margins), snr[ind[1]] is the second largest, etc.
The peak signal-to-noise ratio, $\surd\texttt{snrsq[ind[0]]}$, is the signal-to-noise ratio of the maximum output of a matched filter corresponing to the measured signal $\hat{s}(t)=c_0 s_0(t)+c_1 s_1(t)$ where
\begin{displaymath}
\begin{array}{l}
c_0 = \displaystyle\frac{r_{11}\times\tex...
...ttt{output0[ind[0]]}}{r_{00}r_{11} - r_{01}r_{01}}
\end{array}\end{displaymath} (13.6.313)

The number of threshold crossings returned is the number of times that the threshold signal-to-noise ratio is exceeded between the pre- and post-safety margins.

Author: Jolien Creighton, jolien@tapir.caltech.edu
Comments: The constant $\alpha=\texttt{n}\times\texttt{srate}$ is explained in section [*]. The extra factor of $\surd 2$ in the signal-to-noise ratio arises from the factor of two difference between the inner product of Cutler and Flanagan and the value of, e.g., output0[0].


next up previous contents
Next: Example: binary_search program Up: Binary Inspiral Search on Previous: Function: receiver1()   Contents
Bruce Allen 2000-11-19