This repository contains our up-to-date framework for postprocessing COLIBRE simulations with the SKIRT 3D dust radiative transfer code. This corresponds to our most up-to-date SKIRT setup as of 28.9.2025. Some settings/choices of the postprocessing pipeline might still change over the coming weeks and months, and you probably want to adapt some parameters to your needs. To run SKIRT simulations, you will have to install SKIRT and follow the five steps outlined here. Note that unlike in earlier versions, all required features for the ficudial COLIBRE-SKIRT pipeline are now part of the main SKIRT branch, so you can simply clone the main SKIRT branch as outlined in the installation instructions on the SKIRT [website]{skirt.ugent.be}.
Note that this is (at present) just an example workflow, to illustrate how one has to interface with COLIBRE data to produce SKIRT output. When postprocessing meaningful samples of galaxies, however, it is much more efficient to use a job submission workflow on a high-performance computing system. We aim to include such a workflow in this repo at some point, for now please get in touch if you have questions on how to set up such a workflow.
Generating SKIRT mock observations for COLIBRE galaxies requires interfacing with COLIBRE data, generating intermediate .txt files for the particles, and running SKIRT to compute the required data. There's a fair amount of files and folders involved in the workflow. These filepaths have to be set in SKIRT_parameters.yml.
To run SKIRT on COLIBRE galaxies, a specific galaxy sample is required. There are various ways to generate such a sample, for now the galaxy samples are generated by running the getGalaxySamples.py script on a machine that has access to COLIBRE data. The COLIBRE box has to specified for instance as follows: python getGalaxySamples.py 25 6 --snaps 56 127 (for the 56 and 127 snapshots of the L025m6 box). This script will save the halo IDs, stellar masses, stellar half-mass radii, and dust masses given a specific COLIBRE simulation box, set of snapshots, and selection criteria. For testing purposes this is currently set to a narrow range in stellar mass (configurable in SKIRT_parameters.yml), but more sophisticated selections based on SOAP output are of course possible by editing getGalaxySamples.py.
To run SKIRT we'll need various informations from the stars and gas particle files. Those have to be generated by running saveParticleData.py (e.g. python saveParticleData.py 25 6 --snaps 56 127) on a machine with access to COLIBRE data. The script stores the necessary particle data in .txt files for all galaxies that have been selected in step 2. Once these particle data are generated, you can download those and the galaxy sample files to whatever machine you want to run SKIRT there. No further interfacing with raw COLIBRE data is required from now on. We also note that the extraction of the particle data can be optimized, we use the [SWIFTgalaxy]{https://swiftgalaxy.readthedocs.io/en/latest/} package from Kyle Oman here but when extracting large samples of galaxies a custom-built script from Nick Andreadis is significantly faster. Please get in touch if you want to make use of this!
All settings of the SKIRT simulation are given in the template_v5.0.ski file. For your own work you will probably need to adjust this file, e.g. to customize the output you want (i.e. spectra/images/datacubes). Importantly, if no infrared data is generated, the simulation mode can be changed to omit dust emission, thereby significantly speeding up the SKIRT simulations. Some other settings like the number of photon packets are currently hardcoded in editSkiFile.py and need to be changed there.
To iterate over the galaxies that are in the sample files, run the runSKIRT.py script (e.g. python runSKIRT.py 25 6 --snaps 56 127) on a machine where SKIRT is installed. This will iterate over the galaxies with a specified number of SKIRT simulations in parallel, using the SKIRT parameters specified in template_v5.0.ski. The output of the SKIRT simulation (if you don't change the configuration file, this is simply a set panchromatic SEDs in various apertures for every galaxy) will be placed in the folder specified in SKIRT_parameters.yml.
git clone https://github.com/andreagebek/colibre-skirt
To interface with COLIBRE data (steps 2 & 3), you'll also need to have swiftsimio and swiftgalaxy installed. Our workflow is tested with versions v10.3.0 for swiftsimio and v2.1.1 for swiftgalaxy.
For the installation of SKIRT, please follow the instructions on the SKIRT website.
-
COLIBRE gas particle star-formation rates: For some COLIBRE boxes (e.g. the L025m6 box with thermal AGN feedback), the redshift-zero time-averaged gas particle star-formation rates are erroneously 0 or negative. Carefully check whether the box you're working with is affected by this bug. If yes, use instantaneous star-formation rates of the gas particles as a workaround.
-
COLIBRE star particle smoothing lengths: The smoothing lengths for COLIBRE star particles are inherently derived from neighbouring gas particles. We recalculate those smoothing lengths as the distance to the 32-nd nearest neighbouring star particle using only gravitationally bound star particles (as done in COLIBRE tutorials). This is a problem for subhalos with less than
$\approx32$ star particles, as those smoothing lengths become infinity. Currently we store both smoothing lengths for star particles (based either on neighbouring gas or neighbouring bound star particles), and use the smoothing length based on neighbouring bound star particles as default in the SKIRT input files. Modifications are necessary if you need to postprocess galaxies with$\lesssim100$ star particles. -
v5.0 SKIRT model: Evolved stellar populations (star particles with ages above 10 Myr) are modelled with BPASS v2.2.1 (Chab100 imf). Young stellar populations are modelled using dust-free TODDLERS with emission lines (high-resolution templates), applied to the star-forming gas (using 10-Myr averaged SFRs) and young star particles (ages below 10 Myr) assuming a constant SFR over the past 10 Myr. We use the Draine & Li 2007 dust model with adjusted size distributions to match the COLIBRE predictions.
-
SKIRT spatial grid: To discretize the dust medium we use an adaptive binary tree grid. This grid requires four parameters: The box size, the minimum refinement level, the maximum refinement level, and the maximum dust mass fraction per cell. Based on our testing which is mostly at
$z=0$ and at M5/M6 resolution, we set these parameters to 100 kpc for the box size, minimum refinement level of 15 (maximum cell size of 3.125 kpc), maximum refinement level of 36 (minimum cell size of 24.41 pc), and a maximum dust mass fraction that ranges between$10^{-4.5}$ and$10^{-6.5}$ ($10^{-6}$ ) at M5 resolution (at M6/M7 resolution), scaling with the dust surface density of the galaxy. This grid should give sufficiently converged results. Furthermore, higher-redshift galaxies are smaller and denser, requiring smaller box and cell sizes. We implement this by scaling the SKIRT box size akin to the COLIBRE gravitational softening length: The SKIRT box size is fixed to 100 pkpc between$z=0$ and$z=1.5714$ , and is set to 257.143 ckpc for$z>1.5714$ . -
Convolution with broadband filters: While SKIRT provides options to record SEDs and images in broadband filters directly, it is sometimes more convenient to store SEDs/images on a uniformly log-spaced wavelength grid and later convolve with filter broadbands. To this end, we suggest to use the [Python Toolkit for SKIRT]{https://github.com/SKIRT/PTS9} (PTS) which supports band convolution for a large number of broadbands, e.g. as
pts.band.builtinBand('SDSS_u').convolve(wavelength, SED).
In case of questions or comments, please reach out to Andrea Gebek (andrea.gebek@ugent.be).