Skip to content

Add active-bit(s) operator to masking adapter #269

@wpreimes

Description

@wpreimes

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions