IshmaelDetector
Class IshDetFnProcess

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by IshmaelDetector.IshDetFnProcess
All Implemented Interfaces:
Annotator, PamObserver
Direct Known Subclasses:
EnergySumProcess, MatchFiltProcess, SgramCorrProcess

public abstract class IshDetFnProcess
extends PamProcess

This is the abstract superclass for all the "Ishmael detectors", i.e., the detection PamProcesses that use a detection function and threshold in the course of doing making detections. Currently this means it is the superclass of EnergySumProcess, SgramCorrProcess, and MatchFiltProcess.

Author:
Dave Mellinger

Field Summary
(package private)  int channel
           
(package private)  IshDetControl ishDetControl
           
(package private)  PamDataBlock outputDataBlock
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
IshDetFnProcess(IshDetControl ishDetControl, PamDataBlock parentDataBlock)
          Initializer.
 
Method Summary
 int getChannelMap()
           
abstract  float getDetSampleRate()
           
abstract  float getHiFreq()
           
 PamDataBlock getInputDataBlock()
          An IshDetFnProcess has one input stream.
abstract  float getLoFreq()
           
abstract  java.lang.String getLongName()
           
 IshDetFnDataUnit getOutputDataUnit(AcousticDataUnit rawOrFftDataUnit)
          Get a new IshDetDataUnit suitable for holding output data.
abstract  java.lang.Class inputDataClass()
           
 void pamStart()
          Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.
 void pamStop()
          Stops the process.
protected  void prepareMyParams()
           
 void prepareProcess()
          Get a new IshDetDataUnit suitable for holding output data.
 void setSampleRate(float sampleRate, boolean notify)
          This is called when the sample rate changes.
 void setupConnections()
           
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getAnnotation, getBackendProcess, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, newData, noteNewSettings, notifyModelChanged, relMillisecondsToSamples, relSamplesToMilliseconds, removeObservable, removeOutputDatablock, saveViewerData, setBackendProcess, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setupProcess, toString, update, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ishDetControl

IshDetControl ishDetControl

outputDataBlock

PamDataBlock outputDataBlock

channel

int channel
Constructor Detail

IshDetFnProcess

public IshDetFnProcess(IshDetControl ishDetControl,
                       PamDataBlock parentDataBlock)
Initializer.

IMPORTANT: The subclass initializer should construct the ishDetParams before calling this.

Parameters:
ishDetControl - -- e.g., an EnergySumControl, SgramCorrControl, etc.
parentDataBlock - -- an FFTDataBlock or RawDataBlock
Method Detail

getLongName

public abstract java.lang.String getLongName()

inputDataClass

public abstract java.lang.Class inputDataClass()

getChannelMap

public int getChannelMap()

getInputDataBlock

public PamDataBlock getInputDataBlock()
An IshDetFnProcess has one input stream. Return it, or null if it's not available.


setSampleRate

public void setSampleRate(float sampleRate,
                          boolean notify)
This is called when the sample rate changes. It also gets called on other occasions, like when the model changes (or the FFT size changes??).

Specified by:
setSampleRate in interface PamObserver
Overrides:
setSampleRate in class PamProcess
notify - Notify other PamObservers and PamObservables in the chain.

setupConnections

public void setupConnections()

getOutputDataUnit

public IshDetFnDataUnit getOutputDataUnit(AcousticDataUnit rawOrFftDataUnit)
Get a new IshDetDataUnit suitable for holding output data. This code was copied from PamFFTProcess.newData() and modified.

Parameters:
rawOrFftDataUnit - input to the detector process (EnergySumProcess, etc.).
Returns:
a fresh IshDetDataUnit, with time fields and channel bitmap set

prepareProcess

public void prepareProcess()
Get a new IshDetDataUnit suitable for holding output data. This code was copied from PamFFTProcess.newData() and modified.

Overrides:
prepareProcess in class PamProcess
Parameters:
rawDataUnit - input to the detector process (MatchFiltProcess, etc.).

prepareMyParams

protected void prepareMyParams()

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

pamStop

public void pamStop()
Description copied from class: PamProcess
Stops the process.

Specified by:
pamStop in class PamProcess

getDetSampleRate

public abstract float getDetSampleRate()
Returns:
the rate at which detection samples arrive, which for an FFT based detector is the FFT frame rate.

getLoFreq

public abstract float getLoFreq()
Returns:
the lowest frequency of the detection - e.g. 0 or the lower bound of the detection kernel

getHiFreq

public abstract float getHiFreq()
Returns:
the highest frequency of the detection - e.g. sampleRate/2 or the upper bound of the detection kernel