Last modified: December 2025

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

get_xsabundances

Context: modeling

Synopsis

Return the abundance settings used by X-Spec.

Syntax

get_xsabundances(table: str | None = None)

Returns: dict[str, float]

Description


Examples

Example 1

>>> get_xsabundances()
{'H': 1.0, 'He': ...}

Example 2

>>> set_xsabud("angr")
>>> get_xsabundances()["Cu"]
1.619999956403717e-08
>>> get_xsabundances("felc")["Cu"]
0.0

PARAMETERS

The parameter for this function is:

Parameter Type information Definition
table optional The table to use. Leave as None to use the selected abundance table.

Return value

The return value from this function is:

abundances -- The keys are the element names (e.g. 'Fe') and the values are the abundances.

Changes in CIAO

Changed in CIAO 4.18

The optional table argument was added.

Added in CIAO 4.17

XSPEC version

CIAO 4.18 comes with support for version 12.14.0k of the XSPEC models. This can be checked with the following:

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

Bugs

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

See Also

info
show_xsabund
modeling
get_xsabund, set_xsabundances