Last modified: December 2019

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/show_psf.html
AHELP for CIAO 4.12 Sherpa v1

show_psf

Context: psfs

Synopsis

Display the PSF model

Syntax

show_psf([id=None, outfile=None, clobber=False] )

Description

The show_psf function displays the PSFs that have been defined in Sherpa. To view the filtered kernel which will be used in the convolution, use the show_kernel command.

What is the difference between the PSF and the kernel?

The point spread function (PSF) is defined by the full (unfiltered) PSF image loaded into Sherpa or the PSF model expression evaluated over the full range of the dataset; both types of PSFs are established with the load_psf() command. The kernel is the subsection of the PSF image or model which is used to convolve the data. This subsection is created from the PSF when the size and center of the kernel are defined by the command set_psf(). While the kernel and PSF might be congruent, defining a smaller kernel helps speed the convolution process by restricting the number of points within the PSF that Sherpa must evaluate.


Example

sherpa> load_data("center_box_0.25pix.fits")
sherpa> load_psf("psf0","psf_f1_norm_0.25pix.fits")
sherpa> set_psf(psf0)

sherpa> show_psf
PSF Model: 1
name = psf_f1_norm_0.25pix.fits
x0 = Float64[65536]
x1 = Float64[65536]
y = Float64[65536]
shape = (256, 256)
staterror = None
syserror = None
sky = physical
crval = [ 4064.5 4026.5]
crpix = [ 0.5 0.5]
cdelt = [ 0.25 0.25]
eqpos = world
crval = [ 248.6211 70.531 ]
crpix = [ 4096.5 4096.5]
cdelt = [-0.0001 0.0001]
crota = 0
epoch = 2000
equinox = 2000
coord = logical

sherpa> show_kernel
PSF Kernel: 1
psfmodel.psf0
Param Type Value Min Max Units
----- ---- ----- --- --- -----
psf0.kernel frozen psf_f1_norm_0.25pix.fits
psf0.size frozen (256, 256) (256, 256) (256, 256)
psf0.center frozen (128, 128) (128, 128) (128, 128)
psf0.radial frozen 0 0 1
psf0.norm frozen 1 0 1

sherpa> psf0.size = [32,32]
sherpa> psf0.center = [128,129]

A PSF is loaded from file and assigned to the first dataset with "set_psf". The first pair of "show_psf" and "show_kernel" commands indicate that the PSF and the kernel are identical at this point.

Finally, the size and center of the psf are set. If we run the "show" commands again, we can see that the original PSF data are unaltered. The kernel, however, is now defined as a subsection of the full PSF with the size (32,32) and center (128,129) that were specified.

sherpa> show_psf
PSF Model: 1
name      = psf_f1_norm_0.25pix.fits
x0        = Float64[65536]
x1        = Float64[65536]
y         = Float64[65536]
shape     = (256, 256)
staterror = None
syserror  = None
sky       = physical
 crval    = [ 4064.5  4026.5]
 crpix    = [ 0.5  0.5]
 cdelt    = [ 0.25  0.25]
eqpos     = world
 crval    = [ 248.6211   70.531 ]
 crpix    = [ 4096.5  4096.5]
 cdelt    = [-0.0001  0.0001]
 crota    = 0
 epoch    = 2000
 equinox  = 2000
coord     = logical
	sherpa> show_kernel
PSF Kernel: 1
psfmodel.psf0
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   psf0.kernel  frozen psf_f1_norm_0.25pix.fits
   psf0.size    frozen     (32, 32)     (32, 32)     (32, 32)
   psf0.center  frozen   (128, 129)   (128, 129)   (128, 129)
   psf0.radial  frozen            0            0            1
   psf0.norm    frozen            1            0            1

Changes in CIAO 4.12

PAGER environment variable is no-longer used

Paging of the screen output is now handled by Python rather than using an external tool defined by the PAGER environment variable. This means that paged output should now appear in Jupyter notebooks.


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

psfs
contour_kernel, contour_psf, delete_psf, get_kernel, get_psf, image_kernel, image_psf, load_conv, load_psf, plot_kernel, plot_psf, set_psf, show_kernel