get_bkg_delchi_plot
- sherpa.astro.ui.get_bkg_delchi_plot(id: IdType | None = None, bkg_id: IdType | None = None, recalc: bool = True, copy: bool = True)
Return the data used by plot_bkg_delchi.
Changed in version 4.19.0: The plot object is now copied by default. To get the previous behaviour set the
copyattribute toFalse.- Parameters:
- id
int,str,orNone,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,orNone,optional Identify the background component to use, if there are multiple ones associated with the data set.
- recalcbool,
optional If
Falsethen the results from the last call toplot_bkg_delchi(orget_bkg_delchi_plot) are returned, otherwise the data is re-generated.- copybool,
optional Is the plot object copied before being returned? If so then the plot attributes will not be changed by multiple calls to this routine.
- id
- Returns:
- delchi
asherpa.astro.plot.BkgDelchiPlotinstance An object representing the data used to create the plot by
plot_bkg_delchi.
- delchi
- Raises:
sherpa.utils.err.ArgumentErrIf the data set does not contain PHA data.
sherpa.utils.err.IdentifierErrIf the
bkg_idparameter is invalid.sherpa.utils.err.ModelErrIf 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_ratio_plotReturn the data used by plot_bkg_ratio.
get_bkg_resid_plotReturn the data used by plot_bkg_resid.
plot_bkg_delchiPlot the ratio of residuals to error for the background of a PHA data set.
Examples
>>> bplot = get_bkg_delchi_plot() >>> print(bplot)
>>> get_bkg_delchi_plot('jet', bkg_id=1).plot() >>> get_bkg_delchi_plot('jet', bkg_id=2).overplot()