Skip to content

patmlr/qunits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Static Badge Static Badge

NOTE: Early development. Not fully functional yet.

The qunits Python package provides a performant, verbose and generic physical unit system. Tutorials and the API documentation are available on the Homepage. Additional example scripts can be found in the example folder on GitHub.

Getting started

from qunits import u

q = 2 * u.e  # >>> 2.0 e
v = 2e5 * u.m / u.s  # >>> 200000.0 m/s
B = 0.42 * u.mT  # >>> 0.42 mT

F = q * v * B  # >>> 168000.0 e⋅m⋅mT/s
F = F.to_base_units()  # >>> 2.6916567451199998e-17 N
F = F.to(u.e * u.V / u.m)  # >>> 168.0 e⋅V/m

Dependencies

Modules

  • dimension: Contains the dimension definitions.
  • prefix: Contains resources for prefix handling.
  • registry: Contains the unit registry u.
  • unit: Contains the Unit and the Quantity classes.

About

A performant, verbose and generic physical unit system

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages