RASC Calgary Centre - Imaging the Sky 3

Interested in Astronomy? Become a member of the RASC!

Click here to find out about RASC membership and RASC publications.




Imaging the Sky 3
by Jason Nishyama


Page last updated November 5, 2018

Imaging the sky - part the third

In the first two articles in this series we have looked at imaging devices (DSLRs and imagers) and the ways they can be mounted. In this final article we will look at some of the post imaging processing that can be (and should be) done.

Bias, dark and flat frames

As mentioned in the first article in this series, CCD imagers are subject to dark current. This is the noise caused by thermal motion inside the chip itself which causes stray electrons to enter the wells on the imager. For amateurs this is the predominant noise as it is not practical for most amateurs to cool their imagers below about -40 degrees Celsius. To combat this one must take dark frames. A dark frame is simply an image taken at the same temperature and the same exposure as the astro-image you are taking, only with the lens cover on so that no light can enter the imager. What is recorded is then the noise of the imager at that temperature. Since the noise varies by temperature this needs to be done at the same temperature as the actual image. Also since the noise adds up over time, the "exposure" of the dark frame must be the same length as the actual image itself. It is best to do several dark frames and average them if that is possible.

Bias frames take care of two types of error. One is a bias or shift in the output of the analogue to digital converter (ADC) in the camera. The manufacturer will put a positive bias on the ADC so that small signals aren't lost in the conversion process. In essence the effect of this is that instead of a dark pixel being assigned the value of 0, it will be assigned some number greater than 0. That way small signals don't get lost due to noise. There is also some noise caused by the ADC itself during the readout process. This information is also contained in the bias frame. Taking a bias frame is quick and easy. Simply set the exposure length on the camera to zero (or the fastest shutter speed available on the camera if zero isn't an option) and take a picture with the lens cover on. This frame will contain both the bias offset and any readout noise from the CCD. Bias is why astronomers still prefer CCDs over CMOS sensors as you only have to worry about the noise and bias of one ADC on the CCD as opposed to one ADC per pixel on the CMOS sensor.

One professional astronomer has quipped that the only flat CCD is a dead CCD. Non-flatness comes from the fact that no matter how well it has been produced, each pixel of the CCD has a slightly different sensitivity to light. This means that if you show a CCD a uniformly illuminated surface, it will not look uniformly bright once you read out the image from the chip. Further to this dust in the optical system can cause diffraction "doughnuts" to form in the image. Creating a flat frame can help eliminate these problems.

How to create a good flat frame is the topic of much debate in both professional and amateur circles. In this article I'll just look at the main types and allow you to decide which one works the best for you. The types of flat frame break down into either dome flats or sky flats depending on where you point the telescope to take them.

Dome flats are taken in the dome by either placing an uniformly illuminated white screen over the aperture of the telescope and taking an image or by pointing the telescope at an uniformly illuminated white spot on the dome itself or, in a pinch, just pointing the telescope at the dome and turning the white lights on. The advantage of the dome flat is obvious. You can take it at any time so can be done during the day so you don't lose any observing time at night. Further if you're really serious, the illumination and painting of the spot can be controlled to ensure proper colour and flatness. The down side is that it's nigh impossible to make an uniform white spot, let alone uniformly illuminate it. Even so a dome flat can provide good results if care is taken in the creation of the spot and the illumination.

Sky flats fall into one of two categories: twilight flats and dark sky flats. Twilight flats are taken, as the name suggests, at twilight. There's a time when the Sun has just set where the sky about 10 degrees off the zenith opposite the Sun is very uniform. The telescope is pointed at this point in the sky and flat frames imaged from this. The downside is that the time that twilight is available to do this properly lasts only a few minutes so you have to be quick.

Dark sky flats us the night sky itself to make the flat. Basically you find a part of the night sky with few stars, point the telescope at that point, turn off the telescope drive, open the shutter and let the night sky float by for several minutes. By taking several of these the star trails will average out and provide a flat frame. The main advantage of this is that the colour balance will perfectly match the night sky. The downsides are taking time from observing and star trails through the flats.

Twilight and sky flats also have the advantage of being available even if you don't have a dome. So if you're more mobile in your observing these are the ones for you.

Do I need to take all of these?

Well, no. Professional astronomers generally cool their CCDs with liquid nitrogen virtually eliminating the dark current. This saves them the time of doing dark frames so they will only take bias frames. Unless you have access to a CCD camera in a dewar as well as some liquid nitrogen this is not an option. If one looks at the formula for determining a final image though:

final image = (image - (dark - bias) - bias )/(flat -(dark - bias) - bias)


you will note that both the bias is subtracted from both the image and the dark. This means that the dark frame also contains the bias frame. So subtracting a dark frame from the image frame will remove both the dark noise and the bias. This means that you only need to take darks and not darks and bias frames.

Flat frames are essential if you are trying to do any photometry using your camera/imager as the variations across the chip can cause large changes in measured magnitude. This is less essential for simple "pretty picture" imaging but a proper flat frame can make the background more uniform and reduce the effect of dust "doughnuts" in an image.

So a typical observing night might go something like this:

1) take 3-5 dark frames at the exposure you will be using.
2) take 2-3 flat frames if you wish to use flat frames - take 3-5 dark frames at the exposure for the flats if this exposure is different than what you'll be using for your images.
3) take your images at the same exposure as the initial flats.
4) take 3-5 more dark frames at the same exposure as the flats.

You want to take darks at the start and the end of the observing run to average out any noise difference caused by a change in the air temperature through the night. Each different exposure length will need it's own set of dark frames.

Now that you have your raw images, it's time to process them. I'll only go over the generalities of this as there are many different software packages to do this and to describe the process for each is beyond the scope of this article.

If you've decided you need bias frames, use your software to average them together. This gives you a master bias frame. Of course if you didn't take bias frames (and you really don't need to) you can skip this step.

If you have a master bias frame, use your software to subtract this from the dark frames. Again skip if you don't have the bias frame.

Average your dark frames by exposure time. That is only average the darks with the same exposure (the 1 minute darks with other 1 minute darks, the 2 minute darks only with the other 2 minute darks and so on). This gives you the master darks for each exposure length for that night.

If you have flat frames subtract the appropriate exposure length master dark from your flat frames. Then average the flat frames to make a master flat.

Finally on to your images. First you will subtract your dark/bias frames from each of the images (remembering to match exposure times). Once this is done, divide each image frame by the master flat.

At this point you may then stack (add) the images if you have taken many of the same object. This acts, to a point, like having a longer exposure.

As I have said, how you do all this depends on the software you have. Some will let you do all this in one shot by specifying the appropriate files, others need you to do each step manually. You will need to read the documentation supplied with your software to figure out how it will process your images.

At this point you will have nicely reduced images suitable to do science or to show others. You can even further process the images in image editing software such as Photoshop or GIMP.

The key is to now get out there and take some images. Like with terrestrial photography the key to getting better is to take lots. Also remember to record what you did with each image, that way you can duplicate it later!

This and the previous two articles has only touched the surface of astrophotography. Whole books have been written on the subject and if you want to learn more I would direct you to one of them. Michael Covington's book "Astrophotography for the Amateur" is a good reference and tutorial guide to the subject. Though it primarily deals with film, the techniques are the same. More importantly the Calgary Centre library at the WCO has a copy so you can give it a read the next time you're out at the WCO and it's clouded up!



Return to main page