- sherpa.ui.set_data(id, data=None)
Set a data set.
data (instance of a sherpa.Data.Data-derived class) – The new contents of the data set. This can be copied from an existing data set or loaded in from a file (e.g.
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the
dataparameter. If given two un-named arguments, then they are interpreted as the
>>> d1 = get_data(2) >>> set_data(d1)
Copy the background data from the default data set into a new data set identified as ‘bkg’:
>>> set_data('bkg', get_bkg())