Class SweepClassifier
java.lang.Object
clickDetector.ClickClassifiers.basicSweep.SweepClassifier
- All Implemented Interfaces:
ClickIdentifier
,ClickTypeProvider
,PamSettings
,SettingsNameProvider
An improvements on the BasicClickIdentifier based on work by
Gillespie and Caillat in 2009.
Click length is now measured based on the envelope waveform
rather than a measure of total energy
Have also added some parameters extracted from zero crossings
and will include better diagnostic plots and histograms.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
codeDuplicated
(SweepClassifierSet sweepClassifierSet, int ignoreRow) int
codeToListIndex
(int code) Returns the index in the list for the click type.A pane which holds specific settings for the click classifier type selected.double
getClickLength
(ClickDetection click) Returns the click length, using the times returned by the SweepClassifierWorker method getLengthData.int[]
Returns a list of the currently-defined click types / species codesgetCommonParams
(int code) Return the superclass of the click type parameters class - currently used for accessing the alarm functions.getDialogPanel
(Frame windowFrame) getMenuItem
(Frame parentFrame) int
getNextFreeCode
(int currCode) getParamsInfo
(ClickDetection click) double[]
getPeakSearchRange
(ClickDetection click) Returns the frequency search range defined for peak frequency testing 2014/08/03 MO Split the function to first check for a valid click type set.long
String[]
Get a list of species names.getSpeciesName
(int code) Get the params for the sweep classifier.getSymbol
(ClickDetection click) Get symbols for each click type.Get a list of symbols for each species corresponding to getSpeciesList.Returns the zeroCrossingStats variable, used as an identifier in the Rocca interface.identify
(ClickDetection click) Identify a click detection as a click type.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setSweepClassifierParameters
(SweepClassifierParameters sweepClassifierParameters) void
setSweepClassifierParams
(SweepClassifierParameters sweepClassifierParameters) Set the params for the sweep classifier.
-
Constructor Details
-
SweepClassifier
-
-
Method Details
-
getSweepClassifierParameters
-
setSweepClassifierParameters
-
codeToListIndex
public int codeToListIndex(int code) Description copied from interface:ClickTypeProvider
Returns the index in the list for the click type.- Specified by:
codeToListIndex
in interfaceClickTypeProvider
- Parameters:
code
- - the click type code- Returns:
- the index.
-
getMenuItem
- Specified by:
getMenuItem
in interfaceClickIdentifier
-
getSpeciesList
Description copied from interface:ClickTypeProvider
Get a list of species names.- Specified by:
getSpeciesList
in interfaceClickTypeProvider
- Returns:
- list speces names.
-
getCodeList
public int[] getCodeList()Returns a list of the currently-defined click types / species codes- Specified by:
getCodeList
in interfaceClickTypeProvider
- Returns:
- int array with the codes
-
getSymbol
- Specified by:
getSymbol
in interfaceClickIdentifier
-
getCommonParams
Return the superclass of the click type parameters class - currently used for accessing the alarm functions. Subclasses include ClickTypeParams and SweepClassifierSet.- Specified by:
getCommonParams
in interfaceClickIdentifier
- Parameters:
code
- the click type to check- Returns:
- the ClickTypeCommonParams object related to the species code
-
getSymbols
Description copied from interface:ClickIdentifier
Get symbols for each click type.- Specified by:
getSymbols
in interfaceClickIdentifier
- Returns:
- the symbols for type.
-
getDialogPanel
- Specified by:
getDialogPanel
in interfaceClickIdentifier
-
getSpeciesName
- Specified by:
getSpeciesName
in interfaceClickIdentifier
-
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
-
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
-
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
-
getClickDetector
- Returns:
- the clickDetector
-
getNextFreeCode
public int getNextFreeCode(int currCode) -
codeDuplicated
-
getSweepClassifierParams
Get the params for the sweep classifier.- Returns:
- the sweep classifier params.
-
setSweepClassifierParams
Set the params for the sweep classifier. -
identify
Description copied from interface:ClickIdentifier
Identify a click detection as a click type.- Specified by:
identify
in interfaceClickIdentifier
- Parameters:
click
- - the click to identfy.- Returns:
- the click to
-
getParamsInfo
- Specified by:
getParamsInfo
in interfaceClickIdentifier
-
getZeroCrossingStats
Returns the zeroCrossingStats variable, used as an identifier in the Rocca interface. 2014/07/25 MO- Specified by:
getZeroCrossingStats
in interfaceClickIdentifier
- Parameters:
click
- the Click Detection- Returns:
- the ZeroCrossingStats variable
-
getPeakSearchRange
Returns the frequency search range defined for peak frequency testing 2014/08/03 MO Split the function to first check for a valid click type set. In the case of an unclassified click, findClicktypeSet(click.getClickType()) returns a null and causes a NullPointerException error. serialVersionUID = 21 2015/05/31- Specified by:
getPeakSearchRange
in interfaceClickIdentifier
- Parameters:
click
- the Click Detection- Returns:
- the min/max of the search range
-
getClickLength
Returns the click length, using the times returned by the SweepClassifierWorker method getLengthData. If there is an error, a 0 is returned. Note that this defaults to the first channel. 2014/10/13 MO- Specified by:
getClickLength
in interfaceClickIdentifier
- Parameters:
click
- the current click detection- Returns:
- the duration of the click, in seconds
-
getClassifierPane
Description copied from interface:ClickIdentifier
A pane which holds specific settings for the click classifier type selected.- Specified by:
getClassifierPane
in interfaceClickIdentifier
- Returns:
- the classifier pane
-
getSymbolsData
Description copied from interface:ClickTypeProvider
Get a list of symbols for each species corresponding to getSpeciesList.- Specified by:
getSymbolsData
in interfaceClickTypeProvider
- Returns:
- list of species symbols.
-