public abstract class PeakDetector extends PamProcess
Constructor and Description |
---|
PeakDetector(WhistleControl whistleControl,
WhistleDetector whistleDetector,
FFTDataBlock fftDataSource,
int groupChannels) |
Modifier and Type | Method and Description |
---|---|
int |
getDetectionChannel() |
double[] |
getEqualisationConstants() |
int |
getGroupChannels() |
PamDataBlock<PeakDataUnit> |
getPeakDataBlock() |
abstract java.lang.String |
getPeakDetectorName() |
void |
newData(PamObservable obs,
PamDataUnit newUnit) |
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 |
prepareProcess()
Called for each process before any of them receive the PamStart command
|
void |
searchForPeaks(PamObservable obs,
FFTDataUnit newDataUnit) |
void |
setGroupChannels(int groupChannels) |
void |
setSampleRate(float sampleRate,
boolean notify)
New sample rate
|
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, processNewBuoyData, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setupProcess, toString, update, updateData
public PeakDetector(WhistleControl whistleControl, WhistleDetector whistleDetector, FFTDataBlock fftDataSource, int groupChannels)
public void prepareProcess()
PamProcess
prepareProcess
in class PamProcess
public void setSampleRate(float sampleRate, boolean notify)
PamObserver
setSampleRate
in interface PamObserver
setSampleRate
in class PamProcess
notify
- Notify other PamObservers and PamObservables in the chain.public void newData(PamObservable obs, PamDataUnit newUnit)
newData
in class PamProcess
public void searchForPeaks(PamObservable obs, FFTDataUnit newDataUnit)
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.public double[] getEqualisationConstants()
public void pamStart()
PamProcess
pamStart
in class PamProcess
public void pamStop()
PamProcess
pamStop
in class PamProcess
public PamDataBlock<PeakDataUnit> getPeakDataBlock()
public int getGroupChannels()
public void setGroupChannels(int groupChannels)
public int getDetectionChannel()
public abstract java.lang.String getPeakDetectorName()