#include <PlanckFunction.hpp>
Public Member Functions | |
PlanckFunction (double T) | |
double | cdf (Array &lambdav, Array &pv, Array &Pv, Range lambdaRange) const |
double | operator() (double lambda) const |
double | value (double lambda) const |
Private Attributes | |
double | _f1 |
double | _f2 |
double | _T |
This class represents the Planck function
\[ B_\lambda(\lambda,T) = \frac{2hc^2}{\lambda^5}\, \frac{1}{\exp\left(\dfrac{hc}{\lambda kT}\right)-1}. \]
The temperature \(T\) is specified in the constructor.
|
explicit |
The constructor for the PlanckFunction class accepts the temperature \(T\) and precalculates some constants for later use.
This function constructs a tabulated normalized probability density function (pdf) and the corresponding normalized cumulative distribution function (cdf) for the Planck function with temperature \(T\) (specified in the constructor) within the given wavelength range. As the basis for the tabulation, the function constructs a logarithmic wavelength grid with approximately 1000 wavelength points for each order of magitude in the wavelength range. The integration to determine the cdf is performed using a mechanism that assumes that the pdf behaves as a power-law between any two grid points.
|
inline |
This function call operator returns the value of the Planck function \(B_\lambda(\lambda,T)\) for a given wavelength \(\lambda\) and for the temperature \(T\) specified in the constructor. It is equivalent to the value() function.
double PlanckFunction::value | ( | double | lambda | ) | const |
This function returns the value of the Planck function \(B_\lambda(\lambda,T)\) for a given wavelength \(\lambda\) and for the temperature \(T\) specified in the constructor.