CImCombine:SetNormStat


The SetNormStat method specifies the statistic used to determine the correction needed to normalize each image to the reference image. The statistics are similar to those used by the combining methods, except that the normalization statistic produces a single number applied to the entire image.

Syntax

CImCombine:SetNormStat( sStatName, nPar1, nPar2, nPar3 )

where

    sStatName specifies the "Statistic Name" (see below).

    par1, par2, and par3 are optional parameters used by the various statistics (see below).

  

The normalization statistic may be any of the methods listed in the table below. Parameters are also listed. If not specified, as an argument, all parameters adopt reasonable values. For example, the default values for sigma clipping parameters are 2.5, the default values for alpha clipping parameters are 1, and the default values for rank clipping parameters are 2.5 (percentile). Both power parameters default to 0.5.

The table below describes each of the statistics available for nnormalization. The first column lists the names used for the various statistics. Note that there can be more than 1 name for each statistic. When multiple names are available (e.g., the Alpha Clipping method), use whichever name you wish. The statistic names are case sensive and should be specified in lower case, exactly as shown.

Normalization Methods

sStatName

CStats Equivalent

Description

nPar1

nPar2

nPar3

alpha

alphaclip

alphaclipmean

AlphaClipMean

Mean, excluding alpha high values and alpha low values.

nHigh

nLow

 

contra

contramean

ContraMean

The contra-harmonic mean of pixel values.

power

 

 

geomean

GeometricMean

The geometric mean of pixel values.

 

 

 

max

Max

Maximum pixel value

 

 

 

maxclip

MaxClipMean

Mean, excluding maximum pixel value.

 

 

 

mean

Mean

Unweighted mean value

 

 

 

median

Median

Median value

 

 

 

min

Min

Minimum pixel value

 

 

 

mmclip

MinMaxClipMean

Mean, excluding maximum and minimum pixel values.

 

 

 

mtm

mtmclip

mtmsigmaclip

mtmsigmaclipmean

MtmSigmaClipMean

Mean, excluding values outside upper and lower sigma limits relative to the median.

nHigh

nLow

nIter

rank

Rank

Rank percentile value.

percentile

 

 

rankclip

rankclipmean

RankClipMean

Mean after clipping pixel values above and below rank percentiles.

pctHigh

pctLow

 

sigclip

sigclipmean

sigma

sigmaclip

sigmaclipmean

SigmaClipMean

Mean, excluding values outside upper and lower sigma limits.

nHigh

nLow

nIter

yp

ypmean

YpMean

The Yp Power weighted mean of pixel values.

power

 

 

Example

The following script uses SetNormStat to specify the normalization statistic as sigma clipping with 2.5 sigma rejection above and 5 sigma rejection below the mean:

C = CImCombine:new()

-- create a CImCombine object

R = NewRect(10,50,10,50)

-- central 10% of the image

C:SetRelRect( R )

-- specify CImage and CRect to measure

C:SetNormStat("sigma",2.5,5)

-- use the median as the statistic

C:SetNormStat("scale")

-- scale to normalize the image set

I = C:Mean( S )

-- combine image set and return new image

I:Display()

-- show the new image

Related Topics

CImCombine class

CStats class