romanimpreprocess.utils.bitutils

Helper functions to work with individual bits.

Functions

convert_uint32_to_bits

Unpack a 2D uint32 cube into a 3D array of bits.

Functions

convert_uint32_to_bits(arr)

Converts an (ny,nx) uint32 array into (32,ny,nx) array of 0's and 1's.

Module Contents

convert_uint32_to_bits(arr)[source]

Converts an (ny,nx) uint32 array into (32,ny,nx) array of 0’s and 1’s.

This is mainly so we can visualize a bitmask.

Parameters:

arr (np.array of uint32) – The 2D array to unpack.

Returns:

The bit array.

Return type:

np.array of uint8