Skip to content

Comments

Class structure for COMPASS measurements#70

Merged
RemDelaporteMathurin merged 18 commits intomainfrom
rem/class-structure-compass-measurements
May 9, 2025
Merged

Class structure for COMPASS measurements#70
RemDelaporteMathurin merged 18 commits intomainfrom
rem/class-structure-compass-measurements

Conversation

@RemDelaporteMathurin
Copy link
Member

@RemDelaporteMathurin RemDelaporteMathurin commented May 7, 2025

Example usage:

from libra_toolbox.neutron_detection.activation_foils.compass import Measurement


my_measurement = Measurement.from_directory(
    "250317_BABY_1L_run3/DAQ/Co60_0_872uCi_19Marc2014_250319_run3/UNFILTERED",
    name="test",
)


import matplotlib.pyplot as plt

for detector in my_measurement.detectors:
    hist, bin_edges = detector.get_energy_hist()

    plt.hist(
        bin_edges[:-1],
        bins=bin_edges,
        weights=hist,
        histtype="step",
        label=f"Ch {detector.channel_nb}",
    )
plt.legend()
plt.yscale("log")
plt.show()

image

@codecov
Copy link

codecov bot commented May 7, 2025

Codecov Report

❌ Patch coverage is 94.11765% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.21%. Comparing base (bf88ee2) to head (1c969ce).
⚠️ Report is 128 commits behind head on main.

Files with missing lines Patch % Lines
...lbox/neutron_detection/activation_foils/compass.py 94.11% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   83.66%   84.21%   +0.54%     
==========================================
  Files          18       18              
  Lines        1114     1178      +64     
==========================================
+ Hits          932      992      +60     
- Misses        182      186       +4     

☔ 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 merged commit 1751f74 into main May 9, 2025
5 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the rem/class-structure-compass-measurements 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