-
Notifications
You must be signed in to change notification settings - Fork 415
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 Stüve, Emagram plots #3626
base: main
Are you sure you want to change the base?
Add Stüve, Emagram plots #3626
Conversation
Stüve and Emagram plots are enabled as child classes of SkewT parent class. The child classes inherit plotting capabilities from SkewT (e.g. data, wind barbs, dry and saturated adiabats, and mixing ratio lines).
Thanks for the PR, and congrats on your first contribution here! This is super helpful stuff. We can start to review the implementation in the coming days/weeks. We will need new tests for these classes, do let us know if that's a pain point for you. Also, if it's helpful, most of our linting headaches can be automatically fixed or made known before committing by following the Code Style steps within the MetPy dev guide! |
New test files tests/plots/test_emagram.py tests/plots/test_stuve.py replicate the SkewT tests done in tests/plots/test_skewt.py Whitespace changes for linter. Signed-off-by: Christopher Holmes <[email protected]>
@dcamron, I added pytest files for the new classes. The CI tests pass on many platforms and Python versions, but not all. The failed test artifacts that I checked showed a couple single-pixel shifts, nothing a user would ever notice. From a user perspective, all of the test results look fine to me. This is the limit of what I can provide, so I hope that someone else more familiar with pytest --mpl can look at this or relax the test failure thresholds. I created the baseline images with Python 3.12.5, Matplotlib 3.9.2, and latest MetPy (with modifications) on MacOS. |
After creating a clean environment, a few pixels changedin the baseline images for some of the tests. This might fix some of the failing CI tests. Signed-off-by: Christopher Holmes <[email protected]>
1c106ee
to
361827a
Compare
Yeah, that kind of failure is something where I double check the uploaded test image, and then just set the threshold to something slightly above the failure RMS, which should then have the test pass. If you're not up to doing that, we'll be happy to make those updates. |
I am not familiar with how to change pytest failure thresholds. I would appreciate if you could do that. Thanks |
Images that failed pytest thresholds had only a few pixels of difference, which is fine for users. Signed-off-by: Christopher Holmes <[email protected]>
@dcamron and @dopplershift, |
Thanks for the ping! We would love to include this in an upcoming MetPy feature release, so look forward to a review in the coming weeks. |
This PR enables Stüve and Emagram plots, which are themodynamic diagrams like SkewT.
Description Of Changes
Two new classes, named
Stuve
andEmagram
, are constructed as child classes of theSkewT
parent class. They create Stüve diagrams and Emagrams, respectively. As child classes, they inherit plotting capabilities from SkewT (e.g. data, wind barbs, dry and saturated adiabats, and mixing ratio lines).I confirmed that Advanced Sounding example works with the new
Stuve
and andEmagram
classes as drop-in replacements forSkewT
.This Closes #837 and addresses the Stuve request in #418.
Checklist
tests/plots/test_skewt.py
could be repeated forStuve
andEmagram
, but this has not been done.