The SKIRT project
advanced radiative transfer for astrophysics
LyaSEDFamilyDecorator Class Reference

#include <LyaSEDFamilyDecorator.hpp>

Inheritance diagram for LyaSEDFamilyDecorator:

Public Member Functions

double cdf (Array &lambdav, Array &pv, Array &Pv, const Range &wavelengthRange, const Array &parameters) const override
double conversionFraction () const
Range intrinsicWavelengthRange () const override
vector< SnapshotParameterparameterInfo () const override
SEDFamilysedFamilyOriginal () const
ContSEDsedLymanAlpha () const
double specificLuminosity (double wavelength, const Array &parameters) const override
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

 LyaSEDFamilyDecorator ()
void setupSelfAfter () override
Protected Member Functions inherited from SEDFamily
 SEDFamily ()
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfBefore ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

double _conversionFraction
Range _ionizingRange
SEDFamily_sedFamilyOriginal
ContSED_sedLymanAlpha

Friends

class ItemRegistry

Detailed Description

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

There are three configuration options: the SED family to be adjusted, called the 'original SED family'; the SED representing the Lyman-alpha emission, called the 'Lyman-alpha SED'; and the fraction of the ionizing radiation to be converted. The template parameters passed to the decorator are passed on to the original SED family without change. In the 'decorated SED' templates produced by the decorator, the specified fraction of the luminosity in any 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 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

◆ LyaSEDFamilyDecorator()

LyaSEDFamilyDecorator::LyaSEDFamilyDecorator ( )
inlineprotected

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

Member Function Documentation

◆ cdf()

double LyaSEDFamilyDecorator::cdf ( Array & lambdav,
Array & pv,
Array & Pv,
const Range & wavelengthRange,
const Array & parameters ) const
overridevirtual

This function constructs both the normalized probability density function (pdf) and the corresponding normalized cumulative distribution function (cdf) for the decorated SED with the specified parameters over the specified wavelength range. The function returns the normalization factor. The number and type of parameters must match the information returned by the parameterInfo() function (which match those of the original SED family); if not the behavior is undefined.

Implements SEDFamily.

◆ conversionFraction()

double LyaSEDFamilyDecorator::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".

◆ intrinsicWavelengthRange()

Range LyaSEDFamilyDecorator::intrinsicWavelengthRange ( ) const
overridevirtual

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

Implements SEDFamily.

◆ parameterInfo()

vector< SnapshotParameter > LyaSEDFamilyDecorator::parameterInfo ( ) const
overridevirtual

This function passes on the number and type of parameters used by the original SED family as a list of SnapshotParameter objects. Each of these objects specifies unit information and a human-readable descripton for the parameter.

Implements SEDFamily.

◆ sedFamilyOriginal()

SEDFamily * LyaSEDFamilyDecorator::sedFamilyOriginal ( ) const
inline

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

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

◆ sedLymanAlpha()

ContSED * LyaSEDFamilyDecorator::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".

◆ setupSelfAfter()

void LyaSEDFamilyDecorator::setupSelfAfter ( )
overrideprotectedvirtual

This function verifies that the source wavelength range includes ionizing radiation and caches the ionizing wavelength range.

Reimplemented from SimulationItem.

◆ specificLuminosity()

double LyaSEDFamilyDecorator::specificLuminosity ( double wavelength,
const Array & parameters ) const
overridevirtual

This function returns the specific luminosity \(L_\lambda\) (i.e. radiative power per unit of wavelength) for the decorated SED with the specified parameters at the specified wavelength, or zero if the wavelength is outside of the SED's intrinsic wavelength range. The number and type of parameters must match the information returned by the parameterInfo() function (which match those of the original SED family); if not the behavior is undefined.

Implements SEDFamily.


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