Quantize#

class astropy.io.fits.hdu.compressed._quantization.Quantize(*, row: int, dither_method: int, quantize_level: int, bitpix: int)[source]#

Bases: object

Quantization of floating-point data following the FITS standard.

Methods Summary

decode_quantized(buf, scale, zero)

Unquantize data.

encode_quantized(buf)

Quantize data.

Methods Documentation

decode_quantized(buf, scale, zero)[source]#

Unquantize data.

Parameters:
bufbytes or array_like

The buffer to unquantize.

Returns:
np.ndarray

The unquantized buffer.

encode_quantized(buf)[source]#

Quantize data.

Parameters:
bufbytes or array_like

The buffer to quantize.

Returns:
np.ndarray

A buffer with quantized data.