-
Notifications
You must be signed in to change notification settings - Fork 7
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 uncertainties to active volume calculation. #80
base: main
Are you sure you want to change the base?
Conversation
src/legend_data.jl
Outdated
end | ||
active_volume::Unitful.Volume{<:Float64} = if haskey(diodmap, k) get_active_volume(diodmap[k], fccd) else Float64(NaN) * u"cm^3" end | ||
c = merge(c, (; cc4, cc4ch, daqcrate, daqcard, hvcard, hvch, enrichment, mass, total_volume, active_volume)) | ||
active_volume::Unitful.Volume{<:Number} = if haskey(diodmap, k) get_active_volume(diodmap[k], fccd) else Float64(NaN) * u"cm^3" end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want active_volume
to ALWAYS be a Measurement
? Then, the default for non-germanium channels should be measurement(NaN, NaN) * u"cm^3"
instead of Float64(NaN) * u"cm^3"
(see how it's done for the enrichment)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
=======================================
Coverage 39.05% 39.05%
=======================================
Files 27 27
Lines 1987 1987
=======================================
Hits 776 776
Misses 1211 1211 ☔ View full report in Codecov by Sentry. |
Do we always have an uncertainty for it, if we have a number? |
There is always a field uncertainty, but the value can be zero. |
I added code that reads the uncertainty of the fccd from the metadata to include with the active volume calculations. I took the correlated error (there is also uncorrelated error) which is up for discussion. The fccd values were also saved to the channelinfo table in units of mm.