The default behavior for adding and solving with noisemodels has changed from Pastas 1.5. Find more information here

pastas.model.Model.get_tmax#

Model.get_tmax(tmax=None, use_oseries=True, use_stresses=False)[source]#

Method that checks and returns valid values for tmax.

Parameters
  • tmax (str or pandas.Timestamp, optional) – string with a year or date that can be turned into a pandas Timestamp ( e.g. pd.Timestamp(tmax)).

  • 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

pandas.Timestamp

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:

  1. If no value for tmax is provided:

    1. If the use_oseries argument is True, tmax is based on the oseries.

    2. If the use_stresses argument is True, tmax is based on the stressmodels.

  2. If a values for tmax is provided:

    1. A pandas timestamp is made from the string.

    2. 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.