plot_kernel¶
-
sherpa.astro.ui.
plot_kernel
(id=None, **kwargs)¶ Plot the 1D kernel applied to a data set.
The plot_psf function shows the full PSF, from which the kernel is derived.
Parameters: - id (int or str, optional) – The data set. 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 plot_kernel. The default isFalse
. - overplot (bool, optional) – If
True
then add the data to an exsiting plot, otherwise create a new plot. The default isFalse
.
Raises: sherpa.utils.err.IdentifierErr
– If a PSF model has not been created for the data set.See also
get_kernel_plot()
- Return the data used by plot_kernel.
get_default_id()
- Return the default data set identifier.
plot()
- Create one or more plot types.
plot_psf()
- Plot the 1D PSF model applied to a data set.
set_psf()
- Add a PSF model to a data set.
set_xlinear()
- New plots will display a linear X axis.
set_xlog()
- New plots will display a logarithmically-scaled X axis.
set_ylinear()
- New plots will display a linear Y axis.
set_ylog()
- New plots will display a logarithmically-scaled Y axis.
Examples
Create a model (a step function) that is convolved by a gaussian, and display the kernel overplotted on the PSF:
>>> dataspace1d(1, 10, step=1, dstype=Data1D) >>> set_model(steplo1d.stp) >>> stp.xcut = 4.4 >>> load_psf('psf1', gauss1d.gline) >>> set_psf('psf1') >>> gline.fwhm = 1.2 >>> plot_psf() >>> plot_kernel(overplot=True)