read#
- sunpy.io._fits.read(filepath, hdus=None, memmap=None, **kwargs)[source]#
Read a fits file.
- Parameters:
filepath (
str
) – The fits file to be read.hdus (
int
or iterable) – The HDU indexes to read from the file.**kwargs (
dict
, optional) – Passed toastropy.io.fits.open
.
- Returns:
list
– A list of (data, header) tuples
Notes
This routine reads all the HDU’s in a fits file and returns a list of the data and a FileHeader instance for each one.
Also all comments in the original file are concatenated into a single “comment” key in the returned FileHeader.