show_bkg_model

sherpa.astro.ui.show_bkg_model(id: IdType | None = None, bkg_id: IdType | None = None, outfile=None, clobber: bool = False) None

Display the background model expression used to fit a data set.

This displays the model used to the the background data set, that is, the expression set by set_bkg_model or set_bkg_source combined with any instrumental responses, together with the parameter values for the model. The show_bkg_source function displays just the background model, without the instrument components (if any).

Parameters:
idint, str, or None, optional

The data set. If not given then all background expressions are displayed.

bkg_idint, str, or None, optional

The background component to display. The default is all components.

outfilestr, 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.

clobberbool, optional

If outfile is not None, 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 outfile already exists and clobber is False.

See also

list_model_ids

List of all the data sets with a source expression.

set_bkg_model

Set the background model expression for a data set.

show_all

Report the current state of the Sherpa session.

show_model

Display the model expression used to fit a data set.

show_bkg_source

Display the background model expression for a data set.