January 2, 2018

Using IRAF

Let's face it. IRAF is old and crusty and weird. But that is just the way it is and if you don't like it you probably should look into running PyRAF instead.

I am working with IRAF 2.16.1 on a Fedora linux system (Fedora 26 at this time). Many people use IRAF on MacOS systems. I don't know anything about that, but there are tutorials out there that talk about this (once you get IRAF running, it doesn't much matter).

There are lots of tutorials online, but they all seem to be vanishing one by one,] which ought to tell you something.

Getting started

I make an iraf subdirectory to do this in, so:
cd; mkdir iraf; cd iraf
mkiraf
cl
You get a prompt "vocl", where "vo" stands for virtual observatory. This is kind of an odd quirk, but doesn't really matter. Alternately you can type "ecl", which gives you a cl without the vo features.

Running mkiraf gives you a uparm directory, along with a login.cl file. If you like, you can create a loginuser.cl file and put your own customizations in it that are applied each time you start the cl.

What you probably want to do after you do the one time mkiraf thing is:

#ds9 &
ximtool &
xgterm &
cl (but do this in the xgterm)
Note that I have the line to start ds9 commented out at this point. IRAF display does not know how to talk to it out of the box, and ximtool just works, so this will do for now.

The CL has a history mechanism. Type "e" to get the history editor and use the arrow keys. Trial and error are your friend.

Display an image

You can search around and find an image. The easiest thing though is to use a magic image built into IRAF, presumably for just this sort of thing:
display dev$pix
Note that if you search around and find a FITS image, which are all the rage these days, you will have to master the multi image fits syntax and use a command like this.
display myfile.fits[0]

Issues and workarounds

xgterm has a bug when used with ssh and X forwarding, you get this message:
xgterm
_X11TransSocketINETConnect: Can't get address for localhost
xgterm Xt error: Can't open display: localhost:10.0
I don't know of a workaround -- use VNC.
Have any comments? Questions? Drop me a line!