get_kernel_contour

sherpa.astro.ui.get_kernel_contour(id: IdType | None = None, recalc: bool = True, copy: bool = True) → sherpa.plot.PSFKernelContour

Return the data used by contour_kernel.

Changed in version 4.19.0: The contour object is now copied by default. To get the previous behaviour set the copy attribute to False.

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_kernel (or get_kernel_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.

Returns:
psf_dataa sherpa.plot.PSFKernelContour instance
Raises:
sherpa.utils.err.DataErr

If the data set is not 2D.

sherpa.utils.err.IdentifierErr

If a PSF model has not been created for the data set.

See also

get_psf_contour

Return the data used by contour_psf.

contour_kernel

Contour the kernel applied to the model of an image data set.

contour_psf

Contour the PSF applied to the model of an image data set.

Examples

Return the contour data for the kernel for the default data set:

>>> kplot = get_kernel_contour()