swvo.io.symh.omni#

Module for handling OMNI SYM-H data.

Classes

SymhOMNI([data_dir, prefer_env_var])

Class for reading SYM-H data from OMNI High Resolution files.

class swvo.io.symh.omni.SymhOMNI(data_dir: Path | None = None, prefer_env_var: bool = False)[source]#

Bases: OMNIHighRes

Class for reading SYM-H data from OMNI High Resolution files. Inherits the download_and_process, other private methods and attributes from OMNIHighRes.

read(start_time: datetime, end_time: datetime, cadence_min: int = 1, download: bool = True) DataFrame[source]#

Read OMNI SYM-H 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.

cadence_minint, optional

Cadence of the data in minutes, defaults to 1

downloadbool, optional

Download data on the go, defaults to True.

Returns:
pandas.DataFrame

OMNI SYM-H data.

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.