import numpy as np
import scipy.constants as cs

# mass
kg = 1000
g = 1
mg = 0.001

# length
m = 1
dm = 0.1
cm = 0.01
mm = 0.001
um = 10**-6
nm = 10**-9

# time
s = 1
ms = 0.001
us = 10**-6

# frequency
Hz = 1
kHz = 1000
MHz = 10 ** 6
GHz = 10 ** 9
THz = 10 ** 12

Hz_rad = 2 * np.pi
kHz_rad = Hz_rad * 1000
MHz_rad = Hz_rad * 10 ** 6

mm_Hz = cs.c / mm
um_Hz = cs.c / um
nm_Hz = cs.c / nm

# magnetic field
T = 1
G = 10**-4

# power
W = 1
mW = 10**-3
uW = 10**-6

# angle
rad = 1
deg = np.pi / 180

# temperature
K = 1
mK = 10 ** -3
uK = 10 ** -6
nK = 10 ** -9

# energy
J = 1
eV = 1.602 * 10 ** - 19
meV = eV / 1000
keV = eV * 1000

Hz_J = cs.h * Hz
kHz_J = cs.h * kHz
MHz_J = cs.h * MHz
GHz_J = cs.h * GHz
THz_J = cs.h * THz

mm_J = cs.h * mm_Hz
um_J = cs.h * um_Hz
nm_J = cs.h * nm_Hz

K_J = cs.Boltzmann * K
mK_J = K_J / 1000
uK_J = mK_J / 1000
nK_J = uK_J / 1000