QuantizationOptions

class lsst.afw.fits.QuantizationOptions

Bases: pybind11_object

Attributes Summary

dither

level

mask_planes

scaling

seed

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

dither
level
mask_planes
scaling
seed

Methods Documentation

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

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.

Returns:
optionsQuantizationOptions

An instance of this options class.

Notes

Allowed keys are:

  • dither: str, one of NO_DITHER, SUBTRACTIVE_DITHER_1, or SUBTRACTIVE_DITHER_2. Defaults to NO_DITHER.

  • scaling: str, one of STDEV_CFITSIO, STDEV_MASKED, RANGE, or MANUAL (see C++ docs for definitions).

  • mask_planes : list of str, names of mask planes to reject in STDEV_MASKED and RANGE (but only when writing objects with mask planes)

  • level: float, target compression level (see C++ docs).

  • seed: random number seed for dithering. Default is zero, which uses a timestamp-based seed when used directly, but a data ID-based seed when used via lsst.obs.base.FitsExposureFormatter.

to_dict() dict[str, object]

“Return the mapping representation of these options.

Returns:
mappingdict

See from_mapping.