Syntax
Document.CombineImages ( Mode, Bicubic, Output, Normalize[, Images ])
Parameters
AlignType Mode - specifies method used to align images
mxAutocorrelation (0) : autocorrelation
mxAutoStarMatch (1) : automatic matching of star brightnesses and separations
mxNoAlignment (2) : perform no alignment
mxAstrometric (3) : WCS information in the FITS header
mxPlanetary (4) : aligns centroids of the principal disk found in each image
mxAutoOneStar (5) : aligns centroids of the brightest star found in each image
Boolean Bicubic - specifies whether bicubic interpolation will be performed
CombineType Output - specifies how images are combined
mxSumCombine (0) : take sum of corresponding pixels in all images
mxAvgCombine (1) : take average of corresponding pixels in all images
mxMedianCombine (2) : take median of corresponding pixels in all images
mxSigmaClipCombine (3) : combine images using sigma-clip algorithm
mxSDMaskCombine (4) : combine images using standard-deviation masking algorithm
Boolean Normalize - prenormalizes images so that medians are comparable (ignored if output is calculated by sum or average methods)
Collection Images - [optional] a Collection or Dictionary object whose members are the images to be aligned
Returns
Nothing
Remarks
Combines two or more open images into a single image. The optimal positional adjustments required for each image are automatically determined using the algorithm specified by Mode. Autocorrelation is a mathematical procedure which determines the image shift for each image to minimize the deviation from the reference. Star matching searches for similar triangles formed by the twenty brightest stars in each image; it can translate, rotate, and scale images into best alignment. No Alignment mode simply combines the images pixel-for-pixel without attempting any initial registration of the images. Astrometric alignment requires that each image (including the reference) have been solved, usually by PinPoint; using the plate solution, it determines how much to translate, rotate and scale the images into correspondence. Planetary alignment works only on images containing a large, bright, round object such as the disk of a planet, and shifts the images so that the centroids of these disks are aligned. Auto one-star alignment is intended for use on small subframes or cropped images containing a single dominant star; the images are shifted such that the centroids of this star are aligned.
The required translation is almost never an integral number of pixels, and therefore it is necessary to interpolate into the source image to estimate what the pixel values are at fractional coordinates. If Bicubic is False, the interpolation is performed on a small tilted plane bounded by the four surrounding pixels. If Bicubic is True, a cubic interpolation surface is used instead; this can give smoother results.
The aligned images are then combined using the method specified by Output. Sum simply adds the pixels at each coordinate; Average adds them and divides by the number of images; Median sets the pixel in the resulting image to the median value across the input images. Sigma clip returns either the mean of the input pixels, or the mean of the input pixels with outliers removed, if the standard deviation of the input values exceeds a threshold. Standard deviation masking also computes the standard deviation of the input pixels, but it the output pixel is assigned either the mean or the median of the input pixels, depending on whether the standard deviation of the input pixels exceeds a threshold. When the Median combination method is used, it is generally desirable to set Normalize to True to eliminate differences in scaling across the various input images. For sigma-clipping and standard deviation masking, the current properties in the Combine dialog are used
The set of images to be combined is specified by the Images parameter, a Collection object to which has previously been added all the Documents which are to be aligned. Alternatively this parameter can be omitted, in which case all open images are aligned. Unlike the AlignImages method, this method does not affect images other than the one for which it is called.
This method is equivalent to the Combine command.