January 2, 2018

IRAF

Installing IRAF on Fedora 26

I decided to tackle this in January of 2018. I will be installing IRAF 2.16.1. The claim is that the installation process is now much easier. Based on the Fedora 18 instructions, I install the following packages vi "dnf" before beginning anything else:
dnf install ncurses tcsh xpa
dnf install libXmu
dnf install libXmu.686
I install the 32 bit flavor of libXmu, "just in case" as per the instructions. I attempted to install ds9, but there is no such package for Fedora 26. We will cross this bridge later. It is hard to know if these things are really needed these days, but there is no harm in installing them.

I download the file iraf-linux.tar.gz, which is 343 Mb in size, and includes both 32 and 64 bit binaries. The instructions now allow you to do the install in two ways. One is a non-root install for a single user, the other is a system wide install that must be done by root. I do this:

mkdir /u1/iraf-2.16.1
cd /u1/iraf-2.16.1
download iraf-linux.tar.gz here
tar xf iraf-linux.tar.gz
su
./install --system
This is very fast. It does not seem to copy a myriad of files anywhere. It does not create an "iraf" user. It does not create "/iraf" or links by that name.

As myself (user "tom"), I open a new terminal window and type:

mkiraf
cl
This gives me the prompt "vocl" and things look proper.

It turns out that /usr/local/bin now has a bunch of links for things like "cl" and "mkiraf" that link to /u1/iraf-2.16.1 So this is where I will place ds9 and xgterm.

I actually fiddled with this a bit later and did this:

mkdir /u1/iraf
mkdir /u1/iraf/iraf-2.16.1
cd /u1
ln -s iraf/iraf-2.16.1 iraf-2.16.1
This lets me keep some other additions in /u1/iraf without placing them inside the iraf-2.16.1 directory. It also gets involved with the following:

What about that /iraf directory ?

I notice that the install gives the following error, I have no idea if this is important or not.
Checking for /iraf symlink ...                                 [ FAIL ]
It seems that this is now unnecessary, but maybe not. So I am going to create it by hand and fiddle around with a variety of symbolic links:
su
mkdir /iraf
cd /iraf
mkdir cache imdirs
chmod 777 cache imdirs
ln -s /u1/iraf/iraf-2.16.1 iraf
Once all of this is done, I see this:
cd /iraf
ls -l
drwxrwxrwx   2 root root 4096 Jan  3 12:29 cache
drwxrwxrwx   2 root root 4096 Jan  3 12:29 imdirs
lrwxrwxrwx   1 root root   20 Jan  3 12:28 iraf -> /u1/iraf/iraf_2.16.1

What about xgterm and ximtool ?

When I type "xgterm", there is no such thing. However, the locate command finds it at:
/u1/iraf_2.16.1/vendor/x11iraf/bin.linux/xgterm
And indeed, if I execute this file, I get an xgterm window. So what I do is:
su
cd /usr/local/bin
ln -s /u1/iraf_2.16.1/vendor/x11iraf/bin.linux/xgterm
ln -s /u1/iraf_2.16.1/vendor/x11iraf/bin.linux/ximtool
ln -s /u1/iraf_2.16.1/vendor/x11iraf/bin.linux/ism_wcspix.e
Now I can run xgterm just fine. I can run ximtool too (v2.0BETA), but I get the message:
/usr/local/bin/ism_wcspix.e: No such file or directory
The solution is to create the link, as above. Just for curiosity sake, we peek at what else is in this directory:
ls -l /u1/iraf_2.16.1/vendor/x11iraf/bin.linux
-rwxr-xr-x 1 tom tom  926020 Oct 14  2013 ism_wcspix.e
-rwxr-xr-x 1 tom tom  904640 Oct 14  2013 obmsh
-rwxr-xr-x 1 tom tom    7668 Oct 14  2013 resize
-rwxr-xr-x 1 tom tom  553048 Oct 14  2013 vximtool
-rwxr-xr-x 1 tom tom 5397517 Aug  5  2010 xgterm
-rwxr-xr-x 1 tom tom 6270887 Aug 31  2009 ximtool
-rwxr-xr-x 1 tom tom  335029 Dec 10  2008 ximtool-alt
-rwxr-xr-x 1 tom tom  316347 Dec 10  2008 ximtool-old
-rwxr-xr-x 1 tom tom  212844 Oct 14  2013 xtapemon
When I run ximtool, I get the following warning, and I cannot say whether it is important or not:
Warning: cannot open /dev/imt1o
The word is that this is harmless.
This just means the /dev/imt1 fifo pipes are either not installed on your system (they are created by the iraf install script).
Clearly they were not created by the iraf install script and apparently it won't matter unless I try to use something called saoimage, which may well be obsolete anyway.

What about DS9 ?

This is not part of IRAF, but it may be handy. From the download page at the above, I download
cd /u1/iraf-2.16.1
download ds9.centos7.7.5.tar.gz here
tar xvf ds9.centos7.7.5.tar.gz
su
mv ds9 /usr/local/bin
The tar file contains one file, the ds9 executable.
Have any comments? Questions? Drop me a line!