read_file, filetype=None, **kwargs)[source]

Automatically determine the filetype and read the file.

  • filepath (path-like) – The file to be read.

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

  • memmap (bool, optional) – Should memory mapping be used, i.e. keep data on disk rather than in RAM. This is currently only supported by the FITS reader.


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


Other keyword arguments are passed to the reader used.