Unit conversion (sisl.unit)¶
Generic conversion utility between different units.
All different codes unit conversion routines should adhere to the same routine names for consistency and readability. This package should supply a subpackage for each code where specific unit conversions are required. I.e. if the codes unit conversion are not the same as the sisl defaults.
Default unit conversion utilities¶
unit_group(unit[, tbl]) |
The group of units that unit belong to |
unit_convert(fr, to[, opts, tbl]) |
Factor that takes ‘fr’ to the units of ‘to’. |
unit_default(group[, tbl]) |
The default unit of the unit group group. |
All subsequent subpackages also exposes the above 3 methods. If a subpackage method is used, the unit conversion corresponds to the units defined in the respective code.