Class BasicClickIdentifier
java.lang.Object
clickDetector.ClickClassifiers.basic.BasicClickIdentifier
- All Implemented Interfaces:
 ClickIdentifier,ClickTypeProvider,PamSettings,SettingsNameProvider
- Author:
 - Doug Gillespie
         
Identifies individual clicks to type (e.g. porpoise, beaked whale, etc) using methods developed by Marjolaine Caillat, SMRU, in 2005.
Classification is based on the following:
- Relative energy in two different frequency bands
 - Peak spectral frequency in the click
 - The width of the main frequency peak
 - The duration of the click
 
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintcodeToListIndex(int code) Returns the index in the list for the click type.A pane which holds specific settings for the click classifier type selected.doublegetClickLength(ClickDetection click) Returns the click length for the sweep classifier, 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) Get ID params for the basic click identifier.getMenuItem(Frame parentFrame) Returns a JMenuItem which will launch a dialog for defining different click types.getParamsInfo(ClickDetection click) double[]getPeakSearchRange(ClickDetection click) method used to get peak frequency search range from sweep identifier.longString[]Get a list of species names.getSpeciesName(int code) getSymbol(ClickDetection click) Get symbols for each click type.Get a list of symbols for each species corresponding to getSpeciesList.method used to get zero crossing data from sweep identifier.booleanQuick check to see if any click types have been definedidentify(ClickDetection click) Identifies a click.static SymbolData[]pamSymbol2SymbolData(PamSymbol[] pamSymbols) Convert an aray of pam symbols to an array of symbol data.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsetIdParameters(BasicClickIdParameters idParameters) Set the ID params for the basic click classifier. 
- 
Field Details
- 
idParameters
 
 - 
 - 
Constructor Details
- 
BasicClickIdentifier
- Parameters:
 clickDetector-
 
 - 
 - 
Method Details
- 
getMenuItem
Returns a JMenuItem which will launch a dialog for defining different click types.- Specified by:
 getMenuItemin interfaceClickIdentifier
 - 
haveClickTypes
public boolean haveClickTypes()Quick check to see if any click types have been defined- Returns:
 - true if click types are defined
 
 - 
identify
Identifies a click.- Specified by:
 identifyin interfaceClickIdentifier- Parameters:
 click- A click from the detector- Returns:
 - the unique number code identifying the click type.
 
 - 
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
 
 - 
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
 
 - 
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
 
 - 
getSymbol
- Specified by:
 getSymbolin interfaceClickIdentifier- Returns:
 - the PamSymbol associated with a particular click
 
 - 
getSpeciesList
Description copied from interface:ClickTypeProviderGet a list of species names.- Specified by:
 getSpeciesListin interfaceClickTypeProvider- Returns:
 - list speces names.
 
 - 
getSymbols
Description copied from interface:ClickIdentifierGet symbols for each click type.- Specified by:
 getSymbolsin interfaceClickIdentifier- Returns:
 - the symbols for type.
 
 - 
codeToListIndex
public int codeToListIndex(int code) Description copied from interface:ClickTypeProviderReturns the index in the list for the click type.- Specified by:
 codeToListIndexin interfaceClickTypeProvider- Parameters:
 code- - the click type code- Returns:
 - the index.
 
 - 
getSpeciesName
- Specified by:
 getSpeciesNamein interfaceClickIdentifier
 - 
getDialogPanel
- Specified by:
 getDialogPanelin interfaceClickIdentifier
 - 
getParamsInfo
- Specified by:
 getParamsInfoin interfaceClickIdentifier
 - 
getCodeList
public int[] getCodeList()Returns a list of the currently-defined click types / species codes- Specified by:
 getCodeListin interfaceClickTypeProvider- Returns:
 - int array with the codes
 
 - 
getCommonParams
Return the superclass of the click type parameters class - currently used for accessing the alarm functions. Subclasses include ClickTypeParams and SweepClassifierSet.- Specified by:
 getCommonParamsin interfaceClickIdentifier- Parameters:
 code- the click type to check- Returns:
 - the ClickTypeCommonParams object related to the species code
 
 - 
getZeroCrossingStats
method used to get zero crossing data from sweep identifier. Return null for basic identifier 2014/07/25 MO- Specified by:
 getZeroCrossingStatsin interfaceClickIdentifier- Parameters:
 click- the clickDetection to examine- Returns:
 
 - 
getPeakSearchRange
method used to get peak frequency search range from sweep identifier. Return null for basic identifier 2014/08/03 MO- Specified by:
 getPeakSearchRangein interfaceClickIdentifier- Parameters:
 click- the clickDetection to examine- Returns:
 
 - 
getClickLength
Returns the click length for the sweep classifier, using the times returned by the SweepClassifierWorker method getLengthData. In the case of a different classifier, a 0 is returned 2014/10/13 MO- Specified by:
 getClickLengthin interfaceClickIdentifier- Parameters:
 click- the current click detection- Returns:
 - the click duration, in seconds
 
 - 
getIdParameters
Get ID params for the basic click identifier.- Returns:
 - the params for basic clicks classifier.
 
 - 
setIdParameters
Set the ID params for the basic click classifier.- Parameters:
 idParameters-
 - 
getClassifierPane
Description copied from interface:ClickIdentifierA pane which holds specific settings for the click classifier type selected.- Specified by:
 getClassifierPanein interfaceClickIdentifier- Returns:
 - the classifier pane
 
 - 
pamSymbol2SymbolData
Convert an aray of pam symbols to an array of symbol data.- Parameters:
 pamSymbols- - the pam symbol array to convert.- Returns:
 - an array of symbol data correpsondiong to the pam symbols.
 
 - 
getSymbolsData
Description copied from interface:ClickTypeProviderGet a list of symbols for each species corresponding to getSpeciesList.- Specified by:
 getSymbolsDatain interfaceClickTypeProvider- Returns:
 - list of species symbols.
 
 
 -