Package signal

Class Hilbert

java.lang.Object
signal.Hilbert

public class Hilbert extends Object
Functions to calculate the Hilbert transform of data.
Author:
Doug Gillespie
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    getHilbert(double[] signal)
    Calculate the Hilbert Transform of a sample of data.
    double[]
    getHilbert(double[] signal, int dataLen)
    Calculate the Hilbert Transform of a sample of data to length dataLen.
    double[]
    getHilbert(ComplexArray fftData, int fftLength, int dataLen)
    Compute the Hilbert transform from a Complex spectrum of real data.
    getHilbertC(double[] signal)
    Calculate the Hilbert Transform of a sample of data.
    getHilbertC(double[] signal, int fftLength)
    Calculate the Hilbert Transform of a sample of data.
    getHilbertC(ComplexArray fftData, int fftLength)
    Compute a Hilbert transform from a Complex spectrum of real data.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Hilbert

      public Hilbert()
  • Method Details

    • getHilbertC

      public ComplexArray getHilbertC(double[] signal)
      Calculate the Hilbert Transform of a sample of data. and return as a complex array of the magnitude
      Parameters:
      signal - signal waveform
      Returns:
      Complex Hilbert Transform of the data.
    • getHilbertC

      public ComplexArray getHilbertC(double[] signal, int fftLength)
      Calculate the Hilbert Transform of a sample of data. and return as a complex array of the magnitude
      Parameters:
      signal - signal waveform
      signal - length (will truncate or stretch to this)
      Returns:
      Complex Hilbert Transform of the data.
    • getHilbertC

      public ComplexArray getHilbertC(ComplexArray fftData, int fftLength)
      Compute a Hilbert transform from a Complex spectrum of real data. for some parts of PAMguard for which the complex spectrum is already available, this may be a bit quicker.
      Parameters:
      fftData - Complex FFT data. Only the first half (fftLength/2 long) is needed.
      fftLength - FFT Length
      Returns:
      Complex Hilbert Transform of the data.
    • getHilbert

      public double[] getHilbert(double[] signal)
      Calculate the Hilbert Transform of a sample of data. and return as a real array of the magnitude
      Parameters:
      signal - signal waveform
      Returns:
      magnitude of analytic waveform.
    • getHilbert

      public double[] getHilbert(double[] signal, int dataLen)
      Calculate the Hilbert Transform of a sample of data to length dataLen. If data are shorter than dataLen they will be zero padded. If longer, they will be truncated.
      Parameters:
      signal - signal waveform
      dataLen - maximum data length
      Returns:
      magnitude of analytic waveform.
    • getHilbert

      public double[] getHilbert(ComplexArray fftData, int fftLength, int dataLen)
      Compute the Hilbert transform from a Complex spectrum of real data.
      Parameters:
      fftData - Complex spectrum of real data. Only the first half of the spectrum is required. Length of data will either be fftLenght/2 or fftLength but fftLength must match the original fftLength used with these data.
      fftLength - FFT length used to calculate the spectrum.
      dataLen - length of output data (can be invalid input: '<' fftLength if data had to be padded)
      Returns:
      magnitude of Hilbert Transform.