CStats Class


The CStats class computes statistics or estimator values for numeric data. The data may be in the form of a Lua Table or an object of class CImage, CArray, or CMatrix. For the CImage and CMatrix classes, you can optionally specify a rectangle that bounds the data region. For a CImage, the data may have multiple channels, as for an RGB image. This class uses the same algorithms as the CImCombine class.

Some of the methods in this class have equivalent non-class functions that do not use the CStats class; see Table Functions.

Usage

Construction

Object = CStats:new()

Destruction

Object:delete()

Properties (Variables)

This class has no exposed properties.

Construction & Destruction

new

Creates a new instance of the CImage class.

delete

Deletes the CStats object from memory.

Accessing and Initializing Properties

SetImage

Attaches an image and rectangle to the CStats object for measurements. You can use this method if you want to measure only CImage objects.

(Deprecated - do not use in new scripts)

GetErrMsg

Returns the error message for a method failed.

GetStatus

Returns a non-zero error code if a method failed.

Standard Estimators

ContraMean

Computes the contra-power mean and standard deviation.

GeomMean

Computes the geometric mean and standard deviation.

Mean

Computes the mean and standard deviation.

Median

Computes the median and standard deviation.

Sdev

Computes the standard deviation.

SdevValue

Computes the standard deviation about the specified value.

YpMean

Computes the Y-power Mean and standard deviation.

Data Rejection Methods

AlphaClipMean

Computes the alpha-clipped mean and standard deviation after clipping nHigh and nLow values from the distribution.

MaxClipMean

Computes the mean value with the maximum data value discarded, plus the standard deviation.

MinClipMean

Computes the mean value with the minimum data value discarded, plus the standard deviation.

MinMaxClipMean

Computes the mean value with its minimum and maximum data values discarded, plus the standard deviation.

MtmSigmaClipMean

Computes the Modified Trimmed Mean and standard deviation.

RankClipMean

Computes the rank percentile clipped mean and the standard deviation.

SigmaClipMean

Computes the sigma clipped mean and standard deviation.

SdevClip

Computes the standard deviation after clipping the nHigh highest and nLow lowest values from the distribution.

SdevClipValue

Computes the standard deviation about a specified mean, after clipping the nHigh highest and nLow lowest values from the sample.

Characterising the Distribution

Kurtosis

Computes the kurtosis parameter for assessing the peakiness of the data distribution.

Max

Computes the maximum value and its coordinate.

MaxPix

Computes the coordinate of the maximum value.

Min

Computes the minimum value and its coordinate.

MinPix

Computes the coordinate of the minimum value.

Moment

Computs the n-th moment of the data distribution.

Rank

Computes the percentile rank value and standard deviation.

Skewness

Computes the skewness parameter for assessing the symmetry of the data distribution.

Sdev

Computes the standard deviation.

SdevValue

Computes the standard deviation about the specified value.

Related Topics

CImage class

CArray class

CMatrix class

CRect class

Script Classes