get_ratio_plot

sherpa.astro.ui.get_ratio_plot(id=None)

Return the data used by plot_ratio.

Parameters

id (int or str, optional) – The data set. If not given then the default identifier is used, as returned by get_default_id.

Returns

resid_data

Return type

a sherpa.plot.RatioPlot instance

Raises

sherpa.utils.err.IdentifierErr – If the data set does not exist or a source expression has not been set.

See also

get_chisqr_plot()

Return the data used by plot_chisqr.

get_delchi_plot()

Return the data used by plot_delchi.

get_resid_plot()

Return the data used by plot_resid.

plot_ratio()

Plot the ratio of data to model for a data set.

Examples

Return the ratio of the data to the model for the default data set:

>>> rplot = get_ratio_plot()
>>> np.min(rplot.y)
0.6320905073750186
>>> np.max(rplot.y)
1.5170172177000447

Display the contents of the ratio plot for data set 2:

>>> print(get_ratio_plot(2))

Overplot the ratio plot from the ‘core’ data set on the ‘jet’ data set:

>>> r1 = get_ratio_plot('jet')
>>> r2 = get_ratio_plot('core')
>>> r1.plot()
>>> r2.overplot()