Class SweepClassifierWorker
java.lang.Object
clickDetector.ClickClassifiers.basicSweep.SweepClassifierWorker
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 Summary
ConstructorDescriptionSweepClassifierWorker
(ClickControl clickControl, SweepClassifier sweepClassifier) -
Method Summary
Modifier and TypeMethodDescriptionstatic int[][]
createLengthData
(ClickDetection click, int nChannels, double lengthdB, int lengthSmoothing) Creates a 2D array of length data[channels][start/end]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]int[][]
getLengthData
(ClickDetection click, SweepClassifierSet scs) Creates a 2D array of length data[channels][start/end]Returns the zeroCrossingStats variable, used as an identifier in the Rocca interface.identify
(ClickDetection click) Classifiy the click based on a sequential list of clicks classifiers.void
Clear the lengthData parameter.boolean
testZeroCrossingStat
(ZeroCrossingStats zcStat, SweepClassifierSet scs) Test whether the zero crossing statistics pass sweep classifier tests
-
Constructor Details
-
SweepClassifierWorker
-
-
Method Details
-
identify
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
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
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
- clickscs
- 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 detectionnChannels
- - the number of channels to processlengthdB
- - the dB drop for peak findinglengthSmoothing
- - 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 detectionnChannels
- - the number of channels to processlengthdB
- - the dB drop for peak findinglengthSmoothing
- - the number of bins to smooth waveform for length calculationenableFFTFilter
- - true to use filterfftFilterParams
- - 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
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
-