get_bkg_model_plot

sherpa.astro.ui.get_bkg_model_plot(id=None, bkg_id=None, recalc=True)

Return the data used by plot_bkg_model.

Parameters
  • id (int or str, optional) – The data set that provides the data. If not given then the default identifier is used, as returned by get_default_id.

  • bkg_id (int or str, optional) – Identify the background component to use, if there are multiple ones associated with the data set.

  • recalc (bool, optional) – If False then the results from the last call to plot_bkg_model (or get_bkg_model_plot) are returned, otherwise the data is re-generated.

Returns

model – An object representing the data used to create the plot by plot_bkg_model.

Return type

a sherpa.astro.plot.BkgModelHistogram instance

Raises

See also

get_bkg_source_plot

Return the data used by plot_bkg_source.

plot_bkg_model

Plot the model for the background of a PHA data set.

plot_bkg_source

Plot the model expression for the background of a PHA data set.

Examples

>>> bplot = get_bkg_model_plot()
>>> print(bplot)
>>> get_bkg_model_plot('jet', bkg_id=1).plot()
>>> get_bkg_model_plot('jet', bkg_id=2).overplot()