-
Notifications
You must be signed in to change notification settings - Fork 11
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
EHN: Options to Plot a Terminator #303
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…in ionosphere, unfinished code
… cartopy for geographic
…c with documentation, just not implemented due to inconsistent fill
MacOS Monterey 12.5.1
|
27 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scope
This PR adds options to plot a terminator. As discussed in the last pyDARN meeting, it's difficult to plot your own terminator using fill or fill_between due to the Earth being spherical and fill not understanding which side of the terminator needs filling. Due to this, it was decided that we go ahead with only applying the cartopy nightshade option to geographic projected plots, the cartopy function does not return lat/lon as expected so we can't just convert them and then we still have the plotting issue.
I have, however, left in the terminator and peripheral code so that a user might be able to calculate and plot their own terminator if they would like in magnetic coordinates, but they may find that fill doesn't work as expected - this is written up in the documentation changes to explain.
I have also added a warning if someone uses the nightshade key with a polar projection.
The examples below use a height in the ionosphere of 250 km, so you'll notice that it looks a lot further back than when at ground level. Cartopy nightshade and the terminator function use an angle value to denote how far back it is which is calculated by:
but due to a difference in how the distance is calculated, then you might see a small difference between the two terminator positions.
issue: to close #50
Approval
Number of approvals: 2
Test
matplotlib version: 3.5.2
Note testers: please indicate what version of matplotlib you are using