saltgain

Name

saltgain – CCD amplifier gain correction for images

Usage

saltgain images gaindb mult logfile (verbose)

Parameters

images
String. List of input images including, if necessary, absolute or relative paths to the data. Data can be provided as a comma-separated list, or a string with a wildcard (e.g. ‘images=S20061210*.fits’), or a foreign file containing an ascii list of image filenames. For ascii list option, the filename containing the list must be provided preceded by a ‘@’ character, e.g. 'images=@listoffiles.lis‘. The input files will be overwritten with the gain-corrected data.
outimage
String. A list of images. Data can be provided as a comma-separated list, or a string with a wildcard (e.g. ‘outimages=rS20061210*.fits’), or a foreign file containing an ascii list of image filenames. For ascii list option, the filename containing the list must be provided preceded by a ‘@’ character, e.g. 'outimages=@listoffiles.lis‘. This list must be of the same size as the images argument list.
outpref
String. If the outpref string is non-zero in length and contains characters other than a blank space, it will override any value of the outimages argument. Output file names will use the name list provided in the images argument, but adding a prefix to the basename of each output file defined by outpref. An absolute or relative directory path can be included in the prefix, e.g. ‘outpref=/Volumes/data/p’.
gaindb

String. This is the name and path to an ascii table that contains the amplifier gains specific to a SALT instrument. The table is used to gain-correct amplifier raw count images. Gain is assumed to be uniform across an individual amplifier but assumed to vary from amplifier to amplifier. An example of the table format follows:

# Database of SALTICAM CCD amplifier properties
# 10 Aug 2006 - Telescope Data
# READOUT GAINSTATE GAIN RDNOISE BIAS AMP
SLOW FAINT  1.06  3.60  300 amp1
SLOW FAINT  0.99  3.43  300 amp2
SLOW FAINT  1.06  3.71  300 amp3
SLOW FAINT  1.07  3.69  300 amp4
SLOW BRIGHT 2.32  3.98  300 amp1
SLOW BRIGHT 2.17  3.78  300 amp2
SLOW BRIGHT 2.32  4.07  300 amp3
SLOW BRIGHT 2.33  3.96  300 amp4
FAST FAINT  1.55  5.22  300 amp1
FAST FAINT  1.45  5.11  300 amp2
FAST FAINT  1.53  5.51  300 amp3
FAST FAINT  1.58  5.61  300 amp4
FAST BRIGHT 4.26  6.39  300 amp1
FAST BRIGHT 3.96  5.88  300 amp2
FAST BRIGHT 4.21  6.35  300 amp3
FAST BRIGHT 4.32  7.02  300 amp4

READOUT and GAINSTATE are the CCD readout speed and gain setting respectively. The GAIN column refers to the multiplicative gain factor. RDNOISE refers to readout noise and BIAS refers to typical CCD bias levels. These data are calibrated regularly at the telescope and provided by the SALT project. Recent versions of the table are provided in the SALT IRAF distribution at salt$salticam/data/SALTICAMamps.dat and salt$pfis/data/PFISamps.dat, and updates will be publicized on the SALT web site at www.salt.ac.za.

(usedb)
Boolean. If yes, then the task will use the gain settings from the config file. Otherwise, it will look for the gain values in the image header.
(mult)
Boolean. If mult=’yes’ the images are gain corrected. If mult=’no’ only the GAIN and RDNOISE keywords are updated in the image file extensions with the values contained in the gaindb fil.
(clobber)
Hidden boolean. If set to ‘yes’ files contained within the outpath directory will be overwritten by newly created files of the same name.
(logfile)
String. Name of an ascii file for storing log and error messages written by the task. The file may be new, or messages can also be appended to a pre-existing file.
(verbose)
Boolean. If verbose=n, log messages will be suppressed.

Description

saltgain multiplies images by a constant factor appropriate for gain correction. Each CCD in SALT’s SALTICAM and RSS instruments has two readout nodes, SALTICAM has a two-CCD mosaic and RSS has a three-CCD mosaic. Each amplifier has a specific gain factor which varies slowly over time but which is constant across the amplifiers. Gain values depend on the readout speed and gain setting of the CCD. For all possible permutations, gains are stored in an ascii table which is updated periodically. Saltgain extracts gains from the ascii table and applies them to raw data.

New gain and readout noise values will be written to the header keywords of each HDU. Keyword writing can also occur without peforming the gain correction itself. If the gain correction is performed, a keyword, GAINMULT is added to the image extension with the value 1.0. If the gain correction is not performed, GAINMULT wil contain the gain factor recorded in the ascii table. The purpose of the GAINMULT keyword is to report what multiplicative factor is required to gain correct an image.

Based on data in image keywords, e.g. gain setting, readout speed and amplifier number, saltgain will extract the correct gain and readout noise values from the ascii table and update keywords and optionally perform the gain correction.

The correction for the gain setting is based on the following equation: electrons=gain*(1+gain1*1e-6*data)*data where data is in ADU and gain is in electrons/ADU. The SALT CCDs has shown evidence of non-linearity for very bright values and this correction takes account of that. This non-linear correction is only applied for values given in the header under the GAIN1 keyword.

Examples

  1. To correct gain and readout noise keywords in image files:

    --> saltgain images='@images.lis'
    gaindb='/iraf/extern/salt/pfis/data/PFISamps.dat' mult='no'
    logfile='salt.log' verbose='yes'
  2. To correct gain and readout noise keywords and gain-correct images:

    --> saltgain images='@images.lis'
    gaindb='/iraf/extern/salt/pfis/data/PFISamps.dat' mult='yes'
    logfile='salt.log' verbose='yes'

Time and disk requirements

Individual unbinned full frame RSS image files can be 112MB in size. It is recommended to use workstations with a minimum of 512MB RAM. On a linux machine with 2.8 Ghz processor and 2 Gb of RAM, one 2051x2051 image can be processed in 0.31 sec.

Bugs and limitations

Currently no error propagation is performed through the calculations. This can occur once the saltprepare tool writes bad pixel and variance maps to raw data.

Send feedback and bug reports to salthelp@saao.ac.za

Table Of Contents

Previous topic

saltflat

Next topic

saltheadtime

This Page