Class ZeroCrossingStats

java.lang.Object
clickDetector.ClickClassifiers.basicSweep.ZeroCrossingStats

public class ZeroCrossingStats extends Object
Simple container for a few zero crossing parameters. Will extract these from zero crosing data sent to the constructor.
Author:
Doug Gillespie
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    Zero crossing end frequency from fit
    int
    Number of zero crossings
    double
    Zero crossing start frequency from fit.
    double
    Zero crossing sweep rate in Hz/second
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor, does nothing.
    ZeroCrossingStats(double[] zeroCrossings, double sampleRate)
    Constructor which automatically extracts parameters from some zero crossing data
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Method to return the mean time between zero crossings (in milliseconds) Mike Oswald 2015/05/17
    double
    Method to return the median time between zero crossings (in milliseconds) Mike Oswald 2015/05/17
    double
    Method to return the variance of the time between zero crossings (in milliseconds^2) Mike Oswald 2015/05/17
    double[]
    Method to return the zero crossing data Mike Oswald 2015/05/17

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • nCrossings

      public int nCrossings
      Number of zero crossings
    • sweepRate

      public double sweepRate
      Zero crossing sweep rate in Hz/second
    • startFreq

      public double startFreq
      Zero crossing start frequency from fit.
    • endFreq

      public double endFreq
      Zero 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 samples
      sampleRate - 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