Syntax
Document.CombineFiles ( FilePath, Mode, Bicubic, Output, Normalize )
Parameters
String FilePath - path and filename containing wildcards, specifying the image files to be combined
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)
Returns
Nothing
Remarks
Combines two or more files from disk into a single image. The source files must be described by a single file specification containing wildcards. 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.