Planck Demo

Demonstration of the Planck module in LTEpy.

[1]:
import matplotlib.pyplot as plt

from LTEpy import lte

Define a new instance of an LTEpy Planck object for a given temperature

[2]:
temp = 1000  # temperature in K
planck = lte.Planck(temp)

Plot \(B_\lambda(T)\) on a given wavelength interval

[3]:
wl_start = 50  # starting wavelength in nm
wl_end = 30_000    # ending wavelength in nm

fig, ax = plt.subplots()

planck.set_temp(5800)
planck.plot_B_lambda(wl_start, wl_end, ax=ax, c="k", ls="-")
planck.plot_lambda_max(ax, c="k")


planck.set_temp(2500)
planck.plot_B_lambda(wl_start, wl_end, ax=ax, c="r", ls="--")
planck.plot_lambda_max(ax, c="r")

planck.set_temp(10_000)
planck.plot_B_lambda(wl_start, wl_end, ax=ax, c="b", ls="-.")
planck.plot_lambda_max(ax, c="b")


ax.set_ylim(1e2, 1e9)

[3]:
(100.0, 1000000000.0)
../_images/notebooks_planck_demo_5_1.png

Plot \(B_\nu(T)\) on a given frequency interval

[4]:
nu_start = 1e12  # starting frequency in Hz
nu_end = 1e16    # ending frequency in Hz

fig, ax = plt.subplots()

planck.set_temp(5800)
planck.plot_B_nu(nu_start, nu_end, ax=ax, c="k", ls="-")

planck.set_temp(2500)
planck.plot_B_nu(nu_start, nu_end, ax=ax, c="r", ls="--")

planck.set_temp(10_000)
planck.plot_B_nu(nu_start, nu_end, ax=ax, c="b", ls="-.")

ax.set_ylim(1e-10, 1e-2)
[4]:
(1e-10, 0.01)
../_images/notebooks_planck_demo_7_1.png
[ ]: