Every camera sensor produces a certain amount of dark current, which accumulates in the pixels during an exposure. The dark current is produced by heat; high-performance cameras cool their sensors to minimize this effect.
The main problem with dark current is that it accumulates at a different rate in every pixel. Some pixels are "hot" and others are "cold". Unfortunately there is usually a spattering of pixels that are especially hot, which degrade the image a great deal. Fortunately, the effect of hot and cold pixels can be easily removed by subtracting a dark frame.
A dark frame is an exposure taken under the same conditions as the light exposure, but with no light striking the array. Since each pixel is consistent in its dark current at any one temperature, the dark frame can be subtracted from the light frame to remove the fixed pattern from the image. For most sensors this produces a striking improvement in the image.
Unfortunately, while the rate of dark current is constant, the actual accumulation of dark current is random. Anything that is random in imaging is noise, which is the enemy of sensitivity. Doubling the dark current increases the random noise produced by the square root of 2 (approximately 1.414). This means the hot pixels produce significantly more noise. Since the noise is random and therefore unpredictable, it cannot be removed; in some calibrated images they will be brighter than normal, and in others they will be darker than normal. You can improve the hot pixels, but you cannot completely fix them.
So subtracting a dark frame eliminates noise, because it gets rid of the gross pixel-to-pixel variations in dark current. Unfortunately, and perhaps counterintuitively, subtracting a dark frame also adds noise to the image. Every pixel has random read noise, plus the residual dark current noise. This noise does not subtract, but rather adds in a root-sum-square fashion. Therefore simply subtracting one dark frame increases the noise level 41%. The way to get rid of this noise is remove it by averaging multiple dark frames. Every time you quadruple the number of averaged frames, you drop the noise contribution in half.
Suppressing Hot Pixels
Although you can greatly improve the hot pixels by calibration, there will still be a residual speckle of hot and cold pixels in the image. That does not mean you have to live with them; there are ways to suppress the effects of hot pixels.
One way is to simply replace them with the average of the surrounding pixels. In MaxIm DL the Kernel Filter command can remove them. A better way is to create a "bad pixel map" using the Remove Bad Pixel command, and fix up just the pixels known to be especially hot.
An ever better way is to ”dither” the pointing of the camera slightly between exposures, thus distributing the noise contribution of each hot pixel to a different position on the image, and then combine a number of images together using the median, Sigma Clip, or SD Mask algorithm, which will reject the hot pixel contributions altogether.
Dark Frame Scaling
Sometimes you may not have a dark frame that exactly matches the duration of your light frames, or you may be operating with an unregulated sensor temperature. In that case a good master dark frame can be scaled to match.
When doing dark frame scaling, it is always recommended to use Bias frames. This is because the bias is always constant, even as the dark current changes. Please note that bias frames may not work well with some CMOS sensors, as they can utilize different sensor settings at different exposures, HDR features, or in-camera stacking modes. These functions can cause the bias frame to not match the light frame.
If your dark frames do not match the duration of your light frames, then you should use the Auto Scale option in the Set Calibration command. This will automatically scale the dark frame to account for the difference in exposure times, based on the information in the FITS headers. This technique can work very well for many temperature regulated CCD sensors.
If your camera is not temperature regulated, or if you do not have exposure time information, then use the Auto Optimize option. The Auto Optimize algorithm performs an iterative adjustment of the scaling until the noise is minimized.
Master Frames
If you do have a temperature-regulated camera, you can take a set of ”master frames” at various temperature settings and exposures. These can be used to calibrate any matching exposure taken with the same camera. Dark Frame Scaling can then be used if an exact match is not available. If you enter multiple sets of calibration frames into Set Calibration, MaxIm DL will automatically choose the frames that best match the exposure conditions.