next up previous contents
Next: Function: simulate_sb() Up: GRASP Routines: Stochastic background Previous: Function: get_IFO12()   Contents


Function: simulate_noise()

0

void simulate_noise(int n, float delta_t, double *power, double *whiten_out, float *out, int *pseed)
This function simulates the generation of noise intrinsic to a detector. The output is a (not necessarily continuous-in-time) whitened data stream $o(t)$ representing the detector output when only detector noise is present.

The arguments of simulate_noise() are:

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.
power: Input. power[0..n/2-1] is an array of double precision variables containing the values of the noise power spectrum $P(f)$ of the detector. These variables have units of ${\rm strain}^2/{\rm Hz}$ (or seconds). power[i] contains the value of $P(f)$ evaluated at the discrete frequency $f_i=i/(N\Delta t)$, where $i=0,1,\cdots,N/2-1$.
whiten_out: Input. whiten_out[0..n-1] is an array of double precision variables containing the values of the real and imaginary parts of the spectrum $\tilde W(f)$ of the whitening filter of the 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(f)$. whiten_out[2*i] and whiten_out[2*i+1] contain, respectively, the values of the real and imaginary parts of $\tilde W(f)$ evaluated at the discrete frequency $f_i=i/(N\Delta t)$, where $i=0,1,\cdots,N/2-1$.
out: Output. out[0..n-1] is an array of floating point variables containing the values of the whitened data stream $o(t)$ representing the output of the detector when only detector noise is present. $o(t)$ is the convolution of detector whitening filter $W(t)$ with the noise $n(t)$ intrinsic to the detector. The variables out[] have units of rHz (or ${\rm sec}^{-1/2}$), which follows from the definition of $n(t)$ as a strain and $\tilde W(f)$ as the ``inverse'' of the square root of the noise power spectrum $P(f)$. out[i] contains the value of $o(t)$ evaluated at the discrete time $t_i=i\Delta t$, where $i=0,1,\cdots,N-1$.
pseed: Input. A pointer to a seed value, which is used by the random number generator routine.

simulate_noise() simulates the generation of noise intrinsic to a detector in the following series of steps:

(i)
It first constructs random variables $\tilde n(f_i)$ in the frequency domain that have zero mean and satisfy:
\begin{displaymath}
\langle \tilde n^*(f_i)\tilde n(f_j)\rangle=
{1\over 2}\ T\ \delta_{ij}\ P(f_i)\ ,\\end{displaymath} (11.9.228)

where $\langle\ \rangle$ denotes ensemble average. The above equation is just the discrete frequency version of Eq. ([*]). This equation can be realized by setting
\begin{displaymath}
\tilde n(f_i)={1\over 2}\sqrt{T}\ P^{1/2}(f_i)\ (u_i+i v_i)\ ,
\end{displaymath} (11.9.229)

where $u_i$ and $v_i$ are statistically independent (real) Gaussian random variables, each having zero mean and unit variance. These Gaussian random variables are produced by calls to the Numerical Recipes in C random number generator routine gasdev().
(ii)
simulate_noise() then whitens the data in the frequency domain by multiplying $\tilde n(f_i)$ by the frequency components $\tilde W(f_i)$ of the whitening filter of the detector:
\begin{displaymath}
\tilde o(f_i):=\tilde n(f_i)\ \tilde W(f_i)\ .
\end{displaymath} (11.9.230)

This (complex) multiplication in the frequency domain corresponds to the convolution of $n(t)$ and $W(t)$ in the time domain. By convention, the DC (i.e., zero frequency) and Nyquist critical frequency components of $\tilde o(f_i)$ are set to zero.
(iii)
The final step consists of Fourier transforming the frequency components $\tilde o(f_i)$ into the time domain to obtain the whitened data stream $o(t_i)$. Here $t_i=i\Delta t$ with $i=0,1,\cdots,N-1$.
Authors: Bruce Allen, ballen@dirac.phys.uwm.edu, and Joseph Romano, romano@csd.uwm.edu
Comments: In the context of stochastic background simulations, it would be more efficient to simulate the noise at two detectors simultaneously. Since the time-series data are real, the two Fourier transforms that would need to be performed in step (iii) could be done simultaneously. However, for modularity of design, and to simulate noise for ``single-detector'' gravity-wave searches, we decided to write the above routine instead.


next up previous contents
Next: Function: simulate_sb() Up: GRASP Routines: Stochastic background Previous: Function: get_IFO12()   Contents
Bruce Allen 2000-11-19