Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wpreimes opened this issue May 13, 2022 · 1 comment
Open

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

wpreimes opened this issue May 13, 2022 · 1 comment

Comments

@wpreimes
Copy link
Member

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

@wpreimes
Copy link
Member Author

wpreimes commented Jun 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant