write

sunpy.io.fits.write(fname, data, header, hdu_type=None, **kwargs)[source] [edit on github]

Take a data header pair and write a FITS file.

Parameters:
  • fname (str) – File name, with extension
  • data (numpy.ndarray) – n-dimensional data array
  • header (dict) – A header dictionary
  • hdu_type (None, CompImageHDU) – None will return a normal FITS files. CompImageHDU will rice compress the FITS file.