ccdcalib applies bias, thermal, and flat field corrections to FITS images. In addition ccdcalib can optionally preform a cosmic-ray/hot pixel correction. Default calibration images are retrieved from the calibration directory /usr/local/telescope/archive/calib/. It is normally run as part of the daily image calibration procedure (calib-ccd) for all images transferred from previous night’s observing run on the Gemini telescope, but can be run manually.


R= raw science frame, B = master bias (median averaged), D = master dark (median averaged)

T = scaled thermal = (D - B) * t/t0 (per pixel multiply, where t = science exp. time, t0 = thermal exposure time)

F = master flat (filter specfic, median averaged)

NF = (F-B)/mean(F-B): normalized flat

calibrated frame = (R - B - T) / NF


  • Assumes the flat exposure time is small so no dark correction is needed).
  • Output is 16-bit for compatibility with Talon software
  • Does not use border pixels to calculate mean (outer 20 rows, columns)
  • Uses the cosmics library to removed hot pixels

Version: 2.0 (13 May 2016)

Known bugs/issues: None


  --version             show program's version number and exit

  -h, --help            show this help message and exit

  -H Hot pixel removal  Number of hot pixel removal iterations [1]

  -b Bias frame         Bias frame

  -d Dark frame         Dark frame

  -f Flat frame         Flat frame

  -c Calibrated image   Calibrated image [default: overwrites input image]

  -v                    Verbose output

© Robert Mutel 2018