Open DiamondJoseph opened 2 weeks ago
If we do this, could we explore making the underlying units library pluggable? e.g. at ISIS we're already using scipp
for our units handling (which uses llnl-units under the hood), I could imagine other facilities wanting to use pint
or forallpeople
as you suggested, or various domain-specific libraries, or ...
SignalMetadata, which is used by SoftSignals to present information about units and precision, uses just a str as its datatype. While the use case of providing arbitrary configuration-like metadata is to be discouraged, the use of consolidating several signals into another value should get additional support for developers to ensure data is consistent and maintains integrity.
This could be accomplished by ensuring that the units is an instance of e.g. this library's SI units representation. This would allow propagating units from the physical signals that back the SoftSignal, including relations between multiple signals in a simple way.
Acceptance Criteria