A quick
search on Internet gives many references to DSLR
photometry. Amateur astronomers use DSLRs to observe stellar light curves
(see the AAVSO web
site) and to search for exoplanet transits, sometimes in the form of
amateur/professional collaborations (PANOPTES). There are also examples of the
use of DSLRs in the scientific literature: Velidovsky et al., used a Canon EOS 300D for absolute
photometry of the Moon.
Since I own
an old Canon EOS 300D I thought I’d try to measure a few fundamental
parameters: readout noise, dark current, and gain factors. The EOS 300D model
is now 10 years old and must be regarded as obsolete. I’ve seen them sold at
Ebay for less than 50 USD. It has a 12-bit 3088×2056 CMOS sensor, ISO settings
from 100 to 1600, exposure times from 0.25 milliseconds to 30 seconds, bulb
exposure of infinite length, but unfortunately no mirror lockup. I used IRIS to
convert files from RAW to FITS (note: without debayering the images), and IDL
for the actual analysis.
The gain
factors were determined by taking pairs of exposures from 0.25 to 100 milliseconds,
selecting a 600×400 pixel sub-frame, and plotting the variance of the
difference frame versus the mean level. Image
sequences were generated for ISO 400 and ISO 800, and the R-, G-, and
B-channels (of the Bayer matrix) were treated as independent data points. The
exposures were taken without lens, and with the camera pointed at a white,
uniformly lit wall. At first, the data points spread out across the graph but
when I discarded all exposures shorter than 10 milliseconds, the remaining data
points fell nicely along a straight line. For shorter exposure times, there is apparently
a large spread in the shutter performance (assuming that the light source is
constant between exposures). The uncertainty fell below 1% for exposure times
longer than around 50 milliseconds. This shutter performance may be a property
of the camera model, but it may also be a consequence of my camera being old
and worn-out.
Figure 1. Percentage difference between pairs of exposures at different nominal exposure times.
The obtained
gain curves are shown in Figure 2. The resulting gain factors are g=2.58 electrons/ADU at ISO 400 and g=1.17 electrons/ADU at ISO 800,
which comply well with figures that I found at various web sites (here,
here). Above a signal level of around 3700
to 3800, the gain curves rapidly levels off to smaller noise values, indicating
an abrupt transition from linearity.
Figure 2. Variance of noise versus signal for ISO 400 and ISO 800.
Readout
noise and dark current was determined by repeating the above experiment, but now
with the camera body capped and going to exposure times longer than 20 minutes.
Figure 3 shows a surprising result: the dark current decreases with time, to levels below the CMOS bias level (128 for
the EOS 300D) which means negative values!
Clearly unphysical, but it could be explained as a consequence of
onboard dark-current subtraction before the CMOS frame hits the RAW file.
Apparently, the camera over-estimates the dark current. Or could it be IRIS
that does these subtractions in the RAW-to-FITS conversion?
Figure 3. Dark current as a function of exposure time.
This behavior can only be
explained by onboard dark current subtraction before storage in the RAW file.
Even if the
dark current signal have been
subtracted in the RAW frame, the dark current noise is still there and this may tell us something about the dark
current signal. Figure 4 shows the dark
current variance as a function of exposure time. Up to 7 or 8 minutes it is a
roughly linear relation, but then the curve bends upwards – more strongly for
the ISO 800 sequence. The camera warms up during long exposures (one can
actually feel the temperature difference) and this is a likely explanation for
the nonlinear behavior in Figure 4. This is actually one of the major
limitations of DSLR cameras: the lack of temperature control causes a time
dependent behavior of the dark current, which is difficult to predict or to
monitor.
Figure 4. Dark current noise (here, the variance) as a
function of exposure time.
The readout noise can simply be obtained as the dark current for zero exposure
time. In Figure 5, we expand Figure 4 by plotting the logarithm of the observed
noise (but now the standard deviation) as a function of the logarithm of the
exposure time. Assuming that the observed noise is a combination of readout
noise and dark noise, and that the dark noise is proportional to the square
root of the exposure time (which it should be for exposures shorter than 5 to
10 minutes), we can fit both the readout noise and the dark current to the
observed data. Using the gain factors obtained above, we get a readout noise of
13.7 or 12.2 electrons, for ISO 400 and ISO 800, respectively, and a dark
current of about 3.6 electrons/pixel/second. This latter figure is highly uncertain,
but it suggests that for exposure times shorter than about 30 seconds the
readout noise dominates.
Figure 5. Dark current noise (here, the standard
deviation) versus exposure time on logarithmic scales.
Some
conclusions:
–
Gain
factors and readout noise obtained are relatively consistent with those found
by others. The dark current is a bit on the high side, but cannot be determined
very precisely.
–
The
camera shutter does not allow exposures shorter than 50 msec with any precision.
–
The
lack of temperature control makes the dark current unpredictable. This is less
of a problem for exposures shorter than 30-60 seconds, since they are dominated
by readout noise.
–
There
is some processing going on before the RAW file, at least a dark current
subtraction.
Even the least processed images – those in RAW formats – do not consist of the
raw, unprocessed data in the way we are used to from astronomical CCD cameras.
The details of this onboard processing are not described by the camera manufacturers. A
simple subtraction of a mean dark current level should not pose a problem for
the ability do photometry. However, if the processing includes scaling,
filtering, bad-pixel removal, “noise reduction”, etc., it may introduce
unpredictable errors in photometric measurements. How can we test this?
To Hans’ last question: A possible test of how well CMOS-based observations perform under in-camera secret processing is to test a star field and use astrometry.net processing to find the stars in a standard star database and process observed fluxes against known ones – the magnitude of the problem could be understood with careful analysis. I think 30s wide-field imaging of a clear sky can reveal hundreds of stars from just a tripod – we’d need to mount a DSLR on a guided or tracking telescope to do stellar clusters – perhaps with a telelens of 300mm covering some 10-15 degrees we could do this. We have mounts and telescopes, and even adaptors to put DSLRs right into the telescope. Outside mounting should perhaps be considered first. Chris and I can process the images – we’ve done it (see other blog).
Peter: taking the pictures is manual (clicking, changing exposure time and
ISO settings, etc), but the RAW-to-FITS conversion can be done batch-wise
in IRIS, and I have written 2 IDL-programs that generates the plots in a single
step. The bulk of the work has been to write/debug the IDL-code, to insert
sqrt(2)’s in the right places, and also book-keeping and (re)naming of files.
About the Sigma: doesn’t the clipping of the lowest counts point to some
sort of filtering rather than subtraction of a too large mean value. If you start
at a bias level (128 for my EOS 300D), then add sky signal, dark signal,
readout noise, dark noise, and photon noise, and then subtract a single
number from all pixels, then the noise should still be there. To get what you
see, you EITHER have to subtract more from the pixels with high counts than
from the pixels with low counts, OR perhaps your camera simply set the bias
level to zero after the subtraction. I can see the pixel values BELOW the bias
level in my RAW frames. Can you do that?
Chris: I’ve simply taken pairs of images – click,click – and then computed the
relative differences between the mean values in a central 600×400 pixel
sub-frame. So unless the lamps in my house vary wildly at short time scales,
the variation has to be due to shutter performance. And, yes, you could beat
down the noise by averaging, but the noise introduced by the shutter rapidly
reaches 10-20%, so you would need to spend a lot of work and time just to
compensate for the unreliable shutter. If possible, it is better to use exposures
longer than 50-100 msec. I have no idea if this behavior is typical for these
type of cameras. If I remember it right we saw something similar in our
Earthshine telescope, but perhaps at around 10 msec instead of 50 msec.
/Hans
Very interesting Hans!
Since we, among us, own a 14-bit Canon and a 12-bit Sigma we could test these as well. Is the software you have a simple package, or is each analysis in your blog-entry a hand-operated analysis?
I am working on a system that will operate any camera that has a plug for an electric shutter release, so I can automate the gathering of the many images needed.
I have a comment: in the Sigma images, at least, I see heavy ‘clipping’ of the lowest counts – I think the algorithm inside this camera decides where the dark-level should be and substracts an agressively set mean value – this causes sky pixels to become 0 with remainders of noise sticking up. This would not just alter the mean level of the DC but also alter the variance in RON and DC analysis.
The price for commercial DSLRs – or DSLs (mirror-less) – is such that we can gain a lot by using these cameras for experiments at least. I would like to work towards an automatic system such as the one seen in the PANOPTES site (great site, actually!) – if we have success we could get a ‘real science-grade’ (and 16-bit) CMOS camera.
Let us discuss what is needed – let’s start by reading the PANOPTES site materials.
Great stuff!
For t<50 ms, it starts to look a bit unsettling, right?
One option is to take lots of images — as we do — 100 for example — and beat the noise down by a factor of 10… does this make sense or perhaps I misunderstood the plot?