open

stdatamodels.asdf_in_fits.open(filename_or_hdu, ignore_missing_extensions=False, ignore_unrecognized_tag=False)

Read ASDF data embedded in a fits file.

Parameters:
filename_or_hdustr, path, astropy.io.fits.HDUList

Filename of the FITS file or an open astropy.io.fits.HDUList containing the ASDF data. If a filename is provided it will be opened with astropy.io.fits.open().

ignore_missing_extensionsbool, optional

If True, ignore missing extensions in the FITS file. Defaults to False.

ignore_unrecognized_tagbool, optional

If True, ignore unrecognized tags in the ASDF data. Defaults to False.

Returns:
afasdf.AsdfFile

asdf.AsdfFile created from ASDF data embedded in the opened FITS file.