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
[FIX] _transform_plot_args was converting to degrees instead of coord_unit #14251
Conversation
Thanks @nabobalis ! Given you can't create a WCS with coord_type longitude and a coord_unit of anything other than deg with astropy I am not sure you can easily test this without importing gwcs into the tests. If you could add a changelog that would be good though. |
I added a simple changelog, let me know if it's sufficient. |
@nabobalis would it be possible for you to contribute a test for this to GWCS? |
Don't see why not. Point me at a repo and I will try. |
``_transform_plot_args`` was converting to degrees instead of the unit of the coordinate frame. | ||
While not a problem for WCS, it is a problem for gWCS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would focus on the user facing affects of this:
``WCSAxes.plot_coord`` and ``plot_scatter`` now work correctly for APE 14 compliant WCSes where the units are not always converted to degrees.
Couldn't we make a small fake APE 14 WCS to replicate this bug? |
I am just thinking about what it would need to do, I am not sure how easy it would be to test the behaviour without an image test, so I think you would have to wrap a |
|
We don't even declare gwcs to be installed in Is this good to go as is? |
I was told it was, but I imagine one of the WCSAXES maintainers needs to approve? |
I guess depends on how badly @astrofrog wants you to make a fake WCS for a test here. Adding a test to GWCS downstream should be tracked over at GWCS repo separately. Regardless, please squash the commits. Thanks! |
Done. |
I don't think we should auto backport this because we bumped the minversion of matplotlib on main but not the backport branches. That would mess with the hash stuff. If you really want to backport, please manually do it and use the approrpriate matplotlib versions being tested over there to generate the hashes. |
Thanks, all! |
I'm happy to backport manually but in future could you leave the backport labels if a PR is deemed to need backporting even if it will require a manual backport? Otherwise may lose track of it and also it's useful to have the bot instructions. This one won't be very difficult to backport. |
OK, my bad, let's see how far the bot can go then. @meeseeksdev backport to v5.0.x @meeseeksdev backport to v5.2.x |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Thanks will backport later once at desk! |
Thank you to @astrofrog and @pllim for getting this over the line. |
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…to degrees instead of coord_unit
…-v5.2.x Backport PR #14251: [FIX] _transform_plot_args was converting to degrees instead of coord_unit
…-v5.0.x Backport PR #14251: [FIX] _transform_plot_args was converting to degrees instead of coord_unit
Discovered this when trying to plot a coordinate using a gWCS.
I am unsure how to unit test this.