bitset¶
- sofia_redux.toolkit.utilities.func.bitset(arr, bits, skip_checks=False)[source]¶
Return a byte array the same size as the input array.
A pixel is set if any of the bits requested are set in arr. Uses the Gumley ishft technique.
- Parameters:
- arrarray_like of int
(shape,) the array to search
- bitsint or array_like of int
The bits to search. Note that the “first” bit is denoted as zero, while the “second” bit is denoted as 1.
- skip_checksbool, optional
Do not perform any error checking
- Returns:
- numpy.ndarray of bool:
(shape,) The pixel is set if any of the bits requested are set in array.