Last modified: December 2024

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/get_xsabund.html
Jump to: · Examples · PARAMETERS · XSPEC version · Bugs · See Also


AHELP for CIAO 4.17 Sherpa

get_xsabund

Context: modeling

Synopsis

Return the X-Spec abundance setting or elemental abundance.

Syntax

get_xsabund(element=None)

Examples

Example 1

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

>>> get_xsabund()
'angr'

Example 2

Return the abundance of Helium:

>>> get_xsabund('He')
0.09769999980926514

Example 3

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()
'file'

PARAMETERS

The parameter for this function is:

Parameter Type information Definition
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.

Return value

The return value from this function is:

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 or vector. A numeric value is returned when an element name is given. This value is the elemental abundance relative to H.

XSPEC version

CIAO 4.17 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_xsabundances, set_xsabund, set_xsabundances