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
Return NaN for out of bound conversions in FITS WCS #16328
base: main
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
👋 Thank you for your draft pull request! Do you know that you can use |
From the test failures, this looks like a high impact change? Does https://github.com/astropy/astropy-APEs/blob/main/APE14.rst need to be updated along with this PR? |
I don't think this should be backported. |
@pllim - we don't need to, the APE says 'We note that while we have made efforts to ensure that the API described here is as close as possible to the final implemented API, the authoritative version of the API will be given by the base classes that live in the core astropy package.' Agree about not backporting. |
By default GWCS sets out-of-bounds to NaN. However, it's very useful in certain cases to be able to evaluate the transforms without limits. I think it's a shortcoming of APE 14 that it doesn't allow passing Another difference with GWCS is that while astropy.modeling expects numerical intervals for all directions, we'll have to add an option of The failing tests are all in SlicedWCS, that's not too bad and is perhaps to be expected. |
b702ff2
to
d5bdb48
Compare
I've now fixed the tests - the main failing tests were those for SlicedLowLevelWCS which had unrealistic pixel_bounds which didn't even include the CRPIX values. I've now updated this. In practice, this should not impact many users because they would have needed to explicitly set |
Even though it's technically a bug, as it's an API change I think we can just go with 7.0.0 |
I think it needs a rebase to pick up updated test matrix. |
… to say that implementations should return NaN rather than may.
d5bdb48
to
35c7d87
Compare
Rebased! |
I updated the APE 14 base class to say 'should' instead of 'can' because I think it's important we have consistent behavior.