IRAF at the Center for Astrophysics

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

Setting Up IRAF on Your CF-Managed Computer

IRAF 2.18 is the version which works best on Linux version 4.*, i.e. CentOS 8 and Rocky 8. as well as Linux version 3.*, i.e. CentOS 7. The xgterm task and local IRAF packages are included for CentOS 7 in /data/oir/IRAF2.18 and for CentOS 8 in /data/oir2/IRAF2.18 .
IRAF2.17 and IRAF 2.16.1 only run on Linux version 3.*, i.e. CentOS 7.
IRAF2.16 and earlier versions only run on Linux versions earlier than 3.0, i.e. CentOS 6.

Jessica uses the following script to set up the version of IRAF appropriate to the operating system. Add it to your .cshrc or .myrc file so it gets executed every time you start an IRAF task. In addition to the IRAF command line, this gives you UNIX shell access to RVSAO tasks. Type "rvsao" to find out what they are and how to use them.

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

IRAF 2.18
January 2024
This is the current NOIRLab version of IRAF, with the same structure and capabilities as IRAF 2.17, plus a few more. It is being supported by NOIRLab for Gemini data reduction. Frequently-used packages are installed, including the latest tables and stsdas.
Read the NOIRLab IRAF web site for details.
For Gemini-specific changes, go to https://ui.adsabs.harvard.edu/abs/2024arXiv240101982F/abstract
Contact Jessica if you need a package that is not installed yet.
Add the following two lines to your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.18/
setenv      IRAFARCH linux64
setenv      ARCH linux64
IRAF 2.17
April 2022
This is the current user-supported version of IRAF, with the same structure and capabilities as IRAF 2.16.1. Most subsequent changes to the system are expected to be bug fixes. Frequently-used packages are installed, including the latest tables and stsdas.
Read the release notes for details.
For links to specific changes, go to https://iraf-community.github.io/release.html
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.17/
setenv      IRAFARCH linux64
setenv      ARCH linux64
IRAF 2.16.1
October 2013
This was the first version of IRAF which ran on CentOS 7 (Unix 3+). 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.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.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.14.1
Sept. 2008
This was our workhorse IRAF installation, with the most external packages installed. It works only on systems running Linux versions before 3.0, so now we use IRAF 2.17 or IRAF2.18 for instrument data processing. Change these three settings in your .cshrc or .myrc file:
setenv      irafroot /data/oir/IRAF2.14.1/
setenv      ARCH     redhat
setenv      IRAFARCH redhat

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 16 February 2024 by Jessica Mink