Combining Dark Frames

You should have a number of dark frames with the same integration time and readout mode as your flat field frames. Typically, I make sure these filenames have dark*.fits filenames so that they are readily recognizable from flat field frames (flat*.fits) or object frames (data*.fits). I attempt to use the same exposure times for all my flat field frames, so that a uniform set of dark frames can be used for a night's data. Generally you can combine all dark frames together without a second thought; however occasionally a bad frame or a test dark frame at a different exposure time might sneak through. Although median-filtering during image combination will essentially remove the errant frame, it's better to catch it beforehand. Toward this end, you can look at basic image statistics with the task imstat:

imstat dark*

You can also display all frames sequentially, with a short pause in between, using mdisp in the phoenix package:

mdisp dark*

If all of the frames have similar statistics, let's combine them. The task for image combination is imcombine. Before running imcombine willy-nilly, let's examine (and tune) the parameters first so we know what's about to happen:

epar imcombine

imcombine screenshot
Click here for text parameters

When you are happy with the parameters, you can invoke the script from the epar window by typing : to get IRAF's attention and then g [enter] to go.

This example will median-combine all dark* files into dark15, a combined (15-second) dark frame. In addition to median-filtering, any pixels that are errant from the median by more than 4-sigma are discarded -- note the pixel rejection flag, set to sigclip and the clipping factors lsigma and hsigma. I am combining 40 dark frames here; if you have many fewer frames to combine and want bad pixel rejection, the help for imcombine suggests the avsigclip as a better algorithm for small numbers of frames.

Below is an example of the combined 15-second dark frame (zoom=50%):

dark frame

go back Installing and Preparing IRAF go Home Reduction Home Constructing Flat Field Frames go
	forward


Craig Kulesa
Last modified: Sat Jul 21 01:18:22 MST 2001