Package PamguardMVC.toad
Class GenericTOADCalculator
java.lang.Object
PamguardMVC.toad.GenericTOADCalculator
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider,TOADCalculator
- Direct Known Subclasses:
 ClickTOADCalculator,WSLToadCalculator
Generic TOAD calculator which does it's best by any type of sound. Can be used when 
 specific datablocks claim not to have a TOAD Calculator. It will do it's best to make 
 sensible options based on the type of data block in use.
- Author:
 - dg50
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionPamDataBlock<?> double[][]getMaxDelays(SnapshotGeometry geometry, int channelMap, PamDataUnit dataUnit) Get a 2D array of maximum time delays between channels.getSettingsPane(Window parent, PamDataBlock<?> detectionSource) longPamDataBlock<?> getTOADInformation(List<PamDataUnit> dataUnits, double sampleRate, int channelMap, SnapshotGeometry geometry) Generate TOAD information for a whole load of data units (or just one - maybe needs a simpler list if there is only one to avoid having to make lots of lists of just one data unit !)
Note that any fancy operations that involve waveform envelopes, etc, are generally handled by the FFTOrganiser.booleanFlag to say there is a full settings dialogbooleanbooleanprotected double[][][]makeNaNArray(int n) Make a blank array for delays and estimated errors full of NaN valuesbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsetCanUseEnvelope(boolean canUseEnvelope) voidsetCanUseLeadingEdge(boolean canUseLeadingEdge) voidsetDetectorDataBlock(PamDataBlock<?> detectorDataBlock) voidsetFftDataOrganiser(FFTDataOrganiser fftDataOrganiser) voidsetTimingSource(PamDataBlock<?> timingSource) voidsetTOADSourceParams(GenericTOADSourceParams toadSourceParams) booleanshowTOADDialog(Object parentWindow) Show the dialog, 
- 
Constructor Details
- 
GenericTOADCalculator
- Parameters:
 settingsNameProvider-dataBlock- this is the detection source block and may not be where it's going to get the timing data from ...
 
 - 
 - 
Method Details
- 
setTOADSourceParams
 - 
getTOADInformation
public TOADInformation getTOADInformation(List<PamDataUnit> dataUnits, double sampleRate, int channelMap, SnapshotGeometry geometry) Generate TOAD information for a whole load of data units (or just one - maybe needs a simpler list if there is only one to avoid having to make lots of lists of just one data unit !)
Note that any fancy operations that involve waveform envelopes, etc, are generally handled by the FFTOrganiser. However, this function does need some way of filtering the FFT data for the final cross correlation...- Specified by:
 getTOADInformationin interfaceTOADCalculator- Parameters:
 channelMap- wanted channels ? Do we need this parameter ?dtaUnits- Data units, which are assumed to be of the same sound. If not, then this function should be called separately for sounds considered part of the same group.- Returns:
 
 - 
getMaxDelays
Get a 2D array of maximum time delays between channels.- Parameters:
 geometry- current geometrychannelMap- channel mapdataUnit- data unit (needed to find acquisition source)- Returns:
 - 2D array of max delays in seconds.
 
 - 
makeNaNArray
protected double[][][] makeNaNArray(int n) Make a blank array for delays and estimated errors full of NaN values- Parameters:
 n- array dimension (number of single channels)- Returns:
 - array of dimension [2][n][n]
 
 - 
getDelayMeasurementParams
 - 
getSettingsPane
- Specified by:
 getSettingsPanein interfaceTOADCalculator- Parameters:
 detectionSource-- Returns:
 - A settings pane to configure any TOAD options.
 
 - 
hasTOADDialog
public boolean hasTOADDialog()Description copied from interface:TOADCalculatorFlag to say there is a full settings dialog- Specified by:
 hasTOADDialogin interfaceTOADCalculator- Returns:
 - true if there is a dialog
 
 - 
showTOADDialog
Description copied from interface:TOADCalculatorShow the dialog,- Specified by:
 showTOADDialogin interfaceTOADCalculator- Parameters:
 parentWindow- AWT or FX parent.- Returns:
 - true if OK was pressed and everything OK
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- Returns:
 - true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
 
 - 
getDetectorDataBlock
- Returns:
 - the detectorDataBlock
 
 - 
setDetectorDataBlock
- Parameters:
 detectorDataBlock- the detectorDataBlock to set
 - 
getFftDataOrganiser
- Returns:
 - the fftDataOrganiser
 
 - 
setFftDataOrganiser
- Parameters:
 fftDataOrganiser- the fftDataOrganiser to set
 - 
isCanUseEnvelope
public boolean isCanUseEnvelope()- Returns:
 - the canUseEnvelope
 
 - 
setCanUseEnvelope
public void setCanUseEnvelope(boolean canUseEnvelope) - Parameters:
 canUseEnvelope- the canUseEnvelope to set
 - 
isCanUseLeadingEdge
public boolean isCanUseLeadingEdge()- Returns:
 - the canUseLeadingEdge
 
 - 
setCanUseLeadingEdge
public void setCanUseLeadingEdge(boolean canUseLeadingEdge) - Parameters:
 canUseLeadingEdge- the canUseLeadingEdge to set
 - 
getTimingSource
- Returns:
 - the timingSource
 
 - 
setTimingSource
- Parameters:
 timingSource- the timingSource to set
 
 -