Some useful IRAF commands:

cl                         - starts IRAF

logout                     - exits IRAF

imheader                   - lists all of the images and a short description

imheader object.fits  lo+  - displays the full header file for an image

bye                        - exits a package

!                          - the ! allows you to use any linux command

?                          - gives a list of possible commands

epar                       - allows you to change the parameters of a tool

Data Reduction

The raw images taken of the sources contain flaws from dust, cosmic rays,bad pixels, and electronic noise. These flaws must first be taken out of the images before the images can be used. To do this we used IRAF. IRAF is the Image Reduction and Analysis Facility and is used for annalysis of optical data. Inorder to use IRAF you must first be in an xgterm.

To reduce the images you must be in the ccdred package. Go to noao: imred: ccdred

First, IRAF needs to know what telecsope was used. To find out what instrument the images were taken with, use "imheader" to look at the header file of an image.To set the instument use the "setinstrument" command. Type "?" to get a list of options.


Our images were taken with the WIYN .9m telescope using the S2KB detector so we use "kpnoheaders". This will now automatically take you into EPAR for CCDRED. Set "verbose" to yes. During the processing the images are automatically overwriten.The backup parameter will create backup files of all the images before they are changed.Then type :wq to save and exit.

You are next automatically taken to EPAR CCDPROC. This is the task that does all of the work. You don't need to change this yet so just type :q to exit.

cc>> ccdlist images*.fits	#shows you your files
cc>> type subsets		#this was created by ccdlist
cc>> dir ccddb$kpno		#kpno translation files
cc>>type ccddb$kpno/direct.dat

Now that the instrument is set, the CCDRED package can read the header files.

When all images are saved, extra pixels are added to the sides. Therefore all images must be trimed.The bias frames will have to be combined and then subtracted from the other images. The Flats will be combined as well and subracted from the source images. CCDPROC is used to make all of the corrections on the images.

ccdlist will list the images along with their name, type, filter code, and what corrections have been made.

1) Bias:

cc>> epar ccdproc

setimage = images*.fits
output   = ""
(ccdtype = zero) 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 = yes) Apply overscan strip correction?
(trim    = yes) Trim the image?
 -->set all corrections to no
(biassec = image) Overscan strip image section
(trimsec = image) Trim data section
(minrepl = 1.)

	The rest should be fine as the default.
	Type :wp to save and quite or :go to automatically run ccdproc.

All of the Bias frames must now be combined.

cc>>epar zerocombine

(input   = images*.fits)  
(output  = Zero) Output zero level name
(combine = median) Type of combine operation
(reject  = none) Type of rejection
(ccdtype = zero) 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   = mode) Image scaling

	The rest should be fine as the default.

2) Flats

cc>>epar ccdproc
    Change (ccdtype = flat), (zerocorr = yes), (zero = Zero.fits). The rest is the same as it was
    for the bias frames.

cc>>epar flatcombine
    Change (output = Flat),(combine = median),(subset = yes).

Flatcombine will automaticaly combine the flats taken with different filters separatly. So they 
all can be done at once.

3) Sources

cc>>epar ccdproc

     Change (ccdtype = object), (flatcorr = yes), (zerocorr = yes), (flat = Flat*.fits)
     (zero = Zero.fits), (minrepl = .1)

This will reduce all of your source images. CCDPROC will automatically do the images taken with 
different flats separatly so you can do them all at once.

Return to Top


The magnitude of stars will vary from day to day from changes in weather and observing conditions. To find the flux of the stars without this variation, photometry must also be taken of reference stars. Reference stars are stars that have a steady, measured flux. From knowing the magnitude of these stars, the offset can be computed and this is subtracted from the measured flux of the source. Therefore, if we measure variability in the flux of the source, we know it is not due to changing observing conditions. We used qphot "quick photometry" to determine the magnitudes from the CCD images. This is located in the package noao:digiphot:apphot.

Return to Top

Kirsten Larson's REU Home Page

IRAF Home Page