plot_psf
- sherpa.astro.ui.plot_psf(id: IdType | None = None, replot=False, overplot=False, clearwindow=True, **kwargs) None
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, str, or None, 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 toplot_psf
. The default isFalse
.overplot (bool, optional) – If
True
then add the data to an existing plot, otherwise create a new plot. The default isFalse
.clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?
- 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()