This PR addresses the issue "Documentation Gamma function - factor 100 #1433". The problem was related to the material.gammas() method, which incorrectly calculates the intensity of gamma rays, returning the value in [100*decays/s/atom] instead of the expected [decays/s/atom].
Motivation and Context
The current material.gammas() method in pyne misrepresents the intensity of gamma rays, leading to incorrect results when used in calculations involving specific activity. This PR aims to fix the intensity calculation and ensure that the method returns gamma intensities in the correct units.
Changes
This PR introduces a fix to the material.gammas() method in the material.cpp file. The code has been updated to divide the raw gamma intensity values by 100 to correct the unit representation. With this fix, the method will now return gamma intensities in [decays/s/atom] as documented.
Behavior
Current Behavior: The material.gammas() method incorrectly calculates and returns gamma intensities in [100*decays/s/atom].
New Behavior: After the fix, the method will correctly return gamma intensities in [decays/s/atom].
Other Information
To verify the correctness of the changes, I ran tests with the isotope Cs-137, using an intensity value of 84.99% obtained from nucleide.org. The results now match the expected values, confirming the correction.
from pyne.material import Material
Material({'Cs-137': .8499}).gammas()
Output: [(283.5, 4.2351778792770854e-15), (661.657, 6.214028233215172e-10)]
Changelog file
This PR also includes an update to the CHANGELOG file. I created a new entry describing the change and referenced this pull request number for easy tracking.
Description
This PR addresses the issue "Documentation Gamma function - factor 100 #1433". The problem was related to the
material.gammas()
method, which incorrectly calculates the intensity of gamma rays, returning the value in [100*decays/s/atom] instead of the expected [decays/s/atom].Motivation and Context
The current
material.gammas()
method inpyne
misrepresents the intensity of gamma rays, leading to incorrect results when used in calculations involving specific activity. This PR aims to fix the intensity calculation and ensure that the method returns gamma intensities in the correct units.Changes
This PR introduces a fix to the
material.gammas()
method in thematerial.cpp
file. The code has been updated to divide the raw gamma intensity values by 100 to correct the unit representation. With this fix, the method will now return gamma intensities in [decays/s/atom] as documented.Behavior
material.gammas()
method incorrectly calculates and returns gamma intensities in [100*decays/s/atom].Other Information
To verify the correctness of the changes, I ran tests with the isotope Cs-137, using an intensity value of 84.99% obtained from nucleide.org. The results now match the expected values, confirming the correction.
Changelog file
This PR also includes an update to the
CHANGELOG
file. I created a new entry describing the change and referenced this pull request number for easy tracking.