show_xsabund

sherpa.astro.ui.show_xsabund(outfile=None, clobber: bool = False) → None

Show the XSPEC abundance values.

Added in version 4.17.0.

Parameters:
outfilestr, file-like, or None, optional

If not given the results are displayed to the screen, otherwise it is the file name (string) or file-like object to write the results to.

clobberbool, optional

If outfile is not None, then this flag controls whether an existing file can be overwritten (True) or if it raises an exception (False, the default setting).

See also

get_xsabund, get_xsabundances, set_xsabund, set_xsabundances

Examples

Display the current abundance table and values:

>>> show_xsabund()
Solar Abundance Table:
angr  Anders E. & Grevesse N. Geochimica et Cosmochimica Acta 53, 197 (1989)
  H : 1.000e+00  He: 9.770e-02  Li: 1.450e-11  Be: 1.410e-11  B : 3.980e-10
  C : 3.630e-04  N : 1.120e-04  O : 8.510e-04  F : 3.630e-08  Ne: 1.230e-04
  Na: 2.140e-06  Mg: 3.800e-05  Al: 2.950e-06  Si: 3.550e-05  P : 2.820e-07
  S : 1.620e-05  Cl: 3.160e-07  Ar: 3.630e-06  K : 1.320e-07  Ca: 2.290e-06
  Sc: 1.260e-09  Ti: 9.770e-08  V : 1.000e-08  Cr: 4.680e-07  Mn: 2.450e-07
  Fe: 4.680e-05  Co: 8.320e-08  Ni: 1.780e-06  Cu: 1.620e-08  Zn: 3.980e-08

The output can be written to a file or a file-like instance, such as a StringIO object:

>>> from io import StringIO
>>> buffer = StringIO()
>>> show_xsabund(buffer)
>>> txt = buffer.getvalue()