uxarray icon indicating copy to clipboard operation
uxarray copied to clipboard

Optimize `point_within_gca` by Eliminating Redundant Lat/Lon Conversions

Open amberchen122 opened this issue 1 year ago • 8 comments
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:

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 to docs/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.rst toctree
  • [ ] New notebook files added to new entry in docs/gallery.yml with appropriate thumbnail photo in docs/_static/thumbnails/

amberchen122 avatar Sep 04 '24 22:09 amberchen122