pastas.model.Model.get_tmax#
- pastas.model.Model.get_tmax(tmax: pandas.Timestamp | str | None = None, use_oseries: bool = True, use_stresses: bool = False) pandas.Timestamp#
Method that checks and returns valid values for tmax.
- Parameters:
tmax (pandas.Timestamp or str, optional) – A string or pandas.Timestamp that can be turned into a pandas Timestamp (e.g. ‘2020-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally.
use_oseries (bool, optional) – Obtain the tmin and tmax from the oseries. Default is True.
use_stresses (bool, optional) – Obtain the tmin and tmax from the stresses. The minimum/maximum time from all stresses is taken.
- Returns:
tmax – returns pandas timestamps for tmax.
- Return type:
Notes
The parameters tmin and tmax are leading, unless use_oseries is True, then these are checked against the oseries index. The tmin and tmax are checked and returned according to the following rules:
If no value for tmax is provided:
If the use_oseries argument is True, tmax is based on the oseries.
If the use_stresses argument is True, tmax is based on the stressmodels.
If a values for tmax is provided:
A pandas timestamp is made from the string.
if the use_oseries argument is True, tmax is checked against oseries.
A detailed description of dealing with tmax and timesteps in general can be found in the developers section of the docs.