From 6dcccde9a0c5ae5fcb59ed22a211b11b764f7b7e Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Wed, 11 Sep 2024 12:02:10 +0200 Subject: [PATCH 1/2] Replace `RealQuantity` with `Unitful.RealOrRealQuantity` --- src/LegendDSP.jl | 1 + src/types.jl | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/LegendDSP.jl b/src/LegendDSP.jl index 425ffd3..8156ca3 100644 --- a/src/LegendDSP.jl +++ b/src/LegendDSP.jl @@ -29,6 +29,7 @@ import Adapt import RadiationDetectorDSP: fltinstance, rdfilt!, flt_output_length, flt_input_smpltype, flt_output_smpltype +using Unitful: RealOrRealQuantity as RealQuantity include("tailstats.jl") include("types.jl") diff --git a/src/types.jl b/src/types.jl index ab8a98f..6e73d0e 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,9 +1,5 @@ # This file is a part of LegendDSP.jl, licensed under the MIT License (MIT). -const MaybeWithUnits{T<:Number} = Union{T,Quantity{<:T}} -const RealQuantity = MaybeWithUnits{<:Real} - - """ DSPConfig{T <: Real} From 1c76ba976e2915dfb82be00cbdbb094c036385e4 Mon Sep 17 00:00:00 2001 From: Felix Hagemann Date: Wed, 11 Sep 2024 12:44:43 +0200 Subject: [PATCH 2/2] Set `compat` for Unitful on 1.6 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 8631652..a521c79 100644 --- a/Project.toml +++ b/Project.toml @@ -38,5 +38,5 @@ RadiationDetectorSignals = "0.3.3" Random = "1" Tables = "1.1" TypedTables = "1.4.3" -Unitful = "1" +Unitful = "1.6" julia = "1.9"