|
The Image Math dialog box provides a range of image processing operations that can be applied to either a single FITS image or multiple FITS images. It is organized into following tabs: Standard, Advanced, Advanced - Folder and Binning, each of which is detailed in the following sections.
Standard
The Standard tab consists of two sections: Involving 1 image, Involving 2 images.

- Involving 1 image: use Add file to open the FITS file on which you want to perform an operation. Alternatively, if you already have one or more FITS images open and want to select one, use Add open image. Upon selecting a file or open image, the Image box will display the chosen entry.
Next, choose an operator from the drop down list:
- Add scalar: adds the Scalar value to each pixel value in the selected image.
- Subtract scalar: subtracts the Scalar value from each pixel in the selected image.
- Multiply by scalar: multiplies each pixel value in the selected image by the Scalar value.
- Divide by scalar: dividies each pixel value in the selected image by the Scalar value.
- Remove hot pixels: removes hot pixels from the selected image. The Radius parameter specifies the area around each pixel to identify and remove hot pixels, with a recommended value of 1.
Click the Calculate button to execute the operation. The resulting image will open in a new FITS window.
- Involving 2 images: similar to above, open two FITS files or select two already open FITS images, then choose an operator from the drop down list:
- +: creates a new FITS image by adding the pixel values of Image 1 and Image 2
- -: creates a new FITS image by subtracting the pixel values of Image 2 from Image 1
- *: creates a new FITS image by multiplying the pxiel values of Image 1 with Image 2
- /: creates a new FITS image by dividing the pixel values of Image 1 by Image 2
Click the Calculate button to execute the operation and display the resulting new FITS image.
Advanced
The operations in this tab allow to combine multiple FITS images. One has to keep in mind that all FITS images recorded by a sensor include noise. When performing operations such as addition or subtraction of images, the noise accumulates. This observation is particularly significant in the image calibration process, elucidating why the standard practice involves utilizing multiple bias, dark and flat frames to calibrate a Science image, rather than relying on a single frame of each type. By first averaging multiple bias, dark and flat frames before applying them to a Science image, the introduction of noise is significantly curtailed.
The Advanced tab provides operators designed for large sets of FITS images, enabling actions such as averaging or median combining the set to produce a new image.

The Advanced tab necessitates a minimum of two FITS images, which can be acquired by either opening FITS files using the Add files option or by selecting already open FITS images through the Add open images option. Once the files or open images are selected, the Selected images box will display the chosen entries.
Subsequently, choose an operator from the Math operator section. Utilize the drop down list to select the desired operator:
- Sum: creates a new FITS image by summing the pixel values of all selected images.
- Mean: creates a new FITS image by averaging the pixel values of all selected images. This method yields optimal results when the noise in the selected images is strictly random Gaussian noise. However, if one of the images contains pixels with exceptional values (outlier pixels resulting for instance from cosmic rays), these values will be incorporated in the new FITS image.
- Median: creates a new FITS image by median combining the pixel values of all selected images. This method effectively suppresses outlier pixels but results in a 25% increase in the noise level compared to averaging.
- Sigma Mean: this method initially removes ("clips") outlier pixels from the selected images before averaging them. It combines the superior noise reduction of the Mean method with the outlier pixel rejection capabilities of the Median method.
The Sigma value determines the treshold for identifying outliers. Pixels with values beyond a certain number of sigma from the mean are considered outliers. We recommend a default value of 3.0, which provides a robust balance for most datasets.
- Lower values (e.g., 2.0): More aggressive clipping; use this if your images contain significant noise spikes or many hot pixels, but be careful as it may inadvertently clip faint nebulosity.
- Higher values (e.g., 4.0 - 5.0): More conservative clipping; use this if you want to preserve the maximum amount of signal and are less concerned about minor outliers.
The Normalize option is available when selecting the Mean or Median methods. When enabled, each image undergoes a median-normalization before the selected operator (e.g., mean or median combine) is employed. Median-normalization entails determining the median value of an image, and subsequently dividing each pixel value of the image by this median value.
Normalization is commonly applied when working with flat field frames. Each flat field image is normalized (adjusted) to values approximating unity. This ensures that post flat field correction, the numerical intensities in the images resemble those prior to flat fielding. In simpler terms, the flat field correction for pixels with responses close to the median is adjusted to approximately 1.
Understanding the Stacking and Processing Workflow
The Stack option is compatible with all four Math operators and is essential for registering multiple images of the same celestial target. It compensates for spatial discrepancies caused by minor telescope tracking imprecisions, ensuring that pixels align correctly before the mathematical combination is applied.
- Alignment Process: When Stack is enabled, the software utilizes a cross-correlation technique to calculate the necessary x-y offsets for each subsequent image relative to the first. The first image serves as the fixed Reference Image and remains unaltered. If the Derotate option is selected, the software also corrects for rotational offsets, ensuring precise geometric registration. Derotate is particularly useful for observations affected by field rotation, such as those from alt-azimuth mounts. Smart telescopes such as the SeeStar and DWARF are becoming increasingly popular but inherently suffer from field rotation.
- Stacking: Once alignment is complete, the chosen Math operator (Sum, Mean, Median, or Sigma Mean) is applied to the registered pixels. This process significantly improves the Signal-to-Noise Ratio (SNR) of your final image.
- Hot Pixel Removal: When the Remove hot pixels option is enabled, the software performs a detection and interpolation step to identify and eliminate transient "hot" or "cold" pixel artifacts that may have survived the stacking process, resulting in a cleaner final output.
Use the Remove from list button to remove one or more entries from the Selected images list.
Advanced - Folder

The Advanced - Folder tab processes a Source folder of FITS images, combining them using the selected Math operator to produce new combined FITS images, which are saved in the designated Destination folder.
Example Use Case
Suppose you have a Source folder containing 100 FITS images of a very faint variable star. To improve photometric accuracy, you might want to group every 4 images and average them into a new single combined FITS image. This increases the signal-to-noise ratio, resulting in higher accuracy photometric measurements. Instead of 100 low-accuracy observations, you will have 25 higher-accuracy observations. The Advanced - Folder tab automates this process of creating combined FITS images.
First select the Source folder containing the images to combine. Then specify the Destination folder, where the combined images will be saved. Phoranso automatically generates filenames for the combined files, based on the selected options. Each file also includes a unique sequence number.
In the above example, the first combined file will be named: FS CMi_StackedImage_Average_0001.fit:
- FS CMi: derived from the Combined filename prefix setting
- StackedImage_Mean: indicates the selected Math operator (Mean) and the use of the Stack option
- 0001: a unique sequence number assigned by Phoranso
The Math operator section includes the following fields:
- Operator field offering a choice between Sum, Mean, Median and Sigma Mean. These operators function in the same way as described in the Advanced tab section above.
- The Normalize, Derotate, Stack and Remove hot pixels options also operate identically to their counterparts in the Advanced tab section.
The Grouping section allows to specify the number of Source folder images to each time combine into a new single, grouped image.
To initiate the process, click the Calculate button. If needed, you can stop the process at any time by clicking Abort.
Binning
The operations in this tab allow to bin one or more FITS images. Binning is the process of combining adjacent pixels into a single (super) pixel, often in a square grid format (i.e., 2x2, 3x3, etc). Example: when you bin an image 2x2, Phoranso combines 4 pixels into a single pixel, halving the image resolution in each dimension.

First add one or more FITS images to the Selected images list using the Add files or Add open images buttons. Next, select the desired Binning operator from the drop down list (options are 2x2, 3x3 and 4x4 binning) and the Pixel combination to be applied. Press Calculate to start the binning operation, which results in the display of one new binned image for each image in the list of Selected images.
- When Mean is selected as Pixel combination method, each binned super pixel value will be the mean of the adjacent pixels. Example: with 2x2 binning, the super pixel value will be the mean of the 4 adjacent pixels.
- When Sum is selected as Pixel combination method, each binned super pixel value will be the addition of the adjacent pixels.
Use the Remove from list button to remove one or more entries from the Selected images list.
|