Function:

`double calculate_var(int n, float delta_f, float omega_0,
float f_low, float f_high, float t, double *gamma12, double *power1,
double *power2)`

This function calculates the theoretical variance of the
stochastic background cross-correlation signal .

The arguments of `calculate_var()` are:

`n:`Input. The number of discrete frequency values at which the spectra are to be evaluated.`delta_f:`Input. The spacing (in Hz) between two adjacent discrete frequency values: .`omega_0:`Input. The constant value (dimensionless) of the frequency spectrum for the stochastic background:

should be greater than or equal to zero.`f_low:`Input. The frequency (in Hz) below which the spectrum of the stochastic background is zero. should lie in the range , where is the Nyquist critical frequency. (The Nyquist critical frequency is defined by , where is the sampling period of the detector.) should also be less than or equal to .`f_high:`Input. The frequency (in Hz) above which the spectrum of the stochastic background is zero. should lie in the range . It should also be greater than or equal to .`t:`Input. The observation time (in sec) of the measurement.`gamma12:`Input.`gamma12[0..n-1]`is an array of double precision variables containing the values of the overlap reduction function for the two detector sites. These variables are dimensionless.`gamma12[i]`contains the value of evaluated at the discrete frequency , where .`power1:`Input.`power1[0..n-1]`is an array of double precision variables containing the values of the noise power spectrum of the first detector. These variables have units of (or seconds).`power1[i]`contains the value of evaluated at the discrete frequency , where .`power2:`Input.`power2[0..n-1]`is an array of double precision variables containing the values of the noise power spectrum of the second detector, in exactly the same format as the previous argument.

The double precision value returned by `calculate_var()` is
the theoretical variance given by Eq. ()
of Sec. .
As discussed in that section, Eq. () for
makes no assumption about the relative strengths of the stochastic
background and detector noise signal, but it does use Eq. ()
for the filter function , which is optimal only for the
large detector noise case.
For stochastic background simulations, is usually chosen to
equal some known non-zero value.
This is the value that should be passed as a parameter to
`calculate_var()`.
For stochastic background searches (where is not known
a priori) the value of of the parameter should be set to zero.
The variance for this case is given by Eq. ().

- Authors: Bruce Allen, ballen@dirac.phys.uwm.edu, and Joseph Romano, romano@csd.uwm.edu
- Comments: None.