contour¶
- sherpa.ui.contour(*args, **kwargs)¶
Create a contour plot for an image data set.
Create one or more contour plots, depending on the arguments it is set: a plot type, followed by an optional data set identifier, and this can be repeated. If no data set identifier is given for a plot type, the default identifier - as returned by get_default_id - is used. This is for 2D data sets.
Changed in version 4.12.2: Keyword arguments, such as alpha, can be sent to each plot.
- Raises
sherpa.utils.err.DataErr – The data set does not support the requested plot type.
See also
contour_dataContour the values of an image data set.
contour_fitContour the fit to a data set.
contour_fit_residContour the fit and the residuals to a data set.
contour_kernelContour the kernel applied to the model of an image data set.
contour_modelContour the values of the model, including any PSF.
contour_psfContour the PSF applied to the model of an image data set.
contour_ratioContour the ratio of data to model.
contour_residContour the residuals of the fit.
contour_sourceContour the values of the model, without any PSF.
get_default_idReturn the default data set identifier.
sherpa.astro.ui.set_coordSet the coordinate system to use for image analysis.
Notes
The supported plot types depend on the data set type, and include the following list. There are also individual functions, with
contour_prepended to the plot type, such as contour_data and the contour_fit_resid variant:dataThe data.
fitContours of the data and the source model.
fit_residTwo plots: the first is the contours of the data and the source model and the second is the residuals.
kernelThe kernel.
modelThe source model including any PSF convolution set by set_psf.
psfThe PSF.
ratioContours of the ratio image, formed by dividing the data by the model.
residContours of the residual image, formed by subtracting the model from the data.
sourceThe source model (without any PSF convolution set by set_psf).
The keyword arguments are sent to each plot (so care must be taken to ensure they are valid for all plots).
Examples
>>> contour('data')
>>> contour('data', 1, 'data', 2)
>>> contour('data', 'model')
>>> contour('data', 'model', 'fit', 'resid')
>>> contour('data', 'model', alpha=0.7)