Package Spectrogram

Class SpectrumBackground

java.lang.Object
Spectrogram.SpectrumBackground

public class SpectrumBackground extends Object
Simple background measure for a channel of complex or real FFT data Uses a dead simple decaying mean measurement
Author:
dg50
  • Constructor Details Link icon

    • SpectrumBackground Link icon

      public SpectrumBackground(FFTDataBlock parentFFTBlock, int iChannel)
      Parameters:
      parentFFTBlock -
      iChannel -
  • Method Details Link icon

    • prepareS Link icon

      public boolean prepareS(double timeConstSecs)
      Prepare the background measurement, passing a time constant in seconds
      Parameters:
      timeConstSecs - time constant in seconds
      Returns:
      true if OK
    • process Link icon

      public double[] process(FFTDataUnit fftDataUnit)
      Add a FFT data unit (assume already of the right channel)
      Parameters:
      fftData - FFT Complex Data must be of length fftlength / 2
      Returns:
      current background measure
    • process Link icon

      public double[] process(ComplexArray fftData)
      Add an array of complex FFT data (assume already of the right channel)
      Parameters:
      fftData - FFT Complex Data must be of length fftlength / 2
      Returns:
      current background measure
    • copyBackground Link icon

      public double[] copyBackground()
      Get a copy of the current background. This is often preferable to calling getBackground() since that other function returns a copy to an array which is constantly being updated. So if you're going to manipulate data in that array, then a) it may be out of date by the time you use it and b) you'll mess up the internal background measurement
      Returns:
      array of background measures (magnitude squared, no corrections for FFT length, neg frequencies, etc.)
    • getParentFFTBlock Link icon

      public FFTDataBlock getParentFFTBlock()
      Returns:
      the parentFFTBlock
    • getiChannel Link icon

      public int getiChannel()
      Returns:
      the iChannel
    • getnDone Link icon

      public int getnDone()
      Returns:
      the nDone