#include <SED.hpp>
Public Member Functions | |
virtual double | generateWavelength () const =0 |
virtual double | integratedLuminosity (const Range &wavelengthRange) const =0 |
virtual Range | intrinsicWavelengthRange () const =0 |
Range | normalizationWavelengthRange () const |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
SED () | |
Random * | random () const |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = SED |
Private Attributes | |
Random * | _random |
Friends | |
class | ItemRegistry |
An instance of a SED subclass represents a spectral energy distribution
There are two important categories of emission spectra, each represented by an abstract SED subclass:
Each SED subclass, regardless of its category, must ensure that the implemented spectral energy distribution is normalized to unity over the normalization wavelength range, which is defined as the intersection of the source wavelength range (determined by the SourceSystem) and the intrinsic wavelength range of the implemented distribution (determined by the SED subclass). A convenience function offered by this abstract base class returns this normalization wavelength range.
Specifically, this means that the random wavelengths returned by the generateWavelength() function will always fall inside the normalization range. On the other hand, while the functions calculating specific and integrated luminosities use the same normalization, they operate across the full intrinsic wavelength range of the SED without being limited by the source wavelength range. This makes it possible for a user to configure a luminosity normalization at a wavelength (or over a wavelength range) outside of the wavelength range where the sources are actually emitting.
|
inlineprotected |
|
pure virtual |
This function returns a random wavelength drawn from the normalized spectral energy distribution limited to the normalization wavelength range.
Implemented in BlackBodySED, FamilySED, LineSED, LyaDoublePeakedSED, LyaGaussianSED, LyaSEDDecorator, ResourceSED, SingleWavelengthSED, and TabulatedSED.
|
pure virtual |
This function returns the normalized integrated luminosity
Implemented in BlackBodySED, FamilySED, LineSED, LyaDoublePeakedSED, LyaGaussianSED, LyaSEDDecorator, ResourceSED, and TabulatedSED.
|
pure virtual |
This function returns the intrinsic wavelength range of the SED. Outside this range, all luminosities are zero.
Implemented in BlackBodySED, FamilySED, LineSED, LyaDoublePeakedSED, LyaGaussianSED, LyaSEDDecorator, ResourceSED, and TabulatedSED.
Range SED::normalizationWavelengthRange | ( | ) | const |
This function returns the SED's normalization wavelength range. This range is defined as the intersection of the simulation's source wavelength range (obtained from the simulation configuration) and the intrinsic wavelength range of the SED (obtained through the abtract intrinsicWavelengthRange() function which must be impemented in each subclass.
|
inlineprotected |
This function returns the simulation's random generator as a service to subclasses.
|
overrideprotectedvirtual |
This function caches the simulation's random generator for use by subclasses.
Reimplemented from SimulationItem.
Reimplemented in TabulatedSED.