Skip to content

Adds attenuation transmission interconversion calculations#2047

Merged
Matt-Carre merged 42 commits into
mainfrom
2040_attenuation_transmission
May 15, 2026
Merged

Adds attenuation transmission interconversion calculations#2047
Matt-Carre merged 42 commits into
mainfrom
2040_attenuation_transmission

Conversation

@Matt-Carre
Copy link
Copy Markdown
Contributor

Fixes #2040

This adds calculations to convert between the:
attenuation and natural log of transmission and back,
transmission fraction and attenuation and back

Also includes tests for these functions.

@Matt-Carre Matt-Carre requested a review from a team as a code owner May 5, 2026 12:08
@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 (ca163b9) to head (eed3807).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2047   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files         335      336    +1     
  Lines       13056    13074   +18     
=======================================
+ Hits        12943    12961   +18     
  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.

CoePaul
CoePaul previously requested changes May 5, 2026
Comment thread src/dodal/common/general_maths/transmission_interconversion.py Outdated
Comment thread tests/common/general_maths/test_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 Outdated
Comment thread src/dodal/common/general_maths/transmission_interconversion.py Outdated
@oliwenmandiamond
Copy link
Copy Markdown
Contributor

The standard for dodal for tests is "mirror the file structure of the src folder with the corresponding code files. Use the test_*.py naming convention for test files."

Can you please update your tests accordingly?

https://diamondlightsource.github.io/dodal/main/how-to/write-tests.html

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.

lgtm, just update branch before merging please

@noemifrisina noemifrisina dismissed CoePaul’s stale review May 14, 2026 14:29

comments addressed

@Matt-Carre Matt-Carre merged commit a26ac48 into main May 15, 2026
19 of 20 checks passed
@Matt-Carre Matt-Carre deleted the 2040_attenuation_transmission branch May 15, 2026 08:31
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 beamline-relevant arithmetic module with attenuation-transmission interconversion

4 participants