    Create a PSF model.

load_psf(modelname, filename_or_model, *args, **kwargs)
modelname - str
filename_or_model - str or model instance

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.

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()

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
Definition
modelname
The identifier for this PSF model.
filename_or_model
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.

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

December 2023