unsubtract
- sherpa.astro.ui.unsubtract(id: IdType | None = None) None
Undo any background subtraction for the data set.
The
unsubtract
function undoes any changes made bysubtract
. After this command, anything that uses the data set - such as a plot, fit, or error analysis - will use the original data values. Models should be re-fit ifsubtract
is called.- Parameters:
id (int, str, or None, optional) – The identifier for the data set to use. If not given then the default identifier is used, as returned by
get_default_id
.- Raises:
sherpa.utils.err.ArgumentErr – If the data set does not contain a PHA data set.
Notes
The
subtracted
field of a PHA data set is set toFalse
when the background is not subtracted.Examples
Remove the background subtraction from the default data set.
>>> subtract() >>> get_data().subtracted False
Remove the background subtraction from the data set labelled ‘src’:
>>> subtract('src') >>> get_data('src').subtracted False