# X-ray DB: X-ray Reference Data in SQLite

XrayDB provides atomic data, characteristic X-ray energies, and X-ray cross sections for the elements in an SQLite3 database, `xraydb.sqlite`. This file can be used directly with SQLite [Hipp (2012)] or from the many programming language that have interfaces to SQLite. Some of the components of the database hold arrays of numbers, which are stored as JSON-encoded strings, and will need to be decoded from JSON to be used.

A Python module providing an interface to this database is also provided here.

The current version of the XrayDB database is 9.1, and the Python module is version 4.5.3.

Values in XrayDB use the most common SI units for X-ray work: Cross sections are in cm^2/gr, and energies are in eV. Energy-dependent data for cross-sections are typically most reliable between about 250 eV to about 250,000 eV. Elements from Z=1 to 92 are supported, with some data are included for elements between Z=93 and Z=98.

Some useful resources using this library include:

> - XrayDB Web App (xrayabsorption.org) is an interactive web applications to browse the data in this database and make plots of X-ray attenuation, scattering factors, mirror reflectivity, and more. Data tables and python code to generate that data are available for many of the calculations.

> - X-ray Periodic Table of the Elements for printable Poster-sized Periodic tables of X-ray energies.

> - XrayDB Github Page has data sources, code, development and issues.

> - PDF Version of this documentation

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. 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 the FFAST webpage (but on a finer energy grid, data from [Chantler (2016)]) are also included.

## Table of Contents

- Installation
  - Development Version
  - Testing
  - Copyright, Licensing, and Re-distribution
- X-ray Periodic Table of the Elements
- Example Calculations of X-ray properties of materials
  - X-ray attenuation by elements
  - \(\mu\) calculations for materials
  - X-ray flux calculations for ionization chambers and photodiodes
    - Effective Ionization Potentials of gases and semiconductors
    - Ion Chamber Flux calculations
    - `ionchamber_fluxes()`
  - X-ray mirror reflectivities
  - Darwin widths of monochromator crystals
- Using XrayDB from Python
  - The Python xraydb module
    - `get_xraydb()`
  - Atomic Properties
    - `atomic_number()`
    - `atomic_symbol()`
    - `atomic_mass()`
    - `atomic_name()`
    - `atomic_density()`
  - Elastic Scattering Factors
    - `f0()`
    - `f0_ions()`
  - X-ray Edges
    - `xray_edge()`
    - `xray_edges()`
    - `core_width()`
    - `guess_edge()`
  - X-ray Emission Lines
    - `xray_lines()`
    - `fluor_yield()`
    - `ck_probability()`
  - Absorption and Scattering Cross-sections
    - `mu_elam()`
    - `coherent_cross_section_elam()`
    - `incoherent_cross_section_elam()`
    - `chantler_energies()`
    - `f1_chantler()`
    - `f2_chantler()`
    - `mu_chantler()`
  - Chemical and Materials database
    - `chemparse()`
    - `validate_formula()`
    - `get_materials()`
    - `find_material()`
    - `get_material()`
    - `add_material()`
  - X-ray properties of materials
    - `material_mu()`
    - `material_mu_components()`
    - `xray_delta_beta()`
    - `darwin_width()`
    - `mirror_reflectivity()`
    - `ionization_potential()`
    - `ionchamber_fluxes()`
- Overview of Atomic and X-ray Data
  - Elements
  - Physical Units
  - X-ray Edges
  - X-ray Lines
  - Cross Sections
- Using the XrayDB xraydb.sqlite
  - Overall Database Schema
  - Version Table
  - Elements Table
  - Xray_Levels Table
  - Xray_Transitions Table
  - Photoabsorption Table
  - Scattering Table
  - Coster_Kronig Table
  - Waasmaier Table
  - KeskiRahkonen_Krause Table
  - Krause_Oliver Table
  - Compton Energies Table
  - Chantler Table
- References