Template Class qspectrum_t

Inheritance Relationships

Base Type

Class Documentation

template<Quantity Q>
class qspectrum_t : public wt::scene::scene_element_t

A helper spectrum that scales an underlying spectrum by a quantity. The underlying spectrum may be nullptr in which case this spectrum is a uniform spectrum.

Public Functions

inline qspectrum_t(std::string id, std::shared_ptr<spectrum::spectrum_real_t> spectrum, Q scale)
qspectrum_t(const qspectrum_t&) = default
qspectrum_t(qspectrum_t&&) = default
inline const distribution1d_t *distribution() const noexcept

Returns the underlying spectrum distribution.

inline Q power() const noexcept

Returns the total spectral power contained in this spectrum.

inline Q power(const range_t<wavenumber_t> &wavenumbers) const noexcept

Returns the spectral power over the provided wavenumber range.

inline range_t<wavenumber_t> wavenumber_range() const noexcept

Returns the range of wavenumbers for which this spectrum_complex is defined. Querying the spectrum with wavenumber<range.min or wavenumber>range.max will always return 0.

inline wavenumber_t mean_wavenumber() const noexcept

Returns the mean wavenumber for this spectrum.

inline Q f(const wavenumber_t wavenumber) const noexcept

Query the spectrum.

inline virtual scene::element::info_t description() const override

Public Static Functions

static inline constexpr std::string scene_element_class() noexcept
static inline std::unique_ptr<qspectrum_t> load(std::string id, scene::loader::loader_t *loader, const scene::loader::node_t &node, const wt::wt_context_t &context)