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
If you want to use XrayDB from Python, install the XrayDB Python module (which includes the sqlite database), with:
pip install xraydb
If you are using Anaconda Python, you can also install with:
conda install -c gsecars xraydb
Depending on your system and Python installation, you may need administrative privileges to install any python library. For many linux and Mac OS X systems, you may need to use sudo.
The Python module supports Python 3.5 and above.
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
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
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
Copyright, Licensing, and Re-distribution¶
Public Domain To the extent possible, the data, code, and documentation here are placed in the public domain. No claim of copyright is made by the authors and no restrictions of any kind placed on the use of the work here. The original sources of the data are mostly based on published works with the clear intent of providing data to the general public. Some of the datasets have may not have clear statements of copyright or license, but have been freely available for many years. The work here is a compilation and reformatting of those datasets. If you use these resources and wish to cite the original data source, please see the documentation for more details.