next up previous contents
Next: Function: orthonormalize() Up: GRASP Routines: Gravitational Radiation Previous: Function: correlate()   Contents


Function: avg_inv_spec()

0 void avg_inv_spec(float flo,float srate,int n,double decay,double *norm, float *htilde, float* mean_pow_spec,float* twice_inv_noise)
This function maintains an auto-regressive moving average (see avg_spec()) of the power spectrum $S_h(f)$, and an array containing $2/S_h(f)$, which can be used for optimal filtering. This latter array is set to zero below a specified cuff-off frequency $f_{low}$.

The arguments are:

flo: Input. The low frequency cut-off $f_{low}$, in Hz.
srate: Input. The sample rate, in Hz.
n: Input. The number of points in the arrays.
decay: Input. The quantity $\exp(-\alpha)$ as defined in avg_spec(). Sets the characteristic decay time for the auto-regressive average.
norm: Input/Ouput. Used for internal storage. Set to $0$ when you want to begin a new auto-regressive average. Must not be altered otherwise.
htilde: Input. The array htilde[0..n-1] contains the positive frequency FFT of the metric perturbation.
mean_pow_spec: Output. The array mean_pow_spec[0..n/2] contains the mean power spectrum. Should be zeroed when resetting to begin a new average. The array element mean_pow_spec[0] contains the power spectrum at DC, and the array element mean_pow_spec[n/2] contains the power spectrum at the Nyquist frequency srate/2.
twice_inv_noise: Output. The array twice_inv_noise[0..n/2] contains $2/S_h(f)$. It is set to zero for $f<f_{low}$. The array element twice_inv_noise[0] contains the DC value, and the array element twice_inv_noise[n/2] contains the value at the Nyquist frequency srate/2.
Author: Bruce Allen, ballen@dirac.phys.uwm.edu
Comments: We assume here that the ``correct" thing to do is the average the spectrum, then invert it. There may be a better way to construct the weight function for an optimal filter, however.


next up previous contents
Next: Function: orthonormalize() Up: GRASP Routines: Gravitational Radiation Previous: Function: correlate()   Contents
Bruce Allen 2000-11-19