write_hdul

sofia_redux.toolkit.utilities.fits.write_hdul(hdul, outdir=None, overwrite=True)[source]

Write a HDULists to disk.

Output filename is extracted from the primary header (extension 0) of each HDUList from the FILENAME keyword.

Parameters:
hdulastropy.io.fits.HDUList
outdirstr, optional

Name of the output path. Default is the current working directory.

overwritebool, optional

If False, will fail if the output filename already exists.

Returns:
str

Filename written to disk