plot_bkg_fit_resid¶
-
sherpa.astro.ui.
plot_bkg_fit_resid
(id=None, bkg_id=None, replot=False, overplot=False, clearwindow=True)¶ Plot the fit results, and the residuals, for the background of a PHA data set.
This creates two plots - the first from plot_bkg_fit and the second from plot_bkg_resid - for a data set.
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.
- replot (bool, optional) – Set to
True
to use the values calculated by the last call to plot_bkg_fit_resid. The default isFalse
. - overplot (bool, optional) – If
True
then add the data to an exsiting plot, otherwise create a new plot. The default isFalse
. - clearwindow (bool, optional) – When using ChIPS for plotting, should the existing frame be cleared before creating the plot?
Raises: sherpa.utils.err.ArgumentErr
– If the data set does not contain PHA data.sherpa.utils.err.IdentifierErr
– If thebkg_id
parameter is invalid.sherpa.utils.err.ModelErr
– If no model expression has been created for the background data.
See also
get_bkg_fit_plot()
- Return the data used by plot_bkg_fit.
get_bkg_resid_plot()
- Return the data used by plot_bkg_resid.
plot()
- Create one or more plot types.
plot_bkg()
- Plot the background values for a PHA data set.
plot_bkg_model()
- Plot the model for the background of a PHA data set.
plot_bkg_fit()
- Plot the fit results (data, model) for the background of a PHA data set.
plot_bkg_fit_delchi()
- Plot the fit results, and the residuals, for the background of a PHA data set.
plot_fit()
- Plot the fit results (data, model) for a data set.
set_analysis()
- Set the units used when fitting and displaying spectral data.
Examples
Plot the background fit and residuals to the default data set:
>>> plot_bkg_fit_resid()