The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
LyaGaussianSED Class Reference

#include <LyaGaussianSED.hpp>

Inheritance diagram for LyaGaussianSED:
Inheritance graph
[legend]

Public Member Functions

double dispersion () const
 
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
 
virtual double specificLuminosity (double wavelength) const =0
 
virtual void specificLuminosityArray (Array &lambdav, Array &pv, const Range &wavelengthRange) const =0
 
- Public Member Functions inherited from SED
virtual double generateWavelength () const =0
 
virtual double integratedLuminosity (const Range &wavelengthRange) const =0
 
virtual Range intrinsicWavelengthRange () const =0
 
Range normalizationWavelengthRange () const
 
- Public Member Functions inherited from SimulationItem
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
 
- 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 ItemgetItemProperty (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)
 
Itemoperator= (const Item &)=delete
 
Itemparent () 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

 LyaGaussianSED ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from ContSED
 ContSED ()
 
- Protected Member Functions inherited from SED
 SED ()
 
Randomrandom () const
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from SimulationItem
 SimulationItem ()
 
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
 
virtual void setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- Protected Member Functions inherited from Item
 Item ()
 

Private Types

using BaseType = ContSED
 
using ItemType = LyaGaussianSED
 

Private Attributes

double _dispersion
 
double _wavelengthCenter
 
double _wavelengthDispersion
 
Range _wavelengthRange
 

Friends

class ItemRegistry
 

Detailed Description

The LyaGaussianSED class implements a Gaussian spectrum around the central Lyman-alpha wavelength \(\lambda_\alpha\), reflecting the thermal sub-grid motion in the source. Using the photon velocity shift

\[ v = \frac{\lambda - \lambda_\alpha} {\lambda_\alpha} \,c \]

as the spectral variable, and a dispersion \(s\) configured by the user in velocity units, the normalized Gaussian spectrum can be written as

\[ L_v(v) = \frac{1}{s\,\sqrt{2\pi}} \,\exp\left( -\frac{v^2}{2s^2} \right). \]

The thermal velocity corresponding to the dispersion \(s\) is given by

\[ v_\mathrm{th}=\sqrt{2}\,s \]

and the full width at half maximum of the Gaussian line profile is given by

\[ \text{FWHM} = 2\sqrt{2\ln2}\,s \approx 2.35482\,s. \]

This SED can be implemented analytically and it can sampled using the standard procedure for a Gaussian deviate. To simplify some numerical operations, such as tabulating the SED, we limit the intrinsic range of the SED to \(\pm 9s\) from the center. We have \(L_v(9s)/L_v(0) < 3\times10^{-18}\) so that values outside this range will never contribute to the results anyway.

To simplify normalization of this SED, the source wavelength range configured by the user must fully contain the intrinsic wavelength range defined by

\[ \lambda_\alpha \left(1 \pm \frac{9\,s}{c}\right) \]

This item type is displayed only if the Boolean expression "Lya|Level3" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ LyaGaussianSED()

LyaGaussianSED::LyaGaussianSED ( )
inlineprotected

Default constructor for concrete Item subclass LyaGaussianSED : "a Gaussian spectrum around the central Lyman-alpha wavelength" .

Member Function Documentation

◆ dispersion()

LyaGaussianSED::dispersion ( ) const
inline

This function returns the value of the discoverable double property dispersion : "the Gaussian velocity dispersion" .

This property represents a physical quantity of type "velocity" .

The minimum value for this property is "]0 km/s" .

The maximum value for this property is "1000 km/s]" .

The default value for this property is given by the conditional value expression "50 km/s" .

◆ generateWavelength()

double LyaGaussianSED::generateWavelength ( ) const
overridevirtual

This function draws a random wavelength from the normalized spectral energy distribution.

Implements SED.

◆ integratedLuminosity()

double LyaGaussianSED::integratedLuminosity ( const Range wavelengthRange) const
overridevirtual

This function returns the normalized integrated luminosity \(L\) (i.e. radiative power) over the specified wavelength range.

Implements SED.

◆ intrinsicWavelengthRange()

Range LyaGaussianSED::intrinsicWavelengthRange ( ) const
overridevirtual

This function returns the intrinsic wavelength range of the SED. For our Gaussian profile, we limit the range to \(\pm 9s\) from the Lyman-alpha line center, as decribed in the class header.

Implements SED.

◆ setupSelfBefore()

void LyaGaussianSED::setupSelfBefore ( )
overrideprotectedvirtual

This function precalculates some values for later use.

Reimplemented from SimulationItem.

◆ specificLuminosity()

double LyaGaussianSED::specificLuminosity ( double  wavelength) const
overridevirtual

This function returns the normalized specific luminosity \(L_\lambda\) (i.e. radiative power per unit of wavelength) at the specified wavelength.

Implements ContSED.

◆ specificLuminosityArray()

void LyaGaussianSED::specificLuminosityArray ( Array lambdav,
Array pv,
const Range wavelengthRange 
) const
overridevirtual

This function returns the normalized specific luminosity \(L_\lambda\) (i.e. radiative power per unit of wavelength) at a number of wavelength points within the specified wavelength range. The intrinsic wavelength range \(\pm 9s\) of the SED is covered by 1800 wavelength points on a regular linear grid.

Implements ContSED.


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