load_xstable_model

sherpa.astro.ui.load_xstable_model(modelname, filename, etable=False)

Load a XSPEC table model.

Create an additive (‘atable’, 1), multiplicative (‘mtable’, 2), or exponential (‘etable’, 3) XSPEC table model component. These models may have multiple model parameters.

Changed in version 4.14.0: The etable argument has been added to allow exponential table models to be used.

Parameters
  • 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 4.

  • etable (bool, optional) – Set if this is an etable (as there’s no way to determine this from the file itself). Defaults to False.

Raises

sherpa.utils.err.ImportErr – If XSPEC support is not enabled.

See also

load_conv

Load a 1D convolution model.

load_psf

Create a PSF model

load_template_model

Load a set of templates and use it as a model component.

load_table_model

Load tabular or image data and use it as a model component.

set_model

Set the source model expression for a data set.

set_full_model

Define the convolved model expression for a data set.

Notes

NASA’s HEASARC site contains a link to community-provided XSPEC table models 5.

References

1

http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelAtable.html

2

http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelMtable.html

3

http://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelEtable.html

4

http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/general/ogip_92_009/ogip_92_009.html

5

https://heasarc.gsfc.nasa.gov/xanadu/xspec/newmodels.html

Examples

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)