sherpa.astro.ui.load_conv(modelname, filename_or_model, *args, **kwargs)

The convolution model can be defined either by a data set, read from a file, or an analytic model, using a Sherpa model instance. A source model can be convolved with this model by including modelname in the set_model call, using the form:

modelname(modelexpr)

Parameters: 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.

delete_psf()
Delete the PSF model for a data set.
load_psf()
Create a PSF model.
load_table_model()
Load tabular data and use it as a model component.
set_full_model()
Define the convolved model expression for a data set.
set_model()
Set the source model expression for a data set.
set_psf()
Add a PSF model to a data set.

Examples

Create a 1D data set, assign a box model - which is flat between the xlow and xhi values and zero elsewhere - and then display the model values. Then add in a convolution component by a gaussian and overplot the resulting source model with two different widths.

>>> dataspace1d(-10, 10, 0.5, id='tst', dstype=Data1D)
>>> set_source('tst', box1d.bmdl)
>>> bmdl.xlow = -2
>>> bmdl.xhi = 3
>>> plot_source('tst')

>>> load_conv('cmodel', 'conv.dat')