Last modified: December 2014

AHELP for CIAO 4.12 Sherpa v1


Context: modeling


Set XSPEC solar abundance




These commands change or return the current elemental abundance table used in X-Spec plasma-code models.


This is equivalent to the X-Spec abund command, and it sets the elemental abundance table. The command accepts a single string argument - given in the table below - or the name of a file. If the latter, the file should be in ASCII format, containing a single column of 30 float-type abundance values, all relative to Hydrogen.

Available Abundances

Name Description
angr default value; Anders E. & Grevesse N. (1989, Geochimica et Cosmochimica Acta 53, 197)
aspl Asplund M., Grevesse N., Sauval A.J. & Scott P. (2009, ARAA, 47, 481)
feld Feldman U. (1992, Physica Scripta 46, 202)
aneb Anders E. & Ebihara (1982, Geochimica et Cosmochimica Acta 46, 2363)
grsa Grevesse, N. & Sauval, A.J. (1998, Space Science Reviews 85, 161)
wilm Wilms, Allen & McCray (2000, ApJ 542, 914)
lodd Lodders, K (2003, ApJ 591, 1220)


When called with no argument, the get_xsabund command returns a description of the current elemental table setting. If called with the name of an element, it returns the current abundance setting (if the element is recognized).

XSPEC version

This information is taken from the XSPEC User's Guide. Version 12.10.1n of the XSPEC models is supplied with CIAO 4.12.


Example 1

sherpa> get_xsabund()
sherpa> set_xsabund("lodd")
Solar Abundance Vector set to lodd: Lodders, K. ApJ 591, 1220 (2003)

The current abundance setting is retrieved ("angr", the default). It is then changed to "lodd".

Example 2

sherpa> set_xsabund('angr')
sherpa> get_xsabund('Ar')
sherpa> get_xsabund('Ni')
sherpa> set_xsabund('grsa')
sherpa> get_xsabund('Ar')
sherpa> get_xsabund('Ni')

The abundance values of Ar and Ni are returned for the angr and grsa tables (the output for the set_xsabund commands has been ignored).

Example 3

sherpa> set_xsabund("myabund.dat")

Solar abundances are set with a user-defined ASCII file containing a column of float-type solar abundance values.

Abundance Tables

All abundances are number relative to H.

Abundance tables for set_xsabund

Element angr aspl feld aneb grsa wilm lodd
H 1.00e+0 1.00e+0 1.00e+0 1.00e+0 1.00e+0 1.00e+0 1.00e+0
He 9.77e-2 8.51e-02 9.77e-2 8.01e-2 8.51e-2 9.77e-2 7.92e-2
Li 1.45e-11 1.12e-11 1.26e-11 2.19e-9 1.26e-11 0.00 1.90e-9
Be 1.41e-11 2.40e-11 2.51e-11 2.87e-11 2.51e-11 0.00 2.57e-11
B 3.98e-10 5.01e-10 3.55e-10 8.82e-10 3.55e-10 0.00 6.03e-10
C 3.63e-4 2.69e-04 3.98e-4 4.45e-4 3.31e-4 2.40e-4 2.45e-4
N 1.12e-4 6.76e-05 1.00e-4 9.12e-5 8.32e-5 7.59e-5 6.76e-5
O 8.51e-4 4.90e-04 8.51e-4 7.39e-4 6.76e-4 4.90e-4 4.90e-4
F 3.63e-8 3.63e-08 3.63e-8 3.10e-8 3.63e-8 0.00 2.88e-8
Ne 1.23e-4 8.51e-05 1.29e-4 1.38e-4 1.20e-4 8.71e-5 7.41e-5
Na 2.14e-6 1.74e-06 2.14e-6 2.10e-6 2.14e-6 1.45e-6 1.99e-6
Mg 3.80e-5 3.98e-05 3.80e-5 3.95e-5 3.80e-5 2.51e-5 3.55e-5
Al 2.95e-6 2.82e-06 2.95e-6 3.12e-6 2.95e-6 2.14e-6 2.88e-6
Si 3.55e-5 3.24e-05 3.55e-5 3.68e-5 3.55e-5 1.86e-5 3.47e-5
P 2.82e-7 2.57e-07 2.82e-7 3.82e-7 2.82e-7 2.63e-7 2.88e-7
S 1.62e-5 1.32e-05 1.62e-5 1.89e-5 2.14e-5 1.23e-5 1.55e-5
Cl 1.88e-7 3.16e-07 1.88e-7 1.93e-7 3.16e-7 1.32e-7 1.82e-7
Ar 3.63e-6 2.51e-06 4.47e-6 3.82e-6 2.51e-6 2.57e-6 3.55e-6
K 1.32e-7 1.07e-07 1.32e-7 1.39e-7 1.32e-7 0.00 1.29e-7
Ca 2.29e-6 2.19e-06 2.29e-6 2.25e-6 2.29e-6 1.58e-6 2.19e-6
Sc 1.26e-9 1.41e-09 1.48e-9 1.24e-9 1.48e-9 0.00 1.17e-9
Ti 9.77e-8 8.91e-08 1.05e-7 8.82e-8 1.05e-7 6.46e-8 8.32e-8
V 1.00e-8 8.51e-09 1.00e-8 1.08e-8 1.00e-8 0.00 1.00e-8
Cr 4.68e-7 4.37e-07 4.84e-7 4.93e-7 4.68e-7 3.24e-7 4.47e-7
Mn 2.45e-7 2.69e-07 2.45e-7 3.50e-7 2.45e-7 2.19e-7 3.16e-7
Fe 4.68e-5 3.16e-05 3.24e-5 3.31e-5 3.16e-5 2.69e-5 2.95e-5
Co 8.60e-8 9.77e-08 8.60e-8 8.27e-8 8.32e-8 8.32e-8 8.13e-8
Ni 1.78e-6 1.66e-06 1.78e-6 1.81e-6 1.78e-6 1.12e-6 1.66e-6
Cu 1.62e-8 1.55e-08 1.62e-8 1.89e-8 1.62e-8 0.00 1.82e-8
Zn 3.98e-8 3.63e-08 3.98e-8 4.63e-8 3.98e-8 0.00 4.27e-8


For a list of known bugs and issues with the XSPEC models, please visit the XSPEC bugs page.

To check the XSPEC version used by Sherpa, use the get_xsversion routine from the xspec module:

sherpa> from sherpa.astro.xspec import get_xsversion
sherpa> get_xsversion()

See Also

set_conf_opt, set_covar_opt, set_proj_opt
get_bkg_plot, set_areascal, set_arf, set_backscal, set_bkg, set_coord, set_counts, set_data, set_exposure, set_grouping, set_quality, set_rmf, set_staterror, set_syserror
list_model_ids, show_bkg_model, show_bkg_source
set_iter_method, set_iter_method_opt, set_method, set_method_opt
add_model, add_user_pars, clean, create_model_component, delete_bkg_model, delete_model, delete_model_component, get_model, get_model_autoassign_func, get_model_component, get_model_component_image, get_model_component_plot, get_model_plot, get_num_par, get_order_plot, get_par, get_pileup_model, get_source, get_source_component_image, get_source_component_plot, image_model, image_model_component, image_source, image_source_component, integrate, link, load_table_model, load_template_model, load_user_model, normal_sample, reset, save_model, save_source, set_bkg_model, set_full_model, set_model_autoassign_func, set_par, set_pileup_model, set_source, set_xscosmo, set_xsxsect, set_xsxset, t_sample, uniform_sample
get_lrt_plot, get_lrt_results, get_pvalue_plot, get_pvalue_results, plot_cdf, plot_model, plot_model_component, plot_pdf, plot_pvalue, plot_scatter, plot_source, plot_source_component, plot_trace
delete_psf, load_conv
save_delchi, save_resid
set_prior, set_sampler, set_sampler_opt, set_stat
calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, eqwidth, set_analysis, set_default_id
contour_model, contour_ratio, contour_resid, get_ratio, get_resid, image_setregion