plot_psf
- sherpa.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_kernelfunction 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
Trueto use the values calculated by the last call toplot_psf. The default isFalse.overplot (bool, optional) – If
Truethen 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_plotReturn the data used by plot_psf.
get_default_idReturn the default data set identifier.
plotCreate one or more plot types.
plot_kernelPlot the 1D kernel applied to a data set.
set_psfAdd a PSF model to a data set.
set_xlinearNew plots will display a linear X axis.
set_xlogNew plots will display a logarithmically-scaled X axis.
set_ylinearNew plots will display a linear Y axis.
set_ylogNew 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()