swvo.io.kp.read_kp_from_multiple_models#
- swvo.io.kp.read_kp_from_multiple_models(start_time: datetime, end_time: datetime, model_order: Sequence[KpEnsemble | KpNiemegk | KpOMNI | KpSWPC | KpBGS | KpSIDC] | None = None, reduce_ensemble: Literal['mean', 'median'] | None = None, historical_data_cutoff_time: datetime | None = None, *, download: bool = False, recurrence: bool = False, rec_model_order: Sequence[KpOMNI | KpNiemegk | KpBGS] | None = None, fill_average: bool = False) DataFrame | list[DataFrame][source]#
Read Kp data from multiple models.
The model order determines the priority of models. Data is read from the first model in the model order. If there are still NaNs in the resulting data, the next model is read, and so on. For ensemble predictions, a list of data frames is returned; otherwise, a single data frame is returned.
- Parameters:
- start_timedatetime
The start time of the data request.
- end_timedatetime
The end time of the data request.
- model_orderSequence or None, optional
The 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. Can be “mean”, “median”, or None. Defaults to None.
- historical_data_cutoff_timedatetime or None, optional
Represents “now”. After this time, no data will be taken from historical models (OMNI, Niemegk). Defaults to None.
- downloadbool, optional
Flag to decide whether new data should be downloaded. Defaults to False. Also applies to recurrence filling.
- recurrencebool, optional
If True, fill missing values using 27-day recurrence from historical models (OMNI, Niemegk). Defaults to False.
- rec_model_orderSequence[KpOMNI | KpNiemegk | KpBGS], optional
The order in which historical models will be used for 27-day recurrence filling. Defaults to [OMNI, Niemegk].
- Returns:
- Union[
pandas.DataFrame, list[pandas.DataFrame]] A data frame or a list of data frames containing data for the requested period.
- Union[