Add step parameter to boundaries() and mort2polygon()#19
Merged
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
- Coverage 86.49% 85.82% -0.67%
==========================================
Files 13 13
Lines 1770 1771 +1
==========================================
- Hits 1531 1520 -11
- Misses 239 251 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
path_along_cell_edge()methodstep=1(default) returns the original 4 corners;step=32returns 128 boundary points that accurately trace curved cell edgesChanges
Rust (
geo2mort.rs): Newboundaries_step_scalar()function usingLayer::path_along_cell_edge(pixel, Cardinal::S, true, n_segments_by_side), with vertex ordering rolled to match healpy convention.PyO3 (
lib.rs):rust_boundaries()gains astepparameter (default 1). Step=1 takes the fast original path; step>1 dispatches to the new function. Output shape:(3, 4*step)scalar,(N, 3, 4*step)array.Python (
_healpix.py,tools.py):boundaries(nside, pixel, step=1)andmort2polygon(morton, step=1)pass through the parameter.