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
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WhistleClassificationDataBlockprotected WhistleClassifierControlFields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidCalled whenever settings / species list changes to ensure that database table columns match the species list in use.voidclearFragmentStore(long clearTime) voidprotected voidbooleanFlag to say that it's in the process of collecting training data.voidmasterClockUpdate(long timeMilliseconds, long sampleNumber) voidnewData(PamObservable o, PamDataUnit arg) voidvoidpamStart()Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).voidpamStop()Stops the process.voidvoidprepareTrainingStore(String nameBit, String wavFolder) voidCalled when reprocessing offline.booleanrunClassification(long timeMillis) Called once enough fragments have accumulated.voidrunTimingFunctions(long timeMilliseconds) voidsetSampleRate(float sampleRate, boolean notify) New sample ratevoidCalled after settings read in so that correct table can be created.voidMethods 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 
- 
Field Details
- 
whistleClassifierControl
 - 
whistleClasificationDataBlock
 
 - 
 - 
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:PamObserverNew sample rate- Specified by:
 setSampleRatein interfacePamObserver- Overrides:
 setSampleRatein classPamProcess- Parameters:
 sampleRate-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:PamProcessCalled for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
 pamStartin classPamProcess
 - 
pamHasStopped
public void pamHasStopped() - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
prepareTrainingStore
public void prepareTrainingStore() - 
prepareTrainingStore
 - 
writeTrainingStoreData
public void writeTrainingStoreData() - 
closeTrainingStore
public void closeTrainingStore() - 
findSourceData
protected void findSourceData() - 
masterClockUpdate
public void masterClockUpdate(long timeMilliseconds, long sampleNumber) - Specified by:
 masterClockUpdatein interfacePamObserver- Overrides:
 masterClockUpdatein classPamProcess
 - 
newData
- Overrides:
 newDatain 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) Called once enough fragments have accumulated. Run the classification model.- Returns:
 - true if model ran without errors.
 
 - 
getFragmentStore
 - 
getWhistleClassifierControl
- Returns:
 - the whistleClassifierControl
 
 - 
getWhistleClasificationDataBlock
- Returns:
 - the whistleClasificationDataBlock
 
 
 -