show_bkg_source
- sherpa.astro.ui.show_bkg_source(id: IdType | None = None, bkg_id: IdType | None = None, outfile=None, clobber: bool = False) None
Display the background model expression for a data set.
This displays the background model for a data set, that is, the expression set by
set_bkg_modelorset_bkg_source, as well as the parameter values for the model. Theshow_bkg_modelfunction displays the model that is fit to the data; that is, it includes any instrument responses.- Parameters:
id (int, str, or None, optional) – The data set. If not given then all background expressions are displayed.
bkg_id (int, str, or None, optional) – The background component to display. The default is all components.
outfile (str, optional) – If not given the results are displayed to the screen, otherwise it is taken to be the name of the file to write the results to.
clobber (bool, optional) – If
outfileis notNone, then this flag controls whether an existing file can be overwritten (True) or if it raises an exception (False, the default setting).
- Raises:
sherpa.utils.err.IOErr – If
outfilealready exists andclobberisFalse.
See also
list_model_idsList of all the data sets with a source expression.
set_bkg_modelSet the background model expression for a data set.
show_allReport the current state of the Sherpa session.
show_modelDisplay the model expression used to fit a data set.
show_bkg_modelDisplay the background model expression used to fit a data set.