39 typedef typename units::realT
realT;
81 template <
typename gr
idT>
82 int setSpectrum( gridT &grid )
84 constexpr realT h = constants::h<units>();
85 constexpr realT c = constants::c<units>();
86 constexpr realT k = constants::k<units>();
97 for(
int i = 0; i < grid.size(); ++i )
102 2 * h * pow( c, 2 ) * solidang / pow( grid[i], 5 ) /
108 2 * h / pow( c, 2 ) * solidang * pow( grid[i], 3 ) /
115 realT operator[](
int i )
The blackbody spectral energy distribution in the mx::astro::astroSpectrum form.
realT _radius
The optional radius of the blackbody.
std::vector< realT > _spectrum
The calculated spectral energy distribution.
realT _temperature
The temperature of the blackbody. Default value is the effective temperature of the Sun.
void setParameters(realT T, realT R, realT d)
Set the parameters of the blackbody.
units::realT realT
The real floating point type used for calculations.
blackbody(realT T, realT R=0, realT d=0)
Constructor used to initialize parameters.
realT _distance
The optional distance to the blackbody.