wavelet_util
Class coef_spectrum

java.lang.Object
  |
  +--wavelet_util.plot
        |
        +--wavelet_util.coef_spectrum

public class coef_spectrum
extends plot

After the wavelet transform is calculated, regenerate the time series with a given spectrum set to zero, or with all but a given spectrum set to zero. The plots are generated from the highest frequency spectrum to the lower frequency spectrums. The highest frequency spectrum is left out of later plots since this spectrum contains most of the noise.

Wavelets allow a time series to be examined by filtering the component spectrum. For example, the Haar wavelet transform can be calculated and the highest frequency spectrum of coefficients can be set to zero. When the reverse Haar transform is calculated, the time series will be regenerated without this spectrum.

Wavelets can also be used to look at a single spectrum in isolation. This can be done by setting all but the one spectrum to zero and then regenerating the time series. This will result in a time series showning the contribution of that spectrum.


Field Summary
private  int min_spectrum
           
 
Constructor Summary
coef_spectrum()
           
 
Method Summary
(package private)  java.lang.String class_name()
           
private  double[] copy_coef(double[] coef, int limit)
          Make a copy of the coefficient array.
 void filter_one_spectrum(double[] coef)
           Moving from the high frequency coefficient spectrum to the lower frequency spectrum, set each spectrum to zero and output the regenerated time series to a file.
 void only_one_spectrum(double[] coef)
           Moving from high frequency to lower frequency, regenerate the time series from only one spectrum.
private  void output_time_series(java.lang.String file_name, double[] coef)
          Regenerate the time series from the coefficient array and output the time series to a file.
 
Methods inherited from class wavelet_util.plot
OpenFile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

min_spectrum

private final int min_spectrum
Constructor Detail

coef_spectrum

public coef_spectrum()
Method Detail

class_name

java.lang.String class_name()
Overrides:
class_name in class plot

output_time_series

private void output_time_series(java.lang.String file_name,
                                double[] coef)
Regenerate the time series from the coefficient array and output the time series to a file.

copy_coef

private double[] copy_coef(double[] coef,
                           int limit)
Make a copy of the coefficient array. If limit is greater than zero copy up to limit, otherwise copy the entire array.

filter_one_spectrum

public void filter_one_spectrum(double[] coef)

Moving from the high frequency coefficient spectrum to the lower frequency spectrum, set each spectrum to zero and output the regenerated time series to a file.

The highest frequency spectrum contains most of the noise so when subsequent spectrum are set to zero, the highest frequency spectrum is not included.


only_one_spectrum

public void only_one_spectrum(double[] coef)

Moving from high frequency to lower frequency, regenerate the time series from only one spectrum.

Note that coef[0] contains the time series average and must exist for all coefficient arrays in order to regenerate the time series.