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:
- buf
bytes
or array_like The buffer to unquantize.
- buf
- Returns:
np.ndarray
The unquantized buffer.
- encode_quantized(buf)[source]#
Quantize data.
- Parameters:
- buf
bytes
or array_like The buffer to quantize.
- buf
- Returns:
np.ndarray
A buffer with quantized data.