spectrogramNoiseReduction
Class SpectrogramNoiseProcess

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by spectrogramNoiseReduction.SpectrogramNoiseProcess
All Implemented Interfaces:
Annotator, PamObserver

public class SpectrogramNoiseProcess
extends PamProcess


Field Summary
private  Complex[][] delayedInputData
           
private  java.util.Vector<Annotation> fftAnnotations
           
private  java.util.ArrayList<SpecNoiseMethod> methods
           
private  SpectrogramNoiseSettings noiseSettings
           
protected  FFTDataBlock outputData
           
protected  FFTDataBlock sourceData
           
private  SpectrogramThreshold thresholdMethod
           
private  int totalDelay
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
SpectrogramNoiseProcess(PamControlledUnit pamControlledUnit)
           
 
Method Summary
 boolean fillXMLParameters(org.w3c.dom.Document doc, org.w3c.dom.Element paramsEl)
          Add PamProcess specific XML data.
 Annotation getAnnotation(PamDataBlock pamDataBlock, int annotation)
          Get an Annotation
 java.util.ArrayList<SpecNoiseMethod> getMethods()
           
 SpectrogramNoiseSettings getNoiseSettings()
           
 int getNumAnnotations(PamDataBlock pamDataBlock)
           
 int getOfflineData(PamDataBlock dataBlock, PamObserver endUser, long startMillis, long endMillis)
          Request offline data.
 FFTDataBlock getOutputDataBlock()
           
 void makeAnnotations()
           
 void newData(PamObservable o, PamDataUnit arg)
           
 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 setNoiseSettings(SpectrogramNoiseSettings noiseSettings)
           
 void setParentDataBlock(FFTDataBlock fftDataBlock)
           
 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, getAncestorDataBlock, getBackendProcess, getChainPosition, getCpuPercent, getNumOutputDataBlocks, getObserverName, getObserverObject, 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, setSampleRate, toString, update, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceData

protected FFTDataBlock sourceData

outputData

protected FFTDataBlock outputData

methods

private java.util.ArrayList<SpecNoiseMethod> methods

noiseSettings

private SpectrogramNoiseSettings noiseSettings

thresholdMethod

private SpectrogramThreshold thresholdMethod

totalDelay

private int totalDelay

delayedInputData

private Complex[][] delayedInputData

fftAnnotations

private java.util.Vector<Annotation> fftAnnotations
Constructor Detail

SpectrogramNoiseProcess

public SpectrogramNoiseProcess(PamControlledUnit pamControlledUnit)
Method Detail

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

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

getNoiseSettings

public SpectrogramNoiseSettings getNoiseSettings()

setNoiseSettings

public void setNoiseSettings(SpectrogramNoiseSettings noiseSettings)

getMethods

public java.util.ArrayList<SpecNoiseMethod> getMethods()

setParentDataBlock

public void setParentDataBlock(FFTDataBlock fftDataBlock)

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

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

makeAnnotations

public void makeAnnotations()

getOutputDataBlock

public FFTDataBlock getOutputDataBlock()
Returns:
the outputData

getOfflineData

public int getOfflineData(PamDataBlock dataBlock,
                          PamObserver endUser,
                          long startMillis,
                          long endMillis)
Description copied from class: PamProcess
Request offline data.

This will be called from a PamDatablock in offline viewer mode from requestOfflineData(PamObserver observer, long startMillis, long endMillis).

this is used to request data from upstream processes, e.g. o get raw data to turn into FFT data units to go to the spectrogram display (possible going via decimators and any other processes before spitting out the right data.

Overrides:
getOfflineData in class PamProcess
Parameters:
dataBlock - data block making the request.
endUser - observer which made the original data request.
startMillis - start time in milliseconds
endMillis - end time in milliseconds.
Returns:
true if request can be satisfied (or partially satisfied).

fillXMLParameters

public boolean fillXMLParameters(org.w3c.dom.Document doc,
                                 org.w3c.dom.Element paramsEl)
Description copied from class: PamProcess
Add PamProcess specific XML data.

Generally, this will not be used since most of a modules parameters will have been set in the ControlledUnit which has a similar function.

Overrides:
fillXMLParameters in class PamProcess
Returns: