Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.