Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/get_ratio_plot.html
Jump to: · Examples · PARAMETERS · Bugs · See Also


AHELP for CIAO 4.15 Sherpa

get_ratio_plot

Context: plotting

Synopsis

Return the data used by plot_ratio.

Syntax

get_ratio_plot(id=None, recalc=True)

id - int or str, optional
recalc - bool, optional

Examples

Example 1

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

Example 2

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

>>> print(get_ratio_plot(2))

Example 3

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()

PARAMETERS

The parameters for this function are:

Parameter Definition
id The data set. If not given then the default identifier is used, as returned by `get_default_id` .
recalc If False then the results from the last call to `plot_ratio` (or `get_ratio_plot` ) are returned, otherwise the data is re-generated.

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

plotting
get_resid_plot, plot_ratio
statistics
get_chisqr_plot, get_delchi_plot