Posts Tagged ‘iraf’

IRAF for amateur astronomers

IRAF is short for Image Reduction and Analysis Facility and it is a program widely used by professional astronomers to reduce their data. The program if free and readily available on the web, so in theory there is nothing stopping amateurs from using the same software to reduce their images. IRAF has not changed much over the years, and many people starting off in IRAF will find it hard to deal with a command based program instead of a GUI (Graphical User Interface).

IRAF welcome screen

IRAF can be used on a number of platforms although it is mainly used on UNIX based systems such as Mac and Linux. The installation can be tricky, especially if you have not done it before. The full IRAF working environment requires two other pieces of software to be installed: DS9 and xterm/xgterm. IRAF will work without these environments being installed, but then you will not be able to display your astronomical images.

IRAF can be downloaded from: http://iraf.noao.edu/ and a support forum is available at: http://www.iraf.net/

THELI – an IRAF alternative?

As every astronomer that deals with optical images will know, IRAF can be a real bitch sometimes. Although IRAF is very useful once you know it, it is also known to be a time vampire when doing astronomical image reduction. But is there really an alternative to pre-pharaoh xgterm reduction procedures? YES there is! In comes THELI. THELI is an astronomical image reduction program which automates the image reduction procedure. Now there are two versions of the program, but if you are like me and you just quickly want to reduce the .fits files you’ll want to go for the GUI version (point and click version).

The GUI version let’s you reduce your image data fast and easy for a whole range of preconfigured instruments. If you have not given the program a try I suggest you do. To get the free program go here.

If you have had any experiences with THELI I would love to hear about them. Please comment below.

How to install PyRAF in Ubuntu

Before installing PyRAF in Ubuntu you need to check if you have the following programs installed:

Package Tested with
IRAF 2.14 on Ubuntu
STSDAS/TABLES 3.10
Python 2.5.4, 2.7.1
Tcl/TK 8.5.7
Pmw 1.3.2
urwid 0.9.9.1 (optional)
ipython 0.10.1 (optional)
NumPy 1.5.1
GNU readline 6.1

To install IRAF with STSDAS and TABLES I would highly recommend you follow these instructions. The rest of the stuff you can get using either the Ubuntu Software Center or the Synaptic Package Manager.

To test if you have all got it working try loading the programs:


python
>>> import readline
>>> import Tkinter
>>> Tkinter._test()
>>> import Pmw

If you do not get an ImportError it means that Tcl, Tk, Readline, Python and Pmw are installed on the system.

Download PyRAF (stsci_python). PyRAF comes as part of stsci_python.

Go to the installation directory where you have IRAF installed:


cd /iraf/iraf

Move the downloaded fie to /iraf/iraf. Change user with your username:


sudo cp /home/user/Downloads/stsci_python_2.11.tar.gz .
tar -zxf stsci_python_2.11.tar.gz
rm stsci_python_2.11.tar.gz
cd stsci_python_2.11

Install the stsci_python package:


sudo python setup.py install

You might find that you run into the following error:

pytools.irafglobals.IrafError: Attempt to set unknown lone parameter dp

This is due to a typo in iraf/unix/hlib/extpkg.cl. To fix it, you will need to change line 23 in that file (within your 2.15 IRAF installation) from:

dp = mktemp (“tmp$dpkg”)

to this:

dpkg = mktemp (“tmp$dpkg”)

Then PyRAF should start up as usual.

Return top

About me:

Observational exoplanet astronomer studying the atmospheres of exoplanets. Interested in public outreach and conveying my interest in astronomy to others.

Follow me on Twitter

ExoplanetAstronomer.com