Package fftManager

Class PamFFTProcess

java.lang.Object
PamguardMVC.PamProcess
fftManager.PamFFTProcess
All Implemented Interfaces:
PamObserver, ProcessAnnotator

public class PamFFTProcess extends PamProcess
Author:
Doug Gillespie PamFFTProcess is a extends the PamProcess superclass
Main processing class to calculate FFT data.
Modified October 13 2009 to correctly interleave data from > 1 channel rather then sending data out in chunks corresponding to individual input raw data which is packed as single channels
PamFFTProcess is then notified when new chunks of raw data have been generated (e.g. by reading from a file or taking input from a sound card). It then processes the data to produce blocks of overlapping FFT data which are used to create a new PamDataUnit that is sent to be included in a new PamDataBlock of type PamFFTDataBlock
  • Constructor Details

  • Method Details

    • setupFFT

      public void setupFFT()
    • getFftLength

      public int getFftLength()
    • getFftHop

      public int getFftHop()
    • getChannelMap

      public int getChannelMap()
    • newData

      public void newData(PamObservable obs, PamDataUnit pamRawData)
      Overrides:
      newData in class PamProcess
    • getRequiredDataHistory

      public long getRequiredDataHistory(PamObservable o, Object arg)
      Specified by:
      getRequiredDataHistory in interface PamObserver
      Overrides:
      getRequiredDataHistory in class PamProcess
      Parameters:
      arg - optional argument from PamObservable
      Returns:
      time in milliseconds required by data held in PamObservable
    • pamStart

      public void pamStart()
      Description copied from class: PamProcess
      Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).
      Specified by:
      pamStart in class PamProcess
    • prepareProcess

      public void prepareProcess()
      Description copied from class: PamProcess
      Called for each process before any of them receive the PamStart command
      Overrides:
      prepareProcess in class PamProcess
    • pamStop

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • getOutputData

      public FFTDataBlock getOutputData()
    • getAnnotation

      public ProcessAnnotation getAnnotation(PamDataBlock pamDataBlock, int annotation)
      Description copied from interface: ProcessAnnotator
      Get an Annotation
      Specified by:
      getAnnotation in interface ProcessAnnotator
      Overrides:
      getAnnotation in class PamProcess
      Parameters:
      pamDataBlock - Annotated datablock
      annotation - annotation number
      Returns:
      Annotation
    • getNumAnnotations

      public int getNumAnnotations(PamDataBlock pamDataBlock)
      Specified by:
      getNumAnnotations in interface ProcessAnnotator
      Overrides:
      getNumAnnotations in class PamProcess
      Parameters:
      pamDataBlock - Annotated datablock
      Returns:
      the number of annotations
    • makeAnnotations

      public void makeAnnotations()
    • clearTempStores

      public void clearTempStores()
      Clear all temporary output stores.
    • getFftControl

      public PamFFTControl getFftControl()
    • getCompatibleDataUnits

      public ArrayList getCompatibleDataUnits()
      Description copied from class: PamProcess
      A list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.
      Overrides:
      getCompatibleDataUnits in class PamProcess
      Returns:
      a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
    • dumpBufferStatus

      public void dumpBufferStatus(String message, boolean sayEmpties)
      Description copied from class: PamProcess
      Say the status of any buffers, particularly in output buffers of data blocks, but can add bespoke info for other internal buffers for some processes.
      Overrides:
      dumpBufferStatus in class PamProcess
      Parameters:
      sayEmpties - include info even if a buffer is empty.