-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for boolean/mask maps #49
Conversation
Ran into a bug accessing the mask
|
This PR is now feature-complete, up to the bug above, and an API converting masks to/from numpy arrays. It would be useful to add in the sparse backend handling for healpix maps with this PR, too, otherwise this won't do much in terms of memory efficiency for healpix maps. |
consistent handling of polarized weight attributes
There are many instances of the numpy ufunc reduction wrappers (e.g. |
This is the way. Anything else will be a lot of work and still be fragile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sasha's changes look good to me. I can't actually press "approve" because I apparently wrote too much of the code in the PR but I approved all the same.
It is often useful to have boolean sky maps (e.g. a mask) which are 64x larger than they strictly need to be if represented as doubles. This provides support for such a thing by providing a new sparse storage backend for maps based on std::vector, which stores entries as single bits. Semantics are the following:
To Do:
boost::shared_ptr
)all()
and friends, at least in the simple case