Class SweepClassifier

java.lang.Object
clickDetector.ClickClassifiers.basicSweep.SweepClassifier
All Implemented Interfaces:
ClickIdentifier, ClickTypeProvider, PamSettings, SettingsNameProvider

public class SweepClassifier extends Object implements ClickIdentifier, PamSettings
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 Details Link icon

    • SweepClassifier Link icon

      public SweepClassifier(ClickControl clickControl)
  • Method Details Link icon

    • getSweepClassifierParameters Link icon

      public SweepClassifierParameters getSweepClassifierParameters()
    • setSweepClassifierParameters Link icon

      public void setSweepClassifierParameters(SweepClassifierParameters sweepClassifierParameters)
    • codeToListIndex Link icon

      public int codeToListIndex(int code)
      Description copied from interface: ClickTypeProvider
      Returns the index in the list for the click type.
      Specified by:
      codeToListIndex in interface ClickTypeProvider
      Parameters:
      code - - the click type code
      Returns:
      the index.
    • getMenuItem Link icon

      public JMenuItem getMenuItem(Frame parentFrame)
      Specified by:
      getMenuItem in interface ClickIdentifier
    • getSpeciesList Link icon

      public String[] getSpeciesList()
      Description copied from interface: ClickTypeProvider
      Get a list of species names.
      Specified by:
      getSpeciesList in interface ClickTypeProvider
      Returns:
      list speces names.
    • getCodeList Link icon

      public int[] getCodeList()
      Returns a list of the currently-defined click types / species codes
      Specified by:
      getCodeList in interface ClickTypeProvider
      Returns:
      int array with the codes
    • getSymbol Link icon

      public PamSymbol getSymbol(ClickDetection click)
      Specified by:
      getSymbol in interface ClickIdentifier
    • getCommonParams Link icon

      public ClickTypeCommonParams getCommonParams(int code)
      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 interface ClickIdentifier
      Parameters:
      code - the click type to check
      Returns:
      the ClickTypeCommonParams object related to the species code
    • getSymbols Link icon

      public PamSymbol[] getSymbols()
      Description copied from interface: ClickIdentifier
      Get symbols for each click type.
      Specified by:
      getSymbols in interface ClickIdentifier
      Returns:
      the symbols for type.
    • getDialogPanel Link icon

      public ClassifyDialogPanel getDialogPanel(Frame windowFrame)
      Specified by:
      getDialogPanel in interface ClickIdentifier
    • getSpeciesName Link icon

      public String getSpeciesName(int code)
      Specified by:
      getSpeciesName in interface ClickIdentifier
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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 Link icon

      public ClickDetector getClickDetector()
      Returns:
      the clickDetector
    • getNextFreeCode Link icon

      public int getNextFreeCode(int currCode)
    • codeDuplicated Link icon

      public boolean codeDuplicated(SweepClassifierSet sweepClassifierSet, int ignoreRow)
    • getSweepClassifierParams Link icon

      public SweepClassifierParameters getSweepClassifierParams()
      Get the params for the sweep classifier.
      Returns:
      the sweep classifier params.
    • setSweepClassifierParams Link icon

      public void setSweepClassifierParams(SweepClassifierParameters sweepClassifierParameters)
      Set the params for the sweep classifier.
    • identify Link icon

      public ClickIdInformation identify(ClickDetection click)
      Description copied from interface: ClickIdentifier
      Identify a click detection as a click type.
      Specified by:
      identify in interface ClickIdentifier
      Parameters:
      click - - the click to identfy.
      Returns:
      the click to
    • getParamsInfo Link icon

      public String getParamsInfo(ClickDetection click)
      Specified by:
      getParamsInfo in interface ClickIdentifier
    • getZeroCrossingStats Link icon

      public ZeroCrossingStats[] getZeroCrossingStats(ClickDetection click)
      Returns the zeroCrossingStats variable, used as an identifier in the Rocca interface. 2014/07/25 MO
      Specified by:
      getZeroCrossingStats in interface ClickIdentifier
      Parameters:
      click - the Click Detection
      Returns:
      the ZeroCrossingStats variable
    • getPeakSearchRange Link icon

      public 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. 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 interface ClickIdentifier
      Parameters:
      click - the Click Detection
      Returns:
      the min/max of the search range
    • getClickLength Link icon

      public double getClickLength(ClickDetection click)
      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 interface ClickIdentifier
      Parameters:
      click - the current click detection
      Returns:
      the duration of the click, in seconds
    • getClassifierPane Link icon

      public SweepClassifierPaneFX getClassifierPane()
      Description copied from interface: ClickIdentifier
      A pane which holds specific settings for the click classifier type selected.
      Specified by:
      getClassifierPane in interface ClickIdentifier
      Returns:
      the classifier pane
    • getSymbolsData Link icon

      public SymbolData[] getSymbolsData()
      Description copied from interface: ClickTypeProvider
      Get a list of symbols for each species corresponding to getSpeciesList.
      Specified by:
      getSymbolsData in interface ClickTypeProvider
      Returns:
      list of species symbols.