Function:

`void noise_power(char *noise_file, int n, float delta_f,
double *power)`

This function calculates the noise power spectrum 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 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 of discrete frequency values at which the noise power spectrum is to be evaluated.`delta_f:`Input. The spacing (in Hz) between two adjacent discrete frequency values: .`power:`Output.`power[0..n-1]`is an array of double precision variables containing the values of the noise power spectrum . These variables have units of (or seconds).`power[i]`contains the value of evaluated at the discrete frequency , where .

The input data file specified by `noise_file` contains information
about the noise power spectrum 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 (in Hz);
the second floating point number is the square root of the
*one-sided* noise power spectrum , evaluated at .
is defined by equation (3.18) of
Ref. [36]:

Since the frequency values contained in the input data file need not
agree with the desired frequencies ,
`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 , 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 --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 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 at Hz equal to its 1 Hz value seems to be sufficient. (See Sec. for a similar comment regarding`whiten()`.)