read_file, filetype=None, **kwargs)[source] [edit on github]

Automatically determine the filetype and read the file.

  • 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.

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


Other keyword arguments are passed to the reader used.