IRAF at the Center for Astrophysics

IRAF is a general purpose software system for the reduction and analysis of astronomical data. The Telescope Data Center supports multiple versions at the Harvard-Smithsonian Center for Astropysics.

Setting Up IRAF on Your CF-Managed Computer

IRAF2.16 and earlier versions only run on Linux versions earlier than 3.0 (CentOS 7).
IRAF 2.16.1, the most recent version, only runs on Linux version 3.* (CentOS 7).

I use the following script to set up the version of IRAF appropriate to the operating system. Add it to your .cshrc or .myrc file.

setenv ukernel  `uname -r | cut -c 1`
if ($ukernel == "3") then
    setenv      irafroot /data/oir/IRAF2.16.1
    setenv      ARCH     linux64
    setenv      IRAFARCH linux64
    setenv      iraf    $irafroot/
    setenv      irafpkg $irafroot/extern/
    setenv      irafdir $irafroot/
    set path=( $irafroot/bin.$ARCH $path )
else
    setenv      irafroot /data/oir/IRAF2.14.1
    setenv      ARCH     redhat
    setenv      IRAFARCH redhat
    setenv      iraf    $irafroot/iraf/
    setenv      irafpkg $irafroot/iraf.pkg/
    set path=( ${iraf}unix/bin.$ARCH $path )
endif
setenv      hlib    ${iraf}unix/hlib/
source      ${hlib}irafuser.csh

IRAF 2.14.1
Sept. 2008
This has been our workhorse IRAF installation, with the most external packages installed. It does not work under version 3 of Linux.
Contact Jessica if you need a package that is not installed yet.
Change these three settings in your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.14.1/
setenv      ARCH     redhat
setenv      IRAFARCH redhat
IRAF 2.15.1a
Feb. 2011
This is the first IRAF supporting 64-bit processing. It is a bit faster and has most packages installed.
Read the release notes for details.
Contact Jessica if you need a package that is not installed yet.
For 32-bit executables, use linux instead of linux64
Change these three settings in your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.15.1/
setenv      IRAFARCH linux64
setenv      ARCH linux64
IRAF 2.16
March 2012
This version of IRAF includes Virtual Observatory support. Frequently-used packages are installed, including the latest tables and stsdas.
Contact Jessica if you need a package that is not installed yet.
For 32-bit executables, use linux instead of linux64
Add the following two lines to your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.16/
setenv      IRAFARCH linux64
setenv      ARCH linux64
IRAF 2.16.1
October 2013
This is the current version of IRAF, with Virtual Observatory support. Frequently-used packages are installed, including the latest tables and stsdas.
Read the release notes for details.
Contact Jessica if you need a package that is not installed yet.
For 32-bit executables, use linux instead of linux64
Add the following two lines to your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.16/
setenv      IRAFARCH linux64
setenv      ARCH linux64

Using IRAF

1. Set up your environment for the desired version of IRAF as shown above, and run source .cshrc to enter the new information.

These installations are not automatically available to users, and simply setting the iraf environment variable and your path from the command line won't work. Every time that IRAF executes a package, it invokes csh, thus sourcing ~/.cshrc. The path and iraf environment variable must be set for the shell that IRAF invokes when it executes packages and their tasks so that they are run from the correct version of IRAF. cl, ecl, vocl, and mkiraf are linked into either the bin.redhat, bin.linux, or bin.linux64 directory, depending on the IRAF version, so they will be in your path.

2. Run mkiraf in the directory from which you wish to run IRAF. It will create a login.cl file and a parameter directory called uparm/. You can have multiple startup directories for different projects and use them simultaneously, as long as you are using the same version of IRAF, because that is set by .cshrc.

3. Type ecl to start IRAF. The version will display, followed by a list of installed packages.

4. At the ecl> prompt, type an IRAF command or package name. IRAF help is available for any package and any loaded task.

Available IRAF packages are described here

Contact Jessica or check the forums on iraf.net if you have any questions about IRAF.

Last updated 29 May 2020 by Jessica Mink