STScI logoSTSDAS Help Pages
fitsread compression fitsread

NAME · USAGE · PARAMETERS · DESCRIPTION · EXAMPLES · TIME_REQUIREMENTS
BUGS · SEE_ALSO

NAME

fitsread -- Create an IRAF image from a compressed FITS file.

USAGE

fitsread fitsfiles images

PARAMETERS

fitsfiles
List of input compressed FITS file names. They must have the ".Z". suffix.
images
List of output IRAF image names.
datatype = ""
This parameter has the same meaning as the datatype parameter of rfits . The IRAF image file may be of a different data type than the FITS image data. The data type may be specified as s for short , i for integer , l for long , r for real , and d for double . The user must beware of truncation problems if an inappropriate data type is specified. If an incorrect data type or a null string is given for this parameter then a default data type is used which is the appropriate minimum size for the input pixel values. If the bscale and bzero parameters in the FITS header are undefined or equal to 1.0 and 0.0 respectively, rfits selects datatype s or l depending on bitpix . If bscale and bzero are set to other than 1.0 and 0.0, rfits selects datatype r .
blank = 0.0
This parameter has the same meaning as the blank parameter of rfits , i.e. the IRAF image value of a blank pixel.
scale = yes
This parameter has the same meaning as the scale parameter of rfits . If scale equals no the integers are read directly off the FITS file. Otherwise rfits checks the values of bscale and bzero . If these numbers are not 1. and 0. respectively, rfits scales the data before output.
oldirafname = no
This parameter has the same meaning as the oldirafname parameter of rfits If the oldirafname switch is set rfits will attempt to restore the image to disk with the filename defined by the IRAFNAME parameter in the FITS header.
verbose = yes
Verbose operation ?. If this switch is set to yes then the task will output information about the uncompress operation and the FITS to IRAF conversion.
fitscomp = yes
Leave the FITS file compressed ?. If this switch is set to yes then the FITS file recompressed back to its original state. Otherwise it is left uncompressed.
flist1, flist2
Used internally by the task.

DESCRIPTION

This is a CL script that, for each FITS file in the input list, it uncompresses the FITS file and then it converts it into an IRAF image. The FITS file must have a ".Z" suffix in its name. The uncompress operation is performed by the UNIX utility uncompress , called as a foreign task, and the FITS to IRAF conversion is performed by the rfits task.

EXAMPLES

Create an IRAF image from a compressed FITS file, using verbose output, and then recompress back the FITS file.


co> fitsread fits1.Z image1 verbose=yes fitscomp=yes
fits.Z:  -- replaced with fits
File: image  m51  B  600s          Size = 512 x 512
fits: Compression: 53.46% -- replaced with fits.Z

TIME REQUIREMENTS

The full process, with FITS file recompression, takes about fifteen seconds for a 512x512 short image, on a Sparcstation-1 with a SCSI disk.

BUGS

The task might leave some temporary files in the current directory if it's aborted by the user before it completes.

SEE ALSO

compression.fitswrite, dataio.rfits, (UNIX) compress, (UNIX) uncompress.


Source Code · Search Form · STSDAS

Maintained by the Science Software Group at STScI
This file last updated on 21 Jan 1992