- sherpa.astro.ui.load_xstable_model(modelname, filename, etable=False)
Load a XSPEC table model.
Create an additive (‘atable’, ), multiplicative (‘mtable’, ), or exponential (‘etable’, ) XSPEC table model component. These models may have multiple model parameters.
Changed in version 4.16.0: Parameters with negative DELTA values are now made frozen, to match XSPEC. Support for models which use the ESCALE keyword has been added.
Changed in version 4.14.0: The etable argument has been added to allow exponential table models to be used.
modelname (str) – The identifier for this model component.
filename (str) – The name of the FITS file containing the data, which should match the XSPEC table model definition .
etable (bool, optional) – Set if this is an etable (as there’s no way to determine this from the file itself). Defaults to False.
Load a 1D convolution model.
Create a PSF model
Load a set of templates and use it as a model component.
Load tabular or image data and use it as a model component.
Set the source model expression for a data set.
Define the convolved model expression for a data set.
There is no support for table models that provide multiple spectra per parameter: that is, those with the NXFLTEXP keyword set.
NASA’s HEASARC site contains a link to community-provided XSPEC table models.
Load in the XSPEC table model from the file ‘bbrefl_1xsolar.fits’ and create a model component labelled ‘xtbl’, which is then used in a source expression:
>>> load_xstable_model('xtbl', 'bbrefl_1xsolar.fits') >>> set_source(xsphabs.gal * xtbl) >>> print(xtbl)
Load in an XSPEC etable model:
>>> load_xstable_model('etbl', 'etable.mod', etable=True)