-
Notifications
You must be signed in to change notification settings - Fork 45
Add Sampled Cross-Sections #1321
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
Conversation
… line of intersection
|
Sampling along a transect is very similar in concept to the work I put together in #1271, however instead of sampling onto pixels in an Image, we sample points along the transect. |
|
Oh, if possible can you create a PR or changes directly to my PR. Are we planning to close it in favor of this? |
Let's keep the API changes in this PR and use #1317 for applications to vertical cross sections (i.e. the updates to the notebooks, etc.) Does that work? I'm happy to hop on sometime this week to pair program too. |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rajeeja
left a comment
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.
looks good to go, minor fixes. in comments.
erogluorhan
left a comment
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.
This looks great to me except a small comment I've put into the cross-sections notebook (can you see it?)
rajeeja
left a comment
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.
call still assumes 'n_face' exists, raise error here itself if not face-centered. Test for great clrcle case..
95e4532 to
4d90463
Compare
erogluorhan
left a comment
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.
This looks great to me, and once @rajeeja 's points are addressed, this should be good to go. Thanks a lot for this contribution!
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.
Pull Request Overview
This PR adds a UxDataArray.cross_section() method for sampling data along great-circle arcs (GCAs) and constant latitude/longitude lines, while moving existing cross-section methods to the subset namespace with deprecation warnings.
- Implements cross-section sampling along arbitrary GCAs, constant latitude, and constant longitude
- Moves existing cross-section methods to the
subsetaccessor and introduces deprecation warnings - Updates documentation and user guide to showcase the new cross-section functionality
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uxarray/subset/grid_accessor.py | Adds new constant latitude/longitude subset methods with documentation |
| uxarray/subset/dataarray_accessor.py | Adds subset methods for data arrays with range constraints |
| uxarray/cross_sections/sample.py | New sampling utilities for geodesic and constant lat/lon cross-sections |
| uxarray/cross_sections/grid_accessor.py | Deprecates existing methods, delegates to subset accessor |
| uxarray/cross_sections/dataarray_accessor.py | Replaces old methods with new cross-section sampling functionality |
| test/test_cross_sections.py | Updates tests to use subset accessor and adds new cross-section tests |
| pyproject.toml | Adds pyproj dependency for geodesic calculations |
| docs/user-guide/cross-sections.ipynb | Complete rewrite of user guide with new cross-section examples |
| docs/api.rst | Updates API documentation structure for cross-sections |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Closes #1318 #1319 #1320 #1296
Overview
UxDataArray.cross_section()method, which can be used to sample along lines of constant lat/lon or arbitrary GCAscross_sectionmethods under thesubsetnamespace and begins deprecation