freeze

sherpa.ui.freeze(*args)

Fix model parameters so they are not changed by a fit.

If called with no arguments, then all parameters of models in source expressions are frozen. The arguments can be parameters or models (in which case all parameters of the model are frozen).

See also

fit()
Fit one or more data sets.
link()
Link a parameter value to an associated value.
set_par()
Set the value, limits, or behavior of a model parameter.
thaw()
Allow model parameters to be varied during a fit.
unlink()
Unlink a parameter value.

Examples

Fix the FWHM parameter of the line model (in this case a gauss1d model) so that it will not be varied in the fit.

>>> set_source(const1d.bgnd + gauss1d.line)
>>> line.fwhm = 2.1
>>> freeze(line.fwhm)
>>> fit()

Freeze all parameters of the line model and then re-fit:

>>> freeze(line)
>>> fit()

Freeze the nh parameter of the gal model and the abund parameter of the src model:

>>> freeze(gal.nh, src.abund)