IrafInstallation

From MediaWiki

(Difference between revisions)
Jump to: navigation, search
m (IRAF Setup on Ubuntu/Debian)
m (IRAF Setup on Ubuntu/Debian)
 
(12 intermediate revisions not shown)
Line 20: Line 20:
--------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
-
sudo apt-get install tcsh
+
* Get what you need to start:
-
wget http://ihateskittles.com/iraf/ldso_1.9.11-15_i386.deb
+
sudo apt-get install tcsh <br>
 +
wget http://ihateskittles.com/iraf/ldso_1.9.11-15_i386.deb<br>
 +
sudo dpkg -i ldso_1.9.11-15_i386.deb<br>
 +
wget http://ihateskittles.com/iraf/libc5_5.4.46-15_i386.deb<br>
 +
sudo dpkg -i libc5_5.4.46-15_i386.deb<br>
 +
wget http://ihateskittles.com/iraf/termcap-compat_1.2.3_i386.deb<br>
 +
sudo dpkg -i termcap-compat_1.2.3_i386.deb<br>
-
sudo dpkg -i ldso_1.9.11-15_i386.deb
+
* Use System>Administration>Users and Groups to create an account with username "iraf", real name "IRAF Maintenance", home directory "/iraf/iraf/local", shell "/bin/tcsh", and a secure password. For sudo commands here on, use this password.
-
wget http://ihateskittles.com/iraf/libc5_5.4.46-15_i386.deb
+
sudo chown -R iraf:iraf /iraf <br>
 +
su iraf <br>
 +
mkdir /iraf/irafbin <br>
 +
mkdir /iraf/irafbin/bin.linux<br>
 +
mkdir /iraf/irafbin/noao.bin.linux<br>
 +
mkdir /iraf/x11iraf<br>
 +
mkdir /iraf/extern<br>
 +
cd /iraf/iraf<br>
 +
wget http://iraf.net/ftp/iraf/v214/PCIX/as.pcix.gen.gz<br>
 +
tar -zxf as.pcix.gen.gz<br>
 +
rm as.pcix.gen.gz<br>
 +
cd /iraf/iraf/unix/bin.redhat/<br>
 +
mv * ../bin.linux/<br>
 +
cd /iraf/irafbin/bin.linux<br>
 +
wget http://iraf.net/ftp/iraf/v214/PCIX/ib.rhux.x86.gz<br>
 +
tar -zxpf ib.rhux.x86.gz<br>
 +
rm ib.rhux.x86.gz<br>
 +
cd /iraf/irafbin/noao.bin.linux<br>
 +
wget http://iraf.net/ftp/iraf/v214/PCIX/nb.rhux.x86.gz<br>
 +
tar -zxpf nb.rhux.x86.gz<br>
 +
rm nb.rhux.x86.gz<br>
 +
setenv iraf /iraf/iraf/<br>
 +
cd $iraf/unix/hlib<br>
 +
source irafuser.csh<br>
-
sudo dpkg -i libc5_5.4.46-15_i386.deb
 
-
wget http://ihateskittles.com/iraf/termcap-compat_1.2.3_i386.deb
+
* During the next step keep hitting enter to select the default settings. When it finishes you should receive "Installation Completed With No Errors".
-
sudo dpkg -i termcap-compat_1.2.3_i386.deb
+
sudo ./install<br>
 +
sudo apt-get install libncurses5<br>
 +
cd /iraf/x11iraf/<br>
 +
wget http://iraf.net/ftp/iraf/x11iraf/x11iraf-v1.5DEV-bin.redhat.tar.gz<br>
 +
tar -zxf x11iraf-v1.5DEV-bin.redhat.tar.gz<br>
 +
mv lib.redhat lib.linux<br>
 +
mv bin.redhat bin.linux<br>
-
[[Use System>Administration>Users and Groups to create an account with username "iraf", real name "IRAF Maintenance", home directory "/iraf/iraf/local", shell "/bin/tcsh", and a secure password. For sudo commands here on, use this password.]]
+
* Again keep hitting enter to select the default settings.  When it finishes you should receive "Installation complete".
-
sudo chown -R iraf:iraf /iraf
+
sudo ./install<br>
 +
rm x11iraf-v1.5DEV-bin.redhat.tar.gz<br>
 +
wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.6.0.tar.gz <br>
 +
tar -zxf ds9.linux.6.0.tar.gz <br>
 +
rm ds9.linux.6.0.tar.gz <br>
 +
sudo mv ds9 /usr/local/bin/ <br>
 +
cd /iraf/extern/ <br>
 +
mkdir tables stsdas <br>
 +
cd /iraf/extern/tables/ <br>
 +
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.tar.gz . <br>
 +
tar zxf tables3.11.tar.gz <br>
 +
rm tables3.11.tar.gz <br>
 +
cd bin.linux/ <br>
 +
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.bin.redhat.tar.gz . <br>
 +
tar zxf tables3.11.bin.redhat.tar.gz <br>
 +
rm tables3.11.bin.redhat.tar.gz <br>
 +
cd /iraf/extern/stsdas <br>
 +
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.tar.gz . <br>
 +
tar zxf stsdas3.11.tar.gz <br>
 +
rm stsdas3.11.tar.gz <br>
 +
cd bin.linux <br>
 +
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.bin.redhat.tar.gz . <br>
 +
tar zxf stsdas3.11.bin.redhat.tar.gz <br>
 +
rm stsdas3.11.bin.redhat.tar.gz <br>
 +
cd /iraf/extern/stsdas <br>
 +
python python/compileall.py ./python <br>
 +
python python/compileall.py ./python/* <br>
-
su iraf
+
* Here you will have several lines saying it can't list various files.  This is not an error and is just an artifact of using the *. In your .bashrc file make an alias:
-
 
+
-
mkdir /iraf/irafbin
+
-
 
+
-
mkdir /iraf/irafbin/bin.linux
+
-
 
+
-
mkdir /iraf/irafbin/noao.bin.linux
+
-
 
+
-
mkdir /iraf/x11iraf
+
-
 
+
-
mkdir /iraf/extern
+
-
 
+
-
cd /iraf/iraf
+
-
 
+
-
wget http://iraf.net/ftp/iraf/v214/PCIX/as.pcix.gen.gz
+
-
 
+
-
tar -zxf as.pcix.gen.gz
+
-
 
+
-
rm as.pcix.gen.gz
+
-
 
+
-
cd /iraf/iraf/unix/bin.redhat/
+
-
 
+
-
mv * ../bin.linux/
+
-
 
+
-
cd /iraf/irafbin/bin.linux
+
-
 
+
-
wget http://iraf.net/ftp/iraf/v214/PCIX/ib.rhux.x86.gz
+
-
 
+
-
tar -zxpf ib.rhux.x86.gz
+
-
 
+
-
rm ib.rhux.x86.gz
+
-
 
+
-
cd /iraf/irafbin/noao.bin.linux
+
-
 
+
-
wget http://iraf.net/ftp/iraf/v214/PCIX/nb.rhux.x86.gz
+
-
 
+
-
tar -zxpf nb.rhux.x86.gz
+
-
 
+
-
rm nb.rhux.x86.gz
+
-
 
+
-
setenv iraf /iraf/iraf/
+
-
 
+
-
cd $iraf/unix/hlib
+
-
 
+
-
source irafuser.csh
+
-
 
+
-
[[During the next step keep hitting enter to select the default settings.  When it finishes you should receive "Installation Completed With No Errors".]]
+
-
 
+
-
sudo ./install
+
-
 
+
-
sudo apt-get install libncurses5
+
-
 
+
-
cd /iraf/x11iraf/
+
-
 
+
-
wget http://iraf.net/ftp/iraf/x11iraf/x11iraf-v1.5DEV-bin.redhat.tar.gz
+
-
 
+
-
tar -zxf x11iraf-v1.5DEV-bin.redhat.tar.gz
+
-
 
+
-
mv lib.redhat lib.linux
+
-
 
+
-
mv bin.redhat bin.linux
+
-
 
+
-
[[Again keep hitting enter to select the default settings.  When it finishes you should receive "Installation complete".]]
+
-
 
+
-
sudo ./install
+
-
 
+
-
rm x11iraf-v1.5DEV-bin.redhat.tar.gz
+
-
 
+
-
wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.6.0.tar.gz
+
-
 
+
-
tar -zxf ds9.linux.6.0.tar.gz
+
-
 
+
-
rm ds9.linux.6.0.tar.gz
+
-
 
+
-
sudo mv ds9 /usr/local/bin/
+
-
 
+
-
cd /iraf/extern/
+
-
 
+
-
mkdir tables stsdas
+
-
 
+
-
cd /iraf/extern/tables/
+
-
 
+
-
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.tar.gz .
+
-
 
+
-
tar zxf tables3.11.tar.gz
+
-
 
+
-
rm tables3.11.tar.gz
+
-
 
+
-
cd bin.linux/
+
-
 
+
-
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.bin.redhat.tar.gz .
+
-
 
+
-
tar zxf tables3.11.bin.redhat.tar.gz
+
-
 
+
-
rm tables3.11.bin.redhat.tar.gz
+
-
 
+
-
cd /iraf/extern/stsdas
+
-
 
+
-
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.tar.gz .
+
-
 
+
-
tar zxf stsdas3.11.tar.gz
+
-
 
+
-
rm stsdas3.11.tar.gz
+
-
 
+
-
cd bin.linux
+
-
 
+
-
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.bin.redhat.tar.gz .
+
-
 
+
-
tar zxf stsdas3.11.bin.redhat.tar.gz
+
-
 
+
-
rm stsdas3.11.bin.redhat.tar.gz
+
-
 
+
-
cd /iraf/extern/stsdas
+
-
 
+
-
python python/compileall.py ./python
+
-
 
+
-
python python/compileall.py ./python/*
+
-
 
+
-
[[Here you will have several lines saying it can't list various files.  This is not an error and is just an artifact of using the *.]]
+
-
 
+
-
In your .bashrc file make an alias
+
alias goiraf='xgterm -ls -g 82x30+0+0 -bg bisque1 -fn fixed -fg gray16 -e cl &'
alias goiraf='xgterm -ls -g 82x30+0+0 -bg bisque1 -fn fixed -fg gray16 -e cl &'
-
cd /home/user/
+
* Go to your home directory:
 +
cd /home/user/<br>
mkiraf
mkiraf
xgterm #Select "xgterm" as your IRAF shell when prompted
xgterm #Select "xgterm" as your IRAF shell when prompted
-
If it blinks and die with the message <font color="red">libtermcap.so.2: cannot open shared object file: No such file or
+
If it blinks and dies with the message <font color="red">libtermcap.so.2: cannot open shared object file: No such file or directory</font>, it means you have skipped the first 7 lines (just below the horizontal line in the beginning of this page), so go back and ''do it''! (strongly advised). Or follow the instructions below (not advised).
-
directory</font>, do:
+
-
 
+
-
sudo apt-get install ncurses-dev
+
 +
sudo apt-get install ncurses-dev <br>
sudo ln -s libtermcap.so /usr/lib/libtermcap.so.2
sudo ln -s libtermcap.so /usr/lib/libtermcap.so.2
Line 180: Line 119:
The command 'goiraf' will now launch a complete IRAF session containing DS9, xgterm and ecl, based in ~/IRAF.  
The command 'goiraf' will now launch a complete IRAF session containing DS9, xgterm and ecl, based in ~/IRAF.  
-
If you don't see <font color="darkblue">stsdas</font> or <font color="darkblue">tables</font> edit your extern.pkf file:
+
<font color=red> If it blinks and dies, you have skipped the first 7 lines (just below the horizontal line in the beginning of this page), so go back and ''do it''!</font>
-
sudo gedit /iraf/iraf/unix/hlib/extern.pkg  
+
If you don't see <font color="darkblue">stsdas</font> or <font color="darkblue">tables</font> edit your extern.pkg file:
-
So that it looks like this:
+
sudo gedit /iraf/iraf/unix/hlib/extern.pkg
-
reset noao = iraf$noao/<br>
+
With the following lines:
-
task noao.pkg = noao$noao.cl
+
reset tables = /iraf/extern/tables/<br>
reset tables = /iraf/extern/tables/<br>
Line 203: Line 141:
keep
keep
 +
 +
<font color=red>!!! Copy the missing text and uncomment existing but '''leave exactly the same spaces''' as in the original ''extern.pkg'' file - copy and paste blank fields (I cannot mimic that here) !!!</font>
 +
 +
Now you are ready to improve your IRAF to become [http://wiki.ipb.ac.rs/index.php/Astro_links#PYRAF PYRAF], which I strongly recommend.
= END =
= END =
 +
 +
== IRAF External Packages Installation ==
 +
 +
Move package (let's call it rjtools_2.12.tar.gz) to /iraf/extern/ or /iraf/iraf/extern/ or wherever extern dir is created. Then unpack it (it's usually .tar.gz). Then add the following two lines in your login.cl in the ~/iraf/ dir. This is the one login.cl created in each dir whenever you do mkiraf:
 +
reset rjtools        = /iraf/iraf/extern/rjtools_2.12/
 +
task rjtools.pkg    = rjtools$rjtools.cl
 +
 +
Next time you do mkiraf you will see the following package (in this case rjtools) in the list of currently defined packages ready to use.

Latest revision as of 10:36, 13 September 2018

IRAF Setup on Ubuntu/Debian

Taken from http://ihateskittles.com/iraf/

Updated 12.03.2010

This page describes how to setup IRAF on a 32-bit Ubuntu/Debian machine. Installation of X11IRAF, DS9, Tables, and STSDAS are also included.

It will be easiest if you just copy-paste the instructions one by one. Please be sure to read and implement the instructions in brackets as well.

(For 64-bit installation, use

http://ihateskittles.com/iraf/iraf_amd64.txt )

Based on instructions by: Rubab Khan (http://geco.phys.columbia.edu/~rubab/) and Michael Hutchinson (http://mjhutchinson.com/journal/2006/11/05/install_iraf_on_ubuntu_edgy_amd64)


  • Get what you need to start:

sudo apt-get install tcsh
wget http://ihateskittles.com/iraf/ldso_1.9.11-15_i386.deb
sudo dpkg -i ldso_1.9.11-15_i386.deb
wget http://ihateskittles.com/iraf/libc5_5.4.46-15_i386.deb
sudo dpkg -i libc5_5.4.46-15_i386.deb
wget http://ihateskittles.com/iraf/termcap-compat_1.2.3_i386.deb
sudo dpkg -i termcap-compat_1.2.3_i386.deb

  • Use System>Administration>Users and Groups to create an account with username "iraf", real name "IRAF Maintenance", home directory "/iraf/iraf/local", shell "/bin/tcsh", and a secure password. For sudo commands here on, use this password.

sudo chown -R iraf:iraf /iraf
su iraf
mkdir /iraf/irafbin
mkdir /iraf/irafbin/bin.linux
mkdir /iraf/irafbin/noao.bin.linux
mkdir /iraf/x11iraf
mkdir /iraf/extern
cd /iraf/iraf
wget http://iraf.net/ftp/iraf/v214/PCIX/as.pcix.gen.gz
tar -zxf as.pcix.gen.gz
rm as.pcix.gen.gz
cd /iraf/iraf/unix/bin.redhat/
mv * ../bin.linux/
cd /iraf/irafbin/bin.linux
wget http://iraf.net/ftp/iraf/v214/PCIX/ib.rhux.x86.gz
tar -zxpf ib.rhux.x86.gz
rm ib.rhux.x86.gz
cd /iraf/irafbin/noao.bin.linux
wget http://iraf.net/ftp/iraf/v214/PCIX/nb.rhux.x86.gz
tar -zxpf nb.rhux.x86.gz
rm nb.rhux.x86.gz
setenv iraf /iraf/iraf/
cd $iraf/unix/hlib
source irafuser.csh


  • During the next step keep hitting enter to select the default settings. When it finishes you should receive "Installation Completed With No Errors".

sudo ./install
sudo apt-get install libncurses5
cd /iraf/x11iraf/
wget http://iraf.net/ftp/iraf/x11iraf/x11iraf-v1.5DEV-bin.redhat.tar.gz
tar -zxf x11iraf-v1.5DEV-bin.redhat.tar.gz
mv lib.redhat lib.linux
mv bin.redhat bin.linux

  • Again keep hitting enter to select the default settings. When it finishes you should receive "Installation complete".

sudo ./install
rm x11iraf-v1.5DEV-bin.redhat.tar.gz
wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.6.0.tar.gz
tar -zxf ds9.linux.6.0.tar.gz
rm ds9.linux.6.0.tar.gz
sudo mv ds9 /usr/local/bin/
cd /iraf/extern/
mkdir tables stsdas
cd /iraf/extern/tables/
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.tar.gz .
tar zxf tables3.11.tar.gz
rm tables3.11.tar.gz
cd bin.linux/
wget http://stsdas.stsci.edu/download/tables_3.11/tables3.11.bin.redhat.tar.gz .
tar zxf tables3.11.bin.redhat.tar.gz
rm tables3.11.bin.redhat.tar.gz
cd /iraf/extern/stsdas
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.tar.gz .
tar zxf stsdas3.11.tar.gz
rm stsdas3.11.tar.gz
cd bin.linux
wget http://stsdas.stsci.edu/download/stsdas_3.11/stsdas3.11.bin.redhat.tar.gz .
tar zxf stsdas3.11.bin.redhat.tar.gz
rm stsdas3.11.bin.redhat.tar.gz
cd /iraf/extern/stsdas
python python/compileall.py ./python
python python/compileall.py ./python/*

  • Here you will have several lines saying it can't list various files. This is not an error and is just an artifact of using the *. In your .bashrc file make an alias:

alias goiraf='xgterm -ls -g 82x30+0+0 -bg bisque1 -fn fixed -fg gray16 -e cl &'

  • Go to your home directory:

cd /home/user/
mkiraf

xgterm #Select "xgterm" as your IRAF shell when prompted

If it blinks and dies with the message libtermcap.so.2: cannot open shared object file: No such file or directory, it means you have skipped the first 7 lines (just below the horizontal line in the beginning of this page), so go back and do it! (strongly advised). Or follow the instructions below (not advised).

sudo apt-get install ncurses-dev
sudo ln -s libtermcap.so /usr/lib/libtermcap.so.2

And do mkiraf again in the terminal.


The command 'goiraf' will now launch a complete IRAF session containing DS9, xgterm and ecl, based in ~/IRAF.

If it blinks and dies, you have skipped the first 7 lines (just below the horizontal line in the beginning of this page), so go back and do it!

If you don't see stsdas or tables edit your extern.pkg file:

sudo gedit /iraf/iraf/unix/hlib/extern.pkg

With the following lines:

reset tables = /iraf/extern/tables/
task tables.pkg = tables$tables.cl

reset stsdas = /iraf/extern/stsdas/
task stsdas.pkg = stsdas$stsdas.cl


reset helpdb = "lib$helpdb.mip\
,noao$lib/helpdb.mip\
,tables$lib/helpdb.mip\
,stsdas$lib/helpdb.mip\
"

keep

!!! Copy the missing text and uncomment existing but leave exactly the same spaces as in the original extern.pkg file - copy and paste blank fields (I cannot mimic that here) !!!

Now you are ready to improve your IRAF to become PYRAF, which I strongly recommend.

END

IRAF External Packages Installation

Move package (let's call it rjtools_2.12.tar.gz) to /iraf/extern/ or /iraf/iraf/extern/ or wherever extern dir is created. Then unpack it (it's usually .tar.gz). Then add the following two lines in your login.cl in the ~/iraf/ dir. This is the one login.cl created in each dir whenever you do mkiraf:

reset rjtools        = /iraf/iraf/extern/rjtools_2.12/
task rjtools.pkg     = rjtools$rjtools.cl

Next time you do mkiraf you will see the following package (in this case rjtools) in the list of currently defined packages ready to use.

Personal tools