TkN 2.7
Toolkit for Nuclei
Loading...
Searching...
No Matches
units

As seen in the tkn::tkmeasure class, tkn offers the possibility to convert some measure into different units
Currently, tkn handles three unit types: Energy, Time and Length. Few other units are included in tkn but that cannot be converted

The available energy units are the following: eV, keV, MeV, GeV, TeV
The available time units are the following: as, fs, ps, ns, us, ms, s, min, h, d, y
The available length units are the following: am, fm, pm, nm, um, mm, cm, m

In general, units can be converted only within the same unit type. One exception is the reciprocal conversion between an energy width and a lifetime. For very short lifetimes, it is common to express the width of a level as an energy; this conversion and the corresponding uncertainty transformation are handled by TkN.

Units without a conversion rule (for example K, C, F, %, u, or a user-defined label) cannot be relabelled as another unit. set_unit() returns false in this case, as it does for incompatible dimensions. A converted read such as get_value(requested_unit) does not modify the stored measure and returns NaN when the requested conversion is invalid.