Last modified: 18 December 2023

How do I change the AtomDB version used by XSPEC Apec models?


The default version of the AtomDB atomic database used by the XSPEC Apec models - such as xsapec, xsbapec, xsbvapec and xsvapec - depends on the version of XSPEC used, which can be checked with the following:

sherpa> python -c 'from sherpa.astro import xspec; print(xspec.get_xsversion());'
12.10.1s

The default ATOMDB version used by the XSPEC models in CIAO 4.16 is 3.0.9 (please check the XSPEC documentation).

Unfortunately there is no way to check the default version value, but you can set it by changing the APECROOT variable with the set_xsxset command, as described elsewhere.

Using the default version

To get back to the default version of the AtomDB, clear the APECROOT setting by saying:

sherpa> set_xsxset("APECROOT", "")

WARNING

The set_xsxset call to change the APECROOT value needs to be made each time Sherpa is used (analagous to how changes to the XSPEC abundance setting, using set_xsabund, must be made each session).

Debugging XSPEC models

To see what files the XSPEC models are trying to load, call

sherpa> set_xschatter(50)

before trying to evaluate any model (many XSPEC models cache file checks so you can only find out problems the first time the model is evaluated).