Thursday, September 18, 2014

Photometry with AIP4WIN: A Tutorial – Part 2
Bias and dark frames

By R.D. Boozer

In this second part of the tutorial, I cover the first process that I had to perform on data supplied by the University of Tasmania; that is, the creation of a scalable master dark frame.

Before the images were calibrated, an optimum bias frame, dark frame and flat-field frame needed to be generated.  AIP4WIN has a utility for performing these operations called the Calibration Setup Tool.  Under the Calibrate menu, the Setup option is picked to yield the dialogue box shown below.

Figure 1: The default appearance of the Calibration Setup Tool dialog box.

The dialogue box’s default setting is to follow the Basic calibration protocol in which the only calibration file produced is a master dark frame that is generated from multiple raw dark frames by either averaging the raw frames pixel by corresponding pixel or by taking the median of those pixels.  This method will not bring the background noise level down sufficiently to the degree needed for accurate stellar photometry.  A drop down list box can be used to invoke more adequate options as shown in the next illustration.

Figure 2: Selection of a calibration protocol.

Two other options are presented in the drop down list box.  The Standard protocol will automatically create a master dark frame from a series of raw dark frames and a master flat-field frame from a series of raw flat-field frames, but does not apply any bias frame compensation and thereby is not suitable for photometry.  The only option that is usable for photometric purposes is the Advanced protocol which allows everything.  The following figure shows the appearance of the dialogue box after the user chooses the advanced option.

Figure 3: Selecting the type of bias compensation.

There are four tabs offering different complementary functionality in the dialog box: The Bias frame tab, the Dark frame tab, the Flat-field frame tab, and the Defect frame tab.  Under the first tab, three bias related choices are offered: no bias subtraction at all, subtraction of a user defined number of ADUs from each pixel (only of use if no bias frames are available), or subtraction of either a raw or master bias frame.  Since precision photometry is to be done, the radio button for the third option marked Use Bias Frame is selected followed by clicking the Select Bias Frame(s) button.  At this point what is seen in the illustration after this paragraph shows up.

Figure 4: Selecting bias frames.

Since eleven bias frames were supplied, one master bias frame will be made from all of them.  To begin the process of making the master bias frame, the user highlights the filenames and clicks the Open button.  This action brings the user back to the Calibration Setup dialog box as it appears below.

Figure 5: Bias frames have been selected.

The reader will note that the dialogue box now indicates that 11 raw bias frames have been loaded.  At this point the user needs to decide how the raw bias frames are to be combined into a master bias frame.  If pixels are averaged with their corresponding pixels in the other frames, the readout noise typically decreases with the square root of the number of frames averaged. (Berry and Burnell 169-170)  Given this fact, averaging as many bias frames as possible is usually the best way to go.  One exceptional case is when the camera is being operated in an electrically noisy environment.  Under such circumstances median combining of the raw bias frames should be used because any large power spikes will manifest themselves in a master bias frame that was obtained from an averaging operation. (Berry and Burnell 170; AAVSO 3.2)

I did a visual check of the given raw bias frames that revealed no indication of power line spiking, so I decided that averaging would be used.  Clicking the Average Combine radio button causes ADU values of corresponding pixels in the frames to be automatically averaged.  Finally, the user clicks the Process Bias Frame(s) button to create the master bias frame and the view that follows is seen.

Figure 6: The master bias frame may now be saved.

As soon as the processing has been completed, the Save as Master Bias button becomes enabled so that the master bias frame can be saved as a single file.  After the master bias frame is saved, it can be used in the future instead of going through the bias frame combining process again.  Notice the check box marked Subtract Bias.  As long as that box is checked, AIP4WIN will automatically subtract the master bias frame from any dark frame or image when calibration occurs.  If the user decides at any point that he/she does not want automatic subtraction of the master bias frame to occur, the option may be unchecked.

Now the master dark frame is to be created.  Clicking the tab marked Dark will start this operation.

Figure 7: The default appearance of the Dark frame tab.

The creation of the master dark frame begins with clicking the Select Dark Frame(s) button. Since the selection of the raw dark frames that are to be combined is similar to the procedure followed for the earlier described selection of raw bias frames, this operation will not be pictorially illustrated.

Because a temperature-controlled camera was used, a master dark frame was created using raw frame files that were not necessarily shot near the same time as the research images, nor did they have the same integration time as the research images.  The standard technique (automatically done by the software) in this situation is to:
1) Get the number of ADU counts per second for each pixel in each frame by dividing the count of each pixel by the number of seconds of the frame integration.
2) Produce the master frame by averaging ADU counts per second per pixel (that were calculated in step 1) for every dark frame.

After those two steps have been executed by the software, the resultant master frame can then be scaled to calibrate any stellar image exposure by multiplying the dark frame pixel values by the image integration time.  (Walker 29).  With AIP4WIN, the above series of steps is chosen for automatic implementation when the user clicks the Automatic Dark Matching radio button.  The reader should not be misled by the Constant Dark Scaling radio button, because that option is only used when a user wants to use a raw dark frame as his master and manually inputs a scaling factor for it in the input box below that button.  Ignore it.

As was mentioned in Part 1 of this tutorial, raw dark frames were supplied that had 5, 6, 35 and 180 second integration times.  It should be mentioned that there seems to be some disagreement about what frames to combine.  One source I found says only raw dark frames that have a longer integration time than the stellar images should be used to make the scaling dark frame.  (Berry and Burnell 174-176)  Another source implies that all scaling dark frames should be used. (Walker 29)  Using techniques that will be described shortly, I calibrated some stellar images using each method and compared the signal-to-noise ratios of the stars in the calibrated images.  I decided to resolve the matter myself to my satisfaction by trying both methods and examining the final fully-processed images yielded from each of these methods.  Because I found that including all of the dark frames in the making of the scaling master frame yielded slightly improved SNRs (signal to noise ratios) compared to the other way, I chose that method.  The next figure shows what is seen after these files have been selected and the Automatic Dark Matching radio button was chosen.  At this point, the Process Dark Frame(s) radio button is clicked to indicate that a scalable master dark frame is desired.

Figure 8: Dark frames of varying integration times have been chosen.

Clicking the Process Dark Frame(s) button will start the process of automatically creating the scalable master dark frame via the aforementioned process.  The dialogue box will then look similar to what you see below.

Figure 9:  The newly created scalable dark frame can now be saved.

The Save Master Dark button has become enabled and should be used to save the scalable dark frame as a file for later use.  The Subtract Dark Frame check box was automatically checked to indicate that, during the current run of the AIP4WIN application, an image calibration would automatically scale the master dark frame and apply it to the image after the master bias frame has been applied.

Part 3 will cover the creation of the scalable flat field frame.


AAVSO, CCD Camera Skills, (2009) (last accessed November 2009)
Berry, Richard and James Burnell, Handbook of Astronomical Image Processing, (2006) Willmann-Bell, Inc., Richmond, Virginia, USA

Walker, E. Norman, CCD Photometry, (2007) (last accessed November 2009)

Copyright 2014 R.D. Boozer

No comments:

Post a Comment