sherpa.astro.xspec.get_xsabund(element=None)[source] [edit on github]

Return the X-Spec abundance setting or elemental abundance.


element (str, optional) – When not given, the abundance table name is returned. If a string, then it must be an element name from: ‘H’, ‘He’, ‘Li’, ‘Be’, ‘B’, ‘C’, ‘N’, ‘O’, ‘F’, ‘Ne’, ‘Na’, ‘Mg’, ‘Al’, ‘Si’, ‘P’, ‘S’, ‘Cl’, ‘Ar’, ‘K’, ‘Ca’, ‘Sc’, ‘Ti’, ‘V’, ‘Cr’, ‘Mn’, ‘Fe’, ‘Co’, ‘Ni’, ‘Cu’, ‘Zn’. Case is important.


val – When element is None, the abundance table name is returned (see set_xsabund); the string ‘file’ is used when the abundances were read from a file. A numeric value is returned when an element name is given. This value is the elemental abundance relative to H.

Return type

str or float

See also



Return the current abundance setting, which in this case is ‘angr’, the default value for X-Spec:

>>> get_xsabund()

The set_xsabund function has been used to read in the abundances from a file, so the routine now returns the string ‘file’:

>>> set_xsabund('abund.dat')
>>> get_xsabund()
>>> get_xsabund('He')