qty module¶
A Python library for dealing with physical quantities
-
class
qty.Energy¶ Bases:
qty._MetaEnergy units.
Available units:
Joule [J]
Electronvolt [eV]
Meter [m]
Kelvin [K]
Hertz [Hz]
Second [s]
Hartree [Ha]
Units are related by the following equalities:
\[\begin{split}E[\text{J}] &= E[\text{eV}] \times e[\text{C}] \times [\text{J} \cdot \text{C}^{-1} \cdot \text{eV}^{-1}]\\ E[\text{J}] &= h[\text{J} \cdot \text{s}] \times c[\text{m} \cdot \text{s}^{-1}] \times (\lambda[\text{m}])^{-1}\\ E[\text{J}] &= k_B[\text{J} \cdot \text{K}^{-1}] \times T[\text{K}]\\ E[\text{J}] &= h[\text{J} \cdot \text{s}] \times ν[\text{Hz}] \times [\text{Hz}^{-1} \cdot \text{s}^{-1}]\\ E[\text{J}] &= h[\text{J} \cdot \text{s}] \times (ν^{-1}[\text{s}])^{-1}\\ E[\text{J}] &= E[\text{Ha}] \times m_e[\text{kg}] \times (c[\text{m} \cdot \text{s}^{-1}])^2 \times \alpha^2 \times [\text{Ha}^{-1}] \\\end{split}\]Note
Due to a conflict with the built-in Python keyword as, use as_ for attoseconds.
-
EHa¶
-
EHz¶
-
EJ¶
-
EK¶
-
EeV¶
-
Em¶
-
Es¶
-
GHa¶
-
GHz¶
-
GJ¶
-
GK¶
-
GeV¶
-
Gm¶
-
Gs¶
-
Ha¶
-
Hz¶
-
J¶
-
K¶
-
MHa¶
-
MHz¶
-
MJ¶
-
MK¶
-
MeV¶
-
Mm¶
-
Ms¶
-
PHa¶
-
PHz¶
-
PJ¶
-
PK¶
-
PeV¶
-
Pm¶
-
Ps¶
-
THa¶
-
THz¶
-
TJ¶
-
TK¶
-
TeV¶
-
Tm¶
-
Ts¶
-
YHa¶
-
YHz¶
-
YJ¶
-
YK¶
-
YeV¶
-
Ym¶
-
Ys¶
-
ZHa¶
-
ZHz¶
-
ZJ¶
-
ZK¶
-
ZeV¶
-
Zm¶
-
Zs¶
-
aHa¶
-
aHz¶
-
aJ¶
-
aK¶
-
aeV¶
-
am¶
-
as_¶
-
cHa¶
-
cHz¶
-
cJ¶
-
cK¶
-
ceV¶
-
cm¶
-
cs¶
-
dHa¶
-
dHz¶
-
dJ¶
-
dK¶
-
daHa¶
-
daHz¶
-
daJ¶
-
daK¶
-
daeV¶
-
dam¶
-
das¶
-
deV¶
-
dm¶
-
ds¶
-
eV¶
-
fHa¶
-
fHz¶
-
fJ¶
-
fK¶
-
feV¶
-
fm¶
-
fs¶
-
hHa¶
-
hHz¶
-
hJ¶
-
hK¶
-
heV¶
-
hm¶
-
hs¶
-
kHa¶
-
kHz¶
-
kJ¶
-
kK¶
-
keV¶
-
km¶
-
ks¶
-
m¶
-
mHa¶
-
mHz¶
-
mJ¶
-
mK¶
-
meV¶
-
mm¶
-
ms¶
-
nHa¶
-
nHz¶
-
nJ¶
-
nK¶
-
neV¶
-
nm¶
-
ns¶
-
pHa¶
-
pHz¶
-
pJ¶
-
pK¶
-
peV¶
-
pm¶
-
ps¶
-
s¶
-
uHa¶
-
uHz¶
-
uJ¶
-
uK¶
-
ueV¶
-
um¶
-
us¶
-
zHa¶
-
zHz¶
-
zJ¶
-
zK¶
-
zeV¶
-
zm¶
-
zs¶
-
class
qty.Length¶ Bases:
qty._MetaLength units.
Available units:
Meter [m]
Ångström [Å]
Units are related by the following equality:
\[l[\text{m}] = l[\text{Å}] \times 10^{-10}[\text{m} \cdot \text{Å}^{-1}]\]Note
The ångström symbol (Å) has been substituted with a capital A in the module for convenience.
-
A¶
-
EA¶
-
Em¶
-
GA¶
-
Gm¶
-
MA¶
-
Mm¶
-
PA¶
-
Pm¶
-
TA¶
-
Tm¶
-
YA¶
-
Ym¶
-
ZA¶
-
Zm¶
-
aA¶
-
am¶
-
cA¶
-
cm¶
-
dA¶
-
daA¶
-
dam¶
-
dm¶
-
fA¶
-
fm¶
-
hA¶
-
hm¶
-
kA¶
-
km¶
-
m¶
-
mA¶
-
mm¶
-
nA¶
-
nm¶
-
pA¶
-
pm¶
-
uA¶
-
um¶
-
zA¶
-
zm¶
-
class
qty.Temperature¶ Bases:
qty._MetaTemperature units.
- Available units:
Kelvin [K]
Degree Celsius [℃]
Degree Farenheit [℉]
Units are related by the following equalities:
\[ \begin{align}\begin{aligned}T[\text{K}] &= 1[\text{K} \cdot \text{℃}^{-1}] \times T[\text{℃}] + 273.15[\text{K}]\\T[℉] &= 1.8[\text{F} \cdot \text{℃}^{-1}] \times T[\text{℃}] + 32[\text{℉}]\end{aligned}\end{align} \]Note
The degree sign from the degree Celsius (℃) and degree Farenheit (℉) symbols has been omitted in the module for convenience.
-
C¶
-
EC¶
-
EF¶
-
EK¶
-
F¶
-
GC¶
-
GF¶
-
GK¶
-
K¶
-
MC¶
-
MF¶
-
MK¶
-
PC¶
-
PF¶
-
PK¶
-
TC¶
-
TF¶
-
TK¶
-
YC¶
-
YF¶
-
YK¶
-
ZC¶
-
ZF¶
-
ZK¶
-
aC¶
-
aF¶
-
aK¶
-
cC¶
-
cF¶
-
cK¶
-
dC¶
-
dF¶
-
dK¶
-
daC¶
-
daF¶
-
daK¶
-
fC¶
-
fF¶
-
fK¶
-
hC¶
-
hF¶
-
hK¶
-
kC¶
-
kF¶
-
kK¶
-
mC¶
-
mF¶
-
mK¶
-
nC¶
-
nF¶
-
nK¶
-
pC¶
-
pF¶
-
pK¶
-
uC¶
-
uF¶
-
uK¶
-
zC¶
-
zF¶
-
zK¶
-
class
qty.Time¶ Bases:
qty._MetaTime units.
Available units:
Second [s]
Minutes [min]
Hour [h]
Units are related by the following equalities:
\[ \begin{align}\begin{aligned}t[\text{min}] &= 60[\text{s} \cdot \text{min}^{-1}] × t[\text{s}]\\t[\text{h}] &= 60[\text{min} \cdot \text{h}^{-1}] × t[\text{h}]\end{aligned}\end{align} \]Note
Due to a conflict with the built-in Python keyword as, use as_ for attoseconds.
-
Eh¶
-
Emin¶
-
Es¶
-
Gh¶
-
Gmin¶
-
Gs¶
-
Mh¶
-
Mmin¶
-
Ms¶
-
Ph¶
-
Pmin¶
-
Ps¶
-
Th¶
-
Tmin¶
-
Ts¶
-
Yh¶
-
Ymin¶
-
Ys¶
-
Zh¶
-
Zmin¶
-
Zs¶
-
ah¶
-
amin¶
-
as_¶
-
ch¶
-
cmin¶
-
cs¶
-
dah¶
-
damin¶
-
das¶
-
dh¶
-
dmin¶
-
ds¶
-
fh¶
-
fmin¶
-
fs¶
-
h¶
-
hh¶
-
hmin¶
-
hs¶
-
kh¶
-
kmin¶
-
ks¶
-
mh¶
-
min¶
-
mmin¶
-
ms¶
-
nh¶
-
nmin¶
-
ns¶
-
ph¶
-
pmin¶
-
ps¶
-
s¶
-
uh¶
-
umin¶
-
us¶
-
zh¶
-
zmin¶
-
zs¶