Class SpecsynBlackbody

Inheritance Relationships

Base Type

Class Documentation

class SpecsynBlackbody : public specsyn::Specsyn

An example Specsyn specialization, for testing and validation only.

This class is an example specialization of the Specsyn class, provided for testing and validation of the spectral synthesis architecture only; it should not be used in production simulations. It treats every star as a perfect blackbody radiating at its effective temperature, with a radius set by its luminosity and temperature via the Stefan-Boltzmann law.

Public Functions

explicit SpecsynBlackbody(double wlMin, double wlMax, std::size_t nWl, const io::SimControls &controls)

Construct a SpecsynBlackbody.

If nWl is 0, wlMin and wlMax are ignored (whatever they were passed as) and wl_ is instead set to a grid of nWlDefault points, logarithmically spaced from hc / (10 Ry) to hc / (0.01 Ry). If nWl is nonzero but wlMin is 0 (nWl alone was requested, without an explicit range), wl_ is a grid of nWl points spanning that same default range instead. Otherwise wl_ is a grid of nWl points, logarithmically spaced from wlMin to wlMax.

Parameters:
  • wlMin – Minimum wavelength of the output grid, in Angstrom; if 0 (the default), used as a flag to fall back on this class’s own default range – see

  • wlMax – Maximum wavelength of the output grid, in Angstrom; see wlMin

  • nWl – Number of points in the output grid; if 0 (the default), used as a flag to fall back on this class’s own default range and point count – see

  • controls – Simulation controls; forwarded unchanged to Specsyn’s own constructor – see its comment

virtual auto spec(const StarData &props, double feh) const -> std::vector<double> override

Compute the blackbody spectrum of a single star.

Parameters:
  • props – Stellar properties, as produced by evaluating the Interpolator1D returned by Tracks2D::getIsochrone at this star’s mass

  • feh – [Fe/H] value of the star; unused, since a blackbody spectrum depends only on temperature and radius

Returns:

The star’s spectrum, evaluated on the wavelength grid returned by wl(), in units of erg/s/Angstrom