User Tools

Site Tools


Dark frames and RTS2

Even modern SLR cameras offer a “noise reduction” option, which actually takes a dark exposure and by its subtraction it fixes the major contribution to the pixel noise of an image - the nonuniformity of dark current and CCD precharge. In astronomy, this practice is a must. Let's have a look how dark frames are managed in RTS2.


rts2-executor obtains darks of present cameras during states dusk and dawn unless it decides to take flats or it is interrupted to perform another action (GRB from rts2-grbd, manual insertion of a target <target>). The darks may have different exposure times:

  • item darks in section [<camera>] provides a list of fixed exposures to be always taken. Example:


darks = "10 20 30 120"
  • all exposure times from the past night are recorded and added to the list for the dawn dark frame session.

AFAIK no other dark frame properties are supported at this time.


Dark frame storage path is by default /images/<EPOCH>/darks/<CAMERA>/ and can be customized in rts2.ini.


There is no DF processing internal to RTS2. Externally, there is a set of scripts, developed on BOOTES-1B, to take care of an enormous amount of frames taken there. The set of scripts described here provides a mechanism to prepare a set of combined (average/median/custom) frames ready to be used while processing the scientific images. It is an ongoing work, not fully generalized to be used at other telescopes. On the other hand, its scheme is meant to be relatively easy to do so. The program to be called is, it should go through all the dark frames present, search for bad ones, select frames which could be combined and perform the combination. It has support for multiple CPU threads, so that the processing uses full CPU power present at the machine. The results of the combination are stored in a proc/ subdirectory of the DF storage path.


While processing the darks, generally only dark frames of equal properties can be combined. To simplify this task, we use a value called DID (dark ID), which may be changed to suit a particular camera scheme without changing the rest of scripts. Because obtention of such a value may be sometimes a complex task, it is implemented as a script. The script is supposed to compute the value and store it in the FITS header of the file for further reference.

Example1: the DID of SBIG ST-9 we used to use is simply the binning of the CCD.

Example2: the DID of andor DV-889 we have at BOOTES-1B is constructed of the CCD gain and other CCD configuration parameters:

      awk '{$1="";print;}' |  sed 's/[ \t]//g'`

DID construction should be implemented in

bad images

there is a support for removal of incorrectly taken images - ome camera tend to have problems with shutters, but also other reasons may cause the image to be dangerus to the result. Right now, this is performed in a script somewhat incorrectly called, which performs the evaluation and moves the images not passing the criteria to bad/ subdirectory of DF storage path. :!: The filter MUST be set up for EACH CCD camera separately.


Images are combined using, right now using IRAF, but anything callable from the shell may be used.


There is a script, which performs an automated search and subtraction of the DF. It's called (select dark, as it originally did not perform the actual subtraction).

howto/darks.txt · Last modified: 2009/02/25 00:00 (external edit)