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.

As one of the IRAF developers says: "Keep in mind Cygwin is no longer a supported platform and has evolved since the v2.14 system port was done. Whether it's all worth it depends on what you're trying to do, for something critical I'd recommend a supported Linux platform, perhaps run using a virtual machine on your windows system (e.g. VirtualBox)." (http://iraf.net/forum/viewtopic.php?showtopic=1468885).
Thus we also strongly recommend that you use the latest version of IRAF under a Linux (virtual) machine, in a Docker container, or under the WSL on Windows 10. See Install Astronomical Software on a laptop or ftp://iraf.noao.edu/iraf/v216/PCIX/README.install for Linux installation instructions.

How to install IRAF 2.14 in Cygwin

04-Aug-2014: This page has been revised, and a few broken links have been fixed. The IRAF/Cygwin installation described here has been tested successfully on a Windows 8.1 PC.

Here we assume that Cygwin (32bit) has been properly installed, with all the required packages (in particular the tcsh shell, wget, X11 including xinit, ncurses including libncurses7). 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 ...
    ./install
  • We accept the values offered as default, 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 8.1/Cygwin configuration, my home is /home/ncaon. Thus I will create subdirectory iraf and run there the mkiraf command.
  • Execute mkiraf, reply xgterm when asked about terminal type:
    mkdir -p /home/ncaon/iraf
    cd /home/ncaon/iraf/; mkiraf
  • Previously, when I had Windows XP, my home cygwin home was: /cygdrive/c/Documents and Settings/localuser. As this produced problems due to the spaces in the directory name, I created and set a new directory, /cygdrive/c/localuser/iraf, as my IRAF home (one can of course replace localuser by the actual username).

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/forum/viewtopic.php?forum=4&showtopic=139065

XGterm and DS9

  • Download X11IRAF, untar the file, and copy xgterm to /usr/local/bin:
    cd /cygdrive/c/iraf-files/
    wget http://iraf.noao.edu/iraf/ftp/iraf/x11iraf/x11iraf-v2.0BETA-bin.cygwin.tar.gz (6M)
    tar -zxvf x11iraf-v2.0BETA-bin.cygwin.tar.gz
    * We copy xgterm to /usr/local/bin, and add execution permission:
    cp bin.cygwin/xgterm.exe /usr/local/bin/
    chmod a+x /usr/local/bin/xgterm.exe
  • As for DS9, we install version 7.1 of DS9 directly from the DS9 Archive Page (version 7.2 has a bug in terms of cursor coordinates in IRAF). Download the .exe file, click on it, and unzip for instance inside /cygdrive/c/iraf-files/ds9 (you may need to create the ds9 folder first).
  • Then we copy both the DS9 executable and the zip file in /usr/local/bin/:
    cd /usr/local/bin/
    cp /cygdrive/c/iraf-files/ds9/ds9.exe /usr/local/bin/
    cp /cygdrive/c/iraf-files/ds9/ds9.zip /usr/local/bin/
  • It seems that IRAF communicates with DS9 without having to set the IMTDEV variable. However, if in your case it doesn't, try with:
    export IMTDEV="inet:5137:127.0.0.1"
    This command should be placed into the user's .profile or .bash_profile file.

External packages

  • Update (Oct 2012): I can't find anymore the cygwin binaries for external packages. However, I managed to recover from my Windows box a few external packages, which can be obtained by downloading Attach:iraf-cygwin-files.tar (156M). This tarfile includes: as.pcix.gen.gz, ctio-bin.cygwin.tar.gz, ctio-src.tar.gz, fitsutil-bin.cygwin.tar.gz, fitsutil-src.tar.gz, gemini_v1.9-bin.cygwin.tar.gz, gemini_v1.9-src.tar.gz, ib.cygw.x86.gz, nb.cygw.x86.gz, nmisc-bin.cygwin.tar.gz, nmisc-src.tar.gz, stsdas39-bin.cygwin.tar.gz, stsdas39-src.tar.gz, tables39-bin.cygwin.tar.gz, tables39-src.tar.gz
  • Download the above file and untar it:
    mkdir /cygdrive/c/iraf-files/external/
    cd /cygdrive/c/iraf-files/external/
    wget http://research.iac.es/sieinvens/siepedia/uploads/HOWTOs/iraf-cygwin-files.tar
    tar -xvf iraf-cygwin-files.tar
  • Now we need to create the directories where these packages will be installed, and unpack the tar files:
    mkdir /iraf/extern/tables ; cd /iraf/extern/tables/
    tar -zxvf /cygdrive/c/iraf-files/external/tables39-src.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/tables39-bin.cygwin.tar.gz
    mkdir /iraf/extern/stsdas ; cd /iraf/extern/stsdas/
    tar -zxvf /cygdrive/c/iraf-files/external/stsdas39-src.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/stsdas39-bin.cygwin.tar.gz
    mkdir /iraf/extern/gemini ; cd /iraf/extern/gemini/
    tar -zxvf /cygdrive/c/iraf-files/external/gemini_v1.9-bin.cygwin.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/gemini_v1.9-src.tar.gz
    mkdir /iraf/extern/ctio ; cd /iraf/extern/ctio/
    tar -zxvf /cygdrive/c/iraf-files/external/ctio-src.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/ctio-bin.cygwin.tar.gz
    mkdir /iraf/extern/fitsutil ; cd /iraf/extern/fitsutil/
    tar -zxvf /cygdrive/c/iraf-files/external/fitsutil-src.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/fitsutil-bin.cygwin.tar.gz
    mkdir /iraf/extern/nmisc ; cd /iraf/extern/nmisc/
    tar -zxvf /cygdrive/c/iraf-files/external/nmisc-src.tar.gz
    tar -zxvf /cygdrive/c/iraf-files/external/nmisc-bin.cygwin.tar.gz
  • These are some of the most important external packages. Several more are available. To install them follow the steps described above (download source and binaries, create target directory, unpack tar files).

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 below.
    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 (a symptom of such problems might be error messages like "syntax errors" or "parser gagged" when CL is started).
# External (non core-system) packages. To install a new package, add the
# two statements to define the package root directory and package task,
# then add the packages' helpdb to the 'helpdb' list.

reset   noao            = iraf$noao/
task    noao.pkg        = noao$noao.cl

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

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

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

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

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

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


reset   helpdb          = "lib$helpdb.mip\
                          ,noao$lib/helpdb.mip\
                          ,tables$lib/helpdb.mip\
                          ,stsdas$lib/helpdb.mip\
                          ,nmisc$lib/helpdb.mip\
                          ,ctio$lib/helpdb.mip\
                          ,gemini$lib/helpdb.mip\
                          ,fitsutil$lib/helpdb.mip\
                          "


keep
 

Using IRAF

At this point everything is ready for running IRAF.

  • First of all, if you haven't already done so, launch the X11 windows system by typing:
    startx or startxwin
  • In the newly created window, start DS9 by typing:
    ds9 &
  • And then xgterm (the default font is small, let's change it):
    xgterm -font 9x15 -sb -ls &
    -sb creates the scrollbar, -ls starts xgterm as a login shell.
  • Then, in the xgterm, cd to your home iraf directory and execute ecl:
    cd /home/ncaon/iraf/
    ecl
  • Now you can use any IRAF commands such as display, imexamine, implot, phelp etc, as well as load the installed external packages.

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


OLD STUFF, PLEASE IGNORE

There are many external packages already available in binary form for Cygwin. We download both the source and the cygwin binary files.
As file names or release numbers may vary, please check them first in http://iraf.net/ftp/iraf/extern/, and modify the commands below accordingly.
cd /cygdrive/c/iraf-files/
wget http://iraf.net/ftp/iraf/extern/ctio-src.tar.gz
wget http://iraf.net/ftp/iraf/extern/ctio-bin.cygwin.tar.gz
wget http://iraf.net/ftp/iraf/extern/gemini_v1.9-src.tar.gz
wget http://iraf.net/ftp/iraf/extern/gemini_v1.9-bin.cygwin.tar.gz
wget http://iraf.net/ftp/iraf/extern/stsdas39-src.tar.gz
wget http://iraf.net/ftp/iraf/extern/stsdas39-bin.cygwin.tar.gz
wget http://iraf.net/ftp/iraf/extern/tables39-src.tar.gz
wget http://iraf.net/ftp/iraf/extern/tables39-bin.cygwin.tar.gz
wget http://iraf.net/ftp/iraf/extern/fitsutil-src.tar.gz
wget http://iraf.net/ftp/iraf/extern/fitsutil-bin.cygwin.tar.gz
wget http://iraf.net/ftp/iraf/extern/nmisc-src.tar.gz
@@ wget http://iraf.net/ftp/iraf/extern/nmisc-bin.cygwin.tar.gz @

Section: HOWTOs

edit · print · PDF
Page last modified on June 20, 2019, at 01:20 PM