Full length articleSKIRT: An advanced dust radiative transfer code with a user-friendly architecture☆
Introduction
The presence of even a small fraction of dust can have a substantial impact on the radiation traversing and exiting an astrophysical system. In a typical spiral galaxy viewed edge-on, for example, the central dust lane blocks most of the starlight in the UV and optical wavelength range and re-emits the absorbed energy in the infrared and sub-millimeter regime (e.g. Verstappen et al., 2013). Simulating the precise effect of the dust is not trivial. Anisotropic scattering by the dust couples all lines of sight, and dust absorption/emission couples all wavelengths. As a result, the radiative transfer equation is highly nonlocal and nonlinear (Steinacker et al., 2013). In most astrophysical systems, at least part of the dust is not in local thermal equilibrium with the radiation field, complicating the calculations even more (Draine and Li, 2001). And finally, realistic scenarios involve complex 3D geometries such as spiral arms, randomly placed clumps, or snapshots taken from a hydrodynamical simulation.
Because of these complexities, most dust radiative transfer codes use the Monte Carlo technique to tackle the problem; see e.g. the reviews by Whitney (2011) and Steinacker et al. (2013). The radiation field is represented as a stream of discrete photon packages. A simulation follows the individual path of each photon package through the dusty medium. The trajectory is governed by various events determined statistically by drawing random numbers from the appropriate probability distribution. Typically, a photon package is emitted, undergoes a number of scattering events, and is finally either absorbed or leaves the system. The Monte Carlo technique is conceptually simple and allows efficient radiative transfer calculations for complex problems. However, due to the randomization process, the results inherently contain a certain level of Poisson noise.
SKIRT is a state-of-the-art Monte Carlo dust radiative transfer code. It implements the common optimization techniques, such as peel-off at emission and scattering events (Yusef-Zadeh et al., 1984), continuous absorption (Lucy, 1999, Niccolini et al., 2003), and forced scattering (Cashwell and Everett, 1959), and includes novel techniques such as the library mechanism described in Baes et al. (2011). The code is registered in the Astrophysics Source Code Library with identifier ascl:1109.003. Earlier versions were described in Baes et al., 2003, Baes et al., 2011. Here we present the latest, substantially revised version of SKIRT, which is fully documented1 and publicly available from a GitHub code repository.2
Stalevski et al. (2012) have used SKIRT to investigate the emission of active galactic nuclei (AGN) dusty tori in the infrared domain, modeling the dusty torus as a two-phase medium with high-density clumps and a low-density medium filling the space between the clumps. The resulting SED database has been made public as described in Stalevski (2012). As can be expected, SKIRT is often used to solve the inverse radiative transfer problem, where the goal is to recover the actual 3D distribution of radiation sources and dust by fitting the results of radiative transfer simulations to observational data. This is a nontrivial task, since the underlying model typically has a large number of free parameters. For example, SKIRT has been used to perform detailed studies of the dust energy balance in the edge-on spiral galaxies UGC4754, NGC 4565, and M104 (Baes et al., 2010, De Looze et al., 2012a, De Looze et al., 2012b). These studies found an inconsistency in the dust energy budget, suggesting that a sizable fraction of the total dust reservoir consists of a clumpy distribution with no associated young stellar sources.
Rather than using a manual trial and error procedure, De Geyter et al. (2013) describe FitSKIRT, a code that automatically fits a 3D model to observed images of a dusty galaxy by matching the output of SKIRT radiative transfer simulations to the data. They apply FitSKIRT to automatically determine the intrinsic distribution of stars and dust in the galaxy NGC 4013. De Geyter et al. (2014) use FitSKIRT to investigate interstellar dust in a sample of 12 edge-on galaxies, simultaneously reproducing the -, -, - and -band observations from a model with 19 free parameters without human intervention.
In this article, we do not discuss the results obtained with SKIRT, nor the Monte Carlo radiative transfer techniques implemented in the code. Instead we focus on the software design choices involved with setting up the simulation model. Many scientific codes require a user to hard-code the model makeup for each distinct problem. In contrast, our strategy with SKIRT in recent years has been to continuously add new features without removing existing capabilities. Consequently, SKIRT now offers a wealth of configurable components that are ready to use without any programming at all, especially in the areas where the code has been most often applied. An ad-hoc approach to include all of this functionality would have lead to source code that is hard to understand, maintain, and use. Instead we developed a modular, generic software architecture that can support the wide range of built-in components and options in SKIRT in a developer- and user-friendly way.
In Section 2 we first provide an overview of SKIRT’s features, including the user interface for configuring a particular simulation. In Section 3 we then discuss the design goals for the latest revision of the code, we describe the overall architecture, and we zoom in on a few key aspects of the design, such as the mechanism that automatically adjusts the user interface to accommodate new features. In Section 4 we finally argue that many scientific codes, like SKIRT, can benefit from careful object-oriented design and from a friendly user interface, even if it is not a graphical user interface.
Section snippets
Overview
SKIRT is a Monte Carlo continuum radiative transfer code for simulating the effect of dust on radiation in static astrophysical systems. It is assumed that the radiation traverses the system much faster than the time scale on which the system evolves. SKIRT offers full treatment of absorption and multiple anisotropic scattering by the dust, computes the temperature distribution of the dust and the thermal dust re-emission self-consistently, and supports stochastic heating of small grains using
Architecture
The latest version of SKIRT was re-architected with the following major design goals in mind:
- •
Structured parameter file: use a self-documenting ski file format that supports the complex configuration needs described above in a user-friendly manner.
- •
Single point of definition: define all information relating to a new feature only once and in the same place, including the code, the human-readable text strings used in the query and answer session, and the tags in the ski file.
- •
Data-driven user
Conclusions
We described the major features of SKIRT, a state-of-the-art Monte Carlo dust radiative transfer simulation code used to study spiral galaxies, accretion disks and other astrophysical systems. In addition to its core capability of tracing the radiation through the dust, SKIRT offers a large number of built-in options for configuring all aspects of the simulation model, including spatial and spectral distributions, dust grain characterizations, simulated detection systems, and discretization.
Acknowledgments
This work fits in the CHARM framework (Contemporary physical challenges in Heliospheric and AstRophysical Models), a phase VII Interuniversity Attraction Pole (IAP) program organized by BELSPO, the BELgian federal Science Policy Office.
SKIRT and FitSKIRT are based on the Qt development framework and use the core Qt libraries for run-time class introspection, parallelization, string and container handling, and more. The code further incorporates the following third-party software libraries:
References (54)
- et al.
Radiative transfer in disc galaxies — III. The observed kinematics of dusty disc galaxies
Mon. Not. R. Astron. Soc.
(2003) - et al.
Herschel-ATLAS: The dust energy balance in the edge-on spiral galaxy UGC 4754
Astron. Astrophys.
(2010) - et al.
Efficient Three-dimensional NLTE dust radiative transfer with SKIRT
Astrophys. J. Suppl. Ser.
(2011) - et al.
Stellar population synthesis at the resolution of 2003
Mon. Not. R. Astron. Soc.
(2003) - et al.
Using 3D voronoi grids in radiative transfer simulations
Astron. Astrophys.
(2013) Efficient multi-Gaussian expansion of galaxies
Mon. Not. R. Astron. Soc.
(2002)- et al.
A practical manual on the Monte Carlo method for random walk problems
- et al.
Analytical properties of the law
Astron. Astrophys.
(1999) - et al.
The global dust SED: tracing the nature and evolution of dust with DustEM
Astron. Astrophys.
(2011) - et al.
The distribution of interstellar dust in CALIFA edge-on galaxies via oligochromatic radiative transfer fitting
Mon. Not. R. Astron. Soc.
(2014)
FitSKIRT: genetic algorithms to automatically fit dusty galaxies with a Monte Carlo radiative transfer code
Astron. Astrophys.
The dust energy balance in the edge-on spiral galaxy NGC 4565
Mon. Not. R. Astron. Soc.
Panchromatic radiative transfer modelling of stars and dust in the Sombrero galaxy
Mon. Not. R. Astron. Soc.
A family of potential-density pairs for spherical galaxies and bulges
Mon. Not. R. Astron. Soc.
A completely analytical family of anisotropic Plummer models
Mon. Not. R. Astron. Soc.
Infrared emission from interstellar dust. i. stochastic heating of small grains
Astrophys. J.
Infrared emission from interstellar dust. iv. the silicate-graphite-PAH model in the post-spitzer era
Astrophys. J.
On the construction of a composite model for the galaxy and on the determination of the system of galactic parameters
Trudy Astrofizicheskogo Instituta Alma-Ata
The multi-gaussian expansion method: a tool for building realistic photometric and kinematical models of stellar systems I. the formalism
Astron. Astrophys.
Steps toward interstellar silicate mineralogy. VI. dependence of crystalline olivine IR spectra on iron content and particle shape
Astron. Astrophys.
PEGASE: a UV to NIR spectral evolution model of galaxies. application to the calibration of bright galaxy counts
Astron. Astrophys.
Design Patterns: Elements of Reusable Object-Oriented Software
Thick tori around active galactic nuclei — a comparison of model predictions with observations of the infrared continuum and silicate features
Mon. Not. R. Astron. Soc.
Modeling the pan-spectral energy distribution of starburst galaxies. iv. the controlling parameters of the starburst SED
Astrophys. J. Suppl. Ser.
Steps toward interstellar silicate mineralogy. IV. the crystalline revolution
Astron. Astrophys.
Model atmospheres (Kurucz, 1979)
VizieR Online Data Catalog
Starburst99: synthesis models for galaxies with active star formation
Astrophys. J. Suppl. Ser.
Cited by (371)
The TNG50-SKIRT Atlas: Wavelength dependence of the effective radius
2024, Astronomy and AstrophysicsThe TNG50-SKIRT Atlas: Post-processing methodology and first data release
2024, Astronomy and AstrophysicsERGO-ML: comparing IllustrisTNG and HSC galaxy images via contrastive learning
2024, Monthly Notices of the Royal Astronomical SocietyThe limitations (and potential) of non-parametric morphology statistics for post-merger identification
2024, Monthly Notices of the Royal Astronomical Society