Next: IRAF Update
Previous: IRAF Users Meeting at the San Diego AAS
Table of Contents - Search this issue - NOAO Newsletter Home Page

NOAO Newsletter - Central Computer Services - September 1998 - Number 55


Display and Ximtool

A new version of Ximtool was released last fall, but many IRAF users have not upgraded yet. There are numerous improvements in the latest versions (V1.1), especially the experimental version, that are described in the Ximtool documentation, such as print, including a save to EPS or GIF file, a magnifier viewport, and on-line help. I encourage users to FTP the latest version (from iraf.noao.edu in the /iraf/x11iraf directory). Here I answer a few questions about using Ximtool to view large images, now that 2048 × 4096 CCDs are becoming common, and a few 8192 × 8192 Mosaic systems are on-line.

There are many ways to display an image of a particular size within IRAF. If the image is very small, it can be magnified without gaining or losing information---this is an easy case. A more complex situation arises, though, when loading a large image. You can either see the whole image while sacrificing details, or you can view a small piece of the image at full resolution. This article briefly explores some of the ways to view large images—those that have dimensions larger than the screen.

Consider the simple case of a square 2048 × 2048 image being viewed on a 1024 × 1024 screen. The number of screen pixels allows one to examine only one-quarter of the image at full resolution at one time. Within IRAF, one can display the entire image in several ways. Some of these have advantages over others.

Let's initially adopt this set of parameters:

set stdimage = imt2048, display.fill = no, display.xmag = 1,
display.ymag = 1

With this configuration, the display task will load the entire image into the frame buffer, one pixel per buffer pixel, requiring at least 8 Mbytes of RAM (since Ximtool, by default, starts up with two frame buffers). The only drawback is the memory requirement. Within Ximtool, you can pan and zoom to see the entire image or a piece of it. If you use Ximtool with the experimental magnifier box, you can see the entire image in the main window at reduced resolution and see individual pixels in the magnifier box at full resolution.

If you cannot afford to use the 8 Mbytes of memory, then you might be tempted to use a smaller frame buffer of imt1024. With display.fill = no, you will find that only the central 1024 × 1024 pixels of the image are displayed, but at full resolution. If you wish to see the entire image, you can set display.fill = yes, but then you lose the ability to see individual pixels. The display task attempts to squeeze the entire 2048 × 2048 image into the smaller frame buffer by interpolating the pixels to lower resolution.

When you don't need multiple frame buffers the memory requirements of Ximtool can be minimized using the "nframes 1" command-line option to start up with a single frame buffer. This allows you to double the number of pixels in the frame buffer used since two frames are normally created even if the second is never used. Using the "-memModel small" option will minimize Ximtool memory requirements even further.

Even with a full 2048 × 2048 frame buffer, there are secondary concerns: if the Ximtool window is smaller than the frame buffer size (say, 800 × 800 to allow you to have an Xgterm window visible), and you zoom out to show the entire image, resampling of the image must take place. In the Control Panel there is a button called "Antialias." If engaged, the resampling uses all the pixels to reinterpolate the image onto the Ximtool grid. Otherwise, subsampling is used, which is faster, but more likely to misrepresent the data.

Now consider the case of a very large image, say 8192 × 8192 from the NOAO CCD Mosaic. We could set stdimage to imt8192 to maintain as high a resolution as possible, but this uses 64 Mbytes (per frame) of RAM. If you wish to blink among the 4 available frame buffers in Ximtool, 256 Mbytes of RAM are needed. Also, this configuration takes a very long time to load the image since every pixel must be pushed into the frame buffer. We usually adopt the compromise case and set stdimage to imt4096.

There are a variety of other parameters that can affect the display/Ximtool interactions. My preference is to use the parameters listed above, but not all of my fellow scientists at NOAO find these optimal for their work. If you have questions on how to display your images to take full advantage of the IRAF tools, feel free to contact us at iraf@noao.edu.

George Jacoby, IRAF Project Scientist


Next: IRAF Update
Previous: IRAF Users Meeting at the San Diego AAS
Table of Contents - Search this issue - NOAO Newsletter Home Page

NOAO is operated by the Association of Universities for Research in Astronomy (AURA), Inc. under cooperative agreement with the National Science Foundation