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
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/legend_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,17 @@ function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol

total_volume::Unitful.Volume{<:Float64} = if haskey(diodmap, k) get_active_volume(diodmap[k], 0.0) else Float64(NaN) * u"cm^3" end
fccds = diodmap[k].characterization.l200_site.fccd_in_mm
fccd::Float64 = if isa(fccds, NoSuchPropsDBEntry) ||
fccd::Measurement{Float64} = if isa(fccds, NoSuchPropsDBEntry) ||
isa(fccds, PropDicts.MissingProperty) ||
isa(fccds[first(keys(fccds))].value, PropDicts.MissingProperty)

verbose && haskey(diodmap, k) && @warn "No FCCD value given for detector $(detector)"
0.0
measurement(0.0, 0.0)
else
fccds[first(keys(fccds))].value
fccd = measurement(fccds[first(keys(fccds))].value, maximum(values(fccds[first(keys(fccds))].uncertainty.corr)))
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)

c = merge(c, (; cc4, cc4ch, daqcrate, daqcard, hvcard, hvch, enrichment, mass, total_volume, active_volume, fccd = fccd * u"mm"))
end

c
Expand Down
Loading