Skip to content

Point on GCA helper function - #357

Merged
hongyuchen1030 merged 40 commits into
UXARRAY:mainfrom
hongyuchen1030:point_on_GCR_helper_function
Aug 14, 2023
Merged

Point on GCA helper function#357
hongyuchen1030 merged 40 commits into
UXARRAY:mainfrom
hongyuchen1030:point_on_GCR_helper_function

Conversation

@hongyuchen1030

@hongyuchen1030hongyuchen1030 commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

Closes#356#312

Overview

a feature that determines whether a given point lies within a great circle arc. The great circle arc should be restricted to a span of less than 180 degrees, and the implementation should handle cases where the arc crosses the antimeridian (the 0-degree meridian).

And a global error tolerance constant described in #312 is set

Expected Usage

importuxarrayasuxgcr_same_lon_cart= [
ux.utils.helpers.node_lonlat_rad_to_xyz([0.0, 1.5]),
ux.utils.helpers.node_lonlat_rad_to_xyz([0.0, -1.5])
]
pt_same_lon_in=ux.utils.helpers.node_lonlat_rad_to_xyz([0.0, 0.0])
self.assertTrue(
ux.utils.helpers.point_within_GCR(pt_same_lon_in,
gcr_same_lon_cart))
pt_same_lon_out=ux.utils.helpers.node_lonlat_rad_to_xyz(
[0.0, 1.500000000000001])
res=ux.utils.helpers.point_within_GCR(pt_same_lon_out,
gcr_same_lon_cart)
self.assertFalse(res)

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

@hongyuchen1030hongyuchen1030 self-assigned this Jun 23, 2023
@hongyuchen1030hongyuchen1030 added the new feature New feature or request label Jun 23, 2023
@philipc2

Copy link
Copy Markdown
Member

Hi @hongyuchen1030

Can you untrack all the files under docs/internal_api/_autosummary

@hongyuchen1030

Copy link
Copy Markdown
ContributorAuthor

Hi @hongyuchen1030

Can you untrack all the files under docs/internal_api/_autosummary

You mean deleting all lines after docs/internal_api/_autosummary? I am a bit clueless about what to do

Comment threaduxarray/utils/helpers.py Outdated
Comment threaduxarray/utils/helpers.py Outdated
Comment threaduxarray/utils/helpers.py Outdated

@philipc2philipc2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment threaddocs/user_api/index.rst Outdated
Comment threaddocs/user_api/index.rst Outdated
Comment threaddocs/user_api/index.rst Outdated
Comment threaduxarray/grid/coordinates.py Outdated
Comment threaduxarray/grid/lines.py
Comment threaduxarray/grid/lines.py
Comment threaduxarray/grid/lines.py Outdated
Comment threaduxarray/grid/lines.py Outdated
@hongyuchen1030
hongyuchen1030 merged commit bbb9033 into UXARRAY:mainAug 14, 2023
@hongyuchen1030
hongyuchen1030 deleted the point_on_GCR_helper_function branch September 18, 2023 21:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new featureNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove "Redirected" Edge in the Project Detect if a point on a great circle arc

5 participants

@hongyuchen1030@philipc2@rajeeja@aaronzedwick@erogluorhan