Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to calculate the exposure #75

Merged
merged 6 commits into from
Nov 10, 2024
Merged

Add method to calculate the exposure #75

merged 6 commits into from
Nov 10, 2024

Conversation

fhagemann
Copy link
Contributor

Closes #33.

In this PR, the method get_exposure is introduced, that takes LegendData, DetectorIdLike and a selection of runs (either DataPeriod & DataRun, just DataPeriod, or DataPariition as input to calculate the exposure for that given detector in that given selection of runs.

Example usage would be:

using LegendDataManagement
l200 = LegendData(:l200)
get_exposure(l200, :V00050A, DataPeriod(3), DataRun(0))
get_exposure(l200, :V00050A, DataPeriod(3))
get_exposure(l200, :V00050A, DataPartition(1))

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 12 lines in your changes missing coverage. Please review.

Project coverage is 39.05%. Comparing base (8e1da65) to head (6814279).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/exposure.jl 71.42% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
+ Coverage   33.95%   39.05%   +5.10%     
==========================================
  Files          26       27       +1     
  Lines        1944     1987      +43     
==========================================
+ Hits          660      776     +116     
+ Misses       1284     1211      -73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fhagemann
Copy link
Contributor Author

I also wrote some tests (they also made me spot a bug --> 8629f59), but they require an update to legend-test-data (which I have requested in legend-exp/legend-testdata#22) and a new version with the updated LegendTestData afterwards.
Therefore, the file test_exposure.jl is not included in the standard tests, but should once everything is updated.

@fhagemann
Copy link
Contributor Author

@theHenks This would be good to go now

@theHenks
Copy link
Collaborator

theHenks commented Nov 9, 2024

Let's merge than @oschulz . Looks great! Big thanks to @fhagemann

@oschulz oschulz merged commit 3c0c0c6 into main Nov 10, 2024
11 checks passed
@oschulz oschulz deleted the exposure branch November 10, 2024 01:52
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.

Exposure calculation
3 participants