Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/load_xstable_model.html
AHELP for CIAO 4.16 Sherpa

load_xstable_model

Context: modeling

Synopsis

Load a XSPEC table model.

Syntax

load_xstable_model(modelname, filename, etable=False)

modelname - str
filename - str
etable - bool, optional

Description

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


Examples

Example 1

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)

Example 2

Load in an XSPEC etable model:

>>> load_xstable_model('etbl', 'etable.mod', etable=True)

PARAMETERS

The parameters for this function are:

Parameter Definition
modelname The identifier for this model component.
filename The name of the FITS file containing the data, which should match the XSPEC table model definition [4].
etable Set if this is an etable (as there's no way to determine this from the file itself). Defaults to False.

Notes

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.

References

Changes in CIAO

Changed in CIAO 4.16

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 CIAO 4.14

The etable argument has been added to allow exponential table models to be used.

XSPEC version

CIAO 4.16 comes with support for version 12.13.1e of the XSPEC models. This can be checked with the following:

% python -c 'from sherpa.astro import xspec;
print(xspec.get_xsversion())'
12.13.1e

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

modeling
load_table_model