CImCombine:SigmaClip


The SigmaClip method merges the pixel values using iterative sigma-clipping to remove high and lower value outliers more than some number of sigmas from the mean at each location.

Syntax

CImage = CImCombine:SigmaClip( CImageSet, nHigh=2.5, nLow=2.5, nIter=5 )

bullet.gif    CImageSet contains the collection of images to be combined.

bullet.gif    nHigh is the number of sigmas above the mean for rejecting points.

bullet.gif    nLow is the number of sigmas below the mean for rejecting points.

bullet.gif    nIter is the maximum number of rejection iterations to perform.

bullet.gif    CImage is a new image created by this method.

bullet.gif    On success, this method returns a new CImage.

bullet.gif    On failure, this method returns nil.

Remarks

Each pixel in the output image is the mean value of all images except those rejected by the sigma clipping criteria. The value of sigma is computed independently at each location. In order for the SigmaClip method to work properly, normalization must be done as part of the combining.

Example

Suppose a CImageSet named S exists. The following script combines the images by the SigmaClip method by excluding points more then 2.5 sigmas above the mean and 5 sigmas below the mean. The images are normalized by the Median statistic computed inside the central 10% of the image:

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("median")

-- use the SigmaClip as the statistic

C:SetNormMethod("scale")

-- scale to normalize the image set

I = C:SigmaClip(S,2.5,5,5)

-- 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

CImageSet class

CImage class

CRect class

 


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