Next: Systems Aspects of COBE Science Data Compression
Previous: Parsley: a Command-Line Parser for Astronomical Applications
Table of Contents --- Search --- PS reprint


Astronomical Data Analysis Software and Systems V
ASP Conference Series, Vol. 101, 1996
George H. Jacoby and Jeannette Barnes, eds.

Datastream Compression for IRAF Image Display

Michael Fitzpatrick, Doug Tody

IRAF Group, NOAO,1 PO Box 26732, Tucson, AZ 85726

Abstract:

As CCD frames become larger and observatories consider remote observing as a way to cut costs in lean times, the issue of compressing images to shorten transfer times for remote display, minimize disk usage, and to facilitate quick-look previews is becoming increasingly important. We explore a number of image compression schemes in use today and their application to astronomical images. Preliminary results and a strategy for implementing datastream compression for remote image display within IRAF are also presented.

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

1. Introduction

CCD technology has progressed to the point where 2K square CCDs are common at most large observatories, and larger mosaics will be coming on-line in the near future. This presents not only a problem in data storage and reduction (where each frame represents 8 MB or more of data), but also in the display and analysis of the data. The situation only worsens in the case of remote observing where the astronomer is physically separated from the detector by perhaps thousands of miles and slow networks inhibit the ability to view the data as it's collected. With the release of PC-IRAF (Tody & Fitzpatrick 1996) increasing numbers of users will be able to work from home over a modem or other relatively low speed network connection. Some sort of data compression is necessary to adequately support image display over slow network connections in such applications.

The current IRAF display server, Ximtool, allows display from an Internet host via sockets, but even for relatively small frames slow connections mean the time to display an image can take minutes. For the remote observer or eavesdropper on such a session what is needed is a way to speed the display of images from a remote client. This can be accomplished most practically by compressing the displayed data at the source so that transmission times are reduced, since for a slow network connection the time spent uncompressing the data is typically much less than the time spent transmitting it. Since the compression schemes being considered can also be used for the disk storage of data we get the side benefit of being able to access compressed images on disk with little extra effort.

Planned Ximtool enhancements include not only the ability to read and write images in a variety of formats (compressed or otherwise), but also a new generalized communications protocol to permit progressive display of compressed images allowing the user to view the image as it's being received. This interface will allow any client application, including non-IRAF clients, to use Ximtool as a display server. Derivatives of Ximtool such as SAOtng should also inherit these capabilities.

2. Compression Algorithms

There are a variety of image compression algorithms in use today. Aside from the lossiness tradeoffs usually made for higher compression rates, an algorithm's practical utility depends on how it is being applied: the type of data being displayed and the relative speeds of the server, client, and network connection. Preliminary tests were conducted on four images: a starfield, a galaxy image, an Echelle spectrum, and a bias frame. Results of these tests are summarized in Table 1. Several distinct (dis)advantages emerged for each algorithm as it was used on each of the test images:

Obviously this is not an exhaustive survey of all techniques available or their relative strengths and weaknesses. What is clear though is that no one algorithm stands out as being the best for all possible uses, some combination of algorithms will need to be implemented.

3. Preliminary Work

As an experiment a prototype display client was written using the HCOMPRESS algorithm (White 1992) and an extension to the IRAF IIS/imtool remote display protocol. Initially the entire image was compressed before transmission but this caused a noticeable delay in display even though the total time required was still shorter than displaying the uncompressed image. A second attempt broke the image into smaller sections for display. Since the Ximtool server could be decompressing one section while the client is compressing the next display times fell by more than half, however the compression rates for each section were not as good as when compressing the entire image.

As a test, the display client was run on a machine in Canada to an Ximtool running in Tucson. The average display time for dev$pix (the standard 512x512 IRAF test image) fell from 55 seconds to less than 8, similar results were found when connecting to a Linux PC over a 14K modem. It is expected that better results can be obtained by using an approach that compresses the entire image but the server incrementally reconstructs the images as it's being transmitted rather than waiting for the entire file. As found by Percival & White (1993) a useful image can be seen after only a small percentage of the data has been received. Alternatively some sort of interlacing can be done as with GIF files. We expect that similar prototypes using other compression algorithms will need to be implemented to effectively judge which combination of algorithms and transmission schemes will be required in the final version.

4. Future Work

Our plan is to first complete the survey of compression algorithms available and decide which are to be implemented. By implementing a variety of compression options, in such a way that they can be used for datastream or disk file compression, we can not only handle a larger number of disk formats but also allow a method to be used that is optimal for a given data frame.

The current IIS/imtool protocol has been in use for client-server image display for years and will continue to be supported for compatibility with older clients. This is being extended to handle the requirements of a compressed datastream. The simplest approach is one in which a ``magic number'' is passed in the header packet indicating that compressed data is to follow. This is the approach taken in the prototype task but is clumsy to use and not very flexible given the requirement for backwards compatibility. A generalized client-server display protocol based on messaging is being devised in which the compression type is just one attribute of the image block being sent, along with WCS information, LUTs, and other display parameters. This will permit not only compressed image transmission but also general interaction of the display server with one or more remote clients.

References:

... 1991, Progressive Bi-Level Image Compression, ISO/IEC JTC1/SC2/WG9, CD 11544, Sep. 16

Pennebaker, et al., 1988, IBM Journal of Research and Development, 32, 721

Percival, J. W., & White, R. L. 1993, in Astronomical Data Analysis Software and Systems II, ASP Conf. Ser., Vol. 52, eds. R. J. Hanisch, R. J. V. Brissenden, & J. Barnes (San Francisco, ASP), p. 321

Starck, J.-L., Murtagh, F., & Louys, M. 1995, in Astronomical Data Analysis Software and Systems IV, ASP Conf. Ser., Vol. 77, eds. R. A. Shaw, H. E. Payne, & J. J. E. Hayes (San Francisco, ASP), p. 268

Tody, D., & Fitzpatrick, M. 1996, this volume

White, R. L. 1992, High Performance Compression of Astronomical Images, available via FTP from stsci.edu


Next: Systems Aspects of COBE Science Data Compression
Previous: Parsley: a Command-Line Parser for Astronomical Applications
Table of Contents --- Search --- PS reprint
Wed Jul 3 07:40:33 MST 1996