KernelSmoothing
Class KernelSmoothingProcess

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by KernelSmoothing.KernelSmoothingProcess
All Implemented Interfaces:
Annotator, PamObserver

public class KernelSmoothingProcess
extends PamProcess

Author:
Doug Gillespie Class to smooth out a spectrogram using a Gaussian smoothing kernel Currently fixed to be 3 by 3, but could have others in the future. 29 October, 2008, Added phase information back into smoothed output so that whistle detector can use the smoothed data to estimate bearings to detected whistles

Nested Class Summary
private  class KernelSmoothingProcess.SmoothingChannelProcess
           
 
Field Summary
private  double[][] kernel
           
private  int kernelSize
           
(package private)  FFTDataBlock outputData
           
(package private)  KernelSmoothingProcess.SmoothingChannelProcess[] smoothingChannelProcessList
           
(package private)  KernelSmoothingControl smoothingControl
           
(package private)  FFTDataBlock sourceData
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
KernelSmoothingProcess(KernelSmoothingControl smoothingControl)
           
 
Method Summary
 Annotation getAnnotation(PamDataBlock pamDataBlock, int annotation)
          Get an Annotation
 int getFftHop()
           
 int getFftLength()
           
 int getNumAnnotations(PamDataBlock pamDataBlock)
           
 void newData(PamObservable o, PamDataUnit arg)
           
 void noteNewSettings()
           
 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 setParentDataBlock(PamDataBlock newParentDataBlock)
          Set a parent data block with the default options of rethreading if set
 void setupProcess()
          called for every process once the systemmodel has been created.
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getBackendProcess, getChainPosition, getCpuPercent, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, notifyModelChanged, prepareProcess, relMillisecondsToSamples, relSamplesToMilliseconds, removeObservable, removeOutputDatablock, saveViewerData, setBackendProcess, setCanMultiThread, setParentDataBlock, setProcessName, setSampleRate, toString, update, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kernel

private double[][] kernel

kernelSize

private int kernelSize

sourceData

FFTDataBlock sourceData

outputData

FFTDataBlock outputData

smoothingControl

KernelSmoothingControl smoothingControl

smoothingChannelProcessList

KernelSmoothingProcess.SmoothingChannelProcess[] smoothingChannelProcessList
Constructor Detail

KernelSmoothingProcess

public KernelSmoothingProcess(KernelSmoothingControl smoothingControl)
Method Detail

noteNewSettings

public void noteNewSettings()
Specified by:
noteNewSettings in interface PamObserver
Overrides:
noteNewSettings in class PamProcess

setParentDataBlock

public void setParentDataBlock(PamDataBlock newParentDataBlock)
Description copied from class: PamProcess
Set a parent data block with the default options of rethreading if set

Overrides:
setParentDataBlock in class PamProcess
Parameters:
newParentDataBlock - source data block.

setupProcess

public void setupProcess()
Description copied from class: PamProcess
called for every process once the systemmodel has been created. this is a good time to check out and find input data blocks and similar tasks.

Overrides:
setupProcess in class PamProcess

newData

public void newData(PamObservable o,
                    PamDataUnit arg)
Overrides:
newData in class PamProcess

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

getFftHop

public int getFftHop()

getFftLength

public int getFftLength()

getAnnotation

public Annotation getAnnotation(PamDataBlock pamDataBlock,
                                int annotation)
Description copied from interface: Annotator
Get an Annotation

Specified by:
getAnnotation in interface Annotator
Overrides:
getAnnotation in class PamProcess
Parameters:
pamDataBlock - Annotated datablock
annotation - annotation number
Returns:
Annotation

getNumAnnotations

public int getNumAnnotations(PamDataBlock pamDataBlock)
Specified by:
getNumAnnotations in interface Annotator
Overrides:
getNumAnnotations in class PamProcess
Parameters:
pamDataBlock - Annotated datablock
Returns:
the number of annotations