SAOimage display of M-51

SAOimage as an IRAF IMTOOL

SAO/TDC Home Page
To display IRAF images when using the X window system, SAOimage can be run with the -imtool flag, which turns it into a sort of image server, emulating the IIS stand-alone display which IRAF originally used to display images. Display tasks, such as and, then write images to and read cursor information from this image server. The details of the transfer, such as image size, are defined by the device pointed to by the stdimage IRAF environment parameter, which is by default set to imtool (=imt512).

The details of the transfer, such as image size, are defined by the device entry in the current graphcap file, by default dev$graphcap. The actual bytes of the image pass through files called "named pipes". In the default graphcap file, the input pipe is /dev/imt1i and the output pipe is /dev/imt1o, which are set up in the IRAF installation procedure as world-readable and -writeable.

Problems with such a default Imtool include the limit that only one such instantiation of SAOimage can be run on a given CPU/monitor combination. Multiple Imtools can display on a monitor if the underlying SAOimages are running on different CPUs, but only one SAOimage/Imtool can run on a given CPU. To run SAOimage entirely within the disk space which a user controls, a procedure has been set up to use named pipes in the users own directory heirarchy rather than in the root-controlled /dev.

An IRAF CL script,, has been written at the Center for Astrophysics to create an "imtool" IIS emulator to which IRAF can display. To support it, local named pipes and a local graphcap file are created by a modified version of hlib$mkiraf.

Modifying MKIRAF

Named pipes are created in the user's iraf $home directory, with the second path option dealing with Sun Solaris systems:
# Make named pipes for image display
echo '-- creating named pipes for image display'
if (-e /etc/mknod) then
    /etc/mknod imt1i p
    /etc/mknod imt1o p
    /usr/sbin/mknod imt1i p
    /usr/sbin/mknod imt1o p
ln -s imt1o imt1
A local copy of dev$graphcap is made by adding the following lines to hlib$mkiraf:
set irafhome = `echo "$cwd" | sed -e 's;^/tmp_mnt;;'`
echo $irafhome     | sed -e "s;.*;s+imtool,,+imtool,&/imt1,+;"   > _sed
sed -f _sed < $iraf/dev/graphcap > graphcap; rm _sed
The IRAF graphcap parameter must be set to the pathname of the local graphcap file. Add the following to the template file hlib$
set     graphcap        = "home$graphcap"
After mkiraf is run, the default pipe path for simtool, home$imt1 should work. Then tv.display should display images to the SAOimage set up by simtool.

xiraf: An alternate method

Vassilis Charmandaris of Cornell University has put together a C shell script called xiraf which starts up an IRAF session on an xgterm, including starting an image display of the user's choice. Its purpose is to provide a simple IRAF startup from Unix/Linux; it seems especially useful for casual users, who will be freed from any worries about pathnames or pipes, as it automatically runs mkiraf if the appropriate files are not set up properly.

Last updated 24 September 1999 by Doug Mink