XIRAF -
The new way to start your
IRAF session...
by
Vassilis Charmandaris,
(Department of Physics, University of Crete)
In this web page I provide a script I started developing back in 1992
which starts an IRAF session in a way a bit more user friendly than
the usual cl command. Using this script to start IRAF will make
the life of any IRAF user as well as the local system manager much
simpler.
I hope that once you've read this page you'll be convinced that it is
indeed a good idea to use xiraf and that
my efforts to create the script and this web page did not go in vain.
If you still have any doubts or questions feel free to contact me.
I would not have been able to do this without the guidance and support
over all these years of
Mike Fitzpatrick (NOAO), my IRAF mentor...
Dr. Charm
Current Version:
- On August 3, 2004 xiraf was upgraded to version
3.12 to include a fix/suggestion by Wagner Corradi (UFMG,
Brazil) related to the location of the Xresources of XGterm as well as
to add a clarification about enviroment variable definitions under the BASH shell. The
support for SAOtng, was
also dropped since the package has been replaced for several years now
by DS9.
- On October 8 2001 xiraf was upgraded to version
3.11 to include a fix/suggestion by Terry Hancock (IPAC) so
that "xgterm" is selected by default when the login.cl file is being
recreated by the "mkiraf" script.
- On July 10 2000 xiraf was upgraded to version
3.1 trying asymptotically to reach the value of pi. I've only
added some extra explanations and comments to it but no changes were
done to the actual code.
- On April 15 2000 xiraf was upgraded to version
3.0 to include the option of using DS9 as an image
display. This is a major upgrade...
- On November 5th 1998, after implementing a suggestion of Vivi
Fragopoulou (who is BTW a real computer scientist) the xiraf script
was upgraded to version 2.3. A couple of bugs
reported by Jonathan Adams (NASA, Ames) were also corrected. This is a
major upgrade...
Problems with the default IRAF start-up
First the good news: IRAF is a great package, probably the best in the market,
and above all one can get it for free in nice pre-compiled binaries with easy to
follow installation instructions.
Then the bad news: Once you have it in your system and if you want to serve many
users problems arise.
More specifically:
For the System Manager
- The system manager has to create and maintain the common fifo files
(/dev/imt1o and /dev/imt1i) on each machine of the local cluster
of workstations he/she wants to have IRAF running.
- The system manager has to create an IRAF login.cl file for every user
since many do not quite understand what the command mkiraf does.
For the Novice User
To use IRAF (version 2.10 or later) to its full potential (nice graphics,
colors etc) the user has to do the following:
- Open an xgterm instead of the usual Unix xterm after having
read its proper Xresources.
- Working on the xgterm the user has to go to the directory where his/her IRAF
login.cl is located.
- The user has to start the IRAF cl command in that directory.
- Finally, the user has to choose the image display client (SAOimage, XImtool,
or DS9) he/she prefers and start it with the proper options.
This can be done using the task
xray.xplot.ximtool. Another option is to start the image client
externally from another window..
This procedure is time consuming and not very obvious to someone who starts learning
Unix, astronomy and IRAF at the same time. Frustration may also appear when:
- the xgterm excutable is not installed in the system.
- the user does not start IRAF in the directory of his/her login.cl file and as
a result does not find all installed packages.
- the user encounters problems trying to run IRAF on a machine which access the
IRAF binaries but for some reasons does not have the public fifo files installed.
- the public fifo files exist but another user is running SAOimage making it impossible to run a second SAOimage window on the workstation.
- the user has exited the IRAF environment ("cl>" prompt) but left an SAOimage
session running which prevents him/her to view his/her images when he/she restarts
IRAF and an new SAOimage
- ... your own sad story ...
So why should one use the script xiraf ?!
Well, all of the problems presented above can be solved if the script
xiraf is installed together with the IRAF distribution.
When a user executes the script xiraf for the first time, xiraf
checks whether the user has already been using IRAF by looking for a
login.cl file. Then it creates a set of personal fifo files, and if the
user does not have a login.cl file it runs mkiraf, to create
it. Subsequently, the script opens an XGterm with the selected image
display client and starts IRAF inside this new XGterm. When a user
wishes to finish his/her IRAF session and issues the command
cl>logout, the image display client, the IRAF session, and the
XGterm close keeping everything nice and tidy...
The major advantage of the script is that it
also allows the user to select in a transparent way the program
he/she wants to use to display his/her IRAF images. As far as I know
there are four in the market. First it's the old but reliable
SAOimage. We also have XImtool the X-window resurrection
of the old Sun Imtool which comes as part of the X11IRAF package.
Finally we have DS9 ( SAOimage Deep Space
9) which is the next version of SAOtng and in a manner
analogous to the popular TV series it's an even more powerful program.
The web sites from where one can download the latest versions of all four
programs are listed at the end of this page.
The syntax of the script is :
xiraf -h
| :Show command options
|
xiraf -help
| :Show command options
|
xiraf
| :Start IRAF in an XGterm using the default image display
|
xiraf -ximtool
| :Start IRAF in an XGterm using XImtool for display
|
xiraf -saoimage
| :Start IRAF in an XGterm using SAOimage for display
|
xiraf -ds9
| :Start IRAF in an XGterm using DS9 for display
|
xiraf -rebuild
| :Rerun mkiraf rebuilding the login.cl file of the user. This should be used ONLY in the case of major IRAF version upgrades.
|
It's worth stressing that xiraf does not interfere
with the existing IRAF distribution. It is just simplifying the
intermediate steps. Users who don't like it do not have to use it even
if it has been placed into the system.
They can run IRAF in the usual old fashioned way.
Technical Note:
Apart from setting some options to automate things the xiraf script
forces the user to start his/her IRAF session with private fifo files.
This is done internally in the xgterm sheel using the environment
variable IMTDEV. In principle private fifos are only necessary
if one has multiple users running SAOimage on the same workstation.
XImtool and DS9 do not have this problem. However, my experience
has shown that the public fifos (/dev/imt1o and /dev/imt1i) are not by
default present in all systems. So using personal fifo files is a more
robust approach.
Set-up Requirements
The script can be used either by a single user who just wishes to
simplify his/her IRAF start-up process (by placing it somewhere in
his/her directory) or it can be installed in a global way for all
IRAF users.
In the second case the System manager has to get the script
xiraf provided at the end of this page and place it in the
standard executable Unix PATH of the users. A series of site-dependent
environment variables must be defined in the xiraf script.
Minimum system requirements are:
IRAF
version 2.10 or later, as well as the X11IRAF
software package which includes the xgterm and ximtool executables.
The IRAF commands cl and mkiraf should be in the PATH of
each potential IRAF user. The location of all the other executables
and programs needed is defined within the script.
Any potential IRAF user will simply have to type xiraf
to start IRAF for the first time. The script will prompt the user to
define his/her personal IRAF directory via an environment variable
called USERIRAF and it will take care of all the rest...
The script has been tested under all IRAF versions later than 2.10.4,
running in clusters of DEC-Alphas (OSF/1 vers. 3.2, and Digital Unix
ver. 4.0), DEC-Ultrix, Suns (Solaris versions 2.5, 2.6, and 2.7) as
well as on Red Hat Linux. It has been used in sites which use either
NFS (=Network File System) or AFS(=Andrew File System) or mixed
filesystems. The image display packages currently supported are:
XImtool ver. 1.3.1,
SAOimage ver. 1.35.1, and
DS9 ver. 6.2
The script follows:
- xiraf (25.8 Kbytes) - all Unix platforms (tested on Solaris, HPUX, DEC)
- xiraf
(26.5 Kbytes) - Linux specific (check comments on Debian)
- Macintoch users check here
The script has plenty of comments so it's rather trivial to understand
its function. If you've managed to get IRAF running and you already
have X11IRAF you'll be able to customize the script in your system in
10min, or your money back ....
If you find this script useful please send an e-mail and let me
know about it. This way your institution will be proudly displayed in
the list found at the end of this web page. I would appreciate even
more if you could send me an e-mail with comments or bugs you've
noticed.
I would like to acknowledge once more the help of Mike who
checked the script in its early form.
Vassilis Charmandaris
April 15th 2000
Ithaca, NY, USA
Sites using xiraf include:
-
Dept. of Physics & Astronomy, Iowa State University, IA, USA
(the cradle of xiraf)
-
Service d'Astrophysique, CEA-Saclay, France
- Observatoire de Paris, France
- Joint Astronomy Center,
Hilo, HI, USA
- Laboratoire d'Astronomie Spatiale,
Marseille, France
- Stratospheric Observatory For Infrared Astronomy (SOFIA), NASA Ames, CA, USA
-
Ioffe Physical Technical Institute, St. Petersburg, Russia
- Institute of Geophysics and Planetary Physics, Univ. of California Riverside, CA, USA
- IFA, Univ. of Aarhus, Denmark
- Academia Sinica, Insitute of Astronomy and Astrophysics, Taipei, Taiwan
- MEGACAM/TERAPIX consortium,
Institut d'Astrophysique de Paris, France
- Onsala Space Observatory, Sweden
- IRS Science Center, Astronomy Department, Cornell University, Ithaca, NY, USA [1 Sep 1999]
- Astronomy Group,
The Open University, UK [24 Jul 2000]
- Canadian Institute for Theoretical Astrophysics, Toronto, Canada
- European Southern Observatory, Santiago, Chile [15 Sep 2000]
- Groupe d'Astrophysique, Université de
Monrtéal, Canada
- Vatican Observatory, Tucson, AZ, USA [23 Jun 2000]
- Dept. of Physics & Astronomy, Univ. of Manitoba, Winnipeg, Canada
- Astronomical Observatory of Padova, Padova, Italy [3 Jun 2001]
- Hewitt Undergraduate Laboratory, Cornell University, Ithaca, NY [1 Sep 2001]
- Infrared Processing and Analysis Center, Caltech, Pasadena, CA [8 Oct 2001]
- Instituto de Fisica de Cantabria, Santander, Spain [31 Oct 2001]
- Instituto de Astronomía UNAM - Morelia, México
- Dipartimento di Fisica, Univ. di Roma "La Sapienza", Rome, Italy
- Astronomy Department, Univ. of Virginia, Charlottesville, VA [31 Oct 2002]
- Math/Science Division, Babson College, Wellesley, MA [31 Jan 2003]
- Laboratoire d'AstrOphysique de Grenoble, Grenoble, France [13 Feb 2003]
- Physics Department, Oklahoma State University, Stillwater, OK [10 Mar 2003]
- NASA/Goddard Space Flight Centre, Greenbelt, MD [17 Jul 2003]
- Steward Observatory, Univeristy of Arizona, Tucson, AZ [1 Oct 2003]
- The Canada-France-Hawaii Telescope, Mauna Kea, Hawaii [6 Oct 2003]
- Astrophysics Group, Univ. Federal de Minas Gerais, Pampulha - Belo Horizonte, Brazil [16 Jul 2004]
- Dept. of Physics and Astronomy, Northwestern University, Evanston, IL [21 Sep 2004]
- Center for Astrophysics, Harvard University, Boston, MA [27 Oct 2004]
- University College London, London, UK [28 Nov 2005]
- University of Vienna, Astronomy Department, Vienna, Austria [7 Mar 2006]
- University of Toronto, Astronomy Department, Toronto, CA [4 Jul 2006]
Contact V.Charmandaris |
University of Crete |
Department of Physics |
Copyright © Mar. 15, 2005
Vassilis Charmandaris.
All rights released. Duplicate and redistribute in any form.