cphot 0.1
A C++ tool for computing photometry from spectra.
blackbody.hpp File Reference

Blackbody radiation model. More...

Go to the source code of this file.

Functions

QSpectralFluxDensity bb_flux_function (QLength lam, Number amp, QTemperature teff)
 Blackbody as a flux distribution as function of wavelength, temperature and amplitude. More...
 
double bb_flux_function (double lam_nm, double amp, double teff_K)
 default units blackbody as a flux distribution as function of wavelength, temperature and amplitude. More...
 

Detailed Description

Blackbody radiation model.

Version
0.1
Date
2021-12-01

References:

  • Rybicki, G. B.; Lightman, A. P. (1979). Radiative Processes in Astrophysics. John Wiley & Sons. ISBN 0-471-82759-2.

Planck's law of black-body radiation states that

\begin{eqnarray*} f_{\lambda }(T) &=& a\,\cdot\,{\frac {2h\nu ^{3}}{c^{2}}}{\frac {1}{e^{h\nu /kT}-1}}\\ &=& a\,\cdot\,\frac{2hc^2}{\lambda^5}{\frac {1}{e^{hc /\lambda kT}-1}}, \end{eqnarray*}

where

  • \(f_\lambda(T)\) is the spectral flux density at thermal equilibrium of temperature \(T\).
  • \(h\) is the Planck constant ( \(6.6260693\cdot10^{-34}\) J/s);
  • \(c\) is the speed of light in a vacuum ( \(299792458\cdot 10^6\mu m/s\));
  • \(k\) is the Boltzmann constant ( \(1.3806505\cdot 10^{-23}\) J/K);
  • \(\nu\) is the frequency of the electromagnetic radiation;
  • \(\lambda\) is the wavelength of the electromagnetic radiation;
  • \(T\) is the absolute temperature of the body;
  • and \(a\) is a dimensionless normalization factor.

Note that $a$ can alternatively links to the angular size $\theta$

\[ \theta = \sqrt{\frac{a}{\pi}} = \frac{R}{d} \]

where \(R\) is the radius, and \(d\) is the distance to the star.

Definition in file blackbody.hpp.

Function Documentation

◆ bb_flux_function() [1/2]

double bb_flux_function ( double  lam_nm,
double  amp,
double  teff_K 
)

default units blackbody as a flux distribution as function of wavelength, temperature and amplitude.

Parameters
lamwavelength in nm
ampdimensionless normalization factor
tefftemperature in Kelvins
Returns
evaluation of the blackbody radiation in flam units (erg/s/cm2/AA)

Definition at line 80 of file blackbody.hpp.

◆ bb_flux_function() [2/2]

QSpectralFluxDensity bb_flux_function ( QLength  lam,
Number  amp,
QTemperature  teff 
)

Blackbody as a flux distribution as function of wavelength, temperature and amplitude.

This function deals with unit conversions

Parameters
lamwavelength
ampdimensionless normalization factor
tefftemperature
Returns
evaluation of the blackbody radiation in flam units (erg/s/cm2/AA)

Note that amp is alternatively represented as the angular size θ = R/d = sqrt(amp/pi)

Definition at line 52 of file blackbody.hpp.