next up previous contents
Next: Function: whiten() Up: GRASP Routines: Stochastic background Previous: Comment: noise power spectra   Contents


Function: noise_power()

0

void noise_power(char *noise_file, int n, float delta_f, double *power)
This function calculates the noise power spectrum $P(f)$ of a detector at a given set of discrete frequency values, using information contained in a data file.

The arguments of noise_power() are:

noise_file: Input. A character string that specifies the name of a data file containing information about the noise power spectrum $P(f)$ of a detector. Like the detectors.dat file described in Sec. [*], the noise power data file should reside in the directory pointed to by the GRASP_PARAMETERS environment variable (which you may set as you wish). If you want to use the noise power spectrum data files distributed with GRASP, use a command like:
setenv GRASP_PARAMETERS /usr/local/GRASP/parameters
to point to the directory containing these files. If you want to use your own noise power spectrum data files, then simply set the GRASP_PARAMETERS environment variable to point to the directory containing these files. Note, however, that if a program needs to access both detector site information and noise power spectrum data, then all of the files containing this information should reside in the same directory. (A similar remark applies for the whitening filter data files described in Sec. [*].)
n: Input. The number $N$ of discrete frequency values at which the noise power spectrum $P(f)$ is to be evaluated.
delta_f: Input. The spacing $\Delta f$ (in Hz) between two adjacent discrete frequency values: $\Delta f:=f_{i+1}-f_i$.
power: Output. power[0..n-1] is an array of double precision variables containing the values of the noise power spectrum $P(f)$. 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\Delta f$, where $i=0,1,\cdots,N-1$.

The input data file specified by noise_file contains information about the noise power spectrum $P(f)$ of a detector. The data contained in this file is formatted as follows: Any line beginning with a # is regarded as a comment. All other lines are assumed to consist of two floating point numbers separated by white space. The first floating point number is a frequency $f$ (in Hz); the second floating point number is the square root of the one-sided noise power spectrum $P(f)$, evaluated at $f$. $P(f)$ is defined by equation (3.18) of Ref. [36]:

\begin{displaymath}
\langle\tilde n{}^*(f)\tilde n(f')\rangle
=:{1\over 2}\delta(f-f')\ P(f)\ .
\end{displaymath} (11.4.225)

Here $\langle {\ }\rangle$ denotes ensemble average, and $\tilde n(f)$ is the frequency spectrum (i.e., Fourier transform) of the strain $n(t)$ produced by the noise intrinsic to the detector. $P(f)$ is a non-negative real function, having units of ${\rm strain}^2/{\rm Hz}$ (or seconds). It is defined with a factor of 1/2 to agree with the standard definition used by instrument builders. The total noise power is the integral of $P(f)$ over all frequencies from 0 to $\infty$ (not from $-\infty$ to $\infty$). Hence the name one-sided.

Since the frequency values contained in the input data file need not agree with the desired frequencies $f_i=i\Delta f$, noise_power() must determine the desired values of the noise power spectrum by doing an interpolation/extrapolation on the input data. noise_power() performs a cubic spline interpolation, using the Numerical Recipes in C routines spline() and splint(). noise_power() assumes that the length of the input data is $\le 65536$, and it uses boundary conditions for a natural spline (i.e., with zero second derivative on the two boundaries). noise_power() also squares the output of the splint() routine, since the desired values are $P(f)$--and not their square roots (which are contained in the input data file).

Authors: Bruce Allen, ballen@dirac.phys.uwm.edu, and Joseph Romano, romano@csd.uwm.edu
Comments: In order for the cubic spline interpolation routines to yield approximations to $P(f)$ that are not contaminated by spurious DC or low frequency (e.g., approximately 1 Hz) components, it is important that the input data file specified by noise_file contain noise power information down to, and including, zero Hz. This information can be added in ``by hand,'' for example, if the experimental data for the noise power spectrum only goes down to 1 Hz. In this case, setting the values of $\sqrt{P(f)}$ at $0.0, 0.1, 0.2, \cdots, 0.9$ Hz equal to its 1 Hz value seems to be sufficient. (See Sec. [*] for a similar comment regarding whiten().)


next up previous contents
Next: Function: whiten() Up: GRASP Routines: Stochastic background Previous: Comment: noise power spectra   Contents
Bruce Allen 2000-11-19