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
-
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) long
PamDataBlock<?>
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.boolean
Flag to say there is a full settings dialogboolean
boolean
boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setCanUseEnvelope
(boolean canUseEnvelope) void
setCanUseLeadingEdge
(boolean canUseLeadingEdge) void
setDetectorDataBlock
(PamDataBlock<?> detectorDataBlock) void
setFftDataOrganiser
(FFTDataOrganiser fftDataOrganiser) void
setTimingSource
(PamDataBlock<?> timingSource) void
setTOADSourceParams
(GenericTOADSourceParams toadSourceParams) boolean
showTOADDialog
(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:
getTOADInformation
in 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.
-
getDelayMeasurementParams
-
getSettingsPane
- Specified by:
getSettingsPane
in interfaceTOADCalculator
- Returns:
- A settings pane to configure any TOAD options.
-
hasTOADDialog
public boolean hasTOADDialog()Description copied from interface:TOADCalculator
Flag to say there is a full settings dialog- Specified by:
hasTOADDialog
in interfaceTOADCalculator
- Returns:
- true if there is a dialog
-
showTOADDialog
Description copied from interface:TOADCalculator
Show the dialog,- Specified by:
showTOADDialog
in interfaceTOADCalculator
- Parameters:
parentWindow
- AWT or FX parent.- Returns:
- true if OK was pressed and everything OK
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-