swvo.io.plasmasphere.read_plasmasphere_combined_inputs#

Classes

PlasmasphereCombinedInputsReader([data_dir])

Reads one of the available combined inputs for plasmasphere density prediction.

class swvo.io.plasmasphere.read_plasmasphere_combined_inputs.PlasmasphereCombinedInputsReader(data_dir: Path | None = None)[source]#

Bases: object

Reads one of the available combined inputs for plasmasphere density prediction.

Parameters:
folderstr

The folder where the combined inputs files are stored.

Raises:
FileNotFoundError

If the data folder does not exist.

RuntimeError

If the source of data requested is not among the available ones.

read(source: str, requested_date: datetime | None = None) DataFrame | None[source]#

Read one of the available combined inputs for plasmasphere density prediction.

Parameters:
sourcestr

The source of combined input requested. Available “kp” and “solar_wind”.

requested_datedatetime | None, optional

Date of combined input thar we want to read up to hour precision, by default None which means current date.

Returns:
pd.DataFrame|None

pandas.DataFrame with the data read from the file, or None if the file does not exist.

Raises:
RuntimeError

If the source of data requested is not among the available ones.