Skip to content

Comments

Activation foil classes#73

Merged
RemDelaporteMathurin merged 7 commits intomainfrom
activation-foil-classes
May 9, 2025
Merged

Activation foil classes#73
RemDelaporteMathurin merged 7 commits intomainfrom
activation-foil-classes

Conversation

@RemDelaporteMathurin
Copy link
Member

@RemDelaporteMathurin RemDelaporteMathurin commented May 8, 2025

This PR moves away from get_decay_lines in favour of a class architecture for check sources.

This will be useful in #71

TODO:

  • fix tests
  • document

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.96%. Comparing base (bf88ee2) to head (1681225).
⚠️ Report is 128 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   83.66%   83.96%   +0.30%     
==========================================
  Files          18       18              
  Lines        1114     1129      +15     
==========================================
+ Hits          932      948      +16     
+ Misses        182      181       -1     

☔ 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.

Copy link
Contributor

@cdunn314 cdunn314 left a comment

Choose a reason for hiding this comment

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

Looks pretty good, but the issue is that we can and sometimes do use several different check sources of the same nuclide. For example, we use both a Na22 source with an activity of 9.98 uCi on Sep 29, 2023, and another one that is 1 uCi on Jan 2006. I think creating several subclasses of CheckSources for Na22, Mn54, Cs137, Co60, and Ba133 with their half-lives, photon energies, and intensities built in, but for which the user specifies the activity, name and activity date.

@RemDelaporteMathurin
Copy link
Member Author

Looks pretty good, but the issue is that we can and sometimes do use several different check sources of the same nuclide. For example, we use both a Na22 source with an activity of 9.98 uCi on Sep 29, 2023, and another one that is 1 uCi on Jan 2006. I think creating several subclasses of CheckSources for Na22, Mn54, Cs137, Co60, and Ba133 with their half-lives, photon energies, and intensities built in, but for which the user specifies the activity, name and activity date.

That makes sense to me. So instead of a subclass of CheckSource, we can create a class Nuclide that contains physical quantities like half-lives, energies, intensities

name :
The name of the nuclide.
energy :
The energy of the gamma rays emitted by the nuclide.
Copy link
Contributor

@cdunn314 cdunn314 May 8, 2025

Choose a reason for hiding this comment

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

The energy of the gamma rays emitted by the nuclide in keV

energy :
The energy of the gamma rays emitted by the nuclide.
intensity :
The intensity of the gamma rays emitted by the nuclide. (must sum to 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Intensity doesn't need to sum to 1. For example, in Na22, 1.8 photons are emitted per decay due to positron annihilation creating two photons per beta+ particle being emitted.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok good point thank you. It needs to be relative to something though no? i guess it's photon per decay?

Copy link
Contributor

@cdunn314 cdunn314 left a comment

Choose a reason for hiding this comment

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

Just a couple little edits in the doc string

@RemDelaporteMathurin RemDelaporteMathurin merged commit 0775c8e into main May 9, 2025
5 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the activation-foil-classes branch May 9, 2025 01:45
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.

2 participants