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( stat, par1, par2, par3 )

bullet.gif    stat specifies the statistic (see table in the Remarks section, below).

bullet.gif    par1, par2, and par3 are optional parameters used by the various statistics.

Remarks

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.

Normalization Methods

Stat Name

Description of the Statistic

Par1

Par2

Par3

Alpha Clip

Mean, excluding alpha high values and alpha low values. See AlphaClip

nHigh

nLow

 

Contra Mean

The contra-harmonic mean of pixel values. See ContraMean

power

 

 

Geometric Mean

The geometric mean of pixel values. See GeometricMean

 

 

 

Max

Maximum pixel value

 

 

 

MaxClip

Mean, excluding maximum pixel value. See MaxClip

 

 

 

Mean

Unweighted mean value

 

 

 

Median

Median value

 

 

 

Min

Minimum pixel value

 

 

 

MmClip

Mean, excluding maximum and minimum pixel values. See MmClip

 

 

 

Mtm Sigma Clip

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

nHigh

nLow

nIter

Rank

Rank percentile value. See Rank

percentile

 

 

Rank Clip

Mean after clipping pixel values above and below rank percentiles. See RankClip

pHigh

pLow

 

Sigma Clip

Mean, excluding values outside upper and lower sigma limits. See SigmaClip

nHigh

nLow

nIter

Yp Mean

The Yp Power weighted mean of pixel values. See YpMean

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 = new_imcombine()

-- create a CImCombine object

R = new_rect(10,50,10,50)

-- central 10% of the image

C:SetRelRect( R )

-- specify CImage and CRect to measure

C:SetNormStat("sigma clip",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

C:delete()

-- when done with S, remove it from memory

Related Topics

CImCombine class, CStats class


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