Add support for ASDF serialisation and deserialisation#776
Merged
Conversation
Cadair
commented
Jun 3, 2025
4 tasks
braingram
reviewed
Oct 7, 2025
Contributor
There was a problem hiding this comment.
Thanks for pushing this forward. Overall I think it looks great. I left a few comments:
- 1 possible bug in the collection converter (which might instead be a schema bug where
aligned_axesshould be required) - a few comments about schema required items vs values filled in by converter
I mostly did not review the test changes.
ndcube/asdf/resources/schemas/quantitytablecoordinate-1.0.0.yaml
Outdated
Show resolved
Hide resolved
ndcube/asdf/resources/schemas/skycoordtablecoordinate-1.0.0.yaml
Outdated
Show resolved
Hide resolved
DanRyanIrish
reviewed
Oct 8, 2025
Member
DanRyanIrish
left a comment
There was a problem hiding this comment.
I didn't see any problems that jumped out. So as long as the tests pass, and those more qualified to review this also approve, I'm happy to see this merged
| types = ["ndcube.wcs.wrappers.compound_wcs.CompoundLowLevelWCS"] | ||
|
|
||
| def from_yaml_tree(self, node, tag, ctx): | ||
| from ndcube.wcs.wrappers import CompoundLowLevelWCS |
Member
There was a problem hiding this comment.
Why are imports inside from_yaml... methods through PR?
Member
Author
There was a problem hiding this comment.
Because these files are imported at import asdf time so by moving them into these methods these imports are only triggered when actually reading a file, i.e. if you read a non-ndcube asdf these imports are never run.
Contributor
DanRyanIrish
approved these changes
Oct 9, 2025
Co-authored-by: DanRyanIrish <[email protected]>
This file contains hidden or 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
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.
This PR adds support for saving and loading the vast majority of
ndcubeobjects to/from ASDF files.Thanks to @ViciousEagle03 who did the majority of this work.
This PR is now ready for review, to save every possible ndcube object there's still two PRs to asdf-astropy which need to be merged, some tests are skipped here for that. However, this is now ready for review.
MultipleTableCoordinateSlicedLowLevelWCSsupport all the wrappers: Fix two WCS bugs astropy/asdf-astropy#276