Package whistleClassifier
Class WhistleClassifierProcess
java.lang.Object
PamguardMVC.PamProcess
whistleClassifier.WhistleClassifierProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
Whistle Classifier process
Receives whistles from either whistle detector. Fragments them and either stores the fragments for later training or builds up information on many fragments and then classifies when it's got enough.
Keeps a list or recent whistle times so that it can clear the store if the whistle rate drops too low.
- Author:
- Doug
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called whenever settings / species list changes to ensure that database table columns match the species list in use.void
clearFragmentStore
(long clearTime) void
boolean
Flag to say that it's in the process of collecting training data.void
masterClockUpdate
(long timeMilliseconds, long sampleNumber) void
newData
(PamObservable o, PamDataUnit arg) void
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
void
prepareTrainingStore
(String nameBit, String wavFolder) void
Called when reprocessing offline.boolean
runClassification
(long timeMillis) Run the classification model.void
runTimingFunctions
(long timeMilliseconds) void
setSampleRate
(float sampleRate, boolean notify) New sample ratevoid
Called after settings read in so that correct table can be created.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, noteNewSettings, notifyModelChanged, prepareProcess, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setupProcess, toString, updateData
-
Constructor Details
-
WhistleClassifierProcess
-
-
Method Details
-
setupLogging
public void setupLogging()Called after settings read in so that correct table can be created. -
checkLoggingTables
public void checkLoggingTables()Called whenever settings / species list changes to ensure that database table columns match the species list in use. -
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserver
New sample rate- Specified by:
setSampleRate
in interfacePamObserver
- Overrides:
setSampleRate
in classPamProcess
- Parameters:
notify
- Notify other PamObservers and PamObservables in the chain.
-
isTraining
public boolean isTraining()Flag to say that it's in the process of collecting training data.- Returns:
- true if it's in the process of collecting training data.
-
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
-
pamHasStopped
public void pamHasStopped() -
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
prepareTrainingStore
public void prepareTrainingStore() -
prepareTrainingStore
-
writeTrainingStoreData
public void writeTrainingStoreData() -
closeTrainingStore
public void closeTrainingStore() -
masterClockUpdate
public void masterClockUpdate(long timeMilliseconds, long sampleNumber) - Specified by:
masterClockUpdate
in interfacePamObserver
- Overrides:
masterClockUpdate
in classPamProcess
-
newData
- Overrides:
newData
in classPamProcess
-
runTimingFunctions
public void runTimingFunctions(long timeMilliseconds) -
resetClassifier
public void resetClassifier()Called when reprocessing offline. -
clearFragmentStore
public void clearFragmentStore(long clearTime) -
runClassification
public boolean runClassification(long timeMillis) Run the classification model.- Returns:
- true if model ran without errors.
-
getFragmentStore
-