bundles / astropy latest / astropy / io / fits / hdu / compressed / _codecs / HCompress1
class
astropy.io.fits.hdu.compressed._codecs:HCompress1
source: /astropy/io/fits/hdu/compressed/_codecs.py :362
Signature
class HCompress1 ( * , scale : int , smooth : bool , bytepix : int , nx : int , ny : int ) Members
Summary
The FITS HCompress compression and decompression algorithm.
Extended Summary
Hcompress is an the image compression package written by Richard L. White for use at the Space Telescope Science Institute. Hcompress was used to compress the STScI Digitized Sky Survey and has also been used to compress the preview images in the Hubble Data Archive.
The technique gives very good compression for astronomical images and is relatively fast. The calculations are carried out using integer arithmetic and are entirely reversible. Consequently, the program can be used for either lossy or lossless compression, with no special approach needed for the lossless case.
Parameters
scaleThe integer scale parameter determines the amount of compression. Scale = 0 or 1 leads to lossless compression, i.e. the decompressed image has exactly the same pixel values as the original image. If the scale factor is greater than 1 then the compression is lossy: the decompressed image will not be exactly the same as the original
smoothAt high compressions factors the decompressed image begins to appear blocky because of the way information is discarded. This blockiness ness is greatly reduced, producing more pleasing images, if the image is smoothed slightly during decompression.
Aliases
-
astropy.io.fits.hdu.compressed._codecs.HCompress1