-
Notifications
You must be signed in to change notification settings - Fork 20
Add .downscale()
, .upscale()
, and .rescale()
methods
#141
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
base: main
Are you sure you want to change the base?
Conversation
.downscale()
.upscale() and
.rescale()` methods.downscale()
, .upscale()
, and .rescale()
methods
if offset == 0: | ||
return obj | ||
|
||
upper_cell_membership = np.floor(obj.cell_ids / (4**offset)) |
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.
Hmm, not sure how expensive this line is with high offsets?
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.
there should be a constant cost (a binary right-shift), so I wouldn't worry too much about it. This implementation doesn't do that, so I'd recommend switching to healpix_geo.nested.zoom_to
(nothing for ring
, as hierarchy operations don't really make sense there)
I forgot to mention this before, but usually we create new methods on the I'd also either return the |
Agreed, I think that sounds good now that we aren't considering I'm still interested in this issue, but I have quite a bit on my plate with work and can't dedicate much to hobbyist coding. Might only get around to this again end June. Feel free to take over if this is blocking - otherwise I can pick this back up down the line. |
Scratch that - mainly focussing on work, Rust learning, and other learning so i don't think I have time to get around to this. |
changelog.md
api.rst
Just done downscale for now. Logging off for tonight. Will work on upscale tomorrow (and incorporate #18 (comment) - thanks for the info about hierarchical tooling @keewis , was just looking for that)
Will add tests tmrw as well