Next: Time Critical Analysis by Image Subtraction
Up: Data and Image Processing
Previous: Compression of Mosaic CCD Images with CompFITS2
Table of Contents - Subject Index - Author Index - PS reprint -

Pence, W., White, R. L., Greenfield, P., & Tody, D. 2000, in ASP Conf. Ser., Vol. 216, Astronomical Data Analysis Software and Systems IX, eds. N. Manset, C. Veillet, D. Crabtree (San Francisco: ASP), 551

A FITS Image Compression Proposal

W. Pence
NASA Goddard Space Flight Center

R. L. White, P. Greenfield
Space Telescope Science Institute

D. Tody
IRAF Group, National Optical Astronomy Observatories

Abstract:

We have developed a general technique for storing compressed images in FITS binary tables. The image is first divided into one or more rectangular sub-images or tiles, then each tile is compressed and the resulting byte stream is stored in a variable length row of a binary table. By dividing the image into tiles it is possible to extract and uncompress subsections of the image without the expense of uncompressing the whole image. Several commonly used algorithms for compressing the image tiles will be supported initially, and in principle, support for any other compression algorithm may be added later. We are in the process of making trial implementations of this technique within the IRAF image kernel and within the CFITSIO subroutine library for accessing FITS files. Once completed, these implementations will allow application programs to transparently read (and perhaps write) compressed images without needing any knowledge about the compression algorithm.

1. Introduction

With the development of larger and larger imaging detectors there is a growing need for a data format that will allow the images to be stored and directly used in a compressed format. To this end we have developed a general technique for compressing FITS images based on the scheme first proposed by White & Greenfield (1999) that has a number of advantages over simply using gzip or UNIX compress on the entire FITS file:

In the following sections we describe the current prototype implementation of this compression technique. Some of the details may change as we gain more experience, so readers should consult the latest on-line version of the format description (available from any of the authors) for the precise details of the format.

2. General Description

The general principle used in this convention is to first divide the n-dimensional image into a rectangular grid of sub-images or ``tiles''. Each tile is then compressed as a continuous block of data, and the resulting compressed byte stream is stored in a row of a variable length column in a FITS binary table. By dividing the image into tiles it is generally possible to extract and uncompress subsections of the image without having to uncompress the whole image. The default tiling pattern treats each row of a 2-dimensional image (or higher dimensional cube) as a tile, such that each tile contains NAXIS1 pixels. Any other rectangular tiling pattern (including treating the whole image as a single tile) may be defined using the ZTILEn keywords that are described below.

3. Keywords

The following keywords are defined to describe the structure of the compressed image:

4. Columns

The following columns in the FITS binary table are defined by this convention. The order of the columns in the table is not significant. The column names (given by the TTYPEn keyword) are shown here in upper case letters, but the case is not significant. Any number of other columns besides those defined here may be present in the table to supply other parameters that relate to each image tile.

5. Trial Implementations

We plan to release the prototype implementation of this compression scheme within the IRAF kernel and the CFITSIO libraries for trial use by other software developers and data providers. Eventually it is hoped that this convention will be widely supported and perhaps adopted as part of the official FITS Standard.

References

White, L. R., & Greenfield, P. 1999, in ASP Conf. Ser., Vol. 172, Astronomical Data Analysis Software and Systems VIII, ed. D. M. Mehringer, R. L. Plante, & D. A. Roberts (San Francisco: ASP), 125


© Copyright 2000 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA
Next: Time Critical Analysis by Image Subtraction
Up: Data and Image Processing
Previous: Compression of Mosaic CCD Images with CompFITS2
Table of Contents - Subject Index - Author Index - PS reprint -

adass@cfht.hawaii.edu