All Packages Class Hierarchy This Package Previous Next Index
Class ChaosDemos.powerSpectrum
java.lang.Object
|
+----ChaosDemos.powerSpectrum
- public class powerSpectrum
- extends Object
Calculates power spectrum using FFTs and accumulates spectrum.
Uses routines from Numerical Recipes
- Version:
- 26 July 1997
- Author:
- Michael Cross
-
powerSpectrum(int, int, double)
- Constructor
-
getNumberOfSpectra()
- Number of spectra calculated
-
setFloor(double)
- Set floor for log functio
-
transform(double[])
- Transforms data and updates spectrum
powerSpectrum
public powerSpectrum(int in_nn,
int in_winNum,
double in_scale)
- Constructor
- Parameters:
- in_nn - number of data points : must be power of 2!
- in_winNum - window for FFT: 1=BARTLETT 2=WELCH 3=HANN other=NONE
- in_scale - scale factor to convert from index to frequency
transform
public void transform(double x[])
- Transforms data and updates spectrum
- Parameters:
- x - array of length 2*in_nn containing time sequence of real and imaginary data.
On output x contains spectrum in format suitable for direct plotting in graph2D
in first in_nn positions.
getNumberOfSpectra
public int getNumberOfSpectra()
- Number of spectra calculated
- Returns:
- number of spectra
setFloor
public void setFloor(double input)
- Set floor for log functio
- Parameters:
- floor - value of floor
All Packages Class Hierarchy This Package Previous Next Index