edit · print · PDF

Please note that all the SIEpedia's articles address specific issues or questions raised by IAC users, so they do not attempt to be rigorous or exhaustive, and may or may not be useful or applicable in different or more general contexts.

How to install IRAF 2.14 in Cygwin

Here we assume that Cygwin has been properly installed, with all the required packages (in particular the tcsh shell and X11). We also assume that you have at least some familiarity with Cygwin and with IRAF.

Announcements for new or updated IRAF ports are posted in the IRAF Web Site: http://iraf.net/

Note: Pascal di SCALA, a French student, has made available an automated installer for IRAF under Cygwin. You might wish to use it instead of following the instructions below. For details, see http://ns11.freeheberg.com/~m2ccp/ (also available in french, http://ns11.freeheberg.com/~m2ccp/IRAF_francais.html)

Download IRAF files

Create directory structure for IRAF

  • We follow the standard route, and create a /iraf tree (note that this is different from where IRAF is installed in our Linux machines).
  • Create root directory and subdirectories (cygwin is the architecture name for Cygwin):
    mkdir /iraf
    mkdir /iraf/iraf
    mkdir /iraf/irafbin
    mkdir /iraf/irafbin/bin.cygwin
    mkdir /iraf/irafbin/noao.bin.cygwin
    mkdir /iraf/extern

Uncompress files in proper directory

  • The three downloaded files must be unpacked each in its proper place:
    cd /iraf/iraf
    tar -zxvf /cygdrive/c/iraf-files/as.pcix.gen.gz
    cd /iraf/irafbin/bin.cygwin
    tar -zxvf /cygdrive/c/iraf-files/ib.cygw.x86.gz
    cd /iraf/irafbin/noao.bin.cygwin
    tar -zxvf /cygdrive/c/iraf-files/nb.cygw.x86.gz

Run the IRAF installation script:

  • We run the script install, first with flag "-n" to just check what it would be doing. Remember you need to have the tcsh shell and the X11 packages already installed.
    cd /iraf/iraf/unix/hlib
    ./install -n # if the output messages look fine then ...
  • We accept the values offered as default, but change the "Default root image storage directory" to /cygdrive/c/localuser/iraf (note: I replaced my actual username by localuser, you should use the appropriate username for you), and answer no to "Configuring IRAF Networking". We also ignore a possible message about the lack of a display.
  • At the end, it seems that all the IRAF commands (mkiraf, cl, ecl etc.) are available. Good!

User setup

  • In my current Windows XP/cygwin configuration, my home is: /cygdrive/c/Documents and Settings/localuser. This produces problems due to the spaces in the directory name. So I will create and set a new directory, /cygdrive/c/localuser/iraf, as my IRAF home.
  • Execute mkiraf, reply xgterm when asked about terminal type:
    mkdir -p /cygdrive/c/localuser/iraf
    cd /cygdrive/c/localuser/iraf; mkiraf

Note: /usr/local/bin must be in the user's path. More details about how to check or set your path in cygwin can be found in this IRAF forum thread: http://iraf.net/phpBB2/viewtopic.php?t=86968

XGterm and DS9

  • Download xgterm:
    cd /cygdrive/c/iraf-files
    wget http://iraf.net/ftp/pub/fitz/xgterm.cygwin
  • We copy xgterm to /usr/local/bin, and add execution permission:
    cp xgterm.cygwin /usr/local/bin/xgterm
    chmod a+x /usr/local/bin/xgterm
  • As for DS9, we download the latest version of DS9 directly from the DS9 Home Page. We unzip it into C:/Program Files/ds9 (we may need to create the ds9 folder first). This directory contains an executable, ds9.exe, and a library file, cygwin1.dll.
  • Then we can create a symlink for DS9 in /usr/local/bin:
    cd /usr/local/bin
    ln -sf /cygdrive/c/Program\ Files/ds9/ds9.exe ds9
  • In order to allow IRAF to communicate with DS9, we need to define a new variable:
    export IMTDEV="inet:5137:"
    This command should be placed into the user's .profile or .bash_profile file.

External packages

Editing extern.pkg

  • File extern.pkg, which is located in /iraf/iraf/unix/hlib/, must be edited to add these new external packages.
  • Just follow the instructions and examples provided in the file. My extern.pkg looks like this (the column alignment may appear to be broken, but should be OK if you save and paste the code into a file).
    Please make sure that your extern.pkg file has a newline after the "keep" statement, and that no extra control characters are inserted by your editor. If CL aborts when you launch it with "syntax errors" or "parser gagged" messages, please see the IRAF forum posts http://iraf.net/phpBB2/viewtopic.php?t=87211&start=15 and http://iraf.net/phpBB2/viewtopic.php?p=1463287 for explanations and fixes.

GeSHi Error: GeSHi could not find the language none (using path /datos/ext/sieinvens/siepedia/cookbook/geshi/geshi/geshi/) (code 2)

Using IRAF

At this point everything is ready for us to run IRAF.

  • First of all, if we haven't already done so, we launch the X11 windows system by typing:
  • In the newly created window, we start DS9 by typing:
  • And then xgterm (the default font is small, so we change it):
    xgterm -font lucidasanstypewriter-14 -sb -ls &
    -sb creates the scrollbar, -ls starts xgterm as a login shell.
  • Then, in the xgterm, we cd to our home iraf directory and execute ecl:
    cd /cygdrive/c/localuser/iraf
  • Now you can try any IRAF commands such as display, imexamine, implot, phelp etc.

I haven't used IRAF in Cygwin for any serious work, but it seems to work quite nicely.

Section: HOWTOs

edit · print · PDF
Page last modified on October 24, 2012, at 01:55 PM