get_ratio_contour

sherpa.astro.ui.get_ratio_contour(id: IdType | None = None, recalc: bool = True)

Return the data used by contour_ratio.

Parameters:
idint, str, or None, optional

The data set. If not given then the default identifier is used, as returned by get_default_id.

recalcbool, optional

If False then the results from the last call to contour_ratio (or get_ratio_contour) are returned, otherwise the data is re-generated.

Returns:
ratio_dataa sherpa.plot.RatioContour instance

The y attribute contains the ratio values and the x0 and x1 arrays contain the corresponding coordinate values, as one-dimensional arrays.

Raises:
sherpa.utils.err.DataErr

If the data set is not 2D.

sherpa.utils.err.IdentifierErr

If the data set does not exist or a source expression has not been set.

See also

get_ratio_image

Return the data used by image_ratio.

get_resid_contour

Return the data used by contour_resid.

contour_ratio

Contour the ratio of data to model.

image_ratio

Display the ratio (data/model) for a data set in the image viewer.

Examples

Return the ratio data for the default data set:

>>> rinfo = get_ratio_contour()