whistleDetector
Class BetterPeakDetector

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by whistleDetector.PeakDetector
          extended by whistleDetector.BasicPeakDetector
              extended by whistleDetector.BetterPeakDetector
All Implemented Interfaces:
Annotator, PamObserver

public class BetterPeakDetector
extends BasicPeakDetector


Nested Class Summary
 
Nested classes/interfaces inherited from class whistleDetector.PeakDetector
PeakDetector.PeakStatus
 
Field Summary
(package private)  double[] localAverage
           
(package private)  double[] magSquareData
           
 
Fields inherited from class whistleDetector.PeakDetector
bgndUpdate0, bgndUpdate0_1, bgndUpdate1, bgndUpdate1_1, detectionThreshold, fftDataSource, freqGrad, nrData, overThreshold, peakDataBlock, searchBin0, searchBin1, slicesAnalysed, spectrumAverage, WARMUP_SLICES, whistleControl, whistleDetector
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
BetterPeakDetector(WhistleControl whistleControl, WhistleDetector whistleDetector, FFTDataBlock fftDataSource, int groupChannels)
           
 
Method Summary
 java.lang.String getPeakDetectorName()
           
 void searchForPeaks(PamObservable obs, FFTDataUnit newDataUnit)
           
 
Methods inherited from class whistleDetector.BasicPeakDetector
getNumOutputDataBlocks
 
Methods inherited from class whistleDetector.PeakDetector
getDetectionChannel, getEqualisationConstants, getGroupChannels, getPeakDataBlock, newData, pamStart, pamStop, prepareProcess, setGroupChannels, setSampleRate
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getAnnotation, getBackendProcess, getChainPosition, getCpuPercent, getNumAnnotations, 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
 

Field Detail

localAverage

double[] localAverage

magSquareData

double[] magSquareData
Constructor Detail

BetterPeakDetector

public BetterPeakDetector(WhistleControl whistleControl,
                          WhistleDetector whistleDetector,
                          FFTDataBlock fftDataSource,
                          int groupChannels)
Method Detail

searchForPeaks

public void searchForPeaks(PamObservable obs,
                           FFTDataUnit newDataUnit)
Overrides:
searchForPeaks in class PeakDetector
Parameters:
obs - PamObservable - always a PamDataBlock
newDataUnit - 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.

getPeakDetectorName

public java.lang.String getPeakDetectorName()
Overrides:
getPeakDetectorName in class BasicPeakDetector