{ } Raw JSON

bundles / astropy 7.0.1 / astropy / io / fits / hdu / compressed / _tiled_compression / compress_image_data

function

astropy.io.fits.hdu.compressed._tiled_compression:compress_image_data

source: /astropy/io/fits/hdu/compressed/_tiled_compression.py :476

Signature

def   compress_image_data ( image_data compression_type compressed_header compressed_coldefs )

Summary

Compress the data in a CompImageHDU.

Extended Summary

The input HDU is expected to have a uncompressed numpy array as it's .data attribute.

Parameters

image_data : `~numpy.ndarray`

The image data to compress

compression_type : str

The compression algorithm

compressed_header : `~astropy.io.fits.Header`

The header of the compressed binary table

compressed_coldefs : `~astropy.io.fits.ColDefs`

The ColDefs object for the compressed binary table

Returns

nbytes : `int`

The number of bytes of the heap.

heap : `bytes`

The bytes of the FITS table heap.

Aliases

  • astropy.io.fits.hdu.compressed._tiled_compression.compress_image_data