write

stdatamodels.asdf_in_fits.write(filename, tree, hdulist=None, **kwargs)

Write ASDF data inside a FITS file.

Parameters:
filenamestr or path

Filename where the resulting fits file containing the ASDF data will be saved. This is passed on to astropy.io.fits.HDUList.writeto()

treeASDF tree or dict

ASDF data to save in the fits file

hdulistastropy.io.fits.HDUList

Optional HDUList to write the ASDF data to. If not provided, a new HDUList will be created.

**kwargs

Additional keyword arguments to pass to astropy.io.fits.HDUList.writeto()