Home
Home Blogs k4tz's blog
    • Blog
    • Clinic
    • Contact
    • Download
    • Login
    • Sitemap

Poll

Best of Ubuntu:

Archives

November 2008
SunMonTueWedThuFriSat
1
2345678
9101112131415
16171819202122
23242526272829
30

LXer -- Linux and Open Source News

  • Home Media Center With Mythbuntu
  • An Easier Way to Deploy Ubuntu, CentOS
  • Mozilla Cautions Against Experimental Firefox Plug-Ins
  • SoftMaker Office 2008 focuses on compatibility with Microsoft Office
  • Distraction-free Writing with PyRoom
more

Linux Today

  • Tables in OpenOffice.org Impress: New and Unstylish
  • Book Review: SQL Hacks
  • Web Browser Hero
  • YouTube is Big Fun And Useful
  • Convoluted Column Arithmetic Examples Using Awk On Linux Or Unix
more

Linux Insider

  • No Love, but Plenty of Like, for the G1
  • Mozilla Cautions Against Experimental Firefox Plug-Ins
  • By the People: Citizen Involvement the Open Source Way
  • The Rocky Legal Landscape of Virtual Worlds, Part 2: Patents
  • The Linux Licensing Labyrinth
more

Iraf, x11iraf and ds9 in Ubuntu 32 bits

Submitted by k4tz on Sun, 09/07/2008 - 11:51
  • Blog
  • Ubuntu

Hi! For those who don't know (probably the most) iraf is a software used by astronomers to reduce and process data (actually it has many more uses but this is the one I use most...). So probably, if you came across this by accident, you probably don't need a program that does this...

For those of you who NEED this, and can't get to install it, here's the howto:

First of all, in case everything fails, you can use the installation guide that can be downloaded from here.

Now, prerequisites:

  • Universe repository enabled. In case not, and if you don't know what this means, check many of the howtos on how to do this
  • Working internet connection
  • you must be a sudoer (meaning this, that you can use sudo)

So let's begin installing this things

IRAF
The version of iraf that we will install is v214. This one, unlike version v212 comes with the ecl terminal wich allows autocompletion and using the up key to check previous commands.

Okay, so, to begin with, we will install the tcsh package (that's in the universe repository)

Code:
sudo apt-get install tcsh

Next, we make a folder were all of the iraf downloads will go (in order to keep things neat). Please keed yourself in the same terminal:

Code:
mkdir ~/iraf
cd ~/iraf

Then, we download the iraf files. These are:

  • as.pcix.gen.gz, the architecture independent files
  • ib.lnux.x86.gz, the linux dependent base files
  • nb.lnux.x86.gz, the linux dependent noao files

In the download directions, the v214 folder could be replaced by a more recent version in case it exists:

Code:
wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/as.pcix.gen.gz
wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/ib.lnux.x86.gz
wget http://iraf.noao.edu/iraf/ftp/iraf/v214/PCIX/nb.lnux.x86.gz

Next, I make iraf's directory tree:

Code:
sudo mkdir -p /iraf/iraf/local

Next i add the iraf user (this will ask you many things. The only important one is the password, the rest could be left in blank. The user is added at the admin group so he can sudo when installing iraf):

Code:
sudo adduser iraf --home /iraf/iraf/local --shell /bin/csh --ingroup admin

And I move the downloaded files to the /iraf/iraf directory, and grant all permissions on the directories to the iraf user:

Code:
sudo mv ~/iraf/* /iraf/iraf
sudo chown iraf -R /iraf

Now I login as the iraf user:

Code:
su iraf

We make the directories were the iraf binaries will be extracted:

Code:
mkdir -p /iraf/{,irafbin/{bin.linux,noao.bin.linux}}

We extract the iraf files:

Code:
cd /iraf/iraf
cat /iraf/iraf/as.pcix.gen.gz | zcat | tar -xpf -
cd /iraf/iraf/bin.linux
cat /iraf/iraf/ib.lnux.x86.gz | zcat | tar -xpf -
cd /iraf/iraf/noao/bin.linux
cat /iraf/iraf/nb.lnux.x86.gz | zcat | tar -xpf -

And we remove the unneccesary files:

Code:
rm /iraf/iraf/as.pcix.gen.gz
rm /iraf/iraf/ib.lnux.x86.gz
rm /iraf/iraf/nb.lnux.x86.gz

And we prepare things for the installation (from this point it is essential to keep the same terminal open until the end of the installation):

Code:
setenv iraf /iraf/iraf
cd $iraf/unix/hlib/
source irafuser.csh

We first test the install, to do this we run (from the same terminal of the step before):

Code:
sudo ./install -n

Prompting yes to everything should be enough. In any case, the proccess can get stuck in a loop where it asks if it should configure iraf-networking, fail at trying to configure it, and asking again. to solve this simply say no at this point.

If the installation test went fine, you can install everithing by omiting the -n argument:

Code:
sudo ./install

Having installed iraf succesfully, you can exit from the iraf user's shell bi doing (closing the terminal will work too):

Code:
exit

x11iraf
Next we install x11iraf wich is needed for irafs graphical suport. The version to be installed is 1.3.1, but this could be replaced for a newer one with no problem only by changing the download.

We download x11iraf files to our downloads folder:

Code:
cd ~/iraf
wget http://iraf.noao.edu/iraf/ftp/iraf/x11iraf/x11iraf-v1.3.1-bin.linux.tar.gz

We extract it and install it:

Code:
cat x11iraf-v1.3.1-bin.linux.tar.gz | gunzip | tar -xf -
sudo ./install

ds9
The proccess is simple, download the file, extract it, and copy and give write permission to the binary. We install with this version 5.2 of ds9, but just as in the other steps, this can easily be updated by changing the download address:

Code:
cd ~/iraf
wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.5.2.tar.gz
tar -zxf ds9.linux.5.2.tar.gz
sudo mv ds9 /usr/local/bin
sudo chmod +x usr/local/bin/ds9

Start-up script
For convenience, we will make a start-up script (created by michael hutchinson http://mjhutchinson.com/) that will open an xgterm with an ecl promt and ds9. We use gedit or this, but any text editor (for example kate in kde or vim) could be used:

Code:
sudo gedit /usr/local/bin/irafshell

And next we add this to the file:

Code:
#!/bin/bash
PID=‘pidof ds9‘
if [ ! $PID ]; then
ds9 &
fi
pushd ~/iraf > /dev/null
xgterm -iconic -geometry 80x24 -sb -title "IRAF" -bg "lemon chiffon" -fg "black" -e "ecl" &
popd > /dev/null

With this, iraf can be run just by running the command irafshell.
Running iraf
First, I clean the ~/iraf folder (THIS COMMAND WILL DELETE EVERYTHING ON THE FOLDER):

Code:
rm -rf ~/iraf/*

to run iraf, we create the login.cl and use irafshell command

Code:
cd ~/iraf
mkiraf
irafshell

and voila! suggestions, corrections, etc... are welcome...

see you later!

 

Source: http://ubuntuforums.org/showthread.php?t=912583

  • k4tz's blog
  • Add new comment

Recent blog posts

  • Play RealMedia on Ubuntu 8.10
  • JDownloader - error java version
  • Problems with Nvidia drivers: video run slow
  • Realtek ALC861 microfone in Ubuntu trouble
  • Hide terminal which linux keylogger running
  • Firefox for small screens (EEE, Wind, 4211, Aspire One etc)
  • Update to openoffice 3 in Ubuntu 8.10 Intrepid
  • Setup offline / local dictionary
  • Problems with HP Photosmart P1000: Print garbage characters
  • Laptop Freezes Everytime I Use Video in Ubuntu
more

Linux World

  • Canonical launches U.S.-based shop.ubuntu.com in time for holiday season
  • USN-674-1: HPLIP vulnerabilities
  • USN-673-1: libxml2 vulnerabilities
  • Set up Sound Juicer to rip from CD as VBR mp3s
  • USN-672-1: ClamAV vulnerability
  • USN-671-1: MySQL vulnerabilities
  • USN-667-1 Firefox and xulrunner vulnerabilities
  • KOffice 2.0 Beta 3 Released
  • How to help build a free software search engine and use it too. Welcome to Wikia -- Part 2
  • How to help build a free software search engine and use it too. Welcome to Wikia
Archive XML feed
All contents copyright © 2008, Dhuha Net. All rights reserved
Ubuntudoctor® is a member of the Dhuha Network. Privacy Policy
RoopleTheme