reset
- sherpa.ui.reset(model=None, id: IdType | None = None) None
Reset the model parameters to their default settings.
The
reset
function restores the parameter values to the default value set byguess
or to the user-defined default. If the user set initial model values or soft limits - e.g. either withset_par
or by using parameter prompting viaparamprompt
- thenreset
will restore these values and limits even afterguess
orfit
has been called.- Parameters:
See also
fit
Fit one or more data sets.
guess
Set model parameters to values matching the data.
paramprompt
Control how parameter values are set.
set_par
Set the value, limits, or behavior of a model parameter.
Examples
The following examples assume that the source model has been set using:
>>> set_source(powlaw1d.pl * xsphabs.gal)
Fit the model and then reset the values of both components (
pl
andgal
):>>> 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))