Other software - AstroConda & IRAF

IRAF is the Image Reduction and Analysis Facility - an old-school astronomical data reduction and analysis environment. Installation is traditionally something of a pain and the user interface is pretty much stuck in the early 1980s.

Editing task parameters in a CL task.
The normal IRAF interface, the CL. This brings back many, many, bad memories for the author.

To bring the core IRAF functions into the modern world Python a wrapper called PyRAF was created but as has been mentioned elsewhere Python itself can be a little troublesome to manage…

Installing AstroConda with IRAF

Out of pity for astronomers the fine folks at the Space Telescope Science Institute (STScI) provide an add-on to Anaconda called AstroConda which installs various STScI software and utilities, including a tamed IRAF install.

To install this suite you first need to install Anaconda with Python 2.7 - this is best accomplished by installing the Anaconda2 package. You then need to check if the directory /opt/iraf-support/ exists, and if not then ask Robert or Malachy to install the IRAF support package - you can't do this yourself. Then you can either proceed to the AstroConda pages and follow instructions, or else follow this summary:

  • Enable Anaconda - module load anaconda2
  • Add the AstroConda repository to your Conda - conda config –add channels http://ssb.stsci.edu/astroconda
  • Create a new Conda environment for IRAF - conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci
  • Wait a while as the packages download and install.

Running IRAF

To run IRAF:

  • Enable Anaconda - module load anaconda2
  • Activate the IRAF environment by typing source activate iraf27
  • Start an xgterm - type xgterm & 1)
  • If this is your first time running IRAF you need to initialise the environment.
    • Type mkiraf
    • Enter y for Initialize uparm - this is where IRAF keeps its config files.
    • Enter xgterm for the terminal type.
  • Start IRAF by typing cl
  • Quickly exit by typing logout or lo

Installing SPTABLES

While the IRAF install which comes as part of AstroConda has many third-party packages installed, it does not include the SPTABLE package. This can be installed but it's not trivial. Follow the steps below:

  • Enable Anaconda & load your IRAF environment
    • module load anaconda2
    • source activate iraf27
  • Backup the IRAF extern directory and make a new one
    • cd $iraf
    • mv extern extern.bak
    • mkdir extern
  • Copy the real IRAF configure script to the extern directory - AstroConda ships with a stub
    • cp /opt/iraf-support/configure extern
  • Run the configure script and then configure sptable
    • cd extern
    • ./configure
    • make self_update
    • make sptable

With these steps complete you should see the sptable packages listed as available when you start a new CL session.

A note about DS9

The ds9 image viewer is often used alongside IRAF for image display and analysis. The AstroConda IRAF install bundles its own copy of ds9 and you should not load the standalone ds9 module as things will probably get very confused.

1) This is a special sort of terminal which IRAF uses for line graphics. Unfortunately it's otherwise extremely basic. If you press ctrl and right-click in the window you can set some useful preferences, such as enabling coloured text and opening the graphics window.
public/teaching-linux-systems/other_software_-_astroconda_iraf.txt · Last modified: 2017/07/23 17:11 by Robert Ryans

Back to Top Sitemap News