get_psf_image

sherpa.astro.ui.get_psf_image(id: IdType | None = None, copy: bool = True) → sherpa.image.PSFImage

Return the data used by image_psf.

Changed in version 4.19.0: The image object is now copied by default. To get the previous behaviour set the copy attribute to False.

Parameters:
idint, str, or None, optional

The data set. If not given then the default identifier is used, as returned by get_default_id.

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.

Returns:
psf_dataa sherpa.image.PSFImage instance
Raises:
sherpa.utils.err.IdentifierErr

If a PSF model has not been created for the data set.

See also

get_kernel_image

Return the data used by image_kernel.

image_kernel

Display the 2D kernel for a data set in the image viewer.

image_psf

Display the 2D PSF model for a data set in the image viewer.

Examples

Return the image data for the PSF for the default data set:

>>> iplot = get_psf_image()
>>> iplot.y.shape
(175, 200)