swvo.io.solar_wind.omni#
Module handling SW data from OMNI High Resolution files.
Classes
|
Class for reading SW data from OMNI High resolution files. |
- class swvo.io.solar_wind.omni.SWOMNI(data_dir: Path | None = None, prefer_env_var: bool = False)[source]#
Bases:
OMNIHighResClass for reading SW data from OMNI High resolution files. Inherits the
download_and_process(), other private methods and attributes fromOMNIHighRes.- download_and_process(start_time: datetime, end_time: datetime, cadence_min: int = 1, reprocess_files: bool = False) None#
Download and process OMNI High Resolution data files.
- Parameters:
- start_timedatetime
Start time for data download.
- end_timedatetime
End time for data download.
- cadence_minint, optional
Cadence of the data in minutes, defaults to 1
- reprocess_filesbool, optional
Downloads and processes the files again, defaults to False, by default False
- Returns:
- None
- Raises:
- AssertionError
Raises AssertionError if the cadence is not 1 or 5 minutes.
- read(start_time: datetime, end_time: datetime, cadence_min: int = 1, download: bool = False) DataFrame#
Read OMNI High Resolution data for the given time range.
- Parameters:
- start_timedatetime
Start time for reading data.
- end_timedatetime
End time for reading data.
- cadence_minint, optional
Cadence of the data in minutes, defaults to 1
- downloadbool, optional
Download data on the go, defaults to False.
- Returns:
pandas.DataFrameOMNI High Resolution data.
- Raises:
- AssertionError
Raises AssertionError if the cadence is not 1 or 5 minutes.