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:
- stdimage: this sets the size of an image block that gets
sent to the display window if you use the iraf "display" task to
display an image. In other words, when you display an image it
won't display the entire image, just a central region that's equal to
the pixel size given by the stdimage parameter. This is a typical
annoyance of iraf since it's such ancient software. Choices
are imt800, imt1024, imt2048, imt4096, etc. If you're
working with big images, set this value to imt4096.
- imtype: 99.99% of the time you'll be dealing with
fits-format images. When iraf was written, fits wasn't yet fully
standardized and iraf used its own image format which split images into
separate data and header files. Nowadays you want to use fits
whenever possible, so change this line to "set imtype = fits".
The exception is that for some Hubble Space Telescope data you have to
convert to a different image format to use the pipeline processing
tasks in IRAF.
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