pytesmo
pytesmo copied to clipboard
Add active-bit(s) operator to masking adapter
Data flags often operate on a bit basis. Currently pytesmo includes pre-defined operators to filter decimal numbers
_op_lookup = {
"<": operator.lt,
"<=": operator.le,
"==": operator.eq,
"!=": operator.ne,
">=": operator.ge,
">": operator.gt,
}
Task: add bit operators (e.g. active_bits, inactive_bits) to filter / mask observations where in a (flag) column, a selection of bit(s) in the binary representation of the column value is/are (in)active - e.g. a wrapper for https://numpy.org/doc/stable/reference/generated/numpy.unpackbits.html