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.17 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", "")
Using a Different AtomDB Version
If the AtomDB files are stored in the ${ASCDS_INSTALL}/spectral/modelData directory, a different version from the default APEC files may be specified:
sherpa> set_xsxset("APECROOT", "3.1.2") sherpa> set_xsxset("NEIAPECROOT", "3.1.2") sherpa> set_xsxset("NEIVERS", "3.1.0")
As discussed in the AtomDB release notes, for APEC models, the APECROOT switch controls the equilibrium continuum and line data files, NEIAPECROOT switch is associated with the non-equilibrium ionization data files, and the NEIVERS switch controls the version of the eigenvectors file that the non-equilibrium ionization data is dependent upon.
The APECROOT and NEIAPECROOT switches can also be used if the atomic data sets are in a separate directory by specifying the path and files' root name. For example, if AtomDB 3.1.3 is stored in a directory /path/to/atomdb3/atomdb_v3.1.3:
unix% ls /path/to/atomdb3/atomdb_v3.1.3 apec_coco.fits apec_nei.par apec_v3.1.3_nei_comp.fits filemap apec_line.fits apec.par apec_v3.1.3_nei_line.fits filemap_v3.1.3 apec_linelist.fits apec_v3.1.3_coco.fits apec_v3.1.3_nei.par Release_Notes.txt apec_nei_comp.fits apec_v3.1.3_line.fits apec_v3.1.3.par VERSION apec_nei_line.fits apec_v3.1.3_linelist.fits eigen_v3.1.0.fits
then the APEC switches can be set as:
sherpa> set_xsxset("APECROOT", "/path/to/atomdb3/atomdb_v3.1.3/apec_v3.1.3") sherpa> set_xsxset("NEIAPECROOT", "/path/to/atomdb3/atomdb_v3.1.3/apec_v3.1.3_nei") sherpa> set_xsxset("NEIVERS", "3.1.0")
albeit a copy of the eigenvectors file (or a link to it) must be present in the ${ASCDS_INSTALL}/spectral/modelData directory since the NEIVERS switch presently only supports version numbering.
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).