CStats Class Description


The CStats class computes statistics for numeric data. The data may be in the form of a 1-dimensional array (simple lua array) or a class object of type CImage or CPlotView. Using a CImage, you can optionally specify a rectangle that bounds the data region. Here are some details for the class objects:

bullet.gif    For a CImage object, the data may have multiple channels, as for an RGB image.

bullet.gif    For a CPlotView object, all plot series are combined into a single data set.

This class uses the same algorithms as the CImCombine class. Several of the estimators, like Mean and others, have two forms that return only the estimator or the estimator and stantard deviation. Similarly, the Min and Max methods have two forms that return the value or the value, x, and y coordinates.

Some of the CStats class methods have counterparts that do not require using the CStats class directly; see Table and Array Functions.

Usage

Construction

Object = new_stats()

Object = CStats:new()

Destruction

Object:delete()

Creation - Non-class Functions

This function is normally used to create a new CStats object as an alternative to the class-based new method.

new_stats

Global function that creates a new CStats object.

Construction and Destruction - Class Methods

new

Creates a new instance of the CImage class.

delete

Deletes the instance of the CImage object and deletes its image from memory.

Operations

AlphaClipMean and AlphaClipMeanSdev

Computes the alpha-clipped mean and standard deviation.

ContraMean and ContraMeanSdev

Computes the contra-power mean and standard deviation.

GeometricMean and GeometricMeanSdev

Computes the geometric mean and standard deviation.

Kurtosis

Computes the kurtosis of the data set.

Max, MaxXy

Computes the maximum value and its coordinates.

MaxClipMean and MaxClipMeanSdev

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

MaxPix

Computes the coordinate of the maximum value.

Mean and MeanSdev

Computes the mean and standard deviation.

Median and MedianSdev

Computes the median and standard deviation.

Min and MinXy

Computes the minimum value and its coordinates.

MinClipMean and MinClipMeanSdev

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

MinMaxClipMean and MinMaxClipMeanSdev

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

MinPix

Computes the coordinate of the minimum value.

MtmSigmaClipMean and MtmSigmaClipMeanSdev

Computes the Modified Trimmed Mean and standard deviation.

RankClipMean and RankClipMeanSdev

Computes the rank percentile clipped mean and the standard deviation.

Rank and RankSdev

Computes the percentile rank value and standard deviation.

Sdev

Computes the standard deviation.

SdevValue

Computes the standard deviation about a specified mean value.

SigmaClipMean and SigmaClipMeanSdev

Computes the sigma clipped mean and standard deviation.

Skewness

Computes the skewness of the data set.

Stats

Computes 8 basic statistics and returns them as an indexed table with 8 elements, [1] through [8].

StatsStr

Computes 8 basic statistics and returns them as a table of names, like nMean, nSdev, etc..

Sum

Computes the sum and standard deviation of the data set.

YpMean and YpMeanSdev

Computes the Y-power Mean and standard deviation.

Accessing and Initializing Properties

GetErrMsg

Returns the error message for a method failed.

GetStatus

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

Related Topics

CImage class, CPlotView class, CRect class, Table and Array Functions


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.