Package clipgenerator

Class ClipSpectrogram

java.lang.Object
clipgenerator.ClipSpectrogram
Direct Known Subclasses:
ClickSpectrogram

public class ClipSpectrogram extends Object
Creates and stores a spectrogram image for a wave file snippet. Usually used with small snippets of wave data rather than continious raw data.
Author:
Jamie Macaulay
  • Field Details Link icon

    • fastFFT Link icon

      public FastFFT fastFFT
      A fast fourier transform class.
  • Constructor Details Link icon

    • ClipSpectrogram Link icon

      public ClipSpectrogram(PamDataUnit clickDetection)
  • Method Details Link icon

    • getSpectrogram Link icon

      public ArrayList<double[][]> getSpectrogram()
      Get the spectrogram
      Returns:
      the spectrogram for each channel
    • getSpectrogram Link icon

      public double[][] getSpectrogram(int ichan)
      Get the spectrogram for a given channel
      Parameters:
      iChan - - the relative channel number.
      Returns:
      the spectrogram for each channel
    • getFFTHop Link icon

      public int getFFTHop()
      Get the FFT hope in samples.
      Returns:
      the FFT hop.
    • getFFTSize Link icon

      public int getFFTSize()
      Get the FFT size in samples.
      Returns:
      the FFT size
    • calcSpectrogram Link icon

      public void calcSpectrogram(double[][] waveData, int fftLength, int fftHop, int windowType)
      Calculate the click spectrum for all channels.
      Parameters:
      waveData - - the raw data for each channel
    • specTransform Link icon

      public ComplexArray specTransform(double[] waveChunk)
      Apply a transforms to the raw data to convert from time to frequency/phase domain.
      Parameters:
      wavChunk - - the raw windowed chunk of data (i.e. after hanning window has been applied)
      len - - the len of the transform e.g. FFT length
      Returns:
      the ComplexArray with transformed data.
    • getWindowType Link icon

      public int getWindowType()
      Get the last used window type.
      Returns:
      the window type @see WindowFunction.getWindowFunc(windowType, fftLength);