class StressModel(stress, rfunc, name, up=True, cutoff=None, settings=None, metadata=None, gain_scale_factor=None, meanstress=None)[source]#

Stress model convoluting a stress with a response function.

  • stress (pandas.Series) – pandas.Series with pandas.DatetimeIndex containing the stress.

  • rfunc (pastas.rfunc instance) – An instance of the response function used in the convolution with the stress.

  • name (str) – Name of the stress.

  • up (bool or None, optional) – True if response function is positive (default), False if negative. None if you don’t want to define if response is positive or negative.

  • cutoff (float, optional) – This argument is deprecated since 0.23. Directly provide this to directly to the response function instance (e.g., ps.Gamma(cutoff=0.999).

  • settings (dict or str, optional) – The settings of the stress. This can be a string referring to a predefined settings dict, or a dict with the settings to apply. Refer to the docstring of pastas.Timeseries for further information.

  • metadata (dict, optional) – dictionary containing metadata about the stress. This is passed onto the TimeSeries object.

  • gain_scale_factor (float, optional) – the scale factor is used to set the initial value and the bounds of the gain parameter, computed as 1 / gain_scale_factor.

  • meanstress (float, optional) – This argument is deprecated since 0.23. Use gain_scale_factor instead.


>>> import pastas as ps
>>> import pandas as pd
>>> sm = ps.StressModel(stress=pd.Series(), rfunc=ps.Gamma(), name="Prec",
>>>                     settings="prec")






Determine in how many time series the contribution can be split.


Method to obtain the settings of the stresses.


Returns the stress(es) of the time series object as a pandas DataFrame.


Set the initial parameters (back) to their default values.


Simulates the head contribution.


Method to export the StressModel object.


Method to update the settings of the all stresses in the stress model.