| AHELP for CIAO 4.5 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.
- id - the id of the dataset to use; default is to show PSF information for all available datasets.
- outfile - name of the file in which to store the information
- clobber - a Boolean switch which indicates whether or not the 'outfile' should be overwritten, if the file already exists; default=False
The behavior of the screen output is determined by the user's $PAGER environment variable setting, which is usually a variant of "more." To disable paging within show_all() - i.e. print the entire contents, even if it scrolls offscreen - change this setting to "cat" before starting Sherpa:
unix% setenv PAGER cat unix% sherpa
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

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)