Class SweepClassifierWorker

java.lang.Object
clickDetector.ClickClassifiers.basicSweep.SweepClassifierWorker

public class SweepClassifierWorker extends Object
Do the actual work of the click seep classifier Separated into a separate class for clarity and to keep Separate from all the control functions.
Author:
Doug Gillespie
  • Constructor Details

  • Method Details

    • identify

      public ClickIdInformation identify(ClickDetection click)
      Classifiy the click based on a sequential list of clicks classifiers. The click is identified as the first sweep classifier it passes in the list. If checkAllClassifiers is enabled in the sweep params then the click is tested by all classiifers and a list of passed classifiers is saved in the ClickIdInformation.
      Parameters:
      click - - the click to test
      Returns:
      classification informaiton.
    • testZeroCrossingStat

      public boolean testZeroCrossingStat(ZeroCrossingStats zcStat, SweepClassifierSet scs)
      Test whether the zero crossing statistics pass sweep classifier tests
      Parameters:
      zcStat - - the zero crossings statistics.
      scs - - sweep classifier parameters.
      Returns:
      true if passed.
    • getLengthData

      public int[][] getLengthData(ClickDetection click, SweepClassifierSet scs)
      Creates a 2D array of length data[channels][start/end]

      Will only call getLengthData if it really has to. really has to.

      2017/11/24 added synchronized keyword

      Parameters:
      click - click
      scs - classifier settings
    • createLengthData

      public static int[][] createLengthData(ClickDetection click, int nChannels, double lengthdB, int lengthSmoothing)
      Creates a 2D array of length data[channels][start/end]
      Parameters:
      click - - the click detection
      nChannels - - the number of channels to process
      lengthdB - - the dB drop for peak finding
      lengthSmoothing - - the number of bins to smooth waveform for length calculation
      Returns:
      2D array of length compesnated click bin positions to use for modified measurements.
    • createLengthData

      public static int[][] createLengthData(ClickDetection click, int nChannels, double lengthdB, int lengthSmoothing, boolean enableFFTFilter, FFTFilterParams fftFilterParams)
      Creates a 2D array of length data[channels][start/end]
      Parameters:
      click - - the click detection
      nChannels - - the number of channels to process
      lengthdB - - the dB drop for peak finding
      lengthSmoothing - - the number of bins to smooth waveform for length calculation
      enableFFTFilter - - true to use filter
      fftFilterParams - - the filter params- this is null if no filter is used.
      Returns:
      2d array of length compensated click bin positions to use for modified measurements.
    • getZeroCrossingStats

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

      public void resetLengthData()
      Clear the lengthData parameter. Required when Rocca runs multiple analysis on the same clicks. Once the length data is calculated, it's no longer recalculated even when a different click is being analyzed. added by MO 2015/06/04 2017/11/24 added synchronized keyword