plot_bkg_source

sherpa.astro.ui.plot_bkg_source(id=None, lo=None, hi=None, bkg_id=None, replot=False, overplot=False, clearwindow=True, **kwargs)

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

This function plots the model for the background of a PHA data set. It does not include the instrument response (the ARF and RMF).

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.

  • lo (number, optional) – The low value to plot.

  • hi (number, optional) – The high value to plot.

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

  • replot (bool, optional) – Set to True to use the values calculated by the last call to plot_bkg_model. The default is False.

  • overplot (bool, optional) – If True then add the data to an exsiting plot, otherwise create a new plot. The default is False.

  • clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

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.

set_bkg_model()

Set the background model expression for a PHA data set.

Examples

>>> plot_bkg_source()
>>> plot_bkg_source('jet', bkg_id=1)
>>> plot_bkg_source('jet', bkg_id=2, overplot=True)