#include <GaussianLinesSED.hpp>

Protected Member Functions | |
| GaussianLinesSED () | |
| virtual void | getLineProperties (Array &lambdav, Array &dispersionv, Array &Lv) const =0 |
| void | getWavelengthsAndLuminosities (Array &lambdav, Array &pv) const override |
| Protected Member Functions inherited from TabulatedSED | |
| TabulatedSED () | |
| void | setupSelfBefore () override |
| Protected Member Functions inherited from ContSED | |
| ContSED () | |
| Protected Member Functions inherited from SED | |
| SED () | |
| Random * | random () const |
| Protected Member Functions inherited from SimulationItem | |
| SimulationItem () | |
| virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
| virtual void | setupSelfAfter () |
| Protected Member Functions inherited from Item | |
| Item () | |
Private Types | |
| using | BaseType |
| using | ItemType |
Friends | |
| class | ItemRegistry |
Additional Inherited Members | |
| Public Member Functions inherited from TabulatedSED | |
| double | generateWavelength () const override |
| double | integratedLuminosity (const Range &wavelengthRange) const override |
| Range | intrinsicWavelengthRange () const override |
| double | specificLuminosity (double wavelength) const override |
| void | specificLuminosityArray (Array &lambdav, Array &pv, const Range &wavelengthRange) const override |
| Public Member Functions inherited from SED | |
| Range | normalizationWavelengthRange () const |
| Public Member Functions inherited from SimulationItem | |
| template<class T> | |
| T * | find (bool setup=true) const |
| template<class T> | |
| T * | interface (int upLevels, int downLevels, bool setup) const |
| virtual string | itemName () const |
| void | setup () |
| string | typeAndName () const |
| Public Member Functions inherited from Item | |
| 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 |
GaussianLinesSED is an abstract class for representing spectral energy distributions that consist of one or more Gaussian emission lines. Each line \(i\) is centered on a wavelength \(\lambda_i\) and has a width set by a velocity dispersion \(s_i\) configured by the user for that line, reflecting the thermal (or other) sub-grid motion of the emitting material, in exactly the same way as the LyaGaussianSED class handles a single such line. Using the photon velocity shift
\[ v = \frac{\lambda-\lambda_i}{\lambda_i}\,c \]
as the spectral variable, line \(i\) contributes a specific luminosity
\[ L_{\lambda,i}(\lambda) = \frac{L_i}{s_i\,\sqrt{2\pi}} \exp\left(-\frac{v^2}{2s_i^2}\right) \]
where \(L_i\) is the (relative) luminosity of the line. The SED represented by this class is the sum of the contributions of all configured lines, \(L_\lambda(\lambda) = \sum_i L_{\lambda,i}(\lambda)\), properly handling any overlap between neighbouring lines.
The subclass must provide the center wavelength, the velocity dispersion, and the relative luminosity for each line, in any order – this class sorts the lines by wavelength before further processing, so the lines may be listed in any convenient order in the input. This abstract class handles everything else.
Because a set of lines can be spread over an arbitrarily large wavelength range while each individual line is often extremely narrow relative to that range, this class cannot simply tabulate the summed profile on a single regular wavelength grid covering the full range: this would require an unreasonably large number of grid points to properly resolve the narrowest line, or would grossly undersample that line if the number of points is kept reasonable. Instead, for each line \(i\) this class builds a private linear grid limited to the range \(\lambda_i(1\pm9s_i/c)\) – beyond which the Gaussian contributes negligibly; see the LyaGaussianSED class for a discussion of this limit – with a resolution proportional to that line's own dispersion. The SED is then tabulated on the union of all of these private grids (merging grid points that end up extremely close together), evaluating the sum of all Gaussians at each grid point. This automatically leads to a higher resolution wherever lines overlap, and to just the two edge points of the nearest line(s) across the (possibly wide) empty ranges in between non-overlapping lines or line clusters, without requiring any special-case logic.
This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
inlineprotected |
Default constructor for abstract Item subclass GaussianLinesSED: "a spectral energy distribution consisting of one or more Gaussian emission lines".
|
protectedpure virtual |
This function must be implemented in each subclass to return the center wavelength, the velocity dispersion, and the relative luminosity for each of the Gaussian lines in the SED. The function must guarantee that the three arrays have the same, nonzero size. The order of the lines is not important because this abstract class sorts the lines by wavelength. Constant scaling of the luminosities is not important because the SED will be normalized by this abstract class.
Implemented in FileGaussianLinesSED, and ListGaussianLinesSED.
|
overrideprotectedvirtual |
This function obtains the properties of the individual lines from the subclass and tabulates the sum of the corresponding Gaussian profiles on an appropriate wavelength grid, as described in the class header.
Implements TabulatedSED.