Units
svetlanna.units.ureg
Bases: Enum
Unit registry for SI-prefixed length, time, and frequency units.
A simple unit registry supporting SI prefixes (T, G, M, k, m, u, n, p, f, a) for length (m), time (s), and frequency (Hz) units. Supports basic arithmetic operations with scalars.
Warning
Units are multiplicative factors only; they carry no information about the physical quantity. Keep eye on the units you use to ensure consistency across calculations.
Warning
Round-off errors may occur when using very large and very small units due to floating-point precision limits.
Examples:
Attributes:
-
Gm, Mm, km, m, dm, cm, mm, um, nm, pm(float) –Length units (gigameters to picometers).
-
Gs, Ms, ks, s, ds, cs, ms, us, ns, ps, fs, as_(float) –Time units (gigaseconds to attoseconds).
-
THz, GHz, MHz, kHz, Hz, dHz, cHz, mHz, uHz, nHz, pHz(float) –Frequency units (terahertz to picohertz).