sherpa.ui.reset(model=None, id=None)

Reset the model parameters to their default settings.

The reset function restores the parameter values to the default value set by guess or to the user-defined default. If the user set initial model values or soft limits - e.g. either with set_par or by using parameter prompting via paramprompt - then reset will restore these values and limits even after guess or fit has been called.

  • model (optional) – The model component or expression to reset. The default is to use all source expressions.

  • id (int or string, optional) – The data set to use. The default is to use all data sets with a source expression.

See also


Fit one or more data sets.


Set model parameters to values matching the data.


Control how parameter values are set.


Set the value, limits, or behavior of a model parameter.


The following examples assume that the source model has been set using:

>>> set_source( *

Fit the model and then reset the values of both components (pl and gal):

>>> fit()
>>> reset()

Reset just the parameters of the pl model component:

>>> reset(pl)

Reset all the components of the source expression for data set 2.

>>> reset(get_source(2))