Package matchedTemplateClassifer
Class MTProcess
java.lang.Object
PamguardMVC.PamProcess
PamguardMVC.PamInstantProcess
matchedTemplateClassifer.MTProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
Calculates a correlation difference coefficient between a match and reject click template
and classifies a data unit based on a threshold value for the coefficient. Input data units
must implement RawDataHolder, i.e. must have a raw waveform available.
The MTClassifier annotates data units with results from the matched template. It also adds data unit specific flags e.g. species flags to click detections.
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double[]
createRestrictedLenghtWave
(double[] waveData, int[] lengthPoints, int restrictedBins, double[] win) Create restricted waveform.static double[]
createRestrictedLenghtWave
(RawDataHolder click, int chan, int[] lengthPoints, int restrictedBins, double[] win) Create restricted waveform.Get the manager for bespoke data units.A list of data block class types which are compatible as parent data blocks for the PamProcess.Get the Matched Click Classifier Controller for this process.void
newClickData
(PamDataUnit clickDetection) A new click has arrived .void
newData
(PamObservable o, PamDataUnit arg) 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
called for every process once the systemmodel has been created.Methods inherited from class PamguardMVC.PamInstantProcess
setParentDataBlock, setParentDataBlock
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, 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, noteNewSettings, notifyModelChanged, prepareProcess, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setProcessCheck, setProcessName, setSampleRate, toString, updateData
-
Constructor Details
-
MTProcess
The MTProcess- Parameters:
pamControlledUnit
- - the pam controlled unit.
-
-
Method Details
-
setupProcess
public void setupProcess()Description copied from class:PamProcess
called for every process once the systemmodel has been created. this is a good time to check out and find input data blocks and similar tasks.- Overrides:
setupProcess
in classPamProcess
-
newData
- Overrides:
newData
in classPamProcess
-
newClickData
A new click has arrived . It needs to be classified- Parameters:
clickDetection
- - the incoming click.
-
createRestrictedLenghtWave
public static double[] createRestrictedLenghtWave(RawDataHolder click, int chan, int[] lengthPoints, int restrictedBins, double[] win) Create restricted waveform.- Parameters:
click
- - the input data unitchan
- - the channel to uselengthPoints
- - the restricted start/end points.restrictedBins
- - the number of bins to restrict the waveform to.win
- - the window to use e.g. WindowFunction.hann(restrictedBins)- Returns:
- the restricted waveform.
-
createRestrictedLenghtWave
public static double[] createRestrictedLenghtWave(double[] waveData, int[] lengthPoints, int restrictedBins, double[] win) Create restricted waveform.- Parameters:
waveData
- - the wave data to processlengthPoints
- - the restricted start/end points.restrictedBins
- - the number of bins to restrict the waveform to.win
- - the window to use e.g. WindowFunction.hann(restrictedBins)- Returns:
- the restricted waveform.
-
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
-
getMTControl
Get the Matched Click Classifier Controller for this process.- Returns:
- the matched click classifier controller.
-
getBespokeClassifierManager
Get the manager for bespoke data units. This handles adding custom flags to different ypes of data units.- Returns:
- the bespoke classifier manager
-
getCompatibleDataUnits
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 classPamProcess
- Returns:
- a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
-