read_xstable_model
- 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.
- 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.
- Returns
tablemodel
- Return type
XSTableModel instance
References
- 1
https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelAtable.html
- 2
https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelMtable.html
- 3
https://heasarc.gsfc.nasa.gov/docs/xanadu/xspec/manual/XSmodelMtable.html
- 4
https://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/general/ogip_92_009/ogip_92_009.html
Examples
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)