next up previous
Next: Access to printer-devices in Up: Main Installation Previous: Access to tape devices

FITS Data Decompression on the Fly

Compressed FITS files on disk can also be accessed with the MIDAS command INTAPE/FITS. Compressed FITS files are recognized by extra extensions(e.g .z or .Z) to their names. If INTAPE/FITS matches a filename with one of its expected compressed extensions, the file will be decompressed with the command indicated for such extension (e.g. .Z files will be decompressed with the command zcat). The decompression of the FITS file is done on-the-fly, that means that the decompress command is spawned in a piped mode, sending the decompressed data directly to the input of the INTAPE command. This improves speed access and reduces disk space because it does not create temporary files.

The decompression code uses, by default, a built-in table of compressed extensions and decompress commands as indicated in the following table:

2||c||Built-in table:  
Extension Command
.Z zcat
.z gunzip -c

The algorithm to apply the decompression is:

Example: In a directory with no myfits.mt file but where a myfits.mt.Z file exists, MIDAS will execute something like "zcat myfits.mt.Z | INTAPE/FITS"

Midas 001> $ls myfits*
myfits.mt.Z
Midas 002> INTAPE/FITS 1 xxx myfits.mt
zcat myfits.mt.Z
Image xxx0001 ...
Midas 003>

The built-in decompression table is ignored and overwritten by another user-defined table in a file pointed by the environment variable DECOMPRESS_TABLE if it exists, otherwise in a MIDAS-defined table located in the file /midas/98NOV/incl/decompress.dat if it exists. The syntax of these two files is described in the header of the /midas/98NOV/incl/decompress_dat file, which could also be used as a template.


next up previous
Next: Access to printer-devices in Up: Main Installation Previous: Access to tape devices
Petra Nass
11/25/1998