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
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_kernel(orget_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.
- id
- Returns:
- psf_data
asherpa.plot.PSFKernelContourinstance
- psf_data
- Raises:
sherpa.utils.err.DataErrIf the data set is not 2D.
sherpa.utils.err.IdentifierErrIf a PSF model has not been created for the data set.
See also
get_psf_contourReturn the data used by contour_psf.
contour_kernelContour the kernel applied to the model of an image data set.
contour_psfContour 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()