read_file_header#

sunpy.io._file_tools.read_file_header(filepath, filetype=None, **kwargs)[source]#

Reads the header from a given file.

This should always return a instance of FileHeader.

Parameters:
  • filepath (str) – The file from which the header is to be read.

  • filetype (str) – Supported reader or extension to manually specify the filetype. Supported readers are (‘jp2’, ‘fits’).

  • **kwargs (dict) – All extra keyword arguments are passed to .get_header for the file specific reader.

Returns:

headers (list) – A list of headers.