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

#include <LyaDoublePeakedSED.hpp>

Inheritance diagram for LyaDoublePeakedSED:
Inheritance graph
[legend]

Public Member Functions

double generateWavelength () const override
 
double integratedLuminosity (const Range &wavelengthRange) const override
 
Range intrinsicWavelengthRange () const override
 
double scale () const
 
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

 LyaDoublePeakedSED ()
 
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 = LyaDoublePeakedSED
 

Private Attributes

double _scale
 
double _wavelengthCenter
 
Range _wavelengthRange
 
double _wavelengthScale
 

Friends

class ItemRegistry
 

Detailed Description

The LyaDoublePeakedSED class implements a double-peaked SED, centered on the Lyman-alpha line wavelength \(\lambda_\alpha\), and corresponding to the spectrum that emerges from a static sphere of hydrogen gas surrounding a Lyman-alpha point source. This SED can be used as a simple model to represent sub-grid gas embedded in the source.

The spectrum can be expressed analytically (see Dijkstra et al. 2006a, ApJ, 649, 14-36). Using the photon velocity shift

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

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

\[ L_v(v) = \frac{3v^2} {2s^3\left[1+\cosh(v^3/s^3)\right]}. \]

The two peaks of this profile are situated at \(v_* \approx \pm 1.06938 \,s\).

The cumulative distribution is

\[ \int_{-\infty}^{v} L_v(v') \,\mathrm{d}v' = \frac{1} {1+\exp(-v^3/s^3)}, \]

which can be inverted so that we can obtain a sample from the distribution through

\[ v = s \left( \ln\frac{\mathcal{X}}{1-\mathcal{X}} \right)^{1/3}, \]

where \(\mathcal{X}\) is a uniform deviate.

To simplify some numerical operations, such as tabulating the SED, we limit the intrinsic range of the SED to \(\pm 3.6s\) from the center. We have \(L_v(3.6s)/L_v(v_*) < 4\times10^{-19}\) 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{3.6\,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

◆ LyaDoublePeakedSED()

LyaDoublePeakedSED::LyaDoublePeakedSED ( )
inlineprotected

Default constructor for concrete Item subclass LyaDoublePeakedSED : "a double-peaked spectrum around the central Lyman-alpha wavelength" .

Member Function Documentation

◆ generateWavelength()

double LyaDoublePeakedSED::generateWavelength ( ) const
overridevirtual

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

Implements SED.

◆ integratedLuminosity()

double LyaDoublePeakedSED::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 LyaDoublePeakedSED::intrinsicWavelengthRange ( ) const
overridevirtual

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

Implements SED.

◆ scale()

LyaDoublePeakedSED::scale ( ) const
inline

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

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" .

◆ setupSelfBefore()

void LyaDoublePeakedSED::setupSelfBefore ( )
overrideprotectedvirtual

This function precalculates some values for later use.

Reimplemented from SimulationItem.

◆ specificLuminosity()

double LyaDoublePeakedSED::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 LyaDoublePeakedSED::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 3.6s\) of the SED is covered by 720 wavelength points on a regular linear grid.

Implements ContSED.


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