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

#include <LyaSEDDecorator.hpp>

Inheritance diagram for LyaSEDDecorator:
Inheritance graph
[legend]

Public Member Functions

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

 LyaSEDDecorator ()
 
void setupSelfAfter () 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 = LyaSEDDecorator
 

Private Attributes

double _conversionFraction
 
double _ionizingFraction
 
ContSED_sedLymanAlpha
 
ContSED_sedOriginal
 

Friends

class ItemRegistry
 

Detailed Description

The LyaSEDDecorator class implements a decorator that adjusts another, arbitrary SED by converting a fraction of the ionizing part of that SED to Lyman-alpha emission.

There are three configuration options: the SED to be adjusted, called the 'original SED'; the SED representing the Lyman-alpha emission, called the 'Lyman-alpha SED'; and the fraction of the ionizing radiation to be converted. In the 'decorated SED' produced by this class, the specified fraction of the luminosity in the original SED short of \(\lambda_\mathrm{ion} =911.75\,\text{\AA}\) is replaced by emission following the specified Lyman-alpha SED. The remaining fraction of ionizing radiation and all non-ionizing radiation in the original SED is emitted as usual.

The luminosity normalization configured by the user applies to the decorated SED. The source wavelength range must include the ionizing portion of the spectrum to be considered, even if all ionizing radiation is being converted to Lyman-alpha emission.

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

◆ LyaSEDDecorator()

LyaSEDDecorator::LyaSEDDecorator ( )
inlineprotected

Default constructor for concrete Item subclass LyaSEDDecorator : "an SED decorator replacing ionizing radiation with Lyman-alpha line emission" .

Member Function Documentation

◆ conversionFraction()

LyaSEDDecorator::conversionFraction ( ) const
inline

This function returns the value of the discoverable double property conversionFraction : "the fraction of ionizing radiation replaced by Lyman-alpha emission" .

The minimum value for this property is "[0" .

The maximum value for this property is "1]" .

The default value for this property is given by the conditional value expression "0.5" .

◆ generateWavelength()

double LyaSEDDecorator::generateWavelength ( ) const
overridevirtual

This function draws a random wavelength from the normalized spectral energy distribution. It generates a wavelength from one of the user-configured SEDs as described in the class header.

Implements SED.

◆ integratedLuminosity()

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

This function returns the normalized integrated luminosity \(L\) (i.e. radiative power) over the specified wavelength range. It determines the appropriate value from the user-configured SEDs as described in the class header.

Implements SED.

◆ intrinsicWavelengthRange()

Range LyaSEDDecorator::intrinsicWavelengthRange ( ) const
overridevirtual

This function returns the intrinsic wavelength range of the SED. For this decorator, it returns the union of the intrinsic ranges of the original and Lyman-alpha SEDs configured by the user, even if the configured conversion fraction is equal to one.

Implements SED.

◆ sedLymanAlpha()

LyaSEDDecorator::sedLymanAlpha ( ) const
inline

This function returns the value of the discoverable item property sedLymanAlpha : "the SED representing the Lyman-alpha line emission" .

The default value for this property is given by the conditional value expression "LyaGaussianSED" .

◆ sedOriginal()

LyaSEDDecorator::sedOriginal ( ) const
inline

This function returns the value of the discoverable item property sedOriginal : "the original SED being adjusted" .

The default value for this property is given by the conditional value expression "BlackBodySED" .

◆ setupSelfAfter()

void LyaSEDDecorator::setupSelfAfter ( )
overrideprotectedvirtual

This function precalculates some values for later use.

Reimplemented from SimulationItem.

◆ specificLuminosity()

double LyaSEDDecorator::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. It determines the appropriate value from the user-configured SEDs as described in the class header.

Implements ContSED.

◆ specificLuminosityArray()

void LyaSEDDecorator::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. It determines the appropriate values from the user-configured SEDs as described in the class header.

Implements ContSED.


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