read_files#

irispy.io.read_files(filename, *, spectral_windows=None, uncertainty=False, memmap=True)[source]#

A wrapper function to read a raster or SJI level 2 data file.

You can provide one SJI image or a one raster image or a list of raster images.

If you mix raster and SJI images, the function will raise an error.

Parameters:
  • filename (list of `str, str, pathlib.Path) – Filename(s) to load. If given a string, will load that file. If given a list of strings, it will check they are all raster files and load them.

  • spectral_windows (iterable of str or str) – Spectral windows to extract from files. Default=None, implies, extract all spectral windows.

  • uncertainty (bool, optional) – If True (not the default), will compute the uncertainty for the data (slower and uses more memory). If memmap=True, the uncertainty is never computed.

  • memmap (bool, optional) – If True (the default), will not load arrays into memory, and will only read from the file into memory when needed. This option is faster and uses a lot less memory. However, because FITS scaling is not done on-the-fly, the data units will be unscaled, not the usual data numbers (DN).

Return type:

The corresponding irispy.sji.SJICube or irispy.spectrogram.SpectrogramCube.