SWXIOHandler

class swxsoc.util.io.SWXIOHandler[source]

Bases: ABC

Abstract base class for handling input/output operations of heliophysics data.

Methods Summary

load_data(file_path)

Load data from a file.

save_data(data, file_path)

Save data to a file.

Methods Documentation

abstract load_data(file_path: Path) Tuple[dict, dict, NDCollection, dict][source]

Load data from a file.

Parameters:

file_path (pathlib.Path) – A fully specified file path of the data file to load.

Returns:

  • timeseries (dict[~astropy.time.TimeSeries]) – An instance of TimeSeries containing the loaded data.

  • support (dict[astropy.nddata.NDData]) – Non-record-varying data contained in the file

  • spectra (ndcube.NDCollection) – Spectral or High-dimensional measurements in the loaded data.

  • meta (dict) – Global metadata attributes.

abstract save_data(data, file_path: Path)[source]

Save data to a file.

Parameters:
  • data (swxsoc.swxdata.SWXData) – An instance of SWXData containing the data to be saved.

  • file_path (pathlib.Path) – A fully specified path to the directory where the file is to be saved.