Iraf Install SQ

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Installing IRAF if you absolutely have to on (K)Ubuntu 18.

04

Santiago Quintero de los Ríos

February 11, 2020

Disclaimer: Don’t use IRAF. It’s very old and clunky, it’s losing support everywhere, and there are very good alternatives,
like Astropy.
But if you absolutely have to install it, apparently the easiest way is to just use apt. A good bash script that basically adds
all you need can be found here. I personally haven’t tried it, but apparently it has good results.
Now if that doesn’t work for you or you just hate yourself, you can attempt to install it using AstroConda. This first part
simply follows the Astroconda docs, so probably go there for up-to-date information.
Anyway, to do so, you should install a Conda environment, like Anaconda or Miniconda. Anaconda is really good and it
has everything Python-related you need for. . . well basically everything. After you have a Conda environment, you just
enable and install the Legacy software stack,
conda config −−add channels http : / / ssb . s t s c i . edu/ astroconda
conda create −n i r a f 2 7 python =2.7 i r a f −a l l pyraf−a l l s t s c i

Now if all were good and all everything would just run. But oh no, oh no no no. You need to enable IRAF’s 32-bit depen-
dencies (some tasks are so old that they would need to be re-written to work on 64 bits):
sudo apt−get i n s t a l l l i b c 6 : i386 l i b z 1 : i386 libncurses5 : i386 libbz2 −1.0: i386 libuuid1 : i386
libxcb1 : i386 libxmu6 : i386

Now after that, when I tried running ds9 I got the following error:
Error in startup s c r i p t : can ' t find package xml
while executing
"package require xml"
( " x11 " arm l i n e 10)
invoked from within
" switch $ds9 (wm) {
x11 {
# s e t to absolute path so that i f −cd command i s used ,
# so we can s t i l l find our f i l e s
s e t ds9 ( root ) [ f i l e normalize [ . . . "
( f i l e "/ usr / share / saods9 / l i b r a r y /ds9 . t c l " l i n e 178)

Nice. So I went to the SAOImageDS9 website, downloaded the latest ds9 file for Ubuntu 18, extracted and simply replaced
the ds9 in PATH-TO-CONDA/envs/iraf27/bin with the one I downloaded. Now ds9works! yay.
So now in theory everything works. Before starting you need to run mkiraf on the folder where you want to use IRAF.
Then run
ds9 &
cl

and your’re good to go.


But if you like that old-school feel of having IRAF run on a separate xgterm window, create a file in
PATH−TO−CONDA/ envs / i r a f 2 7 / bin

called iraf, with the following bash script in it:

1
# ! / bin /bash
ds9 &
xgterm −sbr −fn 9x15 −s l 400 −cr red − t i t l e IRAF −e c l &

You need to give it execution permissions, so while you’re in the PATH-TO-CONDA/envs/iraf27/bin folder,
chmod u+x i r a f

And now we’re done! Go to the folder where you ran mkiraf, and if you run iraf, DS9 will open and and xgterm window
with IRAF in it will too.
But seriously don’t use IRAF anymore, please.

You might also like