Adds conversion between material depth and attenuation#2049
Adds conversion between material depth and attenuation#2049Matt-Carre wants to merge 47 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2049 +/- ##
=======================================
Coverage 99.13% 99.13%
=======================================
Files 337 337
Lines 13079 13096 +17
=======================================
+ Hits 12966 12983 +17
Misses 113 113 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… how best to split functions - will be done next time
…n_depth_attenuation
oliwenmandiamond
left a comment
There was a problem hiding this comment.
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."
You have created many test files that don't mirror the src structure e.g test_photon_mass_attenutation.py, test_thickness_required_to_attenuate.py etc.
Can you please update your tests accordingly?
https://diamondlightsource.github.io/dodal/main/how-to/write-tests.html
…uation_transmission
…iamondLightSource/dodal into 2041_interconversion_depth_attenuation
…nsmission_interconversion
…ts, but those that are relevant are forced to be greater than 0
|
Currently, what I have works, but I could create a second model to check if the absorption coefficient is greater than 1.0e-14 with pydantic as well. Worth doing? Or do we want it to raise that specific value error? |
Fixes #2041
Adds tests and functions to convert between depth (measured in cm) and attenuation