** 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 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 . The arguments are:

`input`: Input. The vector `input[0..n-1]` containing
the input data , in frequency domain, to be filtered.
`signal`: Input. The vector `signal[0..n-1]` containing
the expected waveform , in frequency domain.
`twice_inv_noise`: Input. The vector
`twice_inv_noise[0..n/2]`, containing twice the inverse power
spectrum
of the noise.
`var`: Input. The ``variance,'' , 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 in the time domain.
`threshold`: Input. The signal-to-noise ratio
threshold used in counting the number of times that the filter
output exceeded .
`snr`: Output. The vector `snr[0..n-1]`
corresponding to the signal-to-noise ratios

`ind`: Output. A table of indices
`ind[0..n-presafe-postsafe-1]` giving the offsets between
`presafe` and
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
is
explained in section . The extra factor of
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:** Function: receiver2()
** Up:** Binary Inspiral Search on
** Previous:** Function: corr_coef()
** Contents**
Bruce Allen
2000-11-19