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

Add maputils function to fully pixelate a coordinate path #6840

Merged
merged 7 commits into from Apr 4, 2023

Conversation

ayshih
Copy link
Member

@ayshih ayshih commented Mar 12, 2023

This PR adds a new maputils function – pixelate_coord_path() – that fully pixelates a coordinate path. extract_along_coord() tries to do that, but has issues (see #6826 and #6802). Here's a comparison of the pixel paths:
download (76)

TODO:

  • Add a unit test
  • Deprecate extract_along_coord()
  • Update examples
  • Add a changelog entry
  • Add a note that a path passing through a four-corners point may not pick up all four pixels due to floating-point comparisons

@ayshih ayshih added map Affects the map submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) labels Mar 12, 2023
@ayshih ayshih force-pushed the pixelate_coord_path branch 3 times, most recently from 143b742 to a694162 Compare March 29, 2023 04:06
@ayshih ayshih marked this pull request as ready for review March 29, 2023 04:41
@ayshih ayshih requested review from a team as code owners March 29, 2023 04:41
Copy link
Member

@wtbarnes wtbarnes left a comment

Choose a reason for hiding this comment

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

The plot showing the comparison of the two approaches in the first comment could make a good "How-to-Guide" entry.

@ayshih
Copy link
Member Author

ayshih commented Apr 4, 2023

The plot showing the comparison of the two approaches in the first comment could make a good "How-to-Guide" entry.

Er, I'd say an "explanation" page. The how-to guide would just say how to pick different line algorithms.

@nabobalis
Copy link
Contributor

Failure looks like a example broken for pandas 2.0.

@nabobalis nabobalis merged commit 9e048e9 into sunpy:main Apr 4, 2023
24 of 26 checks passed
@ayshih ayshih deleted the pixelate_coord_path branch October 25, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
map Affects the map submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a function to return the map pixels that intersect with a coordinate path
3 participants