- sunpy.data.test.write_header_file_from_image_file(image_path, header_path, hdu=0, **kwargs)#
Convert a FITS file containing an image and a header to a plaintext file containing only the string representation of the header.
This is to be used in the context of generating header-only test data files.
image_path (path-like) – Path to original image data FITS file
header_path (path-like) – Path to header-only test data plaintext file
int, optional) – HDU index of the header to write the header for
Keyword arguments accepted by `~astropy.io.fits.Header.totextfile`