mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::astro::blackbody< units, freq > Struct Template Reference

template<typename units, bool freq = false>
struct mx::astro::blackbody< units, freq >

The blackbody spectral energy distribution in the mx::astro::astroSpectrum form.

You specify the temperature, and optionally the radius and distance of the blackbody.

Template Parameters
unitsspecifies the units of the spectrum
freqif true, then the blackbody is calcuated as a frequency distribution. If false (default), it is a wavelength distribution.

Definition at line 37 of file blackbody.hpp.

#include <astro/blackbody.hpp>

Public Types

typedef units::realT realT
 The real floating point type used for calculations.
 

Public Member Functions

 blackbody ()
 Default c'tor.
 
 blackbody (realT T, realT R=0, realT d=0)
 Constructor used to initialize parameters.
 
void setParameters (realT T, realT R, realT d)
 Set the parameters of the blackbody.
 

Public Attributes

realT _temperature
 The temperature of the blackbody. Default value is the effective temperature of the Sun.
 
realT _radius
 The optional radius of the blackbody.
 
realT _distance
 The optional distance to the blackbody.
 
std::vector< realT_spectrum
 The calculated spectral energy distribution.
 

Member Typedef Documentation

◆ realT

template<typename units , bool freq = false>
typedef units::realT mx::astro::blackbody< units, freq >::realT

The real floating point type used for calculations.

Definition at line 39 of file blackbody.hpp.

Constructor & Destructor Documentation

◆ blackbody() [1/2]

template<typename units , bool freq = false>
mx::astro::blackbody< units, freq >::blackbody ( )
inline

◆ blackbody() [2/2]

template<typename units , bool freq = false>
mx::astro::blackbody< units, freq >::blackbody ( realT  T,
realT  R = 0,
realT  d = 0 
)
inline

Constructor used to initialize parameters.

Parameters
[in]TThe effective temperature of the blackbody. Units as specified by the units template-parameter.
[in]R[optional] The radius of the blackbody. Units as specified by the units template-parameter.
[in]d[optional] The distance to the blackbody. Units as specified by the units template-parameter.

Definition at line 56 of file blackbody.hpp.

References mx::astro::blackbody< units, freq >::setParameters().

Member Function Documentation

◆ setParameters()

template<typename units , bool freq = false>
void mx::astro::blackbody< units, freq >::setParameters ( realT  T,
realT  R,
realT  d 
)
inline

Set the parameters of the blackbody.

Parameters
[in]TThe effective temperature of the blackbody. Units as specified by the units template-parameter.
[in]RThe radius of the blackbody. Units as specified by the units template-parameter.
[in]dThe distance to the blackbody. Units as specified by the units template-parameter.

Definition at line 69 of file blackbody.hpp.

References mx::astro::blackbody< units, freq >::_distance, mx::astro::blackbody< units, freq >::_radius, and mx::astro::blackbody< units, freq >::_temperature.

Referenced by mx::astro::blackbody< units, freq >::blackbody().

Member Data Documentation

◆ _distance

template<typename units , bool freq = false>
realT mx::astro::blackbody< units, freq >::_distance

The optional distance to the blackbody.

Definition at line 43 of file blackbody.hpp.

Referenced by mx::astro::blackbody< units, freq >::blackbody(), and mx::astro::blackbody< units, freq >::setParameters().

◆ _radius

template<typename units , bool freq = false>
realT mx::astro::blackbody< units, freq >::_radius

The optional radius of the blackbody.

Definition at line 42 of file blackbody.hpp.

Referenced by mx::astro::blackbody< units, freq >::blackbody(), and mx::astro::blackbody< units, freq >::setParameters().

◆ _spectrum

template<typename units , bool freq = false>
std::vector<realT> mx::astro::blackbody< units, freq >::_spectrum

The calculated spectral energy distribution.

Definition at line 45 of file blackbody.hpp.

◆ _temperature

template<typename units , bool freq = false>
realT mx::astro::blackbody< units, freq >::_temperature

The temperature of the blackbody. Default value is the effective temperature of the Sun.

Definition at line 41 of file blackbody.hpp.

Referenced by mx::astro::blackbody< units, freq >::blackbody(), and mx::astro::blackbody< units, freq >::setParameters().


The documentation for this struct was generated from the following file: