experiments with image stacking

 

home

   Lymm Observatory

     image stacking

    One of the most useful features of CCDs is that is easy to stack multiple images. This gives the effect of a long exposure, even though the telescope tracking may only be good enough to allow short exposures (it is, of course, necessary to align the images properly before stacking, to allow for any image drift during the series of exposures). I've long used image stacking myself, but recently I improved the process - with interesting results.

    Here's an example image - stacked using the original procedure - showing the Horsehead nebula. The software removes offset due to image drift (from imperfect tracking), then adds all the images, and finally divides by the total number of images.

    The short bright trails are hot pixels. Notice also the partially illuminated areas near the top and right edges of the image. These correspond to areas of sky which drifted out of the field, so when the sum for each pixel is divided by the total number of frames, they appear under illuminated (or even, after stretching the contrast, black).

    I wanted to remove the hot pixels. First, we first have to identify them. This is fairly easy: I use a dark frame, and flag any pixels more than a certain amount above or below the median value.

    Next, when the program forms a sum for each pixel, it can now ignore any hot pixels. Furthermore, it also counts the number of good pixels used to form each pixel sum (so there is a counter for each pixel). Finally, it divides one by the other to obtain an average value for each pixel, unaffected by hot pixels. Here is the result:

    There are two beneficial effects.

    First - as intended - the hot pixels have disappeared!

    Second, the underilluminated areas of the image are also less apparent - this is a consequence of the improved method of normalisation. Actually, it is probably not practical to completely correct the underilluminated areas, for two reasons. First, the noise associated with these areas will now be higher, owing to the reduced number of pixels used to form the sum. Second, if the sky background changes during the series of exposures, the mean formed from an incomplete set of images will be wrong, i.e. slightly different to the main body of the image.

    You will note that for this method of hot pixel removal to work, it is actually necessary that the image drifts slightly on the CCD.