get_resid_contour
- sherpa.astro.ui.get_resid_contour(id: IdType | None = None, recalc: bool = True, copy: bool = True) sherpa.plot.ResidContour
Return the data used by contour_resid.
Changed in version 4.19.0: The contour object is now copied by default. To get the previous behaviour set the
copyattribute toFalse.- Parameters:
- id
int,str,orNone,optional The data set. If not given then the default identifier is used, as returned by
get_default_id.- recalcbool,
optional If
Falsethen the results from the last call tocontour_resid(orget_resid_contour) are returned, otherwise the data is re-generated.- copybool,
optional Is the contour object copied before being returned? If so then the contour attributes will not be changed by multiple calls to this routine.
- id
- Returns:
- resid_data
asherpa.plot.ResidContourinstance The
yattribute contains the residual values and thex0andx1arrays contain the corresponding coordinate values, as one-dimensional arrays.
- resid_data
- Raises:
sherpa.utils.err.DataErrIf the data set is not 2D.
sherpa.utils.err.IdentifierErrIf the data set does not exist or a source expression has not been set.
See also
get_ratio_contourReturn the data used by contour_ratio.
get_resid_imageReturn the data used by image_resid.
contour_residContour the residuals of the fit.
image_residDisplay the residuals (data - model) for a data set in the image viewer.
Examples
Return the residual data for the default data set:
>>> rinfo = get_resid_contour()