Basic IRAF setup.

First, in your home directory, create a subdirectory called "iraf":

    mkdir iraf

Then, go into your iraf directory and type "mkiraf".  This creates the login script (called login.cl) and user parameters directory.

    cd iraf

    mkiraf


The "mkiraf" script will ask you what terminal type you want.  The xgterm is usually the best choice- it's an xterm-like terminal program that's written specifically to work with iraf.

Now, you may want to edit a few details in your login.cl file.  Near the top there's a section that says "Uncomment and edit to change the defaults." In this section, if you remove the # sign before a line you'll uncomment that line.  Some lines you may want to change are:

Now, time to start up iraf.  In your terminal window, type

    xgterm -sb &
    ds9 &

to start up an xgterm window with a scroll-bar, and a ds9 image display window.  Then, in your xgterm window, type

    cd iraf
    cl

to start iraf running.  Always cd to your iraf directory before starting up iraf!  If you don't, all hell may break loose.

Iraf is organized into packages which can contain other packages or tasks.  Each task has a parameter set which you can edit in a vi-like interface.  For example, to display an image called image.fits to your ds9 display window, you can just use the "display" task by typing the following at the iraf command line

    display image.fits

If you want to control the parameters of the display task, type

    epar display

which will put you in a vi-like editing window.  You can fill in parameter values and then quit editing by hitting Escape, and then quit the editor with ":wq" to quit and save values you filled in, ":q!" to quit without saving, or ":go" to execute the task immediately.

If you want to run a task, you need to load in the package that contains that task.  For example, if you want to flatten images using the "ccdproc" task, you have to know where it is (it's in noao.imred.ccdred) and then load in the appropriate packages with the following iraf commands, and then finally you can edit the parameters for the ccdproc task:

    noao
    imred
    ccdred
    epar ccdproc

To get the online help for a particular task, say ccdproc, type

    help ccdproc

There's also a program called pyraf which is a more user-friendly front-end to iraf with a nice graphical interface for editing task parameters.    You can run pyraf from a normal xterm or any terminal window- it doesn't need to be run from an xgterm.   I've found that pyraf is a much nicer environment to work in than old-fashioned iraf.

To make pyraf work without crashing, you need to add a line to your shell's setup file.  If you're using tcsh, then add the following line to your .cshrc file:

    limit stacksize unlimited

If you use bash, put the following line in your .bashrc file:

    ulimit -s unlimited