CompressionOptions#

class lsst.afw.fits.CompressionOptions#

Bases: pybind11_object

Attributes Summary

Methods Summary

from_mapping(mapping)

Construct from a dictionary with keys matching this struct's fields.

to_dict()

"Return the mapping representation of these options.

Attributes Documentation

algorithm#
quantization#
tile_height#
tile_width#

Methods Documentation

classmethod from_mapping(mapping: Mapping[str, object]) CompressionOptions#

Construct from a dictionary with keys matching this struct’s fields.

Parameters#

mappingMapping

Mapping from string to value. Enumeration values may be passed as string value names. Missing keys are mapped to default values.

Returns#

optionsCompressionOptions

An instance of this options class.

Notes#

Allowed keys are:

  • algorithm: str, one of GZIP_1, GZIP_2, or RICE_1.

  • tile_width: int, zero to use entire rows.

  • tile_height: int, zero to use entire columns.

  • quantization: dict or None (see

    QuantizationOptions.from_mapping).

Missing keys are replaced by defaults that reflect lossless compression (GZIP_2) with single rows as tiles.

to_dict() dict[str, object]#

“Return the mapping representation of these options.

Returns#

mappingdict

See from_mapping.