Description
Describe the Bug
The gamma() method in pyne.material.Material appears to return gamma-ray intensities that are approximately 100 times higher than expected , based on known decay data for isotopes such as Cs-137 and I-131 (e.g., at 364 keV for I-131)
This discrepancy may affect any downstream analysis relying on accurate gamma-ray intensity values, such as dose rate calculations or spectroscopy simulations
To Reproduce
the following code highlights the issue
from pyne.material import Material
from pyne import data,nucname
import math
#
Av = 6.0221e23
Isotope = "I131" # I131 or Cs137
decay_period = 1*24*3600
print("*"*80)
print(f"Selected isotope is {Isotope}")
print("-"*50)
Infos = {
"Cs137":(661.657,0.851), # 85.1 % or ~ 94.6%*89.98 % at 662 keV
"I131":(364.489,0.8124),# 81.24% from janis
}
gamma_energy = Infos[Isotope][0] #if False else 636.989# keV
gamma_yeild = Infos[Isotope][1] #1563 if False else .072679985#
mass = 5 #gram
atomic_mass = data.atomic_mass(Isotope)
decay_constant = data.decay_const(Isotope)
number_of_atoms = Av*mass/atomic_mass
activity = number_of_atoms*decay_constant*math.exp(-decay_constant*decay_period)
gamma_intensity = gamma_yeild*activity
mat0 = Material({Isotope:1},mass)
mat = mat0.decay(decay_period)
gm_intensity2 = None
for i,(e,_) in enumerate(mat.gammas()):
#continue
if e==gamma_energy:
gm_intensity2 = mat.gammas()[i][1]*Av*mat.mass/mat.molecular_mass()
break
else:
for i,(e,v) in enumerate(mat.gammas()):
print(i,e,v)
print("Gamma intensity rate ...")
print(f"Direct Method {gamma_intensity:10.8g} gamma/s")
print(f"PyNE Method {gm_intensity2:10.8g} gamma/s")
print("-"*50)
ZAID = nucname.id(Isotope)
for gamma_e,gamma_i,gamma_info_mat in zip(data.gamma_energy(ZAID),data.gamma_photon_intensity(ZAID),mat.gammas()):
if gamma_e[0]==gamma_energy:
print(f"from pyne.data -> Gamma Energy:{gamma_e[0]} -> Yeild:{gamma_i[0]} compare to {gamma_yeild} from Janis ")
print(f"gamma intensity {gamma_i[0]*activity:10.8g} compared to {gamma_intensity:10.8g} direct method")
print()
Expected Behavior
The gamma() method should return gamma-ray intensities consistent with established decay data (e.g., from ENSDF), such as:
I-131 : ~81% intensity at 364 keV
Cs-137 : ~85% intensity at 662 keV
Instead, the returned values appear to be scaled incorrectly, suggesting a possible normalization error or incorrect use of internal units or branching ratios. moreover, when use pyne.data, the gamma_photon_intensity() returns wrong data for some isotopes namely I-131 at 364.5 keV; it provides 100.0 value where the expected value is about 81.2%
Please complete the following information regarding your system:
- OS: [ubuntu Linux]
- PyNE Version: [e.g. 0.7.1]
Name Version
- _libgcc_mutex :[ 0.1 ]
- _openmp_mutex :[ 5.1 ]
- asttokens :[ 3.0.0 ]
- backcall :[ 0.2.0 ]
- blosc :[ 1.21.1 ]
- brotli :[ 1.0.9 ]
- brotli-bin :[ 1.0.9 ]
- bzip2 :[ 1.0.8 ]
- ca-certificates :[ 2025.6.]
- cached-property :[ 1.5.2 ]
- cached_property :[ 1.5.2 ]
- certifi :[ 2024.8.]
- cycler :[ 0.12.1 ]
- decorator :[ 5.1.1 ]
- et_xmlfile :[ 1.1.0 ]
- executing :[ 2.1.0 ]
- expat :[ 2.7.1 ]
- fonttools :[ 4.33.3 ]
- freetype :[ 2.10.4 ]
- future :[ 1.0.0 ]
- h5py :[ 3.3.0 ]
- hdf5 :[ 1.10.6 ]
- icu :[ 68.2 ]
- ipython :[ 8.12.2 ]
- jbig :[ 2.1 ]
- jedi :[ 0.19.1 ]
- jinja2 :[ 3.1.4 ]
- jpeg :[ 9e ]
- kiwisolver :[ 1.4.2 ]
- lcms2 :[ 2.12 ]
- ld_impl_linux-64 :[ 2.40 ]
- lerc :[ 2.2.1 ]
- libblas :[ 3.9.0 ]
- libbrotlicommon :[ 1.0.9 ]
- libbrotlidec :[ 1.0.9 ]
- libbrotlienc :[ 1.0.9 ]
- libcblas :[ 3.9.0 ]
- libdeflate :[ 1.7 ]
- libffi :[ 3.4.4 ]
- libgcc :[ 15.1.0 ]
- libgcc-ng :[ 15.1.0 ]
- libgfortran-ng :[ 7.5.0 ]
- libgfortran4 :[ 7.5.0 ]
- libgfortran5 :[ 15.1.0 ]
- libgomp :[ 15.1.0 ]
- libiconv :[ 1.17 ]
- liblapack :[ 3.9.0 ]
- libopenblas :[ 0.3.12 ]
- libpng :[ 1.6.37 ]
- libstdcxx :[ 15.1.0 ]
- libstdcxx-ng :[ 11.2.0 ]
- libtiff :[ 4.3.0 ]
- libuuid :[ 1.41.5 ]
- libwebp-base :[ 1.2.2 ]
- libxcb :[ 1.17.0 ]
- libxml2 :[ 2.9.10 ]
- libxslt :[ 1.1.33 ]
- lxml :[ 4.8.0 ]
- lz4-c :[ 1.9.3 ]
- lzo :[ 2.10 ]
- markupsafe :[ 2.1.1 ]
- matplotlib-base :[ 3.5.2 ]
- matplotlib-inline :[ 0.1.7 ]
- metis :[ 5.1.0 ]
- moab :[ 5.3.0 ]
- mock :[ 5.1.0 ]
- munkres :[ 1.1.4 ]
- ncurses :[ 6.4 ]
- nomkl :[ 1.0 ]
- numexpr :[ 2.8.0 ]
- numpy :[ 1.22.3 ]
- olefile :[ 0.47 ]
- openjpeg :[ 2.4.0 ]
- openmc :[ 0.12.2 ]
- openpyxl :[ 3.1.5 ]
- openssl :[ 3.5.0 ]
- packaging :[ 25.0 ]
- pandas :[ 1.4.2 ]
- parso :[ 0.8.4 ]
- pexpect :[ 4.9.0 ]
- pickleshare :[ 0.7.5 ]
- pillow :[ 8.3.2 ]
- pip :[ 24.3.1 ]
- prompt-toolkit :[ 3.0.48 ]
- prompt_toolkit :[ 3.0.48 ]
- pthread-stubs :[ 0.3 ]
- ptyprocess :[ 0.7.0 ]
- pure_eval :[ 0.2.3 ]
- pygments :[ 2.18.0 ]
- pyne :[ 0.7.5 ]
- pyparsing :[ 3.1.4 ]
- pytables :[ 3.6.1 ]
- python :[ 3.8.12 ]
- python-dateutil :[ 2.9.0 ]
- python_abi :[ 3.8 ]
- pytz :[ 2024.2 ]
- readline :[ 8.2 ]
- scipy :[ 1.5.3 ]
- setuptools :[ 75.3.0 ]
- six :[ 1.16.0 ]
- snappy :[ 1.1.9 ]
- sqlite :[ 3.45.3 ]
- stack_data :[ 0.6.2 ]
- tk :[ 8.6.14 ]
- traitlets :[ 5.14.3 ]
- typing_extensions :[ 4.12.2 ]
- tzdata :[ 2025b ]
- uncertainties :[ 3.2.2 ]
- unicodedata2 :[ 14.0.0 ]
- wcwidth :[ 0.2.13 ]
- wheel :[ 0.45.1 ]
- xorg-libx11 :[ 1.8.12 ]
- xorg-libxau :[ 1.0.12 ]
- xorg-libxdmcp :[ 1.1.5 ]
- xorg-xorgproto :[ 2024.1 ]
- xz :[ 5.6.4 ]
- zlib :[ 1.2.13 ]
- zstd :[ 1.5.0 ]
Additional Context
Add any other context about the problem here.