get_resid_image
- sherpa.astro.ui.get_resid_image(id: IdType | None = None, copy: bool = True) sherpa.image.ResidImage
Return the data used by image_resid.
Changed in version 4.19.0: The image 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.- copybool,
optional Is the plot object copied before being returned? If so then the plot attributes will not be changed by multiple calls to this routine.
- id
- Returns:
- resid_img
asherpa.image.ResidImageinstance The
yattribute contains the residual values as a 2D NumPy array.
- resid_img
- 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_imageReturn the data used by image_ratio.
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_image()