next up previous contents
Next: setred - Creating a Up: Software components Previous: Software components   Contents

rctred - Reducing the images listed in a file

Usage:

rctred rctred_parfile

rctred indir infiles outdir outfiles overscan /

fit order osrej rejtype trim twodbias /

biasname flatten flatname document

Rctred is a FORTRAN program which performs basic image reduction tasks on a list of images. It outputs the resulting (reduced) images whose names are given in another list. The same set of operations is performed on each image in the list, so normally the images in the list and any calibration images used must match one another in terms of their image type (e.g., bias, flat, or object), filters, etc. In order, it performs any of the following operations on each image: 1) subtracts an overscan bias, 2) trims away the overscan regions, 3) subtracts a 2-D bias pattern image, 4) subtracts a dark image, and 5) divides by a flatfield image.

Rctred normally takes a single argument on the command line which is the name of a parameters file. The parameters file (a simple text file) can exist in the user's current directory or anywhere else on the system if the full pathname is provided. Alternatively, the same 17 parameters that would have appeared in the parameters file can be given in order on the command line. The 17 parameters, in the order they appear in the parameters file or on the command line, are as follows:

1. indir
(the input directory) is the name of the directory containing the images to be reduced. It must be either a full pathname or the string './' if rctred is to be invoked while in the input directory.
2. infiles
is the name of a file that lists the names of the FITS images to be reduced. The image names are given one per line in this file. There should be no blank lines in this file and only simple filenames (not full pathnames) should be given.
3. outdir
(the output directory) is the name of the directory where the output (reduced) images are to be written. Like indir, this parameter must be either a full pathname or the string './'.
4. outfiles
is the name of a file that lists the names of the FITS images that are output. The image names are given one per line in this file. There should be no blank lines in this file and only simple filenames (not full pathnames) should be given. There should be an entry in outfiles for every one in infiles.
5. osbias
is either 'y' or 'n' telling the script "yes", subtract an overscan bias level from the image, or "no", don't do this.
6. fit
tells how to determine the overscan bias as a function of row in the image. If 'mean', the mean value of each row in the overscan region is subtracted from its corresponding row in the image. If 'constant', the mean value of the entire overscan region (a single value) is subtracted from the image. If 'cheby', a Chebyshev polynomial is fit through a running mean of the overscan region. Of course, if the CCD is readout through multiple amplifiers, a separate calculation is done for each area readout.
7. order
is an integer giving the order of the function fit to the overscan regions. This parameter is applicable if fit='cheby'.
8. osrej
is either 'y' or 'n' telling the script "yes", reject overscan pixel values that deviate significantly from the other values in the same overscan row, or "no", don't do this.
9. rejtype
tells what sort of method to use to reject deviant pixels from the overscan region before determining the overscan bias. If 'minmax', the high- and low-valued pixels in each row of the overscan are rejected. If 'sigclip', pixels deviating from the mean in the row by more than 3 times the standard deviation are rejected.
10. trim
is either 'y' or 'n' telling the script "yes", trim away the overscan regions of the image, or "no", don't do this.
11. twodbias
is either 'y' or 'n' telling the script "yes", subtract a calibration frame from the image, or "no", don't do this. This operation is performed after any overscan bias subtraction and trimming is done. Any calibration frame used should have the same size as the image at this point in the process or an error will result. Likely the calibration frame will already have been reduced in some way. For instance, a 2-D pattern in the bias can be removed by providing the script with a combined bias image. The combined bias image may be a "residual" bias pattern if the overscan bias is subtracted from the individual images used to make it. The "bias" might also be made to contain dark counts by adding a dark exposure into this image (whatever makes sense).
12. twodname
is the name of the calibration frame to subtract if requested by the twodbias parameter. This parameter must always be supplied (perhaps using a dumy name) even if it is never used. The full pathname must be provided unless this image exists in the directory where rctred is invoked. Note that in these scripts, the word "bias" or "2-D bias" is often used in reference to this image since this image most likely represents bias counts.
13. subdark
is either 'y' or 'n' telling the script "yes", subtract a dark frame from the image, or "no", don't do this. This operation is performed after any overscan bias subtraction, trimming, or 2-D bias pattern subtraction is done. Any dark frame used should have the same size as the image at this point in the process or an error will result.
14. darkname
is the name of the dark frame to subtract if requested by the subdark parameter. This parameter must always be supplied (perhaps using a dumy name) even if it is never used. The full pathname must be provided unless this image exists in the directory where rctred is invoked.
15. flatten
is either 'y' or 'n' telling the script "yes", divide by a calibration image (e.g., a flat) or "no", don't do this. This operation is performed after the steps above have been taken (bias subtraction, dark subtraction, and trimming).
16. flatname
is the name of the calibration image to divide by if requested by the flatten parameter. This parameter must always be supplied (perhaps using a dumy name) even if it is never used. The full pathname must be provided unless this image exists in the directory where rctred is invoked.
17. document
is either 'y' or 'n' telling the script "yes" write comments or history information into the image headers of the output images describing the reduction steps taken.
An example parameters file for rctred is given below:
/archive/021215/
imagesU.dat
/home/everett/data/images/
outputU.dat
y
mean
0
y
minmax
y
n
dumy
n
dumy
y
/home/everett/data/flats/flatU.fits
y
Note that the formatting is a bit picky for the parameters file. The parameter values begin in the first column of each line, and each parameter must be listed. Lowercase 'y' and 'n' are used for the true and false values. One way to create this parameter file is to use a companion script to rctred called setred, which will help to ensure the correct format.
next up previous contents
Next: setred - Creating a Up: Software components Previous: Software components   Contents
Louis-Gregory Strolger 2012-01-09