Class ZeroCrossingStats
java.lang.Object
clickDetector.ClickClassifiers.basicSweep.ZeroCrossingStats
Simple container for a few zero crossing parameters. 
 Will extract these from zero crosing data sent to the 
 constructor.
- Author:
 - Doug Gillespie
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleZero crossing end frequency from fitintNumber of zero crossingsdoubleZero crossing start frequency from fit.doubleZero crossing sweep rate in Hz/second - 
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, does nothing.ZeroCrossingStats(double[] zeroCrossings, double sampleRate) Constructor which automatically extracts parameters from some zero crossing data - 
Method Summary
Modifier and TypeMethodDescriptiondoubleMethod to return the mean time between zero crossings (in milliseconds) Mike Oswald 2015/05/17doubleMethod to return the median time between zero crossings (in milliseconds) Mike Oswald 2015/05/17doubleMethod to return the variance of the time between zero crossings (in milliseconds^2) Mike Oswald 2015/05/17double[]Method to return the zero crossing data Mike Oswald 2015/05/17 
- 
Field Details
- 
nCrossings
public int nCrossingsNumber of zero crossings - 
sweepRate
public double sweepRateZero crossing sweep rate in Hz/second - 
startFreq
public double startFreqZero crossing start frequency from fit. - 
endFreq
public double endFreqZero crossing end frequency from fit 
 - 
 - 
Constructor Details
- 
ZeroCrossingStats
public ZeroCrossingStats()Default constructor, does nothing. - 
ZeroCrossingStats
public ZeroCrossingStats(double[] zeroCrossings, double sampleRate) Constructor which automatically extracts parameters from some zero crossing data- Parameters:
 zeroCrossings- array of zero crossing times in samplessampleRate- sample rate
 
 - 
 - 
Method Details
- 
getZeroCrossings
public double[] getZeroCrossings()Method to return the zero crossing data Mike Oswald 2015/05/17- Returns:
 - the zeroCrossings
 
 - 
getMeanTime
public double getMeanTime()Method to return the mean time between zero crossings (in milliseconds) Mike Oswald 2015/05/17- Returns:
 - the meanTime
 
 - 
getMedianTime
public double getMedianTime()Method to return the median time between zero crossings (in milliseconds) Mike Oswald 2015/05/17- Returns:
 - the medianTime
 
 - 
getVarianceTime
public double getVarianceTime()Method to return the variance of the time between zero crossings (in milliseconds^2) Mike Oswald 2015/05/17- Returns:
 - the varianceTime
 
 
 -