swvo.io.hp.read_hp_from_multiple_models#

swvo.io.hp.read_hp_from_multiple_models(start_time: datetime, end_time: datetime, model_order: Sequence[Hp30Ensemble | Hp30GFZ | Hp60Ensemble | Hp60GFZ] | None = None, hp_index: str = 'hp30', reduce_ensemble: Literal['mean', 'median'] | None = None, historical_data_cutoff_time: datetime | None = None, *, download: bool = False) DataFrame | list[DataFrame][source]#

Read Hp data from multiple models.

The model order represents the priorities of models. The first model in the model order is read. If there are still NaNs in the resulting data, the next model will be read. And so on. In the case of reading ensemble predictions, a list will be returned, otherwise a plain data frame will be returned.

Parameters:
start_timedatetime

Start time of the data request.

end_timedatetime

End time of the data request.

model_orderSequence, optional

Order in which data will be read from the models, defaults to [OMNI, Niemegk, Ensemble, SWPC].

reduce_ensemble{“mean”, “median”} or None, optional

The method to reduce ensembles to a single time series (“mean” or “median”), defaults to None.

historical_data_cutoff_timedatetime, optional

Time, which represents “now”. After this time, no data will be taken from historical models (OMNI, Niemegk), defaults to None.

downloadbool, optional

Flag which decides whether new data should be downloaded, defaults to False.

Returns:
Union[pandas.DataFrame, list[pandas.DataFrame]]

A data frame or a list of data frames containing data for the requested period.