|
CESE 1.4.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.simulogic.dataview.analysis.ChannelStats
public class ChannelStats
Class that performes a number of statistical/analysis routines on channel(s).
Descriptive statistics methods portions copyright (C) 1999 CERN - European Organization for Nuclear Research.
Field Summary | |
---|---|
static int |
LEFT_SLOPE
Left (from the peak) slope switch for the find slope routine |
static int |
RIGHT_SLOPE
Right (from the peak) slope switch for the find slope routine |
Constructor Summary | |
---|---|
ChannelStats()
|
Method Summary | |
---|---|
static double |
autoCorrelation(double[] data,
int lag,
double mean,
double variance)
Returns the auto-correlation of a data sequence. |
static double |
correlation(double[] data1,
double standardDev1,
double[] data2,
double standardDev2)
Returns the correlation of two data sequences. |
static double |
covariance(double[] data1,
double[] data2)
Returns the covariance of two data sequences. |
static double |
durbinWatson(double[] data)
Durbin-Watson computation. |
static int |
getAbsolutePeakIndex(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the absolute p array index of a data sequence |
static double |
getAbsoluteSlope(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the maximum slope abs(delta(data)/delta(time))
index |
static double |
getCurveArea(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the area under the curve of a data sequence |
static int |
getIndexAtX(double x,
DataChannel xChannel)
Returns the index of x channel that corresponds to the given x value |
static int |
getMaxSlopeIndex(double xMin,
double xMax,
int pi,
int direction,
DataChannel xChannel,
DataChannel yChannel)
Returns the maximum slope abs(delta(data)/delta(time))
index |
static double |
getMean(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the mean of a data sequence. |
static double |
getN(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the number of data points between xMin and xMax for the given x channel / y channel pair |
static int |
getNegativePeakIndex(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the negative p array index of a data sequence |
static int |
getPositivePeakIndex(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the positive p array index of a data sequence |
static int |
getSlopeLevelIndex(double xMin,
double xMax,
int pi,
int direction,
double level,
DataChannel xChannel,
DataChannel yChannel)
Returns the index of a slope level (in %) of a data sequence |
static double |
getValueAtX(double x,
DataChannel xChannel,
DataChannel yChannel)
Returns the value of y channel that corresponds to the given x value |
static double |
getVariance(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the variance of a data sequence. |
static double |
meanDeviation(double[] data,
double mean)
Returns the mean deviation of a dataset. |
static double |
rms(int size,
double sumOfSquares)
Returns the RMS (Root-Mean-Square) of a data sequence. |
static double |
sampleVariance(double[] data,
double mean)
Returns the sample variance of a data sequence. |
static void |
standardize(double[] data,
double mean,
double standardDeviation)
Modifies a data sequence to be standardized. |
static double |
sumOfPowerDeviations(double[] data,
int k,
double c)
Returns Sum( (data[i]-c)k ) ; optimized for
common parameters like c == 0.0 and/or
k == -2 .. |
static double |
sumOfPowerDeviations(double[] data,
int k,
double c,
int from,
int to)
Returns Sum( (data[i]-c)k ) for all
i = from .. |
static double |
sumOfSquares(double[] data)
Returns the sum of squares of a data sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LEFT_SLOPE
public static final int RIGHT_SLOPE
Constructor Detail |
---|
public ChannelStats()
Method Detail |
---|
public static final int getIndexAtX(double x, DataChannel xChannel)
x
- x valuexChannel
- x channel
public static final double getValueAtX(double x, DataChannel xChannel, DataChannel yChannel)
x
- x valuexChannel
- x channelyChannel
- y channel
public static final double getN(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final double getMean(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
sum / size
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final double getVariance(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
(sumOfSquares - mean*sum) / size
with
mean = sum/size
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final int getNegativePeakIndex(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final int getPositivePeakIndex(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final int getAbsolutePeakIndex(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final double getCurveArea(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final int getMaxSlopeIndex(double xMin, double xMax, int pi, int direction, DataChannel xChannel, DataChannel yChannel)
abs(delta(data)/delta(time))
index
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xpi
- index of the peak value to start the searchdirection
- search direction (to left or to right from the peak)xChannel
- x channelyChannel
- y channel
public static final int getSlopeLevelIndex(double xMin, double xMax, int pi, int direction, double level, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xpi
- index of the peak value to start the searchdirection
- search direction (to left or to right from the peak)level
- level of the peak value to find (%)xChannel
- x channelyChannel
- y channel
public static final double getAbsoluteSlope(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
abs(delta(data)/delta(time))
index
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public static final double autoCorrelation(double[] data, int lag, double mean, double variance)
data
- data arraylag
- lagmean
- meanvariance
- variance
public static final double correlation(double[] data1, double standardDev1, double[] data2, double standardDev2)
covariance(data1,data2)/(standardDev1*standardDev2)
.
data1
- standardDev1
- data2
- standardDev2
-
public static final double covariance(double[] data1, double[] data2)
data1
- data2
-
public static final double durbinWatson(double[] data)
data
- data array
public static final double meanDeviation(double[] data, double mean)
Sum (Math.abs(data[i]-mean)) / data.size())
.
data
- mean
-
public static final double rms(int size, double sumOfSquares)
Math.sqrt(Sum( data[i]*data[i] ) / data.size())
. The RMS
of data sequence is the square-root of the mean of the squares of the
elements in the data sequence. It is a measure of the average "size" of
the elements of a data sequence.
sumOfSquares
- sumOfSquares(data) == Sum( data[i]*data[i] )
of the
data sequence.size
- the number of elements in the data sequence.
public static final double sampleVariance(double[] data, double mean)
Sum ( (data[i]-mean)^2 ) / (data.size()-1)
.
data
- mean
-
public static final void standardize(double[] data, double mean, double standardDeviation)
data[i]
as follows:
data[i] = (data[i]-mean)/standardDeviation
.
data
- mean
- standardDeviation
- public static double sumOfPowerDeviations(double[] data, int k, double c)
Sum( (data[i]-c)k )
; optimized for
common parameters like c == 0.0
and/or
k == -2 .. 4
.
data
- data arrayk
- c
-
public static double sumOfPowerDeviations(double[] data, int k, double c, int from, int to)
Sum( (data[i]-c)k )
for all
i = from .. to
; optimized for common parameters like
c == 0.0
and/or k == -2 .. 5
.
data
- data arrayk
- c
- from
- to
-
public static double sumOfSquares(double[] data)
Sum ( data[i]*data[i] )
.
data
- data array
|
CESE 1.4.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |