#!/usr/bin/env python # this script requires Python3, numpy, scipy, matplotlib, and xraydb modules. Use: # pip install xraydb scipy matplotlib import numpy as np import matplotlib.pyplot as plt import xraydb # X-ray propertie elem = 'Al' print('# Atomic Symbol: %s ' % elem) print('# Atomic Number: %d ' % xraydb.atomic_number(elem)) print('# Atomic Moss: %.4f ' % xraydb.atomic_mass(elem)) print('# X-ray Edges:') print('# Edge Energy Width FlourYield EdgeJump') e_fmt = ' %5s %9.1f %7.4f %8.5f %8.5f' l_fmt = '%7s %9.1f %8.5f %11s' widths = dict(xraydb.core_width(elem)) for key, val in xraydb.xray_edges(elem).items(): wid = widths.get(key, 0) print(e_fmt % (key, val.energy, wid, val.fyield, val.jump_ratio)) print('# X-ray Lines:') print('# Line Energy Intensity Levels') for key, val in xraydb.xray_lines(elem).items(): levels = '%s-%s' % (val.initial_level, val.final_level) print(l_fmt % (key, val.energy, val.intensity, levels))