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 uncertainties to active volume calculation. #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apearsonn
Copy link
Contributor

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.

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
Copy link
Contributor

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)

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.05%. Comparing base (8be1f46) to head (82fd6a1).

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.
📢 Have feedback on the report? Share it here.

@oschulz
Copy link
Contributor

oschulz commented Dec 3, 2024

Do we want active_volume to ALWAYS be a Measurement?

Do we always have an uncertainty for it, if we have a number?

@fhagemann
Copy link
Contributor

Do we want active_volume to ALWAYS be a Measurement?

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.
Just sometimes, there is no value for the FCCD at all in the metadata, but this is covered when reading in the FCCD.

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.

3 participants