Archive for March, 2011

An amazing picture was published at the APOD today ! It shows all 1235 candidate planets discovered by Kepler in the same relative scale along with the Sun (top right … the lonely star) with the silhouettes of Earth and Jupiter. Somebody has to search deep in the high resolution image to spot the planets (all of them in … transit !).


Kepler’s candidate transiting planets
Credit to Jason Rowe & Kepler Mission

Installing IRAF on Ubuntu

Posted March 21, 2011 By grigoris

Installing IRAF can always be a huge problem. Many pages exist explaining all the necessary steps to install it but I have never tried to follow these (like Rubab’s tutorials for 32 and 64 bit Ubuntu/Debian, Michael Hutchinson’s tutorial for 64 bit Ubuntu – these tutorials explain how to install 32 bit IRAF in 64 bit machines). Instead there is a great work done by Fernando Ávila, who provides files to install everything in a couple of minutes!

So, someone can use either the iso file (worked great with Ubuntu 8.10, 32bit) or use the bash script along with the associate files (download the files in folder deb/ and the iraf.tar.gz). The last procedure (running the script) worked great with Ubuntu 10.10, 64bit, and now I …enjoy IRAF!

UPDATE (28/Jan/2013): the separate directory containing the above files does not exist any more – but the iso files are updated including all necessary material (universe and multiverse repositories should be enabled to correctly handle the needed dependencies and if not the installation cannot proceed).

UPDATE (25/Jan/2017): The previous link to Fernando Avila’s page is not correct any more, but there is a new link that includes all necessary files (found under “Linux+Astronomia”).

UPDATE (21/Aug/2018): The update we were expecting! Finally IRAF can be installed as a native package, simply as “apt install iraf”.
Thanks to Ole for this!

Including IRAF tasks in Python scripts

Posted March 17, 2011 By grigoris

What do you get if you combine IRAF and Python ? Of course something that starts with Py and ends with RAF, PyRAF, which combines IRAF’s tasks with the Python’s command (allowing to create more sophisticated scripts than the cl ones).

But in order to implement these abilities in a python script you have to include (aka import) the packages you want to use (thanks to this post!).
Suppose that we want to use the ccdhedit command which is included in noao/imread/ccdred package. Then we write:

#!/usr/bin/env python
from pyraf import iraf
from iraf import noao, imred, ccdred

iraf.ccdhedit("bias*.fit", parameter="imagetyp", value="zero")
print "All done!"

Every parameter is given inside the () like what we would do if we were using the command line. The wildcard * is still valid and the ccdhedit will change the imagetyp header keyword to zero all the bias images in this case.