radioactivedecay 用于放射性核素衰变的简单分析计算的开源包,支持放射性核素、亚稳态和分支衰变的衰变链。
https://github.com/radioactivedecay/radioactivedecay
安装:pip install radioactivedecay
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| import radioactivedecay as rd import matplotlib.pyplot as plt
ncld = rd.Nuclide('U-235') half = ncld.half_life('readable') prog = ncld.progeny() frac = ncld.branching_fractions() mode = ncld.decay_modes()
print(ncld, mode, prog, frac, half, sep='\n')
ncld.plot()
NUCs = ['U-235', 'Pu-239']
for name in NUCs: ncld = rd.Nuclide(name) half = ncld.half_life('readable') prog = ncld.progeny() frac = ncld.branching_fractions() mode = ncld.decay_modes() print(ncld, mode, prog, frac, half, sep='\n')
fig, ax = ncld.plot() fig.savefig(f'decay_chains_{name}.png', dpi=300)
|