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

docs mention saving to AsdfInFits which is not available in asdf 3.0 #465

Closed
braingram opened this issue Jul 27, 2023 · 4 comments
Closed
Milestone

Comments

@braingram
Copy link
Collaborator

Perhaps this section should be removed?

>>> from asdf import fits_embed

Or alternatively the section could be updated to use stdatamodels:
https://stdatamodels.readthedocs.io/en/latest/asdf_in_fits.html#writing-asdfinfits-files

@nden nden added this to the 0.19 milestone Sep 6, 2023
@perrygreenfield
Copy link
Collaborator

Does the reading of the WCS from a FITS extension still work (line 260)?

@braingram
Copy link
Collaborator Author

Neither reading nor writing to fits works with asdf 3.0 as support for AsdfInFits was dropped.

Which line are you referring to for reading of the WCS from a FITS extension? Line 260 in docs/index.rst appears to be writing to a fits extension. Are you referring to a different file?

gwcs/docs/index.rst

Lines 259 to 261 in 929478d

>>> fa = fits_embed.AsdfInFits(hdul, tree)
>>> fa.write_to("imaging_with_wcs_in_asdf.fits")
>>> fits.info("imaging_with_wcs_in_asdf.fits")

The following section in docs/index.rst that refers to reading from a fits extension (using asdf) is another example of something that no longer works in asdf 3.0:

gwcs/docs/index.rst

Lines 283 to 288 in 929478d

.. doctest-skip::
>>> import asdf
>>> fa = asdf.open("imaging_with_wcs_in_asdf.fits")
>>> wcsobj = fa.tree["wcs"]

@braingram braingram changed the title docs mention saving to AsdfInFits which is deprecated and will be removed in asdf 3.0 docs mention saving to AsdfInFits which is not available in asdf 3.0 Nov 10, 2023
@perrygreenfield
Copy link
Collaborator

For now I just removed all that FITS stuff (both reading and writing examples from and to FITS extensions). I'd rather not pull in stdatamodels in this. If we have a more generic way of dealing with ASDF in FITS extensions, we can but it back in, but for now let's leave it out.

@perrygreenfield
Copy link
Collaborator

Addressed by #483

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

No branches or pull requests

3 participants