In file No file:

int powerspectrum (int timeseries_length, int data_real, void* data, float timestep, int output_format, int window, void* result)

Power spectrum function

Documentation

Power spectrum function.

Not reentrant and not supported anymore (use psGen instead).

This function generates an fft of a real or complex data set. The output can be either a power spectrum or the raw fft. The input data can be either a single array of floats for real input data or an array of pairs of floats for complex input data array.

Returns:
s -1 if error, 0 otherwise.
Parameters:
timeseries_length - The number of data points in the time series. Function returns a -1 if this is not a power of two. Data points are defined as either single real numbers for real data or pairs of reals for complex data.
data_real - Use data flags DATA_REAL or DATA_COMPLEX. See flags manual page.
data - A pointer to the first element of the data array
timestep - The time interval between successive data points in the time series. Used when the output units are per root Hz.
output_format - specifies what output is required. Definitions of these integer codes are supplied later in this header.
window - Specifies which windowing function will be supplied. 1=hanning, 2=welch, 3=bartlett, 4=uniform, 5=flattop, 6=bmh. Can use flags defined in flags manual page.
result - A pointer to the results data. See the flags page for details of output formats and ordering. Note that even if the output format selected is a power spectrum, and hence shorter than the input array of numbers, the memory allocated for the output should always be at least the length of the input array. I use the output array space to do arithmetic to avoid dynamic memory allocation.
Author:
Edward Daw, June 1999

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++