Skip to content
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

DRAFT: Construct Grid From Points #442

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Conversation

aaronzedwick
Copy link
Member

@aaronzedwick aaronzedwick commented Sep 6, 2023

Closes #349

Overview

The goal is to take in points on a sphere, and be able to create the connectivity information using just the points. The two methods to do this are Voronoi and Delaunay Triangulation. For spherical Voronoi we can use scipy's SphericalVoronoi. For the Delaunay Triangulation, first we must project it to a plane, then use scipy's Delaunay Triangulation, and then relate that back to the sphere. The projection can be done using Stereographic Projection

Expected Usage

import uxarray as ux

verts = np.array([[0, 0, 1], [0, 0, -1], [1, 0, 0], [0, 1, 0],
                          [0, -1, 0], [-1, 0, 0]])
grid_from_verts = ux.open_grid(verts, method="spherical_voronoi")

PR Checklist

General

  • An issue is linked created and linked
  • Add appropriate labels
  • 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/

@aaronzedwick aaronzedwick added the new feature New feature or request label Sep 6, 2023
@aaronzedwick aaronzedwick self-assigned this Sep 6, 2023
@philipc2
Copy link
Member

philipc2 commented Sep 6, 2023

Pending #395, once it's in we'll restructure the from_verticies into it's respective sections as described in that PR.

test/test_grid.py Outdated Show resolved Hide resolved
uxarray/grid/grid.py Outdated Show resolved Hide resolved
@rajeeja
Copy link
Contributor

rajeeja commented Sep 8, 2023

add a notebook example

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@aaronzedwick
Copy link
Member Author

@philipc2 Something in your recent commit broke all the test cases?

@philipc2
Copy link
Member

@philipc2 Something in your recent commit broke all the test cases?

Let me fix it! I started merging main into it last night, but haven't finished yet

@philipc2 philipc2 self-assigned this Sep 20, 2023
@aaronzedwick aaronzedwick changed the title DRAFT: Adding Grid construction from vertices using Voronoi or Delaunay Triangulation DRAFT: Construct Grid From Points Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Construct a grid from points
3 participants