pastas.model.Model.observations#

pastas.model.Model.observations(tmin: pandas.Timestamp | str | None = None, tmax: pandas.Timestamp | str | None = None, freq: str | None = None, update_observations: bool = False) pandas.Series#

Method that returns the observations series used for calibration.

Parameters:
  • tmin (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the start date for the simulation period (E.g. ‘1980-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally. If none is provided, the tmin from the oseries is used.

  • tmax (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the end date for the simulation period (E.g. ‘2020-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally. If none is provided, the tmax from the oseries is used.

  • freq (str, optional) – String with the frequency the stressmodels are simulated. Must be one of the following: (D, h, m, s, ms, us, ns) or a multiple of that e.g. “7D”.

  • update_observations (bool, optional) – If True, force recalculation of the observations, default is False.

Returns:

oseries_calib – pandas series of the oseries used for calibration of the model.

Return type:

pandas.Series

Notes

This method makes sure the simulation is compared to the nearest observation. It finds the index closest to sim_index, and then returns a selection of the oseries. In the residuals method, the simulation is interpolated to the observation-timestamps.