Parameters#

class BaseParameter(*args, **kwargs)[source]#

Bases: Variable[V]

property prior: BasePDF | None#

Returns the prior distribution associated with this parameter.

Returns:

Prior distribution, or None if no prior is set.

Return type:

BasePDF | None

scale(slope: ArrayLike = 1.0, offset: ArrayLike = 0.0) Modifier[source]#

Creates a linear modifier driven by this parameter.

Parameters:
  • slope – Multiplicative factor applied to the histogram.

  • offset – Additive shift applied to the histogram.

Returns:

Modifier representing the linear effect.

Return type:

Modifier

class NormalParameter(*args, **kwargs)[source]#

Bases: Parameter[V]

Parameter whose default prior is the standard normal distribution.

Provides convenience methods for log-normal scaling and template morphing.

property prior: BasePDF#

Returns the standard normal prior distribution for this parameter.

Returns:

Standard normal distribution.

Return type:

BasePDF

scale_log_asymmetric(up: ArrayLike, down: ArrayLike) Modifier[source]#

Creates an asymmetric log-normal modifier for this parameter.

Parameters:
  • up – Scaling factor applied to upward deviations.

  • down – Scaling factor applied to downward deviations.

Returns:

Modifier representing the asymmetric exponential effect.

Return type:

Modifier

scale_log_symmetric(kappa: ArrayLike) Modifier[source]#

Creates a symmetric log-normal modifier for this parameter.

Parameters:

kappa – scaling factor

Returns:

Modifier representing the symmetric exponential effect.

Return type:

Modifier

morphing(up_template: H, down_template: H) Modifier[source]#

Creates a vertical template morphing modifier for this parameter.

Parameters:
  • up_template – Template used for upward variations.

  • down_template – Template used for downward variations.

Returns:

Modifier modelling the morphing effect.

Return type:

Modifier

class Parameter(*args, **kwargs)[source]#

Bases: BaseParameter[V]

Generic parameter with optional bounds, priors, and metadata.

value#

Current parameter value (mutable via .value).

name#

Optional human-readable identifier.

lower#

Optional lower bound enforced via transformations.

upper#

Optional upper bound enforced via transformations.

prior#

Optional prior distribution.

frozen#

Whether the parameter participates in optimisation.

transform#

Optional transformation applied during unwrap/wrap.

tags#

Additional metadata tags.

Examples

>>> import evermore as evm
>>> theta = evm.Parameter(value=1.0, lower=0.0, upper=2.0)
>>> theta.value
Array(1., dtype=float32)