diff options
Diffstat (limited to 'src/planck.py')
-rw-r--r-- | src/planck.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/planck.py b/src/planck.py new file mode 100644 index 0000000..711a973 --- /dev/null +++ b/src/planck.py @@ -0,0 +1,22 @@ +import matplotlib.pyplot as plt +import numpy as np +from shared import * + +plot_setup(width=0.5) + +h = 6.62607015e-34 +c = 299792458 +k_B = 1.380649e-23 + +wvl = 1e-9 * np.linspace(10, 2000, 200) + +for T in [3000, 4000, 5000]: + L = 2 * h * c ** 2 / (wvl ** 5 * (np.exp(h * c / (wvl * k_B * T)) - 1)) + plt.plot(1e+6 * wvl, 1e-12 * L, label="$T$ = %d K" % T) + +plt.xlim(0, 2) +plt.xlabel("$\\lambda~[\\mu\\mathrm{m}]$") +plt.ylabel("$L_\\lambda~\\left[\\frac{\\mathrm{kW}}{\\mathrm{sr}\\cdot\\mathrm{m}^2\\cdot\\mathrm{nm}}\\right]$") +plt.legend() +plot_grid() +plot_export() |