JuliaPhysics / SolidStateDetectors.jl

Solid state detector field and charge drift simulation in Julia
Other
82 stars 32 forks source link

Where/how to define `RealQuantity` #404

Closed fhagemann closed 1 month ago

fhagemann commented 2 months ago

In SSD, we define MaybeWithUnits (never really used) and RealQuantity as follows: https://github.com/JuliaPhysics/SolidStateDetectors.jl/blob/d0b4d57685b8305e8a18ca8741a094650200e938/src/Units.jl#L98-L99

This is an exact replica of what is defined in RadiationDetectorSignals: https://github.com/JuliaPhysics/RadiationDetectorSignals.jl/blob/main/src/numeric_types.jl

Also, there is RealOrRealQuantity in Unitful which does the same thing: https://github.com/PainterQubits/Unitful.jl/blob/317ba73cd8efb98868b36afd5a518134e120fb76/src/types.jl#L238

Could we clean up where/how we define RealQuantity (same applies to RadiationDetectorSignals)?

using RadiationDetectorSignals: RealQuantity # ?
using Unitful: RealOrRealQuantity as RealQuantity # ?