plot_psf

sherpa.ui.plot_psf(id=None, **kwargs)

Plot the 1D PSF model applied to a data set.

The plot_kernel function shows the data used to convolve the model.

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_psf. The default is False.
  • overplot (bool, optional) – If True then add the data to an exsiting plot, otherwise create a new plot. The default is False.
Raises:

sherpa.utils.err.IdentifierErr – If a PSF model has not been created for the data set.

See also

get_psf_plot()
Return the data used by plot_psf.
get_default_id()
Return the default data set identifier.
plot()
Create one or more plot types.
plot_kernel()
Plot the 1D kernel 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 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()