DSLR Photometry Experiments. 4. How many darks?
Summary: The effect of the number of dark frames subtracted from a light frame on the signal-to-noise ratio (SNR) of stars is investigated. The conclusion is that applying a single dark frame gives a substantial improvement in the SNR of stars, while applying additional dark frames gives only a very small improvement.
Key words: techniques: DSLR photometry
When performing photometry on DSLR images, should dark frames be stacked and subtracted from the light frames? If so, how many dark frames should be used, and which stacking method should be employed? This experiment attempts to answer the first question by evaluating the signal-to-noise ratio (SNR) of stars on an image from which different numbers of dark frames have been subtracted.
A Canon EOS 60D fitted with a 50-mm prime lens (Canon EF 50-mm f/1.8 II, giving a measured field of view of 24.3° x 16.2°) was mounted on a tripod and set up in a suburban location. The equipment was left for 15 minutes to cool down before imaging began.
A series (30) of photographs of the field surrounding the nova V1369 Cen (Nova Cen 2013) were taken. The lens was set at f/5.6, the ISO set to 1600, and a 9-second exposure time was selected. The lens was slightly defocussed to better sample the stellar images. The date of mid-exposure of the series was 2014 January 27 at 02:24:31 UT, when the altitude of the centre of the field was ~56° (airmass = 1.2).
Soon after, 40 dark frames (ISO 1600, 9-s) were taken. The camera remained outdoors, the lens cap was put in place, and a dark cloth draped over the camera, covering the lens and view finder. An intervalometer was programmed to take the images with 16 seconds between the start of each frame. The series was started at 2014 January 27 04:51:59 SAST and ended at 05:02:23 SAST.
Both light and dark frames were stored in Canon raw format (CR2). Other camera settings are summarized in Table 1.
Table 1. Camera settings
|Exposure time||9 seconds|
|Image size||5184 x 3456 pixels|
|White Balance mode||Daylight|
|Long exposure noise reduction||Off|
|High ISO speed n.r.||Disabled|
The light and dark frames were registered and stacked using DeepSkyStacker (version 3.3.3 beta 47). Table 2 gives a register of the files processed and analyzed.
Dark frames were stacked using Median stacking mode, with “Hot Pixels detection and removal”, “Dark Optimization”, and “Bad Columns detection and removal” unselected.
The stacks of dark frames were cursorily examined; descriptive statistics appear in Table 3. The effect of stacking is clearly seen by examing the standard deviation columns.
Due to a concern about the possible changing characteristics of a series of dark frames [see this article], two dark frames from the beginning of the series and two from the end of the series were stacked – their statistics appear as the last two rows of Table 3.
Three light frames from the series were selected for analysis: the first, the 15th and the last. From each image, 0, 1, 8, 16 and 32 dark frames were subtracted, resulting in 15 images for analysis (Table 2).
Each processed image was then split into RGB channels (using IRIS version 5.59) and the green channel images retained for further analysis.
Table 2. Register of images processed and analyzed
|4||CR2||1720||8||1828 ... 1835|
|CR2||1735||8||1828 ... 1835|
|CR2||1749||8||1828 ... 1835|
|5||CR2||1720||16||1824 ... 1839|
|CR2||1735||16||1824 ... 1839|
|CR2||1749||16||1824 ... 1839|
|6||CR2||1720||32||1816 ... 1847|
|CR2||1735||32||1816 ... 1847|
|CR2||1749||32||1816 ... 1847|
Key: Series: series running number. Type: image format, JPG or Canon RAW. IMG(L): light frame Canon image number. nD: the number of dark frames applied. IMG(D): dark frame Canon image number.
Table 3. Descriptive statistics of the dark frame stacks
|1828 ... 1835||0.3||0.7||0.0||255.0||0.67||0.79||0.2586||0.6731||0.0||255.0|
|1824 ... 1839||0.2||0.6||0.0||255.0||0.66||0.74||0.2152||0.6123||0.0||255.0|
|1816 ... 1847||0.2||0.6||0.0||255.0||0.65||0.71||0.1926||0.5784||0.0||255.0|
|1816 + 1817||0.3||0.8||0.0||255.0||0.57||0.94||0.3099||0.8083||0.0||255.0|
|1846 + 1847||0.3||0.7||0.0||255.0||0.51||0.86||0.2533||0.7244||0.0||255.0|
Key: Column 1: dark frame Canon image numbers of frames stacked. Columns 2-5: values determined using IRIS (version 5.59). Columns 6-7: values determined using Photoshop CS5. Columns 8-11: values determined using Aperture Photometry Tool (version 2.4.2)
Five stars were selected for SNR assessment. The stars are within 5° of the centre of the field (Figure 1) and were free from nearby stars that could potentially interfere with their measurement. The stars range over 3.3 magnitudes in brightness (Table 4).
Table 4. Stars selected for SNR measurement
|HR 5358||14 20 19.54||–56 23 11.4||4.3|
|HR 5349||14 19 51.50||–61 16 22.7||5.2|
|HR 5266||14 03 26.51||–56 12 48.4||5.9|
|HD 117923||13 35 11.14||–62 37 50.6||6.7|
|HD 118770||13 40 23.81||–57 55 33.3||7.6|
The SNR of the selected stars was measured using MaxIm DL (version 4.62), which reports the SNR of a targeted star in the “Information Window”. According to the software manual (MaximDL Manual, 3-16), signal-to-noise ratio is defined as:
where S is the signal, T is the total integration time, B is the sky background, D is the dark current, R is the readout noise, and t is the integration time per image. Presumably in the instance of analyzing these DSLR images, this relationship reduces to:
SNR measurements were made on the set of raw frames, as well as on a JPG version generated by the camera (neither dark subtraction nor noise reduction applied).
Appendix 1 lists the results of the SNR measures on each image. The SNR of a given star varies from image to image: the largest difference between SNR measures of the same star is 4.3% while the mean difference for all stars is 1.5%. This difference is considered small enough so that the SNR measures for the three light images can be averaged.
Table 5 reports the mean and standard deviation of the SNR of each of the stars as they appear on the six images; Figure 2 illustrates these results.
Table 5. Mean signal-to-noise ratios of selected stars on the 18 images
|S||Image type||HR 5358|
|1||JPG + 0 darks||120.6 ± 2.4||32.9 ± 3.3||10.2 ± 1.9||16.9 ± 2.6||57.7 ± 3.5|
|2||CR2 + 0 darks||135.9 ± 2.0||28.1 ± 2.4||7.0 ± 0.9||13.3 ± 1.2||57.0 ± 1.1|
|3||CR2 + 1 dark||238.8 ± 5.1||49.2 ± 2.1||12.1 ± 1.3||22.4 ± 2.8||98.7 ± 4.5|
|4||CR2 + 8 darks||244.0 ± 4.1||51.4 ± 3.8||12.3 ± 2.5||23.4 ± 2.9||102.8 ± 2.2|
|5||CR2 + 16 darks||247.8 ± 5.2||51.2 ± 2.8||11.8 ± 2.4||23.3 ± 3.1||104.5 ± 3.3|
|6||CR2 + 32 darks||250.2 ± 4.3||52.5 ± 2.6||12.2 ± 2.3||23.1 ± 2.6||105.0 ± 3.4|
Figure 2 shows the rather surprising result that the difference in terms of stellar SNR between a JPG and a CR2 raw file is rather small (Series 1 vs. Series 2).
As anticipated, the SNR increase when a single dark frame is subtracted (Series 2 vs. Series 3) is marked, particularly for brighter stars.
Rather surprising is the rapidly diminishing return when additional dark frames are used. Perhaps the light-polluted skies under which the light frames were taken mitigate the efficacy of additional dark frames, since the noise introduced by light pollution is much greater than the noise generated by the camera? It is planned to repeat this experiment from a dark-sky site.
While these results may suggest that a single dark frame is acceptable, in practice several dark frames should be captured and combined to remove potential outlying values.
The data suggests three results:
(1) a single JPG and a single raw image give similar signal-to-noise ratios for stars;
(2) a single dark frame gives a substantial improvement in SNR; and
(3) applying more than one dark frame gives only a very small improvement in stellar signal-to-noise ratio.
Valuable comments were received from Evan Knox-Davies, Jerome Jooste, Dieter Willasch and Brett du Preez .
MaxIm DL CCD Imaging Software Manual. Version 4. 2004. Diffraction Limited.
IMG_1720 (first image in sequence)
|S||Image type||HR 5358|
|1||JPG + 0 darks||117.857||57.700||29.216||14.589||12.239|
|2||CR2 + 0 darks||134.352||57.479||25.653||11.958||7.230|
|3||CR2 + 1 dark||237.851||100.863||47.171||19.142||12.849|
|4||CR2 + 8 darks||240.812||102.737||48.389||20.097||13.175|
|5||CR2 + 16 darks||245.179||103.836||48.877||19.779||12.384|
|6||CR2 + 32 darks||248.205||103.749||50.773||20.100||12.677|
IMG_1735 (15th image in sequence)
|S||Image type||HR 5358|
|1||JPG + 0 darks||121.639||61.210||33.837||16.338||8.555|
|2||CR2 + 0 darks||138.146||55.712||30.349||14.390||5.996|
|3||CR2 + 1 dark||244.307||93.565||51.405||24.283||10.596|
|4||CR2 + 8 darks||248.539||100.702||55.641||24.573||9.529|
|5||CR2 + 16 darks||253.796||101.607||54.306||25.746||9.102|
|6||CR2 + 32 darks||255.166||102.412||55.453||24.693||9.742|
IMG_1749 (last image in sequence)
|S||Image type||HR 5358|
|1||JPG + 0 darks||122.374||54.143||35.694||19.653||9.666|
|2||CR2 + 0 darks||135.267||57.741||28.269||13.589||7.788|
|3||CR2 + 1 dark||234.177||101.657||49.030||23.763||12.831|
|4||CR2 + 8 darks||242.550||105.025||50.159||25.508||14.231|
|5||CR2 + 16 darks||244.371||108.012||50.396||24.345||13.858|
|6||CR2 + 32 darks||247.268||108.899||51.295||24.406||14.180|
nothing more to see. please move along.