sherpa.astro.xspec.read_xstable_model(modelname, filename, etable=False)[source] [edit on github]

Create a XSPEC table model.

XSPEC additive (atable, [1]), multiplicative (mtable, [2]), and exponential (etable, [3]) table models are supported.

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 [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.



Return type:

XSTableModel instance



Load in the XSPEC table model from the file ‘bbrefl_1xsolar.fits’ and create a model labelled ‘xmdl’, which is then returned:

>>> mdl = read_xstable_model('xmdl', 'bbrefl_1xsolar.fits')
>>> print(mdl)

When the file is an etable model the etable parameter must be set:

>>> emdl = read_xstable_model('xmdl', 'etable.fits', etable=True)
>>> print(emdl)