get_delchi_plot
- sherpa.astro.ui.get_delchi_plot(id: IdType | None = None, recalc=True)
Return the data used by plot_delchi.
- Parameters:
id (int, str, or None, optional) – The data set. If not given then the default identifier is used, as returned by
get_default_id.recalc (bool, optional) – If
Falsethen the results from the last call toplot_delchi(orget_delchi_plot) are returned, otherwise the data is re-generated.
- Returns:
resid_data
- Return type:
a
sherpa.plot.DelchiPlotinstance- Raises:
sherpa.utils.err.IdentifierErr – If the data set does not exist or a source expression has not been set.
See also
get_chisqr_plotReturn the data used by plot_chisqr.
get_ratio_plotReturn the data used by plot_ratio.
get_resid_plotReturn the data used by plot_resid.
plot_delchiPlot the ratio of residuals to error for a data set.
Examples
Return the residual data, measured in units of the error, for the default data set:
>>> rplot = get_delchi_plot() >>> np.min(rplot.y) -2.85648373819671875 >>> np.max(rplot.y) 2.89477053577520982
Display the contents of the residuals plot for data set 2:
>>> print(get_delchi_plot(2))
Overplot the residuals plot from the ‘core’ data set on the ‘jet’ data set:
>>> r1 = get_delchi_plot('jet') >>> r2 = get_delchi_plot('core') >>> r1.plot() >>> r2.overplot()