Synopsis
Create a PSF model.
Syntax
load_psf(modelname, filename_or_model, *args, **kwargs)
Description
Create a PSF model representing either an array of data, read from a file, or a model component (such as a gaussian). The `set_psf` function is used to associate this model with a data set.
Examples
Example 1
Create a PSF model using a 2D gaussian:
>>> load_psf('psf1', gauss2d.gpsf)
>>> set_psf('psf1')
>>> gpsf.fwhm = 4.2
>>> gpsf.ellip = 0.2
>>> gpsf.theta = 30 * np.pi / 180
>>> image_psf()Example 2
Create a PSF model from the data in the ASCII file 'line_profile.dat' and apply it to the data set called 'bgnd':
>>> load_psf('pmodel', 'line_profile.dat')
>>> set_psf('bgnd', 'pmodel')PARAMETERS
The parameters for this function are:
| Parameter | Type information | Definition |
|---|---|---|
| modelname | str | The identifier for this PSF model. |
| filename_or_model | str or model instance | This can be the name of an ASCII file or a Sherpa model component. |
| args | Arguments for `unpack_data` if `filename_or_model` is a file. | |
| kwargs | Keyword arguments for `unpack_data` if `filename_or_model` is a file. |
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.