From 23cd3eb081733e0cebf0596dfc429ec54291ecb3 Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Sat, 9 Nov 2024 10:42:19 -0500 Subject: [PATCH] Remove Suppressor dependency --- Project.toml | 2 -- src/LegendDataManagement.jl | 1 - src/exposure.jl | 4 ++-- src/legend_data.jl | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index b8d3a678..ab611a68 100644 --- a/Project.toml +++ b/Project.toml @@ -24,7 +24,6 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" StaticStrings = "4db0a0c5-418a-4e1d-8806-cb305fe13294" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" @@ -68,7 +67,6 @@ SolidStateDetectors = "0.10.2" StaticStrings = "0.2" Statistics = "<0.0.1, 1" StructArrays = "0.5, 0.6" -Suppressor = "0.2" Tables = "1.1" TypedTables = "1.4" UUIDs = "<0.0.1, 1" diff --git a/src/LegendDataManagement.jl b/src/LegendDataManagement.jl index 6c0e7655..9710ae06 100644 --- a/src/LegendDataManagement.jl +++ b/src/LegendDataManagement.jl @@ -27,7 +27,6 @@ using LRUCache: LRU using ProgressMeter: @showprogress using PropertyFunctions: PropertyFunction, @pf, filterby, props2varsyms, PropSelFunction using StaticStrings: StaticString -using Suppressor: @suppress import Tables using Tables: columns using TypedTables diff --git a/src/exposure.jl b/src/exposure.jl index 616d0052..2536d3ba 100644 --- a/src/exposure.jl +++ b/src/exposure.jl @@ -91,10 +91,10 @@ function _get_exposure(data::LegendData, det::DetectorIdLike, rinfo::Table, is_a mass = if !iszero(livetime) && !isempty(filekeys) # read in the channelinfo filekey = first(filekeys) - _chinfo = @suppress channelinfo(data, filekey, det, extended = true) + _chinfo = channelinfo(data, filekey, det, extended = true, verbose = false) chinfo = if !all(x -> hasproperty(_chinfo, x), (:enrichment, :mass, :active_volume, :total_volume)) empty!(_cached_channelinfo) - @suppress channelinfo(data, filekey, det, extended = true) + channelinfo(data, filekey, det, extended = true, verbose = false) else _chinfo end diff --git a/src/legend_data.jl b/src/legend_data.jl index 21946153..910a5522 100644 --- a/src/legend_data.jl +++ b/src/legend_data.jl @@ -245,7 +245,7 @@ const _cached_channelinfo = LRU{Tuple{UInt, AnyValiditySelection}, StructVector} Get all channel information for the given [`LegendData`](@ref) and [`ValiditySelection`](@ref). """ -function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol = :all, only_processable::Bool = false, extended::Bool = false) +function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol = :all, only_processable::Bool = false, extended::Bool = false, verbose::Bool = true) key = (objectid(data), sel) chinfo = get!(_cached_channelinfo, key) do chmap = data.metadata(sel).hardware.configuration.channelmaps @@ -320,7 +320,7 @@ function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol isa(fccds, PropDicts.MissingProperty) || isa(fccds[first(keys(fccds))].value, PropDicts.MissingProperty) - haskey(diodmap, k) && @warn "No FCCD value given for detector $(detector)" + verbose && haskey(diodmap, k) && @warn "No FCCD value given for detector $(detector)" 0.0 else fccds[first(keys(fccds))].value