Installing Required Gemini IRAF Sofware

Installing Required Gemini IRAF Sofware

For the purpose of the workshop, pre-compiled and pre-packaged personal installation of IRAF, the Gemini package and the external packages it depends on are being offered to support a few popular systems. Find your operating system below and download the recommended package. Instructions are provided also; either go scroll down to the lower sections, or simply follow the link associated with your operating system.

Table of Contents
1. My Operating System is ...
2. Mac OS X Installation Instructions
    2.1. Installing the package - Mac OS X
    2.1. Configuring your user account - Mac OS X
    2.1. Testing your work - Mac OS X
3. Linux Installation Instructions
    2.1. Installing the package - Linux
    2.1. Configuring your user account - Linux
    2.1. Testing your work - Linux
4. Optional
5. Need Help?

1. My Operating System is...

Note: In Linux, to tell whether your OS is 32-bit or 64-bit, type uname -a in a Terminal. If you see a series of x86_64, then it is 64-bit.

 

Operating System

Package to Download

Instructions

 

Mac OS X, Intel

Tiger 10.4

DRWorkshopGeminiIRAF-macintel-10.4.tar.gz

Mac OS X instructions

Leopard 10.5

The package is compiled on Tiger 10.4 but it is known to work on later versions of Mac OS X.

DRWorkshopGeminiIRAF-macintel-10.4.tar.gz

Mac OS X instructions

Snow Leopard 10.6

The package is compiled on Tiger 10.4 but it is known to work on later versions of Mac OS X.

DRWorkshopGeminiIRAF-macintel-10.4.tar.gz

Mac OS X instructions

 

Linux - Redhat Enterprise

32-bit OS

The package is compiled on Redhat Linux 9. It is known to work on a large variety of Redhat systems.

DRWorkshopGeminiIRAF-redhat32-glibc2.3.tar.gz

Linux instructions

 

64-bit OS

IRAF is 32-bit. The package is compiled in 32-bit on a 64-bit Redhat Enterprise 5.

DRWorkshopGeminiIRAF-redhat64-glibc2.5.tar.gz

Linux instructions

 

Linux - Fedora Core

32-bit OS

The package is compiled on Redhat Linux 9. It is known to work on Fedora systems.

DRWorkshopGeminiIRAF-redhat32-glibc2.3.tar.gz

Linux instructions

64-bit OS

IRAF is 32-bit. This package is compiled in 32-bit on a 64-bit Redhat Enterprise 5 machine.  It is known to work on Fedora 64-bit systems.

DRWorkshopGeminiIRAF-redhat64-glibc2.5.tar.gz

Linux instructions

 

Linux - Ubuntu

all

A package compiled with Redhat Enterprise 3, which is similar to Redhat Linux 9 is known to work on a recent Ubuntu system. Therefore, we recommend the package compiled on Redhat Linux 9, 32-bit.

DRWorkshopGeminiIRAF-redhat32-glibc2.3.tar.gz

Linux instructions

2. Mac OS X Installation Instructions

WARNING: These instructions apply to the package distributed for the Workshop.

Please note:

  • The instructions below will install the software in the user's home directory.
  • In the instructions, the user is "klabrie"; change that string to match your user name.
  • It is assumed that the package has been downloaded to the "/Users/klabrie/Downloads" folder; again change that location accordingly.
  • The "root" installation directory in the following instructions is "/Users/klabrie/gemiraf". If you decide to unpack the tar file somewhere else change the path accordingly.

 

Before you start - X11: Make sure you have X11 installed. It is located in "/Applications/Utilities".

2.1. Installing the package - Mac OS X

  1. Open a Terminal. (/Application/Utilities/Terminal)
    All the commands below are to be typed at the Terminal prompt, here represented by "%".
     
  2. Unpack the archive.
     % cd /Users/klabrie
     % mkdir gemiraf
     % cd gemiraf
     % tar xvzf ~/Downloads/DRWorkshopGeminiIRAF-macintel-10.4.tar.gz
     
  3. Configure IRAF.
    % cd iraf/iraf/unix/hlib
     
    With your favorite editor, prepend all occurrences of the string "/iraf/iraf/" or "/iraf/extern/" in the files listed below with the name of "root" installation directory (ie. where you unpacked). For the current instructions, this is "/Users/klabrie/gemiraf". This means that:
    "/iraf/iraf/" becomes "/Users/klabrie/gemiraf/iraf/iraf/"
    "/iraf/extern/" becomes "/Users/klabrie/gemiraf/iraf/extern/"
     
    The files to modify are:
    • cl.csh
    • extern.pkg
    • mkiraf.csh
    • libc/iraf.h
  4. Configuration requiring administrator priviledges
    % cd /usr/include
    % sudo ln -s /Users/klabrie/gemiraf/iraf/iraf/unix/hlib/libc/iraf.h iraf.h
    % cd /usr/local/lib
    % sudo ln -s /Users/klabrie/gemiraf/iraf/iraf/dev/imtoolrc imtoolrc
     
    Note 1: if /usr/local/lib does not exits already, just create it: % sudo mkdir -p /usr/local/lib
    Note 2: If you are absolutely unable to obtain admistrator priviledges: It is possible to configure the user environment such that those links, and therefore admistrator priviledges are not needed. Please refer to the IRAF website if you really cannot set those links as described above. The author of this page is not familiar with that technique, but an IRAF expert will.


2.2. Configuring your user account - Mac OS X

Now that the software is installed and configured, you need to configure your account. Essentially, you need to set up the PATH to the IRAF executables, and then set some IRAF specific variables.

  1. Identify which shell you are using: tcsh or bash.

    A trick is to type "setenv" at the prompt. If it fails ("command not found"), you are a bash user, good for you!

  2. Configure the shell. Tcsh users, look at 2a; bash users, look at 2b.
    1. TCSH users only
       % cd /Users/klabrie
       

      With your favorite editor, add the following lines to your ".cshrc" file:

       setenv iraf /Users/klabrie/gemiraf/iraf/iraf/
       setenv IRAFARCH macintel
       setenv host ${iraf}unix/
       setenv GEMIRAFPATH /Users/klabrie/gemiraf/bin
       setenv PATH ${GEMIRAFPATH}:${PATH}
       
      Save the file then load the configurations:
       % source .cshrc
       % rehash
       
    2. BASH users only

      Note: bash users need to also set up a minimal .cshrc that IRAF will use.

       % cd /Users/klabrie
       

      With your favorite editor, add the following lines to your ".cshrc" file (create if, if necessary):

       setenv iraf /Users/klabrie/gemiraf/iraf/iraf/
       setenv IRAFARCH macintel
       

      With your favorite editor, add the following lines to your ".bash_profile" file:

       export iraf=/Users/klabrie/gemiraf/iraf/iraf/
       export IRAFARCH=macintel
       export host=${iraf}unix/
       export GEMIRAFPATH=/Users/klabrie/gemiraf/bin
       export PATH=${GEMIRAFPATH}:${PATH}
       
      Save the file then load the configurations:
       % source .bash_profile
       
  3. Create your IRAF home.
     % cd /Users/klabrie
     % mkdir iraf
     % cd iraf
     % mkiraf
     (Answer "xgterm". If you are asked to rebuild the uparm, say yes.)
     

2.3. Testing your work - Mac OS X

  1. Launch X11 and open an X11 Terminal if one does not automatically pop up.
  2. Start an xgterm.
     % xgterm&
     

    From now on, we work in the xgterm

  3. Launch an image display.
     % ximtool&
     
  4. Launch IRAF.
     % cd /Users/klabrie/iraf
     % cl
     
  5. Load the gemini.gemtools package and make sure the basics work.
     ecl> gemini
     gemini> gemtools
     gemtools> gemtools
     gemtools> lpar gemarith
     
  6. Test a gemini task.
     gemtools> copy /Users/klabrie/gemiraf/testdata/N20040506S0076.fits .
     gemtools> gemarith N20040506S0076 * 10 test.fits verbose-
     gemtools> imstat test[1][100:200,100:200] fields=mean
     
    The answer should be 67575.
     
  7. Test the display and the plotting.
     gemtools> display dev$pix 1
     gemtools> imexam fr=1
     

    The cursor will move to the ximtool window. Select a star, and press 'r'. A nice radial plot should show up. If instead you get a bunch of weird symbols in your xgterm, make sure that you have selected xgterm during the mkiraf step, and make sure what your are actually running IRAF from an xgterm.

  8. Exit the IRAF session
     gemtools> logout
     


3. Linux Installation Instructions

WARNING: These instructions apply to the package distributed for the Workshop.

Please note:

  • The instructions below will install the software in the user's home directory.
  • In the instructions, the user is "klabrie"; change that string to match your user name.
  • It is assumed that the package has been downloaded to the "/home/klabrie/Downloads" folder; again change that location accordingly.
  • The "root" installation directory in the following instructions is "/home/klabrie/gemiraf". If you decide to unpack the tar file somewhere else change the path accordingly.
  • The instructions use the DRWorkshopGeminiIRAF-redhat32-glibc2.3.tar.gz. If you downloaded the package built on 64-bit OS, just replace the name to DRWorkshopGeminiIRAF-redhat64-glibc2.5.tar.gz.


3.1. Installing the package - Linux

  1. Open a Terminal. All the commands below are to be typed at the Terminal prompt, here represented by "%".
     
  2. Unpack the archive.
     % cd /home/klabrie
     % mkdir gemiraf
     % cd gemiraf
     % tar xvzf ~/Downloads/DRWorkshopGeminiIRAF-redhat32-glibc2.3.tar.gz
     
  3. Configure IRAF.
     % cd iraf/iraf/unix/hlib
     
    With your favorite editor, prepend all occurrences of the string "/iraf/iraf/" or "/iraf/extern/" in the files listed below with the name of "root" installation directory (ie. where you unpacked). For the current instructions, this is "/home/klabrie/gemiraf". This means that:
     "/iraf/iraf/" becomes "/home/klabrie/gemiraf/iraf/iraf/"
     "/iraf/extern/" becomes "/home/klabrie/gemiraf/iraf/extern/"
     
    The files to modify are:
    • cl.csh
    • extern.pkg
    • mkiraf.csh
    • libc/iraf.h
  4. Configuration requiring administrator priviledges
     % cd /usr/include
     % sudo ln -s /home/klabrie/gemiraf/iraf/iraf/unix/hlib/libc/iraf.h iraf.h
     % cd /usr/local/lib
     % sudo ln -s /home/klabrie/gemiraf/iraf/iraf/dev/imtoolrc imtoolrc
     % cd /dev
     % sudo mknod imt1i p
     % sudo mknod imt1o p
     % sudo ln -s imt1o imt1
     % sudo chmod a+w,a+x,a+r imt1*
     
    Note 1: If /usr/local/lib does not exits already, just create it: % sudo mkdir -p /usr/local/lib
    Note 2: If sudo does not work, log in as root.
    Note 3: If you are absolutely unable to obtain admistrator priviledges: It is possible to configure the user environment such that those links, and therefore admistrator priviledges are not needed. Please refer to the IRAF website if you really cannot set those links as described above. The author of this page is not familiar with that technique, but an IRAF expert will.


3.2. Configuring your user account - Linux

Now that the software is installed and configured, you need to configure your account. Essentially, you need to set up the PATH to the IRAF executables, and then set some IRAF specific variables.

  1. Identify which shell you are using: tcsh or bash.

    A trick is to type "setenv" at the prompt. If it fails ("command not found"), you are a bash user, good for you!

  2. Configure the shell. Tcsh users, look at 2a; bash users, look at 2b.
    1. TCSH users only
       % cd /home/klabrie
       

      With your favorite editor, add the following lines to your ".cshrc" file:

       setenv iraf /home/klabrie/gemiraf/iraf/iraf/
       setenv IRAFARCH redhat
       setenv host ${iraf}unix/
       setenv GEMIRAFPATH /home/klabrie/gemiraf/bin
       setenv PATH ${GEMIRAFPATH}:${PATH}
       
      Save the file then load the configurations:
       % source .cshrc
       % rehash
       
    2. BASH users only

      Note: bash users need to also set up a minimal .cshrc that IRAF will use.

       % cd /home/klabrie
       

      With your favorite editor, add the following lines to your ".cshrc" file (create if, if necessary):

       setenv iraf /home/klabrie/gemiraf/iraf/iraf/
       setenv IRAFARCH redhat
       

      With your favorite editor, add the following lines to your ".bash_profile" file:

       export iraf=/home/klabrie/gemiraf/iraf/iraf/
       export IRAFARCH=redhat
       export host=${iraf}unix/
       export GEMIRAFPATH=/home/klabrie/gemiraf/bin
       export PATH=${GEMIRAFPATH}:${PATH}
       
      Save the file then load the configurations:
       % source .bash_profile
       
  3. Create your IRAF home.
     % cd /home/klabrie
     % mkdir iraf
     % cd iraf
     % mkiraf
     (Answer "xgterm". If you are asked to rebuild the uparm, say yes.)
     

3.3. Testing your work - Linux

  1. Start an xgterm.
     % xgterm&
     

    From now on, we work in the xgterm

  2. Launch an image display.
     % ximtool&
     
  3. Launch IRAF.
     % cd /home/klabrie/iraf
     % cl
     
  4. Load the gemini.gemtools package and make sure the basics work.
     ecl> gemini
     gemini> gemtools
     gemtools> gemtools
     gemtools> lpar gemarith
     
  5. Test a gemini task.
     gemtools> copy /home/klabrie/gemiraf/testdata/N20040506S0076.fits .
     gemtools> gemarith N20040506S0076 * 10 test.fits verbose-
     gemtools> imstat test[1][100:200,100:200] fields=mean
     
    The answer should be 67575.
     
  6. Test the display and the plotting.
     gemtools> display dev$pix 1
     gemtools> imexam fr=1
     

    The cursor will move to the ximtool window. Select a star, and press 'r'. A nice radial plot should show up. If instead you get a bunch of weird symbols in your xgterm, make sure that you have selected xgterm during the mkiraf step, and make sure what your are actually running IRAF from an xgterm.

  7. Exit the IRAF session
     gemtools> logout
     


4. Optional

ds9
For those who prefer ds9 to ximtool, the viewer can be obtained from http://hea-www.harvard.edu/RD/ds9/


5. Need help?

First make sure you have followed the instructions carefully. If you still have problems, send the following information to Kathleen Labrie at [klabrie at gemini.edu].

  • A copy of your .cshrc and, if applicable your .bash_profile.
  • The location in which you unpacked the package.
  • A copy of the files:
    • <where-you-unpacked>/iraf/iraf/unix/hlib/cl.csh
    • <where-you-unpacked>/iraf/iraf/unix/hlib/extern.pkg
    • <where-you-unpacked>/iraf/iraf/unix/hlib/mkiraf.csh
    • <where-you-unpacked>/iraf/iraf/unix/hlib/libc/iraf.h
  • The result of the shell commands:
    • % uname -a
    • % sw_vers #Mac users only