IshmaelDetector
Class SgramCorrProcess

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by IshmaelDetector.IshDetFnProcess
          extended by IshmaelDetector.SgramCorrProcess
All Implemented Interfaces:
Annotator, PamObserver

public class SgramCorrProcess
extends IshDetFnProcess

This implements the spectrogram correlation detector. See Mellinger and Clark, J. Acoust. Soc. Am. 107(6):3518-3529 (2000).

Author:
Dave Mellinger and Hisham Qayum

Nested Class Summary
 class SgramCorrProcess.PerChannelInfo
          Information specific to each channel.
 
Field Summary
(package private)  int binOffset
           
(package private)  double[][] kernel
           
private  double maxF
           
private  double minF
           
(package private)  SgramCorrProcess.PerChannelInfo[] perChannelInfo
           
(package private)  int savedGramHeight
           
 
Fields inherited from class IshmaelDetector.IshDetFnProcess
channel, ishDetControl, outputDataBlock
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
SgramCorrProcess(SgramCorrControl sgramCorrControl, PamDataBlock parentDataBlock)
           
 
Method Summary
 float getDetSampleRate()
           
 float getHiFreq()
           
 float getLoFreq()
           
 java.lang.String getLongName()
           
 java.lang.String getNumberName()
           
 double gramDotProd(double[][] ker, double[][] gram, int startI)
           
 double hat(double x)
          The derivative of the Gaussian function -- i.e., the 'Mexican hat' function -- with mean 0 and variance 1.
 java.lang.Class inputDataClass()
           
 void makeKernel(SgramCorrParams p, double sRate, double fRate, int gramHeight)
          Create a spectrogram correlation kernel.
 void newData(PamObservable o, PamDataUnit arg1)
           
 void pamStart()
          Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.
protected  void prepareMyParams()
           
 void renewPerChannelInfo()
           
 
Methods inherited from class IshmaelDetector.IshDetFnProcess
getChannelMap, getInputDataBlock, getOutputDataUnit, pamStop, prepareProcess, setSampleRate, setupConnections
 
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
 

Field Detail

kernel

double[][] kernel

binOffset

int binOffset

savedGramHeight

int savedGramHeight

perChannelInfo

SgramCorrProcess.PerChannelInfo[] perChannelInfo

minF

private double minF

maxF

private double maxF
Constructor Detail

SgramCorrProcess

public SgramCorrProcess(SgramCorrControl sgramCorrControl,
                        PamDataBlock parentDataBlock)
Method Detail

getLongName

public java.lang.String getLongName()
Specified by:
getLongName in class IshDetFnProcess

getNumberName

public java.lang.String getNumberName()

inputDataClass

public java.lang.Class inputDataClass()
Specified by:
inputDataClass in class IshDetFnProcess

getDetSampleRate

public float getDetSampleRate()
Specified by:
getDetSampleRate in class IshDetFnProcess
Returns:
the rate at which detection samples arrive, which for an FFT based detector is the FFT frame rate.

prepareMyParams

protected void prepareMyParams()
Overrides:
prepareMyParams in class IshDetFnProcess

makeKernel

public void makeKernel(SgramCorrParams p,
                       double sRate,
                       double fRate,
                       int gramHeight)
Create a spectrogram correlation kernel.

Parameters:
SgramCorrParams - p -- defines what the kernel is shaped like
double - sRate -- sample rate
double - fRate -- frame rate of the spectrogram (slices/s)
int - gramHeight -- in cells; equal to FFT size / 2

getHiFreq

public float getHiFreq()
Specified by:
getHiFreq in class IshDetFnProcess
Returns:
the highest frequency of the detection - e.g. sampleRate/2 or the upper bound of the detection kernel

getLoFreq

public float getLoFreq()
Specified by:
getLoFreq in class IshDetFnProcess
Returns:
the lowest frequency of the detection - e.g. 0 or the lower bound of the detection kernel

hat

public double hat(double x)
The derivative of the Gaussian function -- i.e., the 'Mexican hat' function -- with mean 0 and variance 1.


newData

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

gramDotProd

public double gramDotProd(double[][] ker,
                          double[][] gram,
                          int startI)

renewPerChannelInfo

public void renewPerChannelInfo()

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.

Overrides:
pamStart in class IshDetFnProcess