Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/unsubtract.html
Jump to: Description · Examples · PARAMETERS · Notes · Bugs · See Also


AHELP for CIAO 4.16 Sherpa

unsubtract

Context: data

Synopsis

Undo any background subtraction for the data set.

Syntax

unsubtract(id=None)

id - int or str, optional

Description

The `unsubtract` function undoes any changes made by `subtract` . 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 if `subtract` is called.


Examples

Example 1

Remove the background subtraction from the default data set.

>>> subtract()
>>> get_data().subtracted
False

Example 2

Remove the background subtraction from the data set labelled 'src':

>>> subtract('src')
>>> get_data('src').subtracted
False

PARAMETERS

The parameter for this function is:

Parameter Definition
id The identifier for the data set to use. If not given then the default identifier is used, as returned by `get_default_id` .

Notes

The subtracted field of a PHA data set is set to False when the background is not subtracted.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

data
get_bkg, get_bkg_arf, get_bkg_model, get_bkg_rmf, get_bkg_source, set_bkg, subtract
info
list_bkg_ids, show_bkg_model, show_bkg_source
modeling
delete_bkg_model
plotting
plot_bkg, plot_bkg_chisqr, plot_bkg_delchi, plot_bkg_fit, plot_bkg_fit_delchi, plot_bkg_fit_resid, plot_bkg_model, plot_bkg_ratio, plot_bkg_resid, plot_bkg_source