Blackbody Peak & Wien's Law
Blackbody Peak & Wien's Law
Stars emit radiation with a spectrum that closely follows a blackbody. The wavelength at which the spectrum peaks is inversely proportional to the surface temperature — this is Wien's displacement law:
where m·K is Wien's displacement constant.
Stellar Colors
| Star type | (K) | Color | |
|---|---|---|---|
| O-type | 30,000 | ~97 nm (UV) | Blue |
| Sun (G2) | 5,778 | ~502 nm | Yellow-white |
| Red dwarf | 3,000 | ~966 nm (near-IR) | Red |
The Sun peaks in green light — but it also emits strongly across the entire visible spectrum, which is why sunlight appears white.
Luminosity Ratio
For two stars of the same radius at temperatures and , the Stefan-Boltzmann law gives:
A star at 30,000 K is over 700 times more luminous than a star of equal size at 5,778 K.
Inverse: Temperature from Peak
Given an observed peak wavelength, you can recover the temperature:
This technique — spectrophotometry — is used to determine stellar temperatures from observed spectra.
Your Task
Implement three functions. All constants must be defined inside each function.
peak_wavelength_nm(T_K)— returns in nanometresstellar_color_ratio(T1_K, T2_K)— returns for equal-radius starstemperature_from_peak(lambda_nm)— returns in Kelvin from peak wavelength in nm
Use m·K.