next up previous contents
Next: Example: monte_carlo program Up: GRASP Routines: Stochastic background Previous: Function: combine_data()   Contents


Function: monte_carlo()

0

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: $\Omega_{\rm gw}(f)=\Omega_0$ for $f_{\rm low}\le f \le f_{\rm high}$. The outputs are two continuous-in-time whitened data streams $o_1(t)$ and $o_2(t)$ 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 $N$ of data points corresponding to an observation time $T:=N\ \Delta t$, where $\Delta t$ is the sampling period of the detector, defined below. $N$ should equal an integer power of 2.
delta_t: Input. The sampling period $\Delta t$ (in sec) of the detector.
omega_0: Input. The constant value $\Omega_0$ (dimensionless) of the frequency spectrum $\Omega_{\rm gw}(f)$ for the stochastic background:

\begin{displaymath}
\Omega_{\rm gw}(f)=\left\{
\begin{array}{cl}
\Omega_0 & \qua...
... f_{\rm high}\0 & \quad {\rm otherwise.}
\end{array}\right.
\end{displaymath}

$\Omega_0$ should be greater than or equal to zero.
f_low: Input. The frequency $f_{\rm low}$ (in Hz) below which the spectrum $\Omega_{\rm gw}(f)$ of the stochastic background is zero. $f_{\rm low}$ should lie in the range $0\le f_{\rm low}\le f_{\rm Nyquist}$, where $f_{\rm Nyquist}$ is the Nyquist critical frequency. (The Nyquist critical frequency is defined by $f_{\rm Nyquist}:=1/(2\Delta t)$, where $\Delta t$ is the sampling period of the detector.) $f_{\rm low}$ should also be less than or equal to $f_{\rm high}$.
f_high: Input. The frequency $f_{\rm high}$ (in Hz) above which the spectrum $\Omega_{\rm gw}(f)$ of the stochastic background is zero. $f_{\rm high}$ should lie in the range $0\le f_{\rm high}\le f_{\rm Nyquist}$. It should also be greater than or equal to $f_{\rm low}$.
gamma12: Input. gamma12[0..n/2-1] is an array of double precision variables containing the values of the overlap reduction function $\gamma(f)$ for the two detector sites. These variables are dimensionless. gamma12[i] contains the value of $\gamma(f)$ evaluated at the discrete frequency $f_i=i/(N\Delta t)$, where $i=0,1,\cdots,N/2-1$.
power1: Input. power1[0..n/2-1] is an array of double precision variables containing the values of the noise power spectrum $P_1(f)$ of the first detector. These variables have units of ${\rm strain}^2/{\rm Hz}$ (or seconds). power1[i] contains the value of $P_1(f)$ evaluated at the discrete frequency $f_i=i/(N\Delta t)$, where $i=0,1,\cdots,N/2-1$.
power2: Input. power2[0..n/2-1] is an array of double precision variables containing the values of the noise power spectrum $P_2(f)$ 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 $\tilde W_1(f)$ of the whitening filter of the first detector. These variables have units ${\rm rHz}/{\rm strain}$ (or ${\rm sec}^{-1/2}$), which are inverse to the units of the square root of the noise power spectrum $P_1(f)$. whiten1[2*i] and whiten1[2*i+1] contain, respectively, the values of the real and imaginary parts of $\tilde W_1(f)$ evaluated at the discrete frequency $f_i=i/(N\Delta t)$, where $i=0,1,\cdots,N/2-1$.
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 $\tilde W_2(f)$ 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 $o_1(t)$ representing the output of the first detector. $o_1(t)$ is the convolution of detector whitening filter $W_1(t)$ with the data stream $s_1(t):=h_1(t)+n_1(t)$, where $h_1(t)$ is the gravitational strain and $n_1(t)$ is the noise intrinsic to the detector. These variables have units of rHz (or ${\rm sec}^{-1/2}$), which follows from the definition of $s_1(t)$ as a strain and $\tilde W_1(f)$ as the ``inverse'' of the square root of the noise power spectrum $P_1(f)$. out1[i] contains the value of $o_1(t)$ evaluated at the discrete time $t_i=i\Delta t$, where $i=0,1,\cdots,N-1$.
out2: Output. out2[0..n-1] is an array of floating point variables containing the values of the continuous-in-time whitened data stream $o_2(t)$ 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.


next up previous contents
Next: Example: monte_carlo program Up: GRASP Routines: Stochastic background Previous: Function: combine_data()   Contents
Bruce Allen 2000-11-19