Constrained (pmrf.Constrained)

pmrf.Constrained(constraint: AbstractConstraint, value: Array | ndarray | bool | number | bool | int | float | complex, *, fixed: bool = False, name: str | None = None, scale: float | None = None, metadata: Any | None = None) → Param

Create a free parameter constrained to a specific domain.

See pmrf.parameters.constraints for built-in constraints.

Parameters:
  • constraint (AbstractConstraint) – The constraint to apply to the parameter.

  • value (ArrayLike) – The initial declared value.

  • fixed (bool, optional) – Initializes the parameter as fixed. Defaults to False.

  • name (str, optional) – A name for the parameter, by default None.

  • scale (float, optional) – The units the value is written in. None, the default, inherits the scale of the field the parameter is passed to, or acts as 1.0.

  • metadata (Any, optional) – Arbitrary metadata for the parameter, by default None.

Returns:

The constrained parameter.

Return type:

pmrf.Param