-
-
Notifications
You must be signed in to change notification settings - Fork 19
Add support for HighLevelWCSWrapper #296
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
base: main
Are you sure you want to change the base?
Conversation
- type: object | ||
properties: | ||
wcs: | ||
anyOf: |
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.
It would be really good to have a way of saying "Any APE-14 compliant WCS". I am kind of tempted to allow any object inside these WCS wrapper classes as we can't possibly enumerate all of them?
Now I think about it #276 has the same problem with the changes to the SlicedLowLeveWCS schema, we should be allowing all the NDCube wrappers there as well.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #296 +/- ##
===========================================
- Coverage 99.39% 88.75% -10.65%
===========================================
Files 65 68 +3
Lines 2326 2410 +84
===========================================
- Hits 2312 2139 -173
- Misses 14 271 +257 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5493b18
to
dd77e0e
Compare
a2f8185
to
068b242
Compare
asdf_astropy/resources/schemas/wcs/highlevelwcswrapper-1.0.0.yaml
Outdated
Show resolved
Hide resolved
Is this oldestdeps fail an asdf standard < 1.6 error? What's the best solution? |
01e4e5c
to
dc01b6c
Compare
Represents the FITS WCS object, the HDUlist of the FITS header is preserved | ||
during serialization and during deserialization the WCS object is recreated | ||
from the HDUlist. | ||
- tag_uri: tag:astropy.org:astropy/wcs/highlevelwcswrapper-1.0.0 |
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 had to add this here to make oldestdeps work. I'm not sure if it's a good idea or not though?
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.
Let's not change this and address the failures a different way. Do you have a link to the failures?
dc01b6c
to
9a89455
Compare
af["hl_wcs"] = hl_wcs | ||
af.write_to(file_path) | ||
|
||
ll_wcs = hl_wcs._low_level_wcs |
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.
Is there a public way to get the low level wcs?
More of a general question but what's the expectation here for
I think the schema in this PR and the serialization structure are an accurate representation of that information. Given the relatively simple structure I'm wondering what benefit there is in all of the tests with |
gwcs.WCS and astropy.wcs.WCS both implement the high and low level APIs. Things such as the wrapper classes only implement the low level api so the high level wrapper gives you a way to get a high level object. Yes probably we don't strictly need to test all combinations of things if it feels lile overkill 😆 |
Thanks for the clarification. That sounds good to me. Would you update this PR dropping gwcs as a test dependency and making the required test changes? |
Actually now I think about it, we don't test that gwcs.WCS is allowed in #276 for |
Thanks. I think the ideal situation would be that we could add gwcs as a test dependency and then test these cases (even though they're largely duplicating tests that hopefully exist already in gwcs). However adding gwcs as a test dependency is problematic since it has different minimum requirements and certain versions won't work here. I'm not opposed to either:
Which would you prefer? |
9a89455
to
10a4647
Compare
10a4647
to
9a1f9f8
Compare
This is used quite heavily in ndcube.
I added use of the lazy fixtures package here, the test changes for SlicedLowLevelWCS are kind of related to #276 in that it makes it easy to also test with gwcs.