Function:

`void simulate_sb(int n, float delta_t, float omega_0, float f_low,
float f_high, double *gamma12, double *whiten1, double *whiten2,
float *out1, float *out2, int *pseed)`

This function simulates the generation of an isotropic and unpolarized
stochastic background of gravitational radiation having a constant
frequency spectrum:
for
.
The outputs are (not necessarily continuous-in-time)
whitened data stream and representing the detector
outputs when only a stochastic background signal is present.

The arguments of `simulate_sb()` are:

`n:`Input. The number of data points corresponding to an observation time , where is the sampling period of the detectors, defined below. should equal an integer power of 2.`delta_t:`Input. The sampling period (in sec) of the detectors.`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 detectors.) 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 .`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 whitened data stream representing the output of the first detector when only a stochastic background signal is present. is the convolution of detector whitening filter with the gravitational strain . The variables`out1[]`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 whitened data stream representing the output of the second detector when only a stochastic background signal is present, 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.

`simulate_sb()` simulates the generation of an isotropic and
unpolarized stochastic background of gravitational radiation having
a constant frequency spectrum
for
in the following series of steps:

- (i)
- It first constructs random variables
and
in the frequency domain that have zero mean and satisfy:

where denotes ensemble average. Here and are the Fourier components of the gravitational strains and at the two detectors. The above equations are the discrete frequency versions of equation (3.17) of Ref. [36], with for . They can be realized by setting

where , , , and are statistically independent (real) Gaussian random variables, each having zero mean and unit variance. (Note: The , , , and random variables are statistically independent of the and random variables defined in Sec. .) These Gaussian random variables are produced by calls to the*Numerical Recipes in C*random number generator routine`gasdev()`. Note also that the second term of (which is proportional to ) is needed to obtain equation (). Without this term, would include an additional (unwanted) factor of . - (iii)
`simulate_sb()`then whitens the data in the frequency domain by multiplying and by the frequency components and of the whitening filters of the two detectors:

(11.10.237) (11.10.238)

This (complex) multiplication in the frequency domain corresponds to the convolution of and , and and in the time domain. By convention, the DC (i.e., zero frequency) and Nyquist critical frequency components of and are set to zero.- (iii)
- The final step consists of Fourier transforming the frequency components and into the time domain to obtain the whitened data streams and . Here with . Since and are the Fourier transforms of real data sets, the two Fourier transforms can be performed simultaneously.

- Authors: Bruce Allen, ballen@dirac.phys.uwm.edu, and Joseph Romano, romano@csd.uwm.edu
- Comments: Although it is possible and more efficient to write a single function to simulate the generation of a stochastic background and intrinsic detector noise simultaneously, we have chosen--for the sake of modularity--to write separate functions to perform these two tasks separately. (See also the comment at the end of Sec. .)