read_uint8_array#

read_uint8_array(bit_mask: Union[xarray.core.dataarray.DataArray, numpy.ndarray], bit_id: Union[list, int]) Union[numpy.ndarray, list][source]#

Read 8 bit arrays as a succession of binary masks.

Forces array to np.uint8.

See read_bit_array.

Parameters
  • bit_mask (np.ndarray) – Bit array to read

  • bit_id (int) – Bit ID of the slice to be read Example: read the bit 0 of the mask as a cloud mask (Theia)

Returns

Binary mask or list of binary masks if a list of bit_id is given

Return type

Union[np.ndarray, list]