Skip to content

Commit

Permalink
Black body radiation curve added
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-brajer committed Jun 5, 2021
1 parent e5e3f95 commit efd0584
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions physicslab/curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@


import numpy as np
from scipy.constants import h, c, k


def black_body_radiation(frequency, T):
"""
UNIT = W/sr/m^2/Hz
To express the law per unit wavelength, input
``frequency = c / wavelength`` (UNIT = W/sr/m^3).
:param frequency:
:type frequency: numpy.ndarray
:param T: Temperature
:type T: float
:return: Spectral radiance
:rtype: numpy.ndarray
"""
return 2 * h * frequency**3 / c**2 / (np.exp(h * frequency / k / T) - 1)


def gaussian_curve(x, expected_value, variance, amplitude=None, zero=0):
Expand Down

0 comments on commit efd0584

Please sign in to comment.