Skip to content

Adds photon mass attenuation calculations#2048

Merged
Matt-Carre merged 57 commits into
mainfrom
2039_photon_mass_calc
May 15, 2026
Merged

Adds photon mass attenuation calculations#2048
Matt-Carre merged 57 commits into
mainfrom
2039_photon_mass_calc

Conversation

@Matt-Carre
Copy link
Copy Markdown
Contributor

@Matt-Carre Matt-Carre commented May 5, 2026

Fixes #2039 - adds ability to calculate the photon mass attenuation per unit length, and tests this functionality.

@Matt-Carre Matt-Carre requested a review from a team as a code owner May 5, 2026 12:51
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.13%. Comparing base (a26ac48) to head (f8fb92e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2048   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files         336      337    +1     
  Lines       13074    13079    +5     
=======================================
+ Hits        12961    12966    +5     
  Misses        113      113           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/dodal/common/general_maths/material_absorption_maths.py
Comment thread src/dodal/common/general_maths/transmission_interconversion.py Outdated
Comment thread tests/common/general_maths/test_transmission_interconversion.py Outdated
Comment thread src/dodal/common/general_maths/transmission_interconversion.py
Comment thread tests/common/general_maths/test_material_absorption_maths.py Outdated
Comment thread tests/common/general_maths/test_material_absorption_maths.py Outdated
Comment thread tests/common/general_maths/test_material_absorption_maths.py Outdated
Comment thread tests/common/general_maths/test_transmission_interconversion.py Outdated
Comment thread src/dodal/common/general_maths/material_absorption_maths.py Outdated
@Relm-Arrowny
Copy link
Copy Markdown
Contributor

Relm-Arrowny commented May 14, 2026

Got attracted to this issue seeing photon mass calculations!!! and got disappointed it is photon mass attenuation, May want to add attenuation to the pr title. As far as I know photon is massless at least at rest, E = m^2C^4+p^2c^2 and photon mass is refer to the m here which zero.

@Matt-Carre Matt-Carre changed the title Adds photon mass calculations Adds photon mass attenuation calculations May 14, 2026
Copy link
Copy Markdown
Collaborator

@noemifrisina noemifrisina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay, thanks - just one comment but take it or leave it
Also please rebase before merging

"result",
[
(5.042, 1.98e2, -2.717, 2.44170544), # Arbitrary Energy
(8.3328, 2.5706e3, -2.83, 6.3708311), # Arbitrary Nickel
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the wording "arbitrary {element}" is extremely unclear.

@Matt-Carre Matt-Carre merged commit 470e03e into main May 15, 2026
11 checks passed
@Matt-Carre Matt-Carre deleted the 2039_photon_mass_calc branch May 15, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend arithmetic module with calculations library script for photon mass attenuation

5 participants