Package IshmaelDetector
Class IshDetFnProcess
java.lang.Object
PamguardMVC.PamProcess
IshmaelDetector.IshDetFnProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
- Direct Known Subclasses:
EnergySumProcess
,MatchFiltProcess
,MatchFiltProcess2
,SgramCorrProcess
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 and Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionIshDetFnProcess
(IshDetControl ishDetControl, PamDataBlock parentDataBlock) Initialiser. -
Method Summary
Modifier and TypeMethodDescriptionint
abstract float
abstract float
An IshDetFnProcess has one input stream.abstract float
abstract String
Get the output data block.getOutputDataUnit
(PamDataUnit rawOrFftDataUnit) Get a new IshDetDataUnit suitable for holding output data.abstract Class
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.void
Get a new IshDetDataUnit suitable for holding output data.void
setSampleRate
(float sampleRate, boolean notify) This is called when the sample rate changes.void
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, newData, noteNewSettings, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setupProcess, toString, updateData
-
Constructor Details
-
IshDetFnProcess
Initialiser.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 Details
-
getLongName
-
inputDataClass
-
getDetSampleRate
public abstract float getDetSampleRate() -
getChannelMap
public int getChannelMap() -
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 interfacePamObserver
- Overrides:
setSampleRate
in classPamProcess
- Parameters:
notify
- Notify other PamObservers and PamObservables in the chain.
-
setupConnections
public void setupConnections() -
getOutputDataUnit
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 classPamProcess
- Parameters:
rawDataUnit
- input to the detector process (MatchFiltProcess, etc.).
-
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 classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
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
-
getOutputDataBlock
Get the output data block.- Returns:
- the output data block.
-