clean

sherpa.astro.ui.clean()

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

Save the current Sherpa session to a file.

restore

Load in a Sherpa session from a file.

sherpa.astro.ui.save_all

Save the Sherpa session as an ASCII file.

Examples

>>> 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()