swvo.io.omni.omni_high_res#
Module for handling OMNI high resolution data.
Classes
|
This is a class for the OMNI High Resolution data. |
- class swvo.io.omni.omni_high_res.OMNIHighRes(data_dir: Path | None = None, prefer_env_var: bool = False)[source]#
Bases:
BaseIOThis is a class for the OMNI High Resolution data.
- Parameters:
- data_dirPath | None
Data directory for the OMNI High Resolution data. If not provided, it will be read from the environment variable
Methods
download_and_process(start_time, end_time[, ...])Download and process OMNI High Resolution data files.
read(start_time, end_time[, cadence_min, ...])Read OMNI High Resolution data for the given time range.
- Raises:
- ValueError
Returns ValueError if necessary environment variable is not set.
- download_and_process(start_time: datetime, end_time: datetime, cadence_min: int = 1, reprocess_files: bool = False) None[source]#
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[source]#
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.