9.1 Introduction
137
9.1.2 Stacking
Once the calibration frames are applied and you have the science frames, you will
need to stack them if you have taken multiple science frames in the same band. In
order to stack, you need to align the frames first. There are several packages that
can do this, including MaxImDL, Deep Sky Stacker (DSS), and AstroImageJ; both
DSS and MaxImDL will align and stack in what appears to be a single operation,
although of course, it isn’t. The easiest alignment method, and in my opinion the
most successful, is to use the WCS in the header to align, although this is possible
only if the frames are plate solved. Pattern alignment is used by both DSS and
MaximDL. Essentially, an algorithm identifies the stars in the field and uses them
to make a series of virtual boxes with stars at each corner. These boxes are then
matched by rotation, translation, and scaling of the frames until they match. An
alternative to this is an aperture or star matching. Here the user does the hard work
by identifying the same group of stars within each image, the software using this
data to find the required transformations. Lastly, some applications have the option
of comet alignment. Comets and other solar system bodies tend to move against the
background stars over multiple frames. Traditionally, stacking methods would stack
the stars at the expense of the comet or another body. Comet stacking (or if this is
not available, single star matching, whereby the solar system body is selected rather
than a star) stacks to the body being observed rather than the background stars.
Once the frames are aligned, they need stacking. If this is going to be done during
the alignment process, it is vital that the stacking process be selected before the
alignment is started. There are several ways to stack a series of frames, collectively
known as, not unsurprisingly, a stack. The process you use will depend on the frames,
the target, and what operations are going to be undertaken after stacking.
The simplest form of stacking is summing. This process simply performs pixel to
pixel addition that keeps the pixel information linear, and if stacked to a higher bit,
FITS can be used to stack images with stars that would otherwise saturate. Summing
is ideal when photometry is being undertaken. Ensure if photometry is intended that
the exposure time is set to the sum of all the co-added frames. The software will
likely do this, but it doesn’t always.
Mean stacking, as the name implies, is the same as summing, but the final pixel
value is divided by the number of frames. This process will result in a linear science
frame if all the frames in the stack have the same exposure time. Mean stacking has
a positive effect on bad pixels if the image is dithered, as the effect of the bad pixel
is spread over several pixels.
Median stacking uses the median value of the pixel to pixel stack. Median stacking has similar results as mean stacking, although I feel that it handles artifacts,
defects, and noise better. However, it does not preserve pixel linearity, so if you wish
to do photometry, I suggest avoiding median stacking.
Sigma clipping, or kappa sigma clipping, determines the standard deviation over
the pixel stack and removes pixels with values displaced more than a set number of
standard deviations, kappa, away from the mean before reducing the pixel value to
137
9.1.2 Stacking
Once the calibration frames are applied and you have the science frames, you will
need to stack them if you have taken multiple science frames in the same band. In
order to stack, you need to align the frames first. There are several packages that
can do this, including MaxImDL, Deep Sky Stacker (DSS), and AstroImageJ; both
DSS and MaxImDL will align and stack in what appears to be a single operation,
although of course, it isn’t. The easiest alignment method, and in my opinion the
most successful, is to use the WCS in the header to align, although this is possible
only if the frames are plate solved. Pattern alignment is used by both DSS and
MaximDL. Essentially, an algorithm identifies the stars in the field and uses them
to make a series of virtual boxes with stars at each corner. These boxes are then
matched by rotation, translation, and scaling of the frames until they match. An
alternative to this is an aperture or star matching. Here the user does the hard work
by identifying the same group of stars within each image, the software using this
data to find the required transformations. Lastly, some applications have the option
of comet alignment. Comets and other solar system bodies tend to move against the
background stars over multiple frames. Traditionally, stacking methods would stack
the stars at the expense of the comet or another body. Comet stacking (or if this is
not available, single star matching, whereby the solar system body is selected rather
than a star) stacks to the body being observed rather than the background stars.
Once the frames are aligned, they need stacking. If this is going to be done during
the alignment process, it is vital that the stacking process be selected before the
alignment is started. There are several ways to stack a series of frames, collectively
known as, not unsurprisingly, a stack. The process you use will depend on the frames,
the target, and what operations are going to be undertaken after stacking.
The simplest form of stacking is summing. This process simply performs pixel to
pixel addition that keeps the pixel information linear, and if stacked to a higher bit,
FITS can be used to stack images with stars that would otherwise saturate. Summing
is ideal when photometry is being undertaken. Ensure if photometry is intended that
the exposure time is set to the sum of all the co-added frames. The software will
likely do this, but it doesn’t always.
Mean stacking, as the name implies, is the same as summing, but the final pixel
value is divided by the number of frames. This process will result in a linear science
frame if all the frames in the stack have the same exposure time. Mean stacking has
a positive effect on bad pixels if the image is dithered, as the effect of the bad pixel
is spread over several pixels.
Median stacking uses the median value of the pixel to pixel stack. Median stacking has similar results as mean stacking, although I feel that it handles artifacts,
defects, and noise better. However, it does not preserve pixel linearity, so if you wish
to do photometry, I suggest avoiding median stacking.
Sigma clipping, or kappa sigma clipping, determines the standard deviation over
the pixel stack and removes pixels with values displaced more than a set number of
standard deviations, kappa, away from the mean before reducing the pixel value to
