About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2008

URL: http://cxc.harvard.edu/sherpa4.1/set_psf.py.html
AHELP for Sherpa 4.1

set_psf

Context: py.sherpa

Synopsis

Convolve the PSF model with the source model

Syntax

set_psf( [id], psf )

Description

The set_psf command adds a PSF model to the instrument list and uses it to convolve the source model. The PSF kernel was loaded by the load_psf command ("ahelp load_psf").

  • id - the id of the dataset to use; if not given, uses the default dataset id (id=1 by default, see "ahelp get_default_id")
  • psf - the name of the PSF model

1-D PSF models

In a 1-D PSF model, a radial profile or 1-D model array is used to convolve (fold) the given source model using the Fast Fourier Transforms (FFTs). The kernel centroid must always be at the center of the extracted sub-image. Otherwise, systematic shifts will occur in best-fit positions of point sources, etc.

Output from an example 1-D PSF model named "psf1":

   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   psf1.kernel  frozen rprofile_rmid.fits
   psf1.size    frozen           38           38           38
   psf1.center  frozen           19           19           19
   psf1.radial  frozen            0            0            1
   psf1.norm    frozen            1            0            1

Parameters for a 1-D PSF Model

Name Description
kernel the input data file or array used for the PSF kernel
size x full-width of the subset of the PSF array to use in convolution
center x-direction center of the kernel
radial radial profile: 1=yes/0=no
norm renormalize the kernel? 1=yes/0=no (kernel mode)

The PSF data or model array is renormalized to 1 by default, unless the parameter 'norm' is 0; norm=0 produces the functionality of a 1-D kernel model. Renormalization is done by summing over all image pixels, regardless of the size value.

If the radial parameter is set to 1, the kernel array will be extended and its values reflected across the edge boundary. The resultant function will be symmetric. The default value is 0 to reduce some of the edge effects from convolution.

2-D PSF models

In a 2-D PSF model, an image or 2-D model array is used to convolve (fold) the given source model using the Fast Fourier Transforms (FFTs). The kernel centroid must always be at the center of the extracted sub-image. Otherwise, systematic shifts will occur in best-fit positions of point sources, etc.

Output from an example 2-D PSF model named "psf0":

    Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   psf0.kernel  frozen psf_image.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

Parameters for a 2-D PSF Model

Name Description
kernel the input image or array used for the PSF kernel
size (x,y) width of the subset of the PSF array to use in convolution
center (x,y) center of the kernel
radial [not applicable to 2-D PSFs]
norm renormalize the kernel? 1=yes/0=no (kernel mode)

The PSF image array or model array is renormalized to 1 by default, unless the parameter 'norm' is 0; norm=0 produces the functionality of a 2-D kernel model. Renormalization is done by summing over all image pixels, regardless of the size value.

Example 1

sherpa> load_psf("psf1","psf256.fits")
sherpa> set_psf(psf1)

A PSF model is created from the file psf256.fits, then is set as the PSF for the default dataset.

Example 2

sherpa> load_psf("psf", "psf_0.25pix.fits")
sherpa> set_psf("src", psf )

The PSF model created from psf_0.25pix.fits is set for dataset "src".

Bugs

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

Last modified: December 2008



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.