whistleDetector
Class PeakDetector
java.lang.Object
PamguardMVC.PamProcess
whistleDetector.PeakDetector
- All Implemented Interfaces:
- Annotator, PamObserver
- Direct Known Subclasses:
- BasicPeakDetector
public abstract class PeakDetector
- extends PamProcess
- Author:
- Doug Gillespie
Detects whistle peaks from FFT data
| Methods inherited from class PamguardMVC.PamProcess |
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getAnnotation, getBackendProcess, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, relMillisecondsToSamples, relSamplesToMilliseconds, removeObservable, removeOutputDatablock, saveViewerData, setBackendProcess, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setupProcess, toString, update, updateData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
spectrumAverage
double[] spectrumAverage
overThreshold
boolean[] overThreshold
nrData
protected double[] nrData
freqGrad
double[] freqGrad
searchBin0
protected int searchBin0
searchBin1
protected int searchBin1
whistleDetector
WhistleDetector whistleDetector
fftDataSource
FFTDataBlock fftDataSource
peakDataBlock
PamDataBlock<PeakDataUnit> peakDataBlock
whistleControl
WhistleControl whistleControl
groupChannels
private int groupChannels
detectionChannel
private int detectionChannel
slicesAnalysed
int slicesAnalysed
detectionThreshold
protected double detectionThreshold
bgndUpdate0
protected double bgndUpdate0
bgndUpdate0_1
protected double bgndUpdate0_1
bgndUpdate1
protected double bgndUpdate1
bgndUpdate1_1
protected double bgndUpdate1_1
WARMUP_SLICES
protected static final int WARMUP_SLICES
- See Also:
- Constant Field Values
PeakDetector
public PeakDetector(WhistleControl whistleControl,
WhistleDetector whistleDetector,
FFTDataBlock fftDataSource,
int groupChannels)
prepareProcess
public void prepareProcess()
- Description copied from class:
PamProcess
- Called for each process before any of them receive the PamStart command
- Overrides:
prepareProcess in class PamProcess
setSampleRate
public void setSampleRate(float sampleRate,
boolean notify)
- Description copied from interface:
PamObserver
- New sample rate
- Specified by:
setSampleRate in interface PamObserver- Overrides:
setSampleRate in class PamProcess
notify - Notify other PamObservers and PamObservables in the chain.
newData
public void newData(PamObservable obs,
PamDataUnit newUnit)
- Overrides:
newData in class PamProcess
searchForPeaks
public void searchForPeaks(PamObservable obs,
FFTDataUnit newDataUnit)
- Parameters:
obs - PamObservable - always a PamDataBlocknewDataUnit - The latest PamDataUnit added to the PamDataBlock
Takes a new block of FFT data and creates a series of peaks based on
parts of the sectrum being above some threshold. Rather than add
individual peaks to the output data block, the peaks are stored in a new
ArrayList and the array list is added to the output block.
This reduces the amount of traffic to the output blocks listeners and
will make it easier for the process linking the peaks to navigate between
successive peak slices.
getEqualisationConstants
public double[] getEqualisationConstants()
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 class PamProcess
pamStop
public void pamStop()
- Description copied from class:
PamProcess
- Stops the process.
- Specified by:
pamStop in class PamProcess
getPeakDataBlock
public PamDataBlock<PeakDataUnit> getPeakDataBlock()
getGroupChannels
public int getGroupChannels()
setGroupChannels
public void setGroupChannels(int groupChannels)
getDetectionChannel
public int getDetectionChannel()
getPeakDetectorName
public abstract java.lang.String getPeakDetectorName()