uxarray
uxarray copied to clipboard
Optimize `point_within_gca` by Eliminating Redundant Lat/Lon Conversions
trafficstars
Closes #936
Overview
This PR addresses a performance issue in the point_within_gca function, which unnecessarily re-converted lat/lon coordinates from Cartesian coordinates. Since Uxarray already stores lat/lon coordinates, they can be passed directly to avoid redundant computation. This change reduces time and space complexity while better aligning with the architecture.
Proposed changes:
- [ ] Root cause: change
point_within_gcato accept lat_lon coordinates - [ ] Upsteam functions that called
point_within_gca:-
[ ] test files
PR Checklist
General
- [x] An issue is linked created and linked
- [x] Add appropriate labels
- [x] Filled out Overview and Expected Usage (if applicable) sections
Testing
- [ ] Adequate tests are created if there is new functionality
- [ ] Tests cover all possible logical paths in your function
- [ ] Tests are not too basic (such as simply calling a function and nothing else)
Documentation
- [ ] Docstrings have been added to all new functions
- [ ] Docstrings have updated with any function changes
- [ ] Internal functions have a preceding underscore (
_) and have been added todocs/internal_api/index.rst - [ ] User functions have been added to
docs/user_api/index.rst
Examples
- [ ] Any new notebook examples added to
docs/examples/folder - [ ] Clear the output of all cells before committing
- [ ] New notebook files added to
docs/examples.rsttoctree - [ ] New notebook files added to new entry in
docs/gallery.ymlwith appropriate thumbnail photo indocs/_static/thumbnails/