Parameter

class matk.parameter.Parameter(name, value=None, vary=True, min=None, max=None, expr=None, nominal=None, discrete_vals=[], **kwargs)

MATK parameter class

discrete_vals

Histogram values: Array containing values (row 1) and probabilities (row 2)

dist

Probabilistic distribution of parameter belonging to scipy.stats module

dist_pars

Distribution parameters required by self.dist e.g. if dist == uniform, dist_pars = (min,max-min) if dist == norm, dist_pars = (mean,stdev))

expr

Mathematical expression to use to evaluate value

nominal

Nominal parameter value, used in info gap decision analyses

setup_bounds()

set up Minuit-style internal/external parameter transformation of min/max bounds.

returns internal value for parameter from self.value (which holds the external, user-expected value). This internal values should actually be used in a fit….

As a side-effect, this also defines the self.from_internal method used to re-calculate self.value from the internal value, applying the inverse Minuit-style transformation. This method should be called prior to passing a Parameter to the user-defined objective function.

This code borrows heavily from JJ Helmus’ leastsqbound.py

value

Parameter value

vary

Boolean indicating whether or not to vary parameter