swvo.io.dst.omni#
Module for handling OMNI Dst data.
Classes
|
Class for reading Dst data from OMNI hourly files. |
- class swvo.io.dst.omni.DSTOMNI(data_dir: Path | None = None, prefer_env_var: bool = False)[source]#
Bases:
OMNILowResClass for reading Dst data from OMNI hourly files. Inherits the download_and_process, other private methods and attributes from OMNILowRes.
- read(start_time: datetime, end_time: datetime, download: bool = False) DataFrame[source]#
Read OMNI DST data for the given time range.
- Parameters:
- start_timedatetime
Start time of the data to read. Must be timezone-aware.
- end_timedatetime
End time of the data to read. Must be timezone-aware.
- downloadbool, optional
Download data on the go, defaults to False.
- Returns:
pandas.DataFrameOMNI DST data.
- available_variables() DataFrame#
Return metadata for every hourly OMNI2 output variable.
- Returns:
- pandas.DataFrame
One row per hourly variable with its canonical name, description, unit, fill value, and accepted aliases.
- download_and_process(start_time: datetime, end_time: datetime, reprocess_files: bool = False) None#
Download and process OMNI Low Resolution data files.
- Parameters:
- start_timedatetime
Start time for the data to be downloaded and processed.
- end_timedatetime
End time for the data to be downloaded and processed.
- reprocess_filesbool, optional
Downloads and processes the files again, defaults to False, by default False
- Returns:
- None
- Raises:
- ValueError
If
start_timeis not beforeend_time.