CombineImages or CI



The CombineImages command processes a Source folder of FITS images, combining them using a selected Math operator to produce new combined FITS images, which are saved in the designated Destination folder. It encompasses several parameters, some of which are mandatory, while others are optional. These parameters serve to specify the input requirements of the command.


It is advisable to review the explanations provided for the equivalent interactive operation, which is detailed in the Image math section, under the Advanced - Folder paragraph. This will enhance your understanding of the CombineImages command parameters and their respective functionalities:


    • SourceFolder or -SF: specifies the location of the folder with images to be combined

    • DestinationFolder or -DF: specifies the location of the folder where the combined images will be stored

    • CombinedFilenamePrefix or -CFP: Phoranso automatically generates the filenames of the combined files, based on the selected parameters. Each generate filename includes a unique sequence number. You can define a prefix to be added in front of the auto-generated filenames using this parameter. This is an optional parameter, and the default value is to add nothing.

    • MathOperator or -MO: specifies the name of the Math operator to be used for combining the source images. You have the choice between "Sum", "Average", "Median" or "SigmaClipping". 

    • SigmaValue or -SV: when using the "SigmaClipping" math operator, this parameter allows to specify the Sigma value to be used during Sigma clipping. It is an optional parameter, and the default value is 3.

    • Normalize or -NO: normalizes images before combining them. It is available when selecting the "Average" or "Median" Math operator. It entails determining the average or median value of an image and subsequently dividing each pixel value of the image by this value. It is commonly applied when working with flat field frames. This is an optional paramter, and the default value is False. 


    • Stack or -ST: is particularly useful in situations involving a series of images capturing the same target but exhibiting slight variations, i.e. shifts in the x-y plane caused by a minor movement of the field of view (e.g., resulting from imprecisions in the telescope mount tracking). The stack operation helps to improve the SNR ratio of your image: when enabled, each image undergoes x-y shifting relative to the first image, employing a cross-correlation technique, to ensure that all pixels align spatially. The first image remains unaltered, serving as a reference image to which all subsequent images are aligned. After stacking, the chosen Math operator is applied. 
      Note that stacking only works for images exhibiting x-y shifts; it is not applicable to images with rotational differences.
      This is an optional parameter, and the default value is False.

    • NbrImagesToGroup or -IG: determines the number of source images to combine into a single output image. 

    • Verbose or -V: this optional parameter has the default value True, indicating that the progress achieved during execution of the CombineImages command will be displayed in the Command Prompt.


Example



  • Phoranso CombineImages -SF "G:\2025 01 15 XD\BY Cam" -DF "G:\2025 01 15 XD\BY Cam\CombinedImages" -CFP "BY Cam comb" -MO "Average" -ST True -IG 3 


Combines images from the Source Folder "G:\2025 01 15 XD\BY Cam". Combined images will be stored in "G:\2025 01 15 XD\BY Cam\CombinedImages". Images will be stacked first and then combined per 3 using averaging. The CombineImages progress appears in the Command Prompt.