CStats:SdevClip


The SdevClip method computes the standard deviation after rejecting the nHigh highest and nLow lowest values from the sample. The normal standard deviation is also computed and returned.

Syntax

nSdevClipped, nSdev = CStats:SdevClip( CImage, nHigh, nLow, CRect )

nSdevClipped, nSdev = CStats:SdevClip( CImage, nHigh, nLow )

nSdevClipped, nSdev = CStats:SdevClip( CPlotView, nHigh, nLow )

nSdevClipped, nSdev = CStats:SdevClip( table, nHigh, nLow )

bullet.gif    CRect is a bounding rectangle for the CImage object.

bullet.gif    CPlotView is a plot window containing data.

bullet.gif    nHigh and nLow specify the number of values to reject from the calculation.

bullet.gif    table is a 1-dimensional array containing numbers.

bullet.gif    On success, returns the clipped standard deviation and normal standard deviation.

bullet.gif    On failure, returns 0, 0.

Remarks

The calculated standard deviation excludes a specified number of lowest and highest values from the sample. The parameters nHigh and nLow are the number of points to clip, effectively the same as the "alpha" values used by AlphaClipMean. When a CPlotView is passed, only the current CPlot buffer is processed.

Example

Suppose a CImage named I and a CRect named R exist. The following script returns the clipped standard deviation inside a rectangle on the image. The normal standard deviation is also returned:

S = new_stats()

-- create a CStats object

-- CImage and CRect to be measured

 

nSclip,nS = S:SdevClip( I, nHigh nLow, R )

-- return the clipped sandard deviation

Printf("Sdev=%lg/%lg\n", nSclip, nS)

-- list the results

Related Topics

CStats class

CImage class

CRect class

Sdev

SdevValue

AlphaClipMean

 


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