StressModel#

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

Time series model consisting of the convolution of one stress with one response function.

Parameters
  • stress (pandas.Series) – pandas Series object containing the stress.

  • rfunc (rfunc class) – 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) – float between 0 and 1 to determine how long the response is (default is 99% of the actual response time). Used to reduce computation times.

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

  • meanstress (float, optional) – The mean stress determines the initial parameters of rfunc. The initial parameters are chosen in such a way that the gain of meanstress is 1.

Examples

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

Attributes#

nparam

Methods#

__init__

dump_stress

Method to dump all stresses in the stresses list.

get_nsplit

Determine in how many timeseries the contribution can be split.

get_stress

Returns the stress or stresses of the time series object as a pandas DataFrame.

set_init_parameters

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

simulate

Simulates the head contribution.

to_dict

Method to export the StressModel object.

update_stress

Method to update the settings of the individual TimeSeries.