Package qa.generator.distributions
Class QACorrelatedSequence
java.lang.Object
qa.generator.distributions.QADistribution
qa.generator.distributions.QACorrelatedSequence
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 Summary
ConstructorDescriptionQACorrelatedSequence
(boolean integrate, double mean, double width, int correlation) Construct a correlated sequence of values with given mean and distribution width using a gamma distribution.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. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getRange
(double nSigma) Get the range of the distrubution.Methods inherited from class qa.generator.distributions.QADistribution
getRange, getValues, isIntegrate, isSort, setIntegrate, setSort
-
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 valuewidth
- width of distributioncorrelation
- 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 valuewidth
- width of distributioncorrelation
- 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 classQADistribution
- Parameters:
nSigma
- number of Standard Deviations (or equivalents).- Returns:
- The range of values.
-