UnitRegistry class

(Shortest import: from brian2.units.fundamentalunits import UnitRegistry)

class brian2.units.fundamentalunits.UnitRegistry[source]

Bases: object

Stores known units for printing in best units.

All a user needs to do is to use the register_new_unit() function.

Default registries:

The units module defines three registries, the standard units, user units, and additional units. Finding best units is done by first checking standard, then user, then additional. New user units are added by using the register_new_unit() function.

Standard units includes all the basic non-compound unit names built in to the module, including volt, amp, etc. Additional units defines some compound units like newton metre (Nm) etc.



Add a unit to the registry



Add a unit to the registry