Next: Access to printer-devices in
Up: Main Installation
Previous: Access to tape devices
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:
- If the file exists an the filename matches on the compressed extensions
the file will be decompressed.
- If the file does not exist, the first file with a filename+extension
found in the same directory will be decompressed.
- In any other case the file will be opened if it exists or an error will be
returned if it does not exist.
- Whenever a decompress command is executed it will also be displayed in
the standard output.
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: Access to printer-devices in
Up: Main Installation
Previous: Access to tape devices
Petra Nass
11/25/1998