Tiled Compression

Warning

This module is in development (so marked as private), anything may change in future releases. This documentation is provided to aid in further development of this submodule and related functionality.

This module implements the compression and decompression algorithms, and associated functionality for FITS Tiled Image Compression. The goal of this submodule is to expose a useful Python API, which different functionality can be built on for reading these files.

The functionality is roughly split up into the following sections:

  1. Low level compression and decompression functions implemented in cfitsio (for all algorithms other than the GZIP ones, which use the Python stdlib).

  2. The quantize and dequantize functions from cfitsio.

  3. A Python C-API module which wraps all the compression and quantize cfitsio functions.

  4. numcodecs style Codec classes for each compression algorithms.

  5. compress_hdu and decompress_hdu_section functions which are called from CompImageHDU.

astropy.io.fits._tiled_compression Package

Functions

compress_hdu(hdu)

Compress the data in a CompImageHDU.

decompress_hdu_section(hdu, ...)

Decompress the data in a CompImageHDU.

astropy.io.fits._tiled_compression.codecs Module

This module contains the FITS compression algorithms in numcodecs style Codecs.

Classes

Gzip1()

The FITS GZIP 1 compression and decompression algorithm.

Gzip2(*, itemsize)

The FITS GZIP2 compression and decompression algorithm.

Rice1(*, blocksize, bytepix, tilesize)

The FITS RICE1 compression and decompression algorithm.

PLIO1(*, tilesize)

The FITS PLIO1 compression and decompression algorithm.

HCompress1(*, scale, smooth, bytepix, nx, ny)

The FITS HCompress compression and decompression algorithm.

NoCompress()

A dummy compression/decompression algorithm that stores the data as-is.

Class Inheritance Diagram

Inheritance diagram of astropy.io.fits._tiled_compression.codecs.Gzip1, astropy.io.fits._tiled_compression.codecs.Gzip2, astropy.io.fits._tiled_compression.codecs.Rice1, astropy.io.fits._tiled_compression.codecs.PLIO1, astropy.io.fits._tiled_compression.codecs.HCompress1, astropy.io.fits._tiled_compression.codecs.NoCompress

astropy.io.fits._tiled_compression.quantization Module

This file contains the code for Quantizing / Dequantizing floats.

Classes

Quantize(*, row, dither_method, ...)

Quantization of floating-point data following the FITS standard.

Class Inheritance Diagram

Inheritance diagram of astropy.io.fits._tiled_compression.quantization.Quantize