Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47

Thread: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

  1. #1
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    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 which 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 keep 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/{irafbin/{bin.linux,noao.bin.linux},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 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. The error message you should receive is:
    Code:
    Checking that iraf networking is properly enabled ...      os.zgtenv:
    cannot open ‘/usr/include/iraf.h’
    [ FAIL ]
       ***  The NETSTATUS task claims that networking is disabled.
       ***  Please contact site support (iraf@noao.edu) with questions
       ***  or check the Site Manager’s Guide for details on how to
       ***  properly configure networking.
    To solve this simply say no at this point.

    If the installation test went fine, you can install everything by omitting the -n argument:
    Code:
    sudo ./install
    Having installed iraf successfully, you can exit from the iraf user's shell bi doing (closing the terminal will work too):
    Code:
    exit
    x11iraf
    Next we install x11iraf which is needed for irafs graphical support. 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/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.6 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.6.tar.gz
    tar -zxf ds9.linux.5.6.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 "black" -fg "green" -e "ecl" &
    popd > /dev/null
    Here, the -bg and -fg options indicate respectively background and font colors for the xgterm where iraf will be run. Some of the available colors are lemon chiffon, black, darkslategrey, linen, red, green, blue, cyan, yellow, purple, magenta and slategray. I personally prefer the black on green layout...

    Then, add execution permission to the script:
    Code:
    sudo chmod +x /usr/local/bin/irafshell
    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. When mkiraf asks for terminal type, select xgterm.
    Code:
    cd ~/iraf
    mkiraf
    irafshell
    If you get the error "xgterm: no available ptys", Then follow this steps (if iraf started correctly, then you dont need to this):
    Code:
    wget ftp://iraf.noao.edu/pub/xgterm.fedora
    sudo mv xgterm.fedora /usr/local/bin/xgterm
    sudo chmod +x /usr/local/bin/xgterm
    And now you should be able to run the command irafshell with no problems.
    Icon!
    This is a suggestion made by Elias Pizarro. You can download the iraf icon and use it to show an iraf icon in your application list wich will execute the irafshell script. First, download the iraf icon:
    Code:
    cd /usr/share/pixmaps/
    sudo wget http://iraf.noao.edu/iraf/web/images/iraf.gif
    Then, create the desktop entry:
    Code:
    gedit ~/.local/share/applications/iraf.desktop
    And add to the file this:
    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Terminal=false
    Type=Application
    Categories=Application;Office;Astronomy;
    Exec=irafshell
    Name=IRAF
    Comment=Image reduction and analysis facility
    Icon=/usr/share/pixmaps/iraf.gif
    and voila! suggestions, corrections, etc... are welcome...

    see you later!
    Last edited by orlox; June 12th, 2009 at 09:50 PM. Reason: Included a fix to a problem
    ...

  2. #2
    Join Date
    Sep 2006
    Location
    Victoria, Australia
    Beans
    Hidden!

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    hi there,
    just something i noticed with your mkdir commands, instead of doing a long winded way:

    Code:
    sudo mkdir /iraf
    sudo mkdir /iraf/iraf
    sudo mkdir /iraf/iraf/local
    you can do:
    Code:
    sudo mkdir -p /iraf/iraf/local
    and instead of:
    Code:
    mkdir /iraf/irafbin
    mkdir /iraf/irafbin/bin.linux
    mkdir /iraf/irafbin/noao.bin.linux
    you could do:
    Code:
    mkdir -p /iraf/{,irafbin/{bin.linux,noao.bin.linux}}
    It is handy for not having to repeditively type mkdir etc

    AJ
    Last edited by ajmorris; September 7th, 2008 at 04:42 AM. Reason: added a missing '/'
    Want to find out more about your ubuntu system? see HowTO Ubuntu System
    Want to know a little more about networking? see HOWTO Ubuntu Networking
    Looking for help with something on your ubuntu? see the tutorial of the week sticky


  3. #3
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    Thanks for the tip. I'll edit the howto to do it that way.
    ...

  4. #4

    Red face Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    I have an installer for IRAF that includes

    IRAF 2.14
    STSDAS 3.8
    TABLES 3.8
    PyRAF 1.5
    DS9 5.2
    X11IRAF 1.5
    WCSTOOLS 3.7.0
    Telarchive 1.4

    You only need the universe and multiverse repos enabled.

    The .iso which includes the files, installer and uninstaller is in
    http://www.astro.uson.mx/~favilac/do...RAF_Ubuntu.iso

    To install just do a 'sh install.sh' and when in ends, in your home directory do a mkiraf and pick xgterm as your terminal.

    It's all.

  5. #5
    Join Date
    Jan 2006
    Beans
    616
    Distro
    Ubuntu Development Release

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    Quote Originally Posted by favilac View Post
    I have an installer for IRAF that includes

    IRAF 2.14
    STSDAS 3.8
    TABLES 3.8
    PyRAF 1.5
    DS9 5.2
    X11IRAF 1.5
    WCSTOOLS 3.7.0
    Telarchive 1.4

    You only need the universe and multiverse repos enabled.

    The .iso which includes the files, installer and uninstaller is in
    http://www.astro.uson.mx/~favilac/do...RAF_Ubuntu.iso

    To install just do a 'sh install.sh' and when in ends, in your home directory do a mkiraf and pick xgterm as your terminal.

    It's all.
    Well, guess thats another way to do it ...

    question...where do you get x11iraf 1.5????
    ...

  6. #6

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    Actually it's a beta ( x11iraf-v1.5DEV), but it's been a beta for at least three years now. Heh, maybe more because a remember that it fixed the issues it had with redhat 9 and the new kernel it used.



    I got it from iraf.net (the site is down at the moment).

  7. #7
    Join Date
    Sep 2008
    Beans
    1

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    Quote Originally Posted by favilac View Post
    I have an installer for IRAF that includes

    IRAF 2.14
    STSDAS 3.8
    TABLES 3.8
    PyRAF 1.5
    DS9 5.2
    X11IRAF 1.5
    WCSTOOLS 3.7.0
    Telarchive 1.4

    You only need the universe and multiverse repos enabled.

    The .iso which includes the files, installer and uninstaller is in
    http://www.astro.uson.mx/~favilac/do...RAF_Ubuntu.iso

    To install just do a 'sh install.sh' and when in ends, in your home directory do a mkiraf and pick xgterm as your terminal.

    It's all.


    That's great favilac, it took hours for me to install IRAF , but i wasn't succesful. With your installer it is quite easier and the nice thing is working. Thanks a lot...

  8. #8

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    No problem

    I forgot to mention that the installer creates an alias in /usr/local/bin which launches an xgterm running ecl, and the ds9 viewer. The alias is called 'iraf'.

    Also, the installer is easy to modify so it can run in a 64 bit system.
    You only need to edit the DEPS field to include the 32 bits libraries.

  9. #9
    Join Date
    Mar 2005
    Beans
    8

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    favilac:

    I don't know if you'll see this, but your install script was very helpful. I got IRAF running within a couple minutes, after failing to get it running when I tried to install it on my own. So thanks a bunch for making it.

    Unfortunately, I can't seem to get PyRAF working. That portion of the install script returns boatloads of errors. I'm running xubuntu, but that shouldn't matter (though I've not used any Ubuntu distros before now, I was under the impression that xubuntu differed only in that it uses Xfce). If you can shed any light as to what the problem might be, I'd really appreciate it. You can see a log of the output for install here, if you'd like: http://uploaded.interestingnonethele...ubuntuiraf.txt

  10. #10

    Re: HOWTO: iraf, x11iraf and ds9 in ubuntu 32 bits

    Hi. I don't have an amd64 install handy, but it seems that you don't have libc6-dev installed. I think that because i had installed earlier, didn't realize that you really need to build pyraf.

    However, because as I said i don't have a 64 bit install (i'll try to install it tomorrow night), I'm not totally sure you need libc6-dev or libc6-dev-amd64.

    I'm betting on the later.

    Try installing libc6-dev-amd64 first and try again. If it works, well, you will save me from a double-reinstall

Page 1 of 5 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •