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.
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 |
Mean, excluding alpha high values and alpha low values. |
nHigh |
nLow |
|
|
contra contramean |
The contra-harmonic mean of pixel values. |
power |
|
|
|
geomean |
The geometric mean of pixel values. |
|
|
|
|
max |
Maximum pixel value |
|
|
|
|
maxclip |
Mean, excluding maximum pixel value. |
|
|
|
|
mean |
Unweighted mean value |
|
|
|
|
median |
Median value |
|
|
|
|
min |
Minimum pixel value |
|
|
|
|
mmclip |
Mean, excluding maximum and minimum pixel values. |
|
|
|
|
mtm mtmclip mtmsigmaclip mtmsigmaclipmean |
Mean, excluding values outside upper and lower sigma limits relative to the median. |
nHigh |
nLow |
nIter |
|
rank |
Rank percentile value. |
percentile |
|
|
|
rankclip rankclipmean |
Mean after clipping pixel values above and below rank percentiles. |
pctHigh |
pctLow |
|
|
sigclip sigclipmean sigma sigmaclip sigmaclipmean |
Mean, excluding values outside upper and lower sigma limits. |
nHigh |
nLow |
nIter |
|
yp ypmean |
The Yp Power weighted mean of pixel values. |
power |
|
|
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:
|
-- create a CImCombine object |
|
-- central 10% of the image |
|
-- specify CImage and CRect to measure |
|
-- use the median as the statistic |
|
-- scale to normalize the image set |
|
-- combine image set and return new image |
|
-- show the new image |