Class ContinuousWavelet


  • public class ContinuousWavelet
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean DEBUG  
      protected int START_THREADS  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.gsi.dataset.DataSet getScalogram​(double[] data, int nQuantx, int nQuanty, double nu, double fmin, double fmax)
      Wavelet Scalogram implementation with truncated convolution the assumption is made that the wavelet vanishes for large scales
      double[][] getScalogramArray​(double[] data, int nQuantx, int nQuanty, double nu, double fmin, double fmax)  
      double[][] getScalogramArrayFourier​(double[] data, int nQuantx, int nQuanty, double nu, double fmin, double fmax)  
      double[] getScalogramFrequencyAxis​(int nQuantx, int nQuanty, double nu, double fmin, double fmax)  
      double[] getScalogramTimeAxis​(double[] data, int nQuantx, int nQuanty, double nu, double fmin, double fmax)  
      int getStatus()  
      boolean isBusy()  
      static void main​(java.lang.String[] args)  
      org.apache.commons.math3.complex.Complex MexicanHat​(double x)  
      org.apache.commons.math3.complex.Complex Morlet​(double x, double nu)
      Complex Morlet wavelet function
      void Morlet​(double x, double nu, double[] ret)
      Complex Morlet wavelet function this version avoids the Complex object for the sake of performance
      org.apache.commons.math3.complex.Complex Paul​(double x, int m)
      Complex Paul wavelet function
      org.apache.commons.math3.complex.Complex WaveletTransform​(double[] data, double scale, double translation, double nu)
      Wavelet Scalogram implementation with truncated convolution the assumption is made that the wavelet vanishes for large scales
      org.apache.commons.math3.complex.Complex WaveletTransform​(org.apache.commons.math3.complex.Complex[] data, double scale, double translation, double nu)
      Complex Wavelet Scalogram implementation -- no assumptions on the Wavelet nor input data are made.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • START_THREADS

        protected int START_THREADS
      • DEBUG

        protected boolean DEBUG
    • Constructor Detail

      • ContinuousWavelet

        public ContinuousWavelet()
    • Method Detail

      • getScalogram

        public de.gsi.dataset.DataSet getScalogram​(double[] data,
                                                   int nQuantx,
                                                   int nQuanty,
                                                   double nu,
                                                   double fmin,
                                                   double fmax)
        Wavelet Scalogram implementation with truncated convolution the assumption is made that the wavelet vanishes for large scales
        Parameters:
        data - real valued input data
        nQuantx - number of bins on the time axis
        nQuanty - number of frequency bins of full range
        nu - the number of oscillations per wavelet
        fmin - minimum scalogram frequency range
        fmax - maximum scalogram frequency range
        Returns:
        the complex scalogram spectrum
      • getScalogramArray

        public double[][] getScalogramArray​(double[] data,
                                            int nQuantx,
                                            int nQuanty,
                                            double nu,
                                            double fmin,
                                            double fmax)
        Parameters:
        data - input data
        nQuantx - number of bins on the time axis
        nQuanty - number of frequency bins of full range
        nu - Morlet wavelet oscillation parameter
        fmin - minimum scalogram frequency range
        fmax - maximum scalogram frequency range
        Returns:
        Scalogram power in dB
      • getScalogramArrayFourier

        public double[][] getScalogramArrayFourier​(double[] data,
                                                   int nQuantx,
                                                   int nQuanty,
                                                   double nu,
                                                   double fmin,
                                                   double fmax)
        Parameters:
        data - input data
        nQuantx - number of bins on the time axis
        nQuanty - number of frequency bins of full range
        nu - Morlet wavelet oscillation parameter
        fmin - minimum scalogram frequency range
        fmax - maximum scalogram frequency range
        Returns:
        Scalogram power in dB
      • getScalogramFrequencyAxis

        public double[] getScalogramFrequencyAxis​(int nQuantx,
                                                  int nQuanty,
                                                  double nu,
                                                  double fmin,
                                                  double fmax)
      • getScalogramTimeAxis

        public double[] getScalogramTimeAxis​(double[] data,
                                             int nQuantx,
                                             int nQuanty,
                                             double nu,
                                             double fmin,
                                             double fmax)
      • getStatus

        public int getStatus()
        Returns:
        progress of pending calculations in percent
      • isBusy

        public boolean isBusy()
        Returns:
        whether class is busy computing a spectra
      • MexicanHat

        public org.apache.commons.math3.complex.Complex MexicanHat​(double x)
      • Morlet

        public org.apache.commons.math3.complex.Complex Morlet​(double x,
                                                               double nu)
        Complex Morlet wavelet function
        Parameters:
        x - the
        nu - the oscillatory parameter (needs to be > 0.8)
        Returns:
        reference: P. Goupillaud, A. Grossman, and J. Morlet., Cycle-Octave and Related Transforms in Seismic Signal Analysis., Geoexploration, 23:85-102, 1984
      • Morlet

        public void Morlet​(double x,
                           double nu,
                           double[] ret)
        Complex Morlet wavelet function this version avoids the Complex object for the sake of performance
        Parameters:
        x - input
        nu - the oscillatory parameter
        ret - return value ret[0] stores the real and ret[1] the imaginary value of the function reference: P. Goupillaud, A. Grossman, and J. Morlet., Cycle-Octave and Related Transforms in Seismic Signal Analysis., Geoexploration, 23:85-102, 1984
      • Paul

        public org.apache.commons.math3.complex.Complex Paul​(double x,
                                                             int m)
        Complex Paul wavelet function
        Parameters:
        x - input
        m - input
        Returns:
        complex Paul wavelet function
      • WaveletTransform

        public org.apache.commons.math3.complex.Complex WaveletTransform​(org.apache.commons.math3.complex.Complex[] data,
                                                                         double scale,
                                                                         double translation,
                                                                         double nu)
        Complex Wavelet Scalogram implementation -- no assumptions on the Wavelet nor input data are made. -- beware: this transform is quite time-consuming
        Parameters:
        data - complex valued input data
        scale - the scale parameter
        translation - the time shift parameter
        nu - the number of oscillations per wavelet
        Returns:
        the complex scalogram spectrum coefficient
      • WaveletTransform

        public org.apache.commons.math3.complex.Complex WaveletTransform​(double[] data,
                                                                         double scale,
                                                                         double translation,
                                                                         double nu)
        Wavelet Scalogram implementation with truncated convolution the assumption is made that the wavelet vanishes for large scales
        Parameters:
        data - real valued input data
        scale - the scale parameter
        translation - the time shift parameter
        nu - the number of oscillations per wavelet
        Returns:
        the complex scalogram spectrum coefficient
      • main

        public static void main​(java.lang.String[] args)