BkgModelHistogram

class sherpa.astro.plot.BkgModelHistogram[source] [edit on github]

Bases: ModelHistogram

Plot a background model for a PHA dataset with no grouping.

The model is drawn at the native resolution of the instrument response, or ungrouped channels. The model is filtered to the minimum and maximum of the background to the PHA dataset but any ignored ranges within this are ignored.

Attributes Summary

histo_prefs

x

Return (xlo + xhi) / 2

Methods Summary

overplot(*args, **kwargs)

plot([overplot, clearwindow])

Plot the data.

prepare(data, model[, stat])

Attributes Documentation

histo_prefs = {}
x

Return (xlo + xhi) / 2

This is intended to make it easier to swap between plot- and histogram-style plots by providing access to an X value.

Methods Documentation

overplot(*args, **kwargs) [edit on github]
plot(overplot=False, clearwindow=True, **kwargs) [edit on github]

Plot the data.

This will plot the data sent to the prepare method.

Parameters
  • overplot (bool, optional) – If True then add the data to an existing plot, otherwise create a new plot.

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

  • **kwargs – These values are passed on to the plot backend, and must match the names of the keys of the object’s plot_prefs dictionary.

See also

prepare, overplot

prepare(data, model, stat=None) [edit on github]