- qspec.models.Model. set_fix ( i , fix , force=False )[source]
-
Set a specific parameter fix state. The fix state can be
- a
bool, whether the parameter is fixed (True) or varied (False) in a fit. - a positive
float$\sigma$, to vary the parameter with a Gaussian prior with the standard deviation $\sigma$ around its current value.0or negative values fix the parameter,infvaries it freely. - a
str"val(unc)", e.g.,"1.5(0.2)", to vary the parameter with a Gaussian prior with meanvaland standard deviationunc. - any other
str, an expression of the other parameter names, e.g.,"2 * Al", that defines the value of the parameter. The parameter is not varied in a fit. - a list
[lower, upper], to vary the parameter within the bounds. An empty list is equivalent to[0, 1], a list with a single value to[0, upper].
Invalid expressions and expressions that form loops are rejected with a printed message.
- Parameters:
- Raises:
-
- ValueError
If
fixhas the wrong format.
- a