The SKIRT project
advanced radiative transfer for astrophysics
ToddlersSEDFamily Class Reference

#include <ToddlersSEDFamily.hpp>

Inheritance diagram for ToddlersSEDFamily:

Public Types

enum class  Resolution : int { Low , High }
enum class  SedMode : int { SFRNormalized , Cloud }
enum class  SFRPeriod : int { Period10Myr , Period30Myr }
enum class  StellarTemplate : int { SB99Kroupa100Sin , BPASSChab100Bin , BPASSChab300Bin }

Public Member Functions

 ToddlersSEDFamily (SimulationItem *parent, SedMode sedMode, StellarTemplate stellarTemplate, bool includeDust, Resolution resolution, SFRPeriod sfrPeriod=SFRPeriod::Period10Myr)
double cdf (Array &lambdav, Array &pv, Array &Pv, const Range &wavelengthRange, const Array &parameters) const override
bool includeDust () const
Range intrinsicWavelengthRange () const override
vector< SnapshotParameterparameterInfo () const override
Resolution resolution () const
SedMode sedMode () const
SFRPeriod sfrPeriod () const
double specificLuminosity (double wavelength, const Array &parameters) const override
StellarTemplate stellarTemplate () 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

 ToddlersSEDFamily ()
void setupSelfBefore () 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 setupSelfAfter ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

StoredTable< 6 > _cloudTable
bool _includeDust
Resolution _resolution
SedMode _sedMode
StoredTable< 4 > _sfrNormalizedTable
SFRPeriod _sfrPeriod
StellarTemplate _stellarTemplate

Friends

class ItemRegistry

Detailed Description

An instance of the ToddlersSEDFamily class represents the family of star-forming region templates from the TODDLERS model suite (Time evolution of Observables including Dust Diagnostics and Line Emission from Regions containing young Stars).

The TODDLERS model calculates the spherical evolution of a gas cloud around a young stellar cluster, accounting for stellar feedback processes such as stellar winds, supernovae, radiation pressure, and gravitational forces; see Kapoor et al. 2023 (MNRAS, 526, 3871) and Kapoor et al. 2024 (A&A, 692A, 79). The spectra were generated using the third-party Cloudy code based on the results of the evolution model.

Configuration Options

This class offers several user-configured options as described below.

sedMode determines how the SED is calculated and scaled:

  • SFRNormalized: SEDs pre-integrated over time and cloud mass spectrum, directly scaled by SFR
  • Cloud: SEDs for individual star-forming clouds with explicit time evolution

stellarTemplate determines the stellar population model, IMF, and stellar evolution:

  • SB99Kroupa100Sin: Starburst99 models with Kroupa IMF (0.1-100 \(\mathrm{M}_\odot\)) and single star evolution
  • BPASSChab100Bin: BPASS models with Chabrier IMF (0.1-100 \(\mathrm{M}_\odot\)) and binary star evolution
  • BPASSChab300Bin: BPASS models with Chabrier IMF (0.1-300 \(\mathrm{M}_\odot\)) and binary star evolution

includeDust determines dust processing in the SEDs:

  • true:
    • For low spectral resolution, uses the total emission reported by Cloudy, which includes attenuated stellar, nebular, and dust continuum components.
    • For high spectral resolution, uses dust-attenuated emission lines (emergent luminosities) added to the total emission after removing the low-resolution lines. The high-resolution mode includes a limited set of approximately 140 emission lines tracked by TODDLERS, so the replacement is not one-to-one. Emergent luminosity values are calculated using escape probabilities for diffuse radiation in Cloudy. Roughly, these drop off as \(E_2(\tau)\), where \(E_2\) is the exponential integral and \(\tau\) is the optical depth. \(E_2(\tau)\) drops off faster than \(\exp(-\tau)\). This is discussed in section 3.1.1 of Rollig et al. 2007 (A&A, 467, 187).
  • false:
    • For low spectral resolution, uses only the incident stellar radiation field (stellar continuum) without any gas or dust processing.
    • For high spectral resolution, uses intrinsic emission line luminosities (without foreground attenuation) added to the incident stellar continuum.

resolution determines the spectral resolution of the SEDs:

  • Low: the entire spectrum (continuum and lines) is at \(R=300\) resolution
  • High: low-resolution continuum with selected emission lines represented as high-resolution Gaussian profiles ( \(R = \lambda/\Delta\lambda_G = 5\times 10^4\)) sampled using 37 points per line. This approach offers better line-to-continuum contrast while maintaining computational efficiency.

sfrPeriod sets the time period over which SFR is averaged and integrated (only used in SFRNormalized mode):

  • Period10Myr: SFR integrated over 10 Myr
  • Period30Myr: SFR integrated over 30 Myr

Wavelength Coverage

The SEDs in the TODDLERS library are tabulated over a wavelength range from \(0.01\) to \(3000~\mu\mathrm{m}\) (UV through millimeter) and include stellar, nebular, and dust continuum emission along with numerous emission lines from H II, PDR, and molecular gas phases from Cloudy spectral synthesis calculations. For more details, see the discussion on dust processing and spectral resolution in the previous section. The figure below shows the spectral resolution for a high-resolution model.

Emission Line Artifacts

For the high-resolution Cloud-mode models with includeDust=true, the process of subtracting low-resolution line emission from the total low-resolution spectrum before adding high-resolution line profiles can occasionally produce numerical artifacts. These artifacts appear as sharp drops in flux sometimes up to 5 orders of magnitude below the continuum level. This has been observed particularly around mid-IR lines in the 10-30 \(\mu\mathrm{m}\) region. The artifacts primarily affect lower mass clouds ( \(\le 10^{5.5}~\mathrm{M}_\odot\)) and occur at the transition points between the continuum and line profiles. The artifacts are expected to have a negligible impact on the integrated line luminosities in actual galaxy simulations using an ensemble of clouds.

Parameter space

The SEDs in the TODDLERS library are tabulated for combinations of the following parameters.

  1. Evolution time (Cloud mode only): the time since the start of evolution
    • Time-dependent evolution from 0.1 to 30 Myr (90 values)
  2. Metallicity:
    • Starburst99: range from Z=0.001 to Z=0.04 (5 values)
    • BPASS: range from Z=0.001 to Z=0.04 (11 values)
  3. Star formation efficiency (SFE): the fraction of cloud mass converted to stars
    • Starburst99: range from 0.01 to 0.15 (7 values)
    • BPASS: range from 0.01 to 0.1 (5 values)
  4. Cloud number density: the initial density of the star-forming cloud
    • Starburst99: range from 10 to 2560 \(\mathrm{cm}^{-3}\) (9 values)
    • BPASS: range from 40 to 640 \(\mathrm{cm}^{-3}\) (5 values)
  5. Cloud mass (Cloud mode only): the mass of the star-forming cloud
    • range from \(10^5\) to \(10^{6.75}~\mathrm{M}_\odot\) (8 values)

When using SFRNormalized mode, the parameters must appear in the following order, with the specified default units unless overridden by column header info:

\[ Z\,(\mathrm{dimensionless}) \quad \mathrm{SFE}\,(\mathrm{dimensionless}) \quad n_{\text{cl}}\,(\mathrm{cm}^{-3}) \quad \dot{M}_*\,(\mathrm{M}_\odot\,\mathrm{yr}^{-1}) \]

where \(Z\) is the metallicity, \(\mathrm{SFE}\) is the star formation efficiency, \(n_{\text{cl}}\) is the cloud number density, and \(\dot{M}_*\) is the star formation rate.

When using Cloud mode, the parameters must appear in the following order, with the specified default units unless overridden by column header info:

\[ t\,(\mathrm{Myr}) \quad Z\,(\mathrm{dimensionless}) \quad \mathrm{SFE}\,(\mathrm{dimensionless}) \quad n_{\text{cl}}\,(\mathrm{cm}^{-3}) \quad M_{\text{cl}}\,(\mathrm{M}_\odot) \quad \mathrm{scaling}\,(\mathrm{dimensionless}) \]

where \(t\) is the evolution time since the start of star formation, \(Z\) is the metallicity, \(\mathrm{SFE}\) is the star formation efficiency, \(n_{\text{cl}}\) is the cloud number density, \(M_{\text{cl}}\) is the cloud mass, and \(\mathrm{scaling}\) is an arbitrary scaling factor (typically 1).

Recollapse

If stellar feedback is insufficient to overcome gravity, the evolution of a star-forming cloud includes a recollapse phase, triggering a subsequent generation of star formation. Consequently, at a given point in time, multiple stellar populations of different ages may be present.

In SFRNormalized mode, a constant star formation history is assumed over the past 10 or 30 Myr period (as determined by the sfrPeriod parameter). The model properly accounts for recollapse: any recollapse contribution is pre-integrated over the time evolution (10 or 30 Myr) and cloud mass spectrum ( \(10^5\) to \(10^{6.75}~\mathrm{M}_\odot\)) with a power-law distribution ( \(dN/dM \propto M^{-1.8}\)).

In Cloud mode, users must apply the appropriate scaling to ensure that the star formation rate follows the input model when recollapse occurs. Assuming SKIRT is used to post-process a galaxy snapshot from a hydrodynamical simulation, this can be achieved with the following steps:

  1. Divide the young stellar population particles into temporal bins based on their age.
  2. Calculate recollapse contributions for each temporal bin.
  3. Apply a uniform scaling factor to all particles within a time bin based on the total recollapse contribution in that bin, thereby maintaining the simulated galaxy's total star formation rate.

A Python implementation of this algorithm can be found at https://github.com/anandutsavkapoor/reSample

In other words, when a recollapse event occurs, stellar mass is effectively added to one part of the galaxy while being removed from other parts based solely on the time bin in which the recollapse occurs, without any consideration of spatial proximity or physical connection between these regions. Although this approach preserves the galaxy's total star formation rate, users should consider this limitation when interpreting results, particularly for analyses that are sensitive to local star formation or that examine spatially resolved properties of simulated galaxies. The SFRNormalized mode circumvents this issue at the expense of explicit time evolution.

Resource packs

The tabulated data used by the various TODDLERS models is contained in SKIRT resource packs that need to be downloaded separately. Because of the large size of the Cloud-mode tables, the data are distributed over multiple resource packs. It is recommended to download and install only the packs for the required models:

  • SKIRT9_Resources_TODDLERS (400 MB installed): all SFRNormalized-mode models
  • SKIRT9_Resources_TODDLERS_Cloud_SB99_kroupa100 (50 GB installed): Cloud-mode models with Starburst99 and Kroupa IMF (0.1-100)
  • SKIRT9_Resources_TODDLERS_Cloud_BPASS_chab100 (43 GB installed): Cloud-mode models with BPASS and Chabrier IMF (0.1-100)
  • SKIRT9_Resources_TODDLERS_Cloud_BPASS_chab300 (43 GB installed): Cloud-mode models with BPASS and Chabrier IMF (0.1-300)

Member Enumeration Documentation

◆ Resolution

enum class ToddlersSEDFamily::Resolution : int
strong

The enumeration type indicating the wavelength resolution

Low : "Low wavelength resolution (continuum and lines at R=300)".

High : "High wavelength resolution (continuum at R=300 and lines at R=5e4)".

◆ SedMode

enum class ToddlersSEDFamily::SedMode : int
strong

The enumeration type indicating the SED calculation mode

SFRNormalized : "SEDs normalized by star formation rate".

Cloud : "Individual cloud SEDs with time evolution".

◆ SFRPeriod

enum class ToddlersSEDFamily::SFRPeriod : int
strong

The enumeration type indicating the SFR integration period

Period10Myr : "SFR integrated over 10 Myr".

Period30Myr : "SFR integrated over 30 Myr".

◆ StellarTemplate

enum class ToddlersSEDFamily::StellarTemplate : int
strong

The enumeration type indicating the stellar template to use

SB99Kroupa100Sin : "Starburst99 with Kroupa IMF (0.1-100 Msun) and single star evolution".

BPASSChab100Bin : "BPASS with Chabrier IMF (0.1-100 Msun) and binary star evolution".

BPASSChab300Bin : "BPASS with Chabrier IMF (0.1-300 Msun) and binary star evolution".

Constructor & Destructor Documentation

◆ ToddlersSEDFamily() [1/2]

ToddlersSEDFamily::ToddlersSEDFamily ( )
inlineprotected

Default constructor for concrete Item subclass ToddlersSEDFamily: "a TODDLERS SED family for emission from star-forming regions".

◆ ToddlersSEDFamily() [2/2]

ToddlersSEDFamily::ToddlersSEDFamily ( SimulationItem * parent,
SedMode sedMode,
StellarTemplate stellarTemplate,
bool includeDust,
Resolution resolution,
SFRPeriod sfrPeriod = SFRPeriod::Period10Myr )
explicit

This constructor can be invoked programmatically by classes that use a hard-coded SED family. The newly created object is hooked up as a child to the specified parent in the simulation hierarchy, and its setup() function has been called.

Member Function Documentation

◆ cdf()

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

This function constructs the normalized probability density function (pdf) and cumulative distribution function (cdf) for the SED with the specified parameters.

Implements SEDFamily.

◆ includeDust()

bool ToddlersSEDFamily::includeDust ( ) const
inline

This function returns the value of the discoverable Boolean property includeDust: "include dust processing in the SED models".

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

◆ intrinsicWavelengthRange()

Range ToddlersSEDFamily::intrinsicWavelengthRange ( ) const
overridevirtual

This function returns the intrinsic wavelength range of the SED family from the stored table.

Implements SEDFamily.

◆ parameterInfo()

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

This function returns the number and type of parameters used by this particular SED family as a list of SnapshotParameter objects. Each object specifies unit information and a human-readable description for the parameter.

Implements SEDFamily.

◆ resolution()

Resolution ToddlersSEDFamily::resolution ( ) const
inline

This function returns the value of the discoverable Resolution enumeration property resolution: "the wavelength resolution".

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

◆ sedMode()

SedMode ToddlersSEDFamily::sedMode ( ) const
inline

This function returns the value of the discoverable SedMode enumeration property sedMode: "SED calculation mode".

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

◆ setupSelfBefore()

void ToddlersSEDFamily::setupSelfBefore ( )
overrideprotectedvirtual

This function opens the appropriate resource file (in SKIRT stored table format).

Reimplemented from SimulationItem.

◆ sfrPeriod()

SFRPeriod ToddlersSEDFamily::sfrPeriod ( ) const
inline

This function returns the value of the discoverable SFRPeriod enumeration property sfrPeriod: "the SFR integration time period".

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

This property is relevant only if the Boolean expression "sedModeSFRNormalized" evaluates to true after replacing the names by true or false depending on their presence.

◆ specificLuminosity()

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

This function returns the specific luminosity \(L_\lambda\) (radiative power per unit of wavelength) for the SED with the specified parameters at the specified wavelength.

Implements SEDFamily.

◆ stellarTemplate()

StellarTemplate ToddlersSEDFamily::stellarTemplate ( ) const
inline

This function returns the value of the discoverable StellarTemplate enumeration property stellarTemplate: "the stellar template, IMF, and evolution model to use".

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


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