contour_resid

sherpa.astro.ui.contour_resid(id=None, **kwargs)

Contour the residuals of the fit.

The residuals are formed by subtracting the current model - including any PSF - from the data. The preferences are the same as contour_data.

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

  • replot (bool, optional) – Set to True to use the values calculated by the last call to contour_resid. The default is False.

  • overcontour (bool, optional) – If True then add the data to an exsiting plot, otherwise create a new contour plot. The default is False.

See also

get_resid_contour()

Return the data used by contour_resid.

get_default_id()

Return the default data set identifier.

contour()

Create one or more plot types.

sherpa.astro.ui.set_coord()

Set the coordinate system to use for image analysis.

Examples

Plot the residuals from the default data set:

>>> contour_resid()

Overplot the residuals on the model:

>>> contour_model('img')
>>> contour_resid('img', overcontour=True)