SWXIOHandler¶
- class swxsoc.util.io.SWXIOHandler[source]¶
Bases:
ABCAbstract 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 ofTimeSeriescontaining the loaded data.support (
dict[astropy.nddata.NDData]) – Non-record-varying data contained in the filespectra (
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 ofSWXDatacontaining the data to be saved.file_path (
pathlib.Path) – A fully specified path to the directory where the file is to be saved.