Calibration of TUG data
Introduction
In this page you will find some
information about how to calibrate a data taken from TUG using IRAF. Throughout the document it will
be assumed that the reader is already familiar with CCD data reduction.
Before starting to make the calibration
it would be good for you to extract the properties of the fits files
came from TUG since they do not have a proper naming convention. To do
this for an amount of data you can use the IDL script i have written (rtt150_retrieve.pro)
In order to start an Iraf session you
can use the given commands below or a little script to both go to the
iraf login directory, start-up the DS9 and the iraf session (iraf_startup_script)
in an xgterm.
To start an Iraf session you can use the :
$ cl
command in the IRAF login directory. If you want to use graphical
interfaces you should execute cl in an xgterm. I would also suggest you
to start DS9 before starting the IRAF session.
We first begin by bias and flat combining :
cl> noao
cl> imred
cl> ccdred
You can always display the images
by the
cl> display image.fits 1
First we will need to combine the bias frames to
create a superbias by taking the median values, using the zerocombine
task of iraf
cc> epar zerocombine
PACKAGE = ccdred
TASK = zerocombine
input
=
b*.fit List of zero level images to combine
(output =
super_bias) Output zero level name
(combine=
median) Type of combine operation
(reject
=
minmax) Type of rejection
(ccdtype=
) CCD image type to combine
(process=
no) Process images before combining?
(delete
=
no) Delete input images after combining?
(clobber=
no) Clobber existing output image?
(scale
=
none) Image scaling
(statsec=
) Image section for computing statistics
(nlow
=
0) minmax: Number of low pixels to reject
(nhigh
=
1) minmax: Number of high pixels to reject
(nkeep
=
1) Minimum to keep (pos) or maximum to reject (neg)
(mclip
=
yes) Use median in sigma clipping algorithms?
(lsigma
=
3.) Lower sigma clipping factor
(hsigma
=
3.) Upper sigma clipping factor
(rdnoise=
3.0) ccdclip: CCD readout noise (electrons)
(gain
=
1.5) ccdclip: CCD gain (electrons/DN)
(snoise
=
0.) ccdclip: Sensitivity noise (fraction)
(pclip
=
-0.5) pclip: Percentile clipping parameter
(blank
=
0.) Value if there are no pixels
(mode
=
ql)
After editing the parameter file we can execute the tool by the command
below :
cc> zerocombine
We
should also create the lists of the files we will use. To create the
lists you can use the little script i have written (lister) or just use the ls commands with the
appropriate parameters. Here i have created the flat.lis and data.lis
files as the lists of the flat and image files.
Now we will subtract the bias images
from the flat files, and combine the flat files to create a super flat
which will be used to normalize the data.
cc> epar ccdproc
PACKAGE = ccdred
TASK = ccdproc
images
=
@flat.lis List of CCD images to correct
(output
=
@bf.lis) List of output CCD images
(ccdtype=
) CCD image type to correct
(max_cac=
0) Maximum image caching memory (in Mbytes)
(noproc
=
no) List processing steps only?
(fixpix
=
no) Fix bad CCD lines and columns?
(oversca=
no) Apply overscan strip correction?
(trim
=
no) Trim the image?
(zerocor=
yes) Apply zero level correction?
(darkcor=
no) Apply dark count correction?
(flatcor=
no) Apply flat field correction?
(illumco=
no) Apply illumination correction?
(fringec=
no) Apply fringe correction?
(readcor=
no) Convert zero level image to readout correction?
(scancor=
no) Convert flat field image to scan correction?
(readaxi=
line) Read out axis (column|line)
(fixfile=
) File describing the bad lines and columns
(biassec=
) Overscan strip image section
(trimsec=
) Trim data section
(zero
=
super_bias) Zero level calibration image
(dark
=
) Dark count calibration image
(flat
=
) Flat field images
(illum
=
) Illumination correction images
(fringe
=
) Fringe correction images
(minrepl=
1.) Minimum flat field value
(scantyp=
shortscan) Scan type (shortscan|longscan)
(nscan
=
1) Number of short scan lines
(interac=
no) Fit overscan interactively?
(functio=
legendre) Fitting function
(order
=
1) Number of polynomial terms or spline pieces
(sample
=
*) Sample points to fit
(naverag=
1) Number of sample points to combine
(niterat=
1) Number of rejection iterations
(low_rej=
3.) Low sigma rejection factor
(high_re=
3.) High sigma rejection factor
(grow
=
0.) Rejection growing radius
(mode
=
ql)
cc> ccdproc
cc> epar flatcombine
PACKAGE = ccdred
TASK = flatcombine
input
=
@bf.lis List of flat field images to combine
(output =
super_flat) Output flat field root name
(combine=
median) Type of combine operation
(reject
=
avsigclip) Type of rejection
(ccdtype=
) CCD image type to combine
(process=
no) Process images before combining?
(subsets=
no) Combine images by subset parameter?
(delete
=
no) Delete input images after combining?
(clobber=
no) Clobber existing output image?
(scale
=
mode) Image scaling
(statsec=
) Image section for computing statistics
(nlow
=
1) minmax: Number of low pixels to reject
(nhigh
=
1) minmax: Number of high pixels to reject
(nkeep
=
1) Minimum to keep (pos) or maximum to reject (neg)
(mclip
=
yes) Use median in sigma clipping algorithms?
(lsigma
=
3.) Lower sigma clipping factor
(hsigma
=
3.) Upper sigma clipping factor
(rdnoise=
3.0) ccdclip: CCD readout noise (electrons)
(gain
=
1.5) ccdclip: CCD gain (electrons/DN)
(snoise
=
0.) ccdclip: Sensitivity noise (fraction)
(pclip
=
-0.5) pclip: Percentile clipping parameter
(blank
=
1.) Value if there are no pixels
(mode
=
ql)
cc> flatcombine
Now we can use super_bias and super_flat files to make the reduction of
the images.
cc> epar ccdproc
PACKAGE = ccdred
TASK = ccdproc
images
=
@data.lis List of CCD images to correct
(output =
@cdata.lis) List of output CCD images
(ccdtype=
) CCD image type to correct
(max_cac=
0) Maximum image caching memory (in Mbytes)
(noproc
=
no) List processing steps only?
(fixpix
=
no) Fix bad CCD lines and columns?
(oversca=
no) Apply overscan strip correction?
(trim
=
no) Trim the image?
(zerocor=
yes) Apply zero level correction?
(darkcor=
no) Apply dark count correction?
(flatcor=
yes) Apply flat field correction?
(illumco=
no) Apply illumination correction?
(fringec=
no) Apply fringe correction?
(readcor=
no) Convert zero level image to readout correction?
(scancor=
no) Convert flat field image to scan correction?
(readaxi=
line) Read out axis (column|line)
(fixfile=
) File describing the bad lines and columns
(biassec=
) Overscan strip image section
(trimsec=
) Trim data section
(zero
=
super_bias) Zero level calibration image
(dark
=
) Dark count calibration image
(flat
=
super_flat) Flat field images
(illum
=
) Illumination correction images
(fringe
=
) Fringe correction images
(minrepl=
1.) Minimum flat field value
(scantyp=
shortscan) Scan type (shortscan|longscan)
(nscan
=
1) Number of short scan lines
(interac=
no) Fit overscan interactively?
(functio=
legendre) Fitting function
(order
=
1) Number of polynomial terms or spline pieces
(sample
=
*) Sample points to fit
(naverag=
1) Number of sample points to combine
(niterat=
1) Number of rejection iterations
(low_rej=
3.) Low sigma rejection factor
(high_re=
3.) High sigma rejection factor
(grow
=
0.) Rejection growing radius
(mode
=
ql)
And thats all !! we are finished with the calibration of the data.
Now we will make the alignment
and combining of the data, this will be helpful when we want to study
dim objects. Since the observation of a specific field is being done by
shift the the field of view a little to make possible the future
correction of the bad pixel of cosmic ray events, we have to first
align the images before combining them. To do this we have two tasks to
complete, imalign and imcombine.
Before executing the imalign task you
will need to create some files : These are fisrt the list of images you
will use to align, the list of the output image list, a reference frame
to take as a reference to other frames and the coordinates of the
sources which will be used to make the alignment. To obtain the
coordinates you can use DS9.
cc>epar imalign
PACKAGE = immatch
TASK = imalign
input
=
@im_list_1 Input images
referenc=
cr0001_1.fit Reference image
coords
=
source_1 Reference coordinates file
output =
@outim_list_1 Output images
(shifts
=
) Initial shifts file
(boxsize=
3) Size of the small centering box
(bigbox
=
25) Size of the big centering box
(negativ=
no) Are the features negative ?
(backgro=
INDEF) Reference background level
(lower
=
INDEF) Lower threshold for data
(upper
=
INDEF) Upper threshold for data
(niterat=
5) Maximum number of iterations
(toleran=
0) Tolerance for convergence
(maxshif=
INDEF) Maximum acceptable pixel shift
(shiftim=
yes) Shift the images ?
(interp_=
linear) Interpolant
(boundar=
nearest) Boundary type
(constan=
0.) Constant for constant boundary extension
(trimima=
yes) Trim the shifted images ?
(verbose=
yes) Print the centers, shifts, and trim section ?
(list
=
)
(mode
=
ql)
Here
i should warn you about two parameters, bigbox and the boxsize these
are important since the task will shift the images with these
parameters. If you want it to be more accurate you should make the
small centering box smaller. Also you should make the bigbox parameter
big if you have a much shifted data. I have used these parameters to
align 8 images and it works fine.
cc> epar imcombine
PACKAGE = immatch
TASK = imcombine
input =
@outim_list_1 List of images to combine
output
=
field_1 List of output images
(headers=
) List of header files (optional)
(bpmasks=
) List of bad pixel masks (optional)
(rejmask=
) List of rejection masks (optional)
(nrejmas=
) List of number rejected masks (optional)
(expmask=
) List of exposure masks (optional)
(sigmas
=
) List of sigma images (optional)
(logfile=
STDOUT) Log file
(combine=
sum) Type of combine operation
(reject
=
none) Type of rejection
(project=
no) Project highest dimension of input images?
(outtype=
real) Output image pixel datatype
(outlimi=
) Output limits (x1 x2 y1 y2 ...)
(offsets=
none) Input image offsets
(masktyp=
none) Mask type
(maskval=
0.) Mask value
(blank
=
0.) Value if there are no pixels
(scale
=
none) Image scaling
(zero
=
none) Image zero point offset
(weight
=
none) Image weights
(statsec=
) Image section for computing statistics
(expname=
2400) Image header exposure time keyword
(lthresh=
INDEF) Lower threshold
(hthresh=
INDEF) Upper threshold
(nlow
=
1) minmax: Number of low pixels to reject
(nhigh
=
1) minmax: Number of high pixels to reject
(nkeep
=
1) Minimum to keep (pos) or maximum to reject (neg)
(mclip
=
yes) Use median in sigma clipping algorithms?
(lsigma
=
3.) Lower sigma clipping factor
(hsigma
=
3.) Upper sigma clipping factor
(rdnoise=
3.0) ccdclip: CCD readout noise (electrons)
(gain
=
1.5) ccdclip: CCD gain (electrons/DN)
(snoise
=
0.) ccdclip: Sensitivity noise (fraction)
(sigscal=
0.1) Tolerance for sigma clipping scaling corrections
(pclip
=
-0.5) pclip: Percentile clipping parameter
(grow
=
0.) Radius (pixels) for neighbor rejection
(mode
=
ql)
And thats all now we have a set of calibrated, alinged images and a
combined one super image from those.
