Installation

The X-ray database is held in the SQLite3 file xraydb.sqlite. If you are looking for direct use with SQLite, you can download this from here: xraydb.sqlite.

To install the XrayDB Python module (which includes the sqlite database), use:

pip install xraydb

Depending on your system and Python installation, you may need administrative privileges or to use sudo to install to a system-installed Python environment.

Note

The Python module supports Python 3.9 and above.

Development Version

To work with the data sources or to add or modify data in the XrayDB, you will want to clone or download the full source code kit xrayDB on github.com which contains the current database, original source data, python module, and files for generating the Periodic Table posters. To get the latest development version, use:

git clone https://github.com/xraypy/XrayDB.git

Testing

There are a set of tests scripts for the Python interface that can be run with the pytest testing framework. These are located in the python/tests folder. These tests are automatically run as part of the development process. For any release or any master branch from the git repository, running pytest should run all of these tests to completion without errors or failures.

Acknowledgements

The project began with the data from the compilation of basic atomic properties and X-ray absorption edge energies, emission energies, and absorption cross sections from [Elam, Ravel, and Sieber (2002)], who assembled data from a several sources. The original code to store this with SQLite was written by Darren S. Dale (see https://github.com/praxes/elam_physical_reference) from CHESS. More data has been added from other sources. Energy widths of core holes for excited electronic levels from [Keski-Rahkonen and Krause (1974)] and [Krause and Oliver (1979)]. Elastic X-ray scattering data, \(f_0(q)\) is taken from [Waasmaier and Kirfel (1995)]. Resonant scattering cross sections \(f'(E)\) and \(f''(E)\) and absorption cross sections from [Chantler (2000)] as from https://www.nist.gov/pml/data/ffast/index.cfm, but on a finer energy grid been provided directly by Christopher T. Chantler [Chantler (2016)]. Nathan Whittington from U Tennessee and Roman Chernikov from BNL provided the code to calculate reflectivity of multilayer and coated mirrors. Code for better calculation of sample thicknesses for XAFS transmission samples was provided by easyXAFS. Most of the remaining code was written and is maintained by Matt Newville, though with contributions from many others.

Citing this work

To cite this work, please use https://zenodo.org/badge/latestdoi/205441660