read_file

sunpy.io.read_file(filepath, filetype=None, **kwargs)[source] [edit on github]

Automatically determine the filetype and read the file.

Parameters:
  • filepath (str) – The file to be read
  • filetype (str) – Supported reader or extension to manually specify the filetype. Supported readers are (‘jp2’, ‘fits’, ‘ana’)
  • memmap (bool) – Should memory mapping be used, i.e. keep data on disk rather than in RAM. This is currently only supported by the FITS reader.
Returns:

pairs (list) – A list of (data, header) tuples.

Notes

Other keyword arguments are passed to the reader used.