get_kernel_plot
- sherpa.astro.ui.get_kernel_plot(id: IdType | None = None, recalc: bool = True, copy: bool = True) sherpa.plot.PSFKernelContour
Return the data used by plot_kernel.
Changed in version 4.19.0: The plot 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 toplot_kernel(orget_kernel_plot) are returned, otherwise the data is re-generated.- 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:
- kernel_plot
asherpa.plot.PSFKernelPlotinstance
- kernel_plot
- Raises:
sherpa.utils.err.IdentifierErrIf a PSF model has not been created for the data set.
See also
get_psf_plotReturn the data used by plot_psf.
plot_kernelPlot the 1D kernel applied to a data set.
plot_psfPlot the 1D PSF model applied to a data set.
Examples
Return the plot data and then create a plot with it:
>>> kplot = get_kernel_plot() >>> kplot.plot()