Wide range of innovative products
In-house development & manufacturing
Magazine > Practical tips > Weigand's technical tips > How to save images using sigma stacking
Practical tips

How to save images using sigma stacking

No more satellite trails!

Aeroplanes and satellites are a nuisance for the astrophotographer. But do you really need to completely discard the images?

It’s so irritating! An aeroplane was moving through the field of view during this 15-minute shot of NGC 501. Is the image still usable? M.Weigand It’s so irritating! An aeroplane was moving through the field of view during this 15-minute shot of NGC 501. Is the image still usable? M.Weigand

Anyone starting out in deep sky photography will get to know one particular problem very quickly: a sometimes not insignificant number of images are "decorated" with unsightly trails. Aeroplanes and satellites are a nuisance for the astrophotographer as they move through the field of view and destroy laboriously collected image data. But do you really need to completely reject the images?

Astronomy image processing programs offer several different stacking methods to combine a series of images into a single combined picture. The simplest variant is to work with averages, in which the brightness values of the pixels from all the individual images contribute equally to the combined value. The brightness of a satellite trail certainly decreases if several images are averaged, but you would need to combine an extremely high number of images until the trail no longer caught the eye.

The correct stacking method

Another option is to use median data. In this method, the brightness values for each pixel are sorted by size, and the middle value is selected. For example, if you have five images with brightness values for a given pixel of 9, 201, 7, 5 and 11, the median is 9. The satellite crossed the pixel in the second shot, but it was successfully eliminated from the data. This means that we have already found one way to make use of images with satellite trails.

But the median gives us worse results than the mean. This can be easily understood with the following values from five fictitious images: 9, 9, 9, 9, 10. This scenario could correspond to a faint nebula arm or a galaxy tidal tail, where a photon is only very rarely detected – in this case only in the last image. The other images with a value of 9 record the constant celestial brightness. The mean value here would at least show a slight brightening at 9.2, while the median is 9. Fainter section of objects "suffer" during median stacking. If we had a very large number of images, the quality of the final image created using median values would come close to one using mean values, but it would never quite reach it.

To achieve this, we first determine the median m of the values once more. This is better suited as a reference value because it is less sensitive to extreme values than the mean value. The standard deviation σ of the value distribution is used as the required threshold value. In fact, a multiple κσ (usually κ ≈ 2) is used, which is also adjustable in some programs, because only about 68% of the values are found in the range [m - σ, m + σ]. Then the constraint would be too severe and a large volume of data collected would be eliminated. Any pixel values that are now outside the interval will not be used in the steps that follow. Finally, the mean of the remaining pixel values is calculated. As a result, satellite trails disappear and you get very good results.

Beware of having too few images

Beware of having too few images

However, one thing needs to be considered: the number of images to be averaged must not be too small. For example, if you only have three images, the standard deviation is too large and the trail is not removed cleanly; this will only succeed with five images or more. It should also be noted that a satellite trail is not an absolutely sharp line, but has a soft edge. Sometimes you only get really good results by stacking more than five images. In difficult cases, it makes sense to vary the scaling factor κ.

This shows us that even images with satellite trails or similar interferences are still usable. If you have at least five images in the stack, trails can be removed successfully with sigma stacking. Besides satellites and aircraft, you can also remove the effect of cosmic rays. Two free programs that offer sigma stacking are Fitswork and Regim.

Author: Mario Weigand / Licence: Oculum Verlag GmbH