Units and unit systems

Unit system for physical quantities; include definition of constants.

class sympy.physics.units.unitsystem.UnitSystem(base_units, units=(), name='', descr='', dimension_system=None)[source]

UnitSystem represents a coherent set of units.

A unit system is basically a dimension system with notions of scales. Many of the methods are defined in the same way.

It is much better if all base units have a symbol.

property dim

Give the dimension of the system.

That is return the number of units forming the basis.

extend(base, units=(), name='', description='', dimension_system=None)[source]

Extend the current system into a new one.

Take the base and normal units of the current system to merge them to the base and normal units given in argument. If not provided, name and description are overridden by empty strings.

property is_consistent

Check if the underlying dimension system is consistent.

print_unit_base(unit)[source]

Useless method.

DO NOT USE, use instead convert_to.

Give the string expression of a unit in term of the basis.

Units are displayed by decreasing power.