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


Function: receiver1()

int receiver1(float *input, float *filter, float *twice_inv_noise, float var,
	      float *output, int n, int presafe, int postsafe, float threshold,
	      float *snr, int *ind)

This function computes the maximum signal-to-noise ratio $\rho$ for a matched filter of known form (including phase), but unknown 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.
signal: Input. The vector signal[0..n-1] containing the expected waveform $\tilde{s}(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,'' $(s,s)$, of the expected waveform.
output: Output. The vector output[0..n-1] corresponding to the result of correlating the input with the expected waveform. This quantity is computed by the call:
correlate(output,input,signal,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$.
snr: Output. The vector snr[0..n-1] corresponding to the signal-to-noise ratios

\begin{displaymath}
\texttt{snr[i]}=\vert\texttt{output[i]}\vert\times\surd(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, snr[ind[0]] is the largest signal-to-noise ratio (between the pre- and post-safety margins), snr[ind[1]] is the second largest, etc.
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 output[0].


next up previous contents
Next: Function: receiver2() Up: Binary Inspiral Search on Previous: Function: corr_coef()   Contents
Bruce Allen 2000-11-19