get_bkg_resid_plot
- sherpa.astro.ui.get_bkg_resid_plot(id: IdType | None = None, bkg_id: IdType | None = None, recalc=True)
Return the data used by plot_bkg_resid.
- Parameters:
id (int, str, or None, 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, str, or None, optional) – Identify the background component to use, if there are multiple ones associated with the data set.
recalc (bool, optional) – If
Falsethen the results from the last call toplot_bkg_resid(orget_bkg_resid_plot) are returned, otherwise the data is re-generated.
- Returns:
resid – An object representing the data used to create the plot by
plot_bkg_resid.- Return type:
a
sherpa.astro.plot.BkgResidPlotinstance- Raises:
sherpa.utils.err.ArgumentErr – If the data set does not contain PHA data.
sherpa.utils.err.IdentifierErr – If the
bkg_idparameter is invalid.sherpa.utils.err.ModelErr – If no model expression has been created for the background data.
See also
get_bkg_chisqr_plotReturn the data used by plot_bkg_chisqr.
get_bkg_delchi_plotReturn the data used by plot_bkg_delchi.
get_bkg_ratio_plotReturn the data used by plot_bkg_ratio.
plot_bkg_residPlot the residual (data-model) values for the background of a PHA data set.
Examples
>>> bplot = get_bkg_resid_plot() >>> print(bplot)
>>> get_bkg_resid_plot('jet', bkg_id=1).plot() >>> get_bkg_resid_plot('jet', bkg_id=2).overplot()