Package whistleDetector
Class WhistleDetector
java.lang.Object
PamguardMVC.PamProcess
whistleDetector.WhistleDetector
- All Implemented Interfaces:
 PamObserver,ProcessAnnotator
- Author:
 - Doug Gillespie
         
Re-implementation of the IFAW 2003 whistle detector
Uses the PeakDetector and WhistleLinker to do the actual work
 
- 
Field Summary
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondoublebinsToHz(int nFrequencyBins) Convert a number of frequency bins in the spectrgram matrix to a frequency in Hz.doublebinsToSeconds(int nTimeBins) Convert a number of time bins in the spectrgram matris to a a time in secondsvoidCalled from the PamControlled unit when a PamControlled unit is removed from the model.intintlonginthzToBins(double frequency) voidnewData(PamObservable obs, PamDataUnit obj) voidpamStart()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.voidCalled for each process before any of them receive the PamStart commandvoidsetSampleRate(float sampleRate, boolean notify) New sample rateMethods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, 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, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, 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
- 
WhistleDetector
- Parameters:
 whistleControl- reference ot a WhistleControl PamControlledUnit pamguard plug-in
 
 - 
 - 
Method Details
- 
destroyProcess
public void destroyProcess()Description copied from class:PamProcessCalled from the PamControlled unit when a PamControlled unit is removed from the model. Offers an opportunity to disconnect individual processed from the rest of the model. May be necessary to override to clean up some processes.- Overrides:
 destroyProcessin classPamProcess
 - 
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.
 - 
newData
- Overrides:
 newDatain classPamProcess
 - 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Overrides:
 getRequiredDataHistoryin classPamProcess- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 - 
prepareProcess
public void prepareProcess()Description copied from class:PamProcessCalled for each process before any of them receive the PamStart command- Overrides:
 prepareProcessin classPamProcess
 - 
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
 - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
binsToHz
public double binsToHz(int nFrequencyBins) Convert a number of frequency bins in the spectrgram matrix to a frequency in Hz.- Parameters:
 nFrequencyBins- number of frequency bins- Returns:
 - frequency in Hz
 
 - 
hzToBins
public int hzToBins(double frequency)  - 
binsToSeconds
public double binsToSeconds(int nTimeBins) Convert a number of time bins in the spectrgram matris to a a time in seconds- Parameters:
 nTimeBins- number of time bins- Returns:
 - time in seconds
 
 - 
getFftHop
public int getFftHop() - 
getFftLength
public int getFftLength() - 
getWhistleControl
 - 
getFftDataBlock
 
 -