pastas.model.Model.set_parameter#

pastas.model.Model.set_parameter(name: str, initial: float | None = None, vary: bool | None = None, pmin: float | None = None, pmax: float | None = None, optimal: float | None = None, move_bounds: bool = False, **kwargs) None#

Change the parameter properties.

Parameters:
  • name (str) – name of the parameter to update. This has to be a single variable.

  • initial (float, optional) – parameters value to use as initial estimate.

  • vary (bool, optional) – boolean to vary a parameter (True) or not (False).

  • pmin (float, optional) – minimum value for the parameter.

  • pmax (float, optional) – maximum value for the parameter.

  • optimal (float, optional) – optimal value for the parameter.

  • move_bounds (bool, optional) – Reset pmin/pmax based on new initial value. If move_bounds=True, pmin and pmax must be None.

  • kwargs (dict, optional) – These keyword arguments can be used to change any other parameter properties that are present in the parameters DataFrame, such as “dist”.

Notes

It is highly recommended to use this method to set parameter properties. Changing the parameter properties directly in the parameter DataFrame may not work as expected.

Examples

>>> ml.set_parameter(name="constant_d", initial=10, vary=True,
>>>                  pmin=-10, pmax=20)