Skip to content

Comments

Spectrum fitting for activation foils#71

Merged
RemDelaporteMathurin merged 44 commits intomainfrom
rem/spectrum-fit
May 16, 2025
Merged

Spectrum fitting for activation foils#71
RemDelaporteMathurin merged 44 commits intomainfrom
rem/spectrum-fit

Conversation

@RemDelaporteMathurin
Copy link
Member

@RemDelaporteMathurin RemDelaporteMathurin commented May 7, 2025

This PR reimplements what was proposed by @cdunn314 in #47

It adds new objects:

  • CheckSource : is composed of a Nuclide, an activity date, and an activity
  • Detector: has a channel_nb, holds the events (time and energies) as well as the count times (real and live)
  • Measurement : is composed of several Detector, and has a start and stop time. Can also be used for background measurements.
  • CheckSourceMeasurement : is a child class of Measurement, and has a CheckSource attached to it. It is useful to compute the detection efficiency of detectors

I also moved almost everything to compass.py to avoid circular imports

I've also tried to test as much as possible. Tests can probably be simplified in some cases but I'm happy to refactor tests in a future PR.

Next steps (in future PRs) will hopefully close the analysis:

  • Making an object for activation foil measurements (inheriting from Measurement)
  • Compute the activity of an activation foil
  • Integrate with the existing capabilities to work out the neutron fluence based on an irradiation schedule

@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

❌ Patch coverage is 89.52381% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.74%. Comparing base (0775c8e) to head (c61e420).
⚠️ Report is 101 commits behind head on main.

Files with missing lines Patch % Lines
...lbox/neutron_detection/activation_foils/compass.py 88.48% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   84.49%   84.74%   +0.25%     
==========================================
  Files          18       18              
  Lines        1193     1331     +138     
==========================================
+ Hits         1008     1128     +120     
- Misses        185      203      +18     

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

@RemDelaporteMathurin RemDelaporteMathurin marked this pull request as ready for review May 10, 2025 01:47
Copy link
Member Author

Choose a reason for hiding this comment

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

please ignore this file it's just for showing some of the usage for now

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.

I didn't test the code but I did look through most of it.

@RemDelaporteMathurin RemDelaporteMathurin merged commit f740deb into main May 16, 2025
5 of 6 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the rem/spectrum-fit branch May 16, 2025 20:05
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