Function:

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

`input`: Input. The vector`input[0..n-1]`containing the input data , in frequency domain, to be filtered.`signal0`: Input. The vector`signal0[0..n-1]`containing the expected waveform , in frequency domain.`signal1`: Input. The vector`signal1[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.`output0`: Output. The vector`output0[0..n-1]`corresponding to the result of correlating the input with the expected waveform . 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 . 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 in the time domain.`threshold`: Input. The signal-to-noise ratio threshold used in counting the number of times that the filter output exceeded .`snrsq`: Output. The vector`snrsq[0..n-1]`corresponding to the squared 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,`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.

(13.6.313) |

- 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, e.g.,
`output0[0]`.