Skip to content

Latest commit

 

History

History
62 lines (53 loc) · 3.05 KB

units.rst

File metadata and controls

62 lines (53 loc) · 3.05 KB

Units

WrightTools provides its own units system. You can use it directly, if you wish.

>>> import WrightTools as wt
>>> wt.units.converter(2., 'eV', 'nm')
620.0

This same units system enables the units-aware properties throughout WrightTools.

In WrightTools, units are organized into kinds. It is always possible to convert between units of the same kind, and never possible to convert between kinds.

The units system also provides a symbol for each unit, enabling easy plotting.

The following table contains every unit in WrightTools.

name description kind symbol
rad radian angle None
deg degrees angle None
fs femtoseconds delay τ
ps picoseconds delay τ
ns nanoseconds delay τ
mm_delay mm delay τ
nm nanometers energy λ
wn wavenumbers energy ν̄
eV electronvolts energy ω
meV millielectronvolts energy E
Hz hertz energy f
THz terahertz energy f
GHz gigahertz energy f
K kelvin temperature T
deg_C celsius temperature T
deg_F fahrenheit temperature T
deg_R rankine temperature T
fluence uJ per sq. cm intensity
mOD mOD optical density None
OD OD optical density None
nm_p nanometers position None
um microns position None
mm millimeters position None
cm centimeters position None
in inches position None
FWHM full width half max pulse width σ
fs_t femtoseconds time None
ps_t picoseconds time None
ns_t nanoseconds time None
us_t microseconds time None
ms_t milliseconds time None
s_t seconds time None
m_t minutes time None
h_t hours time None
d_t days time None