sherpa.astro.ui.clean() None

Clear out the current Sherpa session.

The clean function removes all data sets and model assignments, and restores the default settings for the optimisation and fit statistic.

Changed in version 4.15.0: The model names are now removed from the global symbol table.

See also


Save the current Sherpa session to a file.


Load in a Sherpa session from a file.


Save the Sherpa session as an ASCII file.


>>> clean()

After the call to clean, the line and bgnd variables will be removed, so accessing them would cause a NameError.

>>> set_source(gauss1d.line + const1d.bgnd)
>>> bgnd.c0.min = 0
>>> print(line)
>>> clean()