Space Telescope Science Institute
Intro to HST Data Handbooks 8.0 May 2011
Table of Contents Previous Next Index Print

Introduction to the HST Data Handbooks > Chapter 3: Analyzing HST Data > 3.3 Displaying HST Images

Displaying HST Images
This section will be of interest primarily to observers whose datasets contain two-dimensional images, as it explains:
How to display images in IRAF using the display task
The most general IRAF task for displaying image data is the display task, the best choice for a first look at HST imaging data. To display an image, you need to:
Start an image display server, such as SAOimage DS9, in a separate window from your IRAF session, either from a different xterm window or as a background job before starting IRAF. To start DS9, type the following in a Unix window:
Several different display servers, including SAOimage, DS9 (the next generation of SAOimage), and Ximtool, can be used with IRAF. DS9 may be retrieved from Ximtool may be retrieved from
Make sure that IRAF has been set to expect the size of the image you wish to display. This is controlled with the stdimage keyword. As long as this is set to the largest image size you would like to display, the entire image will be available in your viewer. Otherwise, IRAF will only display up to the currently set limit. If you would like a general setting that will display images up to 8192 8192, set stdimage equal to imt7, otherwise, set stdimage equal to the length of one side of the image. Other types of images may require larger formats, like imt4096 for ACS and WFC3 images, for example, while imt1024 is often adequate for WFPC2 and NICMOS images. To set the size of the image buffer to 1024 1024, or the size of the image you would like to display, type the following in the IRAF window:
Load the package from the window where you are running IRAF:
Note that parameters, like stdimage, and frequently used tasks, like tv, are generally defined in the file.
Display the image in frame 1 with the IRAF display task, using the syntax appropriate for the file format (Chapter 2 explains how to specify GEIS groups and FITS extensions):
tv> display fname.c0h[2] 1 (GEIS group 2)
tv> display fname.fits[11] 1 (FITS extension 11)
tv> display fname.fits[sci,3] 1 (FITS extension sci,3)
Note that when using display or any other task on GEIS images, you do not need to specify a group; the first group is the default. However, when working with FITS files you must specify an extension. Figure 3.1 shows how to display chip 1 of an ACS/WFC image.
If you want to display all four chips of a WF/PC-1 or WFPC2 image simultaneously, you can create a mosaic with the STSDAS wmosaic task in the hst_calib.wfpc package. Type help wmosaic for details.
Modifying the Display
There are two ways to adjust how your image is displayed:
Reset the display task parameters, either on the command line or using the epar command.
Once an image appears in your DS9 window, you can use the SAOimage commands displayed near the top of the image window to manipulate or print your image. The SAOimage User’s Guide describes these commands, although most are fairly intuitive. Just click on the buttons to scale, pan, or print the image, or to perform other commonly-used functions. Online help is also available at the system level: type man saoimage in Unix.
Figure 3.1: Displaying an Image
The example in Figure 3.1 shows how you could display an image for a first look. By default, display automatically scales the image intensity using a sampling of pixels throughout the image. During your first look, you may want to experiment with the intensity scaling using the zscale, zrange, z1 and z2 parameters. The zscale parameter toggles the auto scaling. Setting zrange+ (and zscale-) tells the task to display the image using the minimum and maximum values in the image. To customize your minimum and maximum intensity display values, set z1 to the minimum value and z2 to the maximum value that you want displayed. You must also set zscale- and zrange- to disable these parameters. To ensure the entire image is displayed, you should set the fill+ option. For example:
Notice in Figure 3.1 that when you run display, the task shows you the z1 and z2 values that it calculates. You can use these starting points in estimating reasonable values for the minimum and maximum intensity display parameters.1
If you want to display an image with greater dynamic range, you may prefer to use logarithmic scaling. However, the log scaling function in DS9 divides the selected intensity range into 200 linearly spaced levels before taking the log. The resulting intensity levels are rendered in a linear rather than a logarithmic sense. You can often obtain better results if you create a separate logarithmic image to display. One way to create a logarithmic image is with the imcalc task:
If the peak pixel in your original image contained 2000 counts, for example, you would then display the logarithmic image with z1=0 and z2=3.3. Otherwise, you can simply use:
To display only a portion of an image, use the syntax for specifying image sections discussed in Chapter 2. Your specified pixel range should give the starting point and ending point, with a colon separating the two. List the horizontal (x-axis) range first, followed by the vertical (y-axis) range. For example, to specify a pixel range from 101 to 200 in the x-direction, and all pixels in the y-direction from group three of a GEIS format image, type:
tv> display image.hhh[3][101:200,*] 1
To specify the same pixel range in the second SCI extension of a NICMOS FITS image:
If you specify both a group and an image section of a GEIS file, the group number must come first. When displaying sections of FITS image extensions, you must specify the extension number followed by the image section.
Figure 3.2 shows examples of displaying an image and an image section.
Figure 3.2: Displaying Sections and Groups of an Image

Type help display within IRAF to get more information about these parameters.

Table of Contents Previous Next Index Print