pastas.rfunc.One.moment#

pastas.rfunc.One.moment(p: pastas.typing.ArrayLike, order: int, method: Literal['discrete', 'exact'] = 'discrete', dt: float = 1.0) float#

Calculate the moment of a certain order for the One response function.

Parameters:
  • p (array_like) – Response function parameters [A].

  • order (int) – Order of the moment to calculate.

  • method (str, optional) – Method to use: ‘discrete’ or ‘exact’. Default is ‘discrete’. Note: Only ‘discrete’ is supported for One.

  • dt (float, optional) – Time step in days. Default is 1.0.

Returns:

moment – Moment of the specified order. Returns gain(p) for order=0, 0.0 otherwise.

Return type:

float

Raises:

ValueError – If method is not ‘discrete’.