Skip to content
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

AsdfInFits deprecation and move to stdatamodels #1006

Closed
2 tasks
braingram opened this issue Jan 30, 2023 · 2 comments · Fixed by #1032
Closed
2 tasks

AsdfInFits deprecation and move to stdatamodels #1006

braingram opened this issue Jan 30, 2023 · 2 comments · Fixed by #1032

Comments

@braingram
Copy link
Contributor

braingram commented Jan 30, 2023

Blocked by:


The ability to read AsdfInFits files is being moved from ASDF into stdatamodels (in part to consolidate non-pipeline code for jwst). The current plan for this move is:

We do not have a estimate for when a stable version of stdatamodels or ASDF 3.0 will be released. We are planning to release ASDF 2.15 (which will support AsdfInFits) in the next few weeks which we will continue to support for at least 1 year (please see our proposed release and support process).

To summarize, at some point in the next year or so the uses of AsdfInFits in specutils and opening of fits files using asdf.open will need to be updated.

I've found a usage of AsdfInFits in a test fixture

# Mock the ASDF extension
hdulist.append(fits.BinTableHDU(name='ASDF'))
ff = fits_embed.AsdfInFits(hdulist, tmp_asdf)
tmpfile = str(tmpdir.join('jwst_embedded_asdf.fits'))
ff.write_to(tmpfile)

and likely usage in jwst_reader.py
# Get a list of GWCS objects from the slits
with asdf.open(filename) as af:
wcslist = [af.tree["meta"]["wcs"]]

I am happy to discuss alternatives, suggestions, comments on this process and hope to make it as painless as possible.

Also see:

🐱

@pllim
Copy link
Member

pllim commented Feb 22, 2023

Will the work to address this also naturally address #1011 ?

@braingram
Copy link
Contributor Author

The two issues are mostly unrelated (aside from both relying on deprecated or soon to be deprecated ASDF features).

To provide a minor update to this issue, a version of stdatamodels with AsdfInFits support has been released:
https://pypi.org/project/stdatamodels/1.1.0/
with documentation on reading and writing AsdfInFits files: https://stdatamodels.readthedocs.io/en/latest/asdf_in_fits.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants