Function:

`void monte_carlo(int fake_sb, int fake_noise1, int fake_noise2,
int n, float delta_t, float omega_0, float f_low, float f_high,
double *gamma12, double *power1, double *power2,
double *whiten1, double *whiten2, float *out1, float *out2, int *pseed)`

This high-level function simulates (if desired) the generation of
noise intrinsic to a pair of detectors, and an isotropic and
unpolarized stochastic background of gravitational radiation having a
constant frequency spectrum:
for
.
The outputs are two continuous-in-time whitened data streams
and representing the detector outputs in the presence of a
stochastic background signal plus noise.

The arguments of `monte_carlo()` are:

`fake_sb:`Input. An integer variable that should be set equal to 1 if a simulated stochastic background is desired.`fake_noise1:`Input. An integer variable that should be set equal to 1 if simulated detector noise for the first detector is desired.`fake_noise2:`Input. An integer variable that should be set equal to 1 if simulated detector noise for the second detector is desired.`n:`Input. The number of data points corresponding to an observation time , where is the sampling period of the detector, defined below. should equal an integer power of 2.`delta_t:`Input. The sampling period (in sec) of the detector.`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 .`gamma12:`Input.`gamma12[0..n/2-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/2-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/2-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.`whiten1:`Input.`whiten1[0..n-1]`is an array of double precision variables containing the values of the real and imaginary parts of the spectrum of the whitening filter of the first detector. These variables have units (or ), which are inverse to the units of the square root of the noise power spectrum .`whiten1[2*i]`and`whiten1[2*i+1]`contain, respectively, the values of the real and imaginary parts of evaluated at the discrete frequency , where .`whiten2:`Input.`whiten2[0..n-1]`is an array of double precision variables containing the values of the real and imaginary parts of the spectrum of the whitening filter of the second detector, in exactly the same format as the previous argument.`out1:`Output.`out1[0..n-1]`is an array of floating point variables containing the values of the continuous-in-time whitened data stream representing the output of the first detector. is the convolution of detector whitening filter with the data stream , where is the gravitational strain and is the noise intrinsic to the detector. These variables have units of rHz (or ), which follows from the definition of as a strain and as the ``inverse'' of the square root of the noise power spectrum .`out1[i]`contains the value of evaluated at the discrete time , where .`out2:`Output.`out2[0..n-1]`is an array of floating point variables containing the values of the continuous-in-time whitened data stream representing the output of the second detector, in exactly the same format as the previous argument.`pseed:`Input. A pointer to a seed value, which is used by the random number generator routine.

`monte_carlo()` is a very simple function, consisting of calls to
`simulate_sb()`, `simulate_noise()`, and `combine_data()`.
If `fake_sb=1`, `monte_carlo()` calls `simulate_sb()`
*twice*, producing two sets of data that are time-shifted and
combined by `combine_data()` to simulate continuous-in-time detector
output.
Similar statements apply when either `fake_noise1` or
`fake_noise2` equals 1.

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