XrayDB provides reference data for X-ray interactions with matter, including atomic scattering factors, X-ray absorption cross-sections, fluorescence yields, and more. Version 4.5.8 supports Python >=3.9. Release cadence is irregular, with occasional minor updates.
pip install xraydbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage of XrayDB to fetch anomalous scattering factors and absorption cross-sections.
None (expected behavior). Alternatively, use system database by setting environment variables or installing separately.
Delete the cache directory: rm -rf ~/.xraydb
Use from xraydb import XrayDB; db = XrayDB(); db.mu('Fe', 7000) instead.Set an alternative cache directory with XRAYDB_CACHE environment variable or pass cache_dir to XrayDB().
Delete the cache: rm -rf ~/.xraydb and re-run your script.
Run your script again; the download will start automatically. Alternatively, set XRAYDB_CACHE to a writable directory.
Use the XrayDB class: from xraydb import XrayDB; db = XrayDB(); results = db.mu(...)
Use valid element symbols e.g., 'Fe', 'Cu'. Case-sensitive.
No dependency data recorded yet.