- sherpa.astro.ui.set_full_model(id, model=None)
Define the convolved model expression for a data set.
The model expression created by
set_modelcan be modified by “instrumental effects”, such as a PSF set by
set_full_modelfunction is for when this is not sufficient, and full control is needed. An example of when this would be if different PSF models should be applied to different source components.
id (int or str, optional) – The data set containing the source expression. If not given then the default identifier is used, as returned by
model (str or sherpa.models.Model object) – This defines the model used to fit the data. It can be a Python expression or a string version of it.
The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the
modelparameter. If given two un-named arguments, then they are interpreted as the
Some functions - such as
plot_source- may not work for model expressions created by
Apply different PSFs to different components, as well as an unconvolved component:
>>> load_psf("psf1", "psf1.dat") >>> load_psf("psf2", "psf2.dat") >>> smodel = psf1(gauss2d.src1) + psf2(beta2d.src2) + const2d.bgnd >>> set_full_model("src", smodel)