Class QACorrelatedSequence

java.lang.Object
qa.generator.distributions.QADistribution
qa.generator.distributions.QACorrelatedSequence

public class QACorrelatedSequence extends QADistribution
Make a correlated sequence of values with a given width and mean.

This can be used to generate slowly varying amplitude and ICI sequences. Works by generating the numbers from a base distribution and then filtering them at a frequency of 1/correlation using a 'correlation' order butterworth filter.

Author:
dg50
  • Constructor Details

    • QACorrelatedSequence

      public QACorrelatedSequence(boolean integrate, QADistribution baseDistribution, double mean, double width, int correlation)
      Construct a correlated sequence of values with given mean and distribution width using a gamma distribution.
      Parameters:
      integrate - integrate the values (e.g. to give times rather than inter-click intervals)
      baseDistribution - underlying distribution. This will probably need to be set up with a width (e.g. the Guassian sigma) of sqrt(correlation) times the width you want in the distribution of the output data.
      mean - mean value
      width - width of distribution
      correlation - order of the correlation
    • QACorrelatedSequence

      public QACorrelatedSequence(boolean integrate, double mean, double width, int correlation)
      Construct a correlated sequence of values with given mean and distribution width using a gamma distribution.
      Parameters:
      integrate - integrate the values (e.g. to give times rather than inter-click intervals)
      mean - mean value
      width - width of distribution
      correlation - order of the correlation
  • Method Details

    • getRange

      public double[] getRange(double nSigma)
      Description copied from class: QADistribution
      Get the range of the distrubution. How this is defined is a little nebulous, for Guassian like distributions its the mean +/- n standard deviations.
      Specified by:
      getRange in class QADistribution
      Parameters:
      nSigma - number of Standard Deviations (or equivalents).
      Returns:
      The range of values.