Overview of SLUG
This is version 3 of the Stochastically Lighting Up Galaxies (SLUG) code.
SLUG is a stellar population synthesis (SPS) code, meaning that for an input star formation history, stellar initial mass function, and a set of evolutionary tracks and stellar atmospheres, it can predict the light output of the stellar population. The main difference between SLUG and conventional SPS codes is that, instead of the usual approach of assuming that all stellar masses and ages are fully populated, SLUG is capable of stochastically sampling from the stellar initial mass function and age distribution, and thereby predicting not just the mean light output, nucleosynthetic yields, and feedback power, but also the full distribution that results from stochastic sampling. This capability is critical in the regime of low star formation rates and total stellar masses, where finite sampling can lead to a distribution of properties that is extremely broad, and the mean values produced by other SPS codes are therefore of limited predictive power.
Installation
The easiest way to install SLUG is from PyPI, which provides both the slugpy Python package and the slug command-line executable:
pip install slugpy
python -m slugpy.download_data
The second command downloads the stellar tracks, spectral libraries, and other data files SLUG needs, which are too large to include in the package (several GB). Prebuilt wheels are available for Linux (x86_64 and aarch64) and macOS 14+ on Apple Silicon, for Python 3.12–3.14; on other platforms pip builds SLUG from source.
SLUG is also available as a container image, with MPI support, for use with Docker or Apptainer/Singularity:
docker pull ghcr.io/markkrumholz/slug3:latest
apptainer pull slug3.sif docker://ghcr.io/markkrumholz/slug3:latest
Finally, you can clone this repository and build SLUG from source with CMake, which requires a C++23 compiler, GSL, and HDF5.
See the installation instructions and the quickstart guide in the documentation for full details on all three options.
Version history
This is version 3 of SLUG. It is a complete rewrite of version 2, taking advantage of modern C++ and Python capabilities to significantly improve its usability. It also greatly expands the range of stellar tracks, atmospheres, nucleosynthetic yield tables, and feedback models available, incorporating advances that have occurred since the last release. Additional major improvements in this version include:
- The ability to drive SLUG entirely from Python, as well as the traditional command line interface.
- Metallicity is now a first-class variable, which can be treated stochastically and described by a distribution.
- Native support for hybrid MPI + OpenMP parallelism.
- A modernized build system that greatly reduces the number of external dependencies and makes building the code across platforms significantly easier.
- Output has been migrated from the FITS format used in version 2 to HDF5 format, allowing significantly faster and more flexible IO.
- The input format has been simplified and converted to the TOML standard, providing a more intuitive way of controlling the code.
- A larger, modernized set of stellar tracks, atmospheres, and photometric filters, and standardization of the formats for describing these and other data inputs so that users can easily add additional data without needing to alter the source code.
Version 2 of SLUG remains available at https://bitbucket.org/krumholz/slug2/. As of this writing there are some capabilities in SLUG version 2 that have not yet been re-implemented in this version, and while this remains true SLUG version 2 will continue to be maintained. However, version 2 is no longer being developed, and eventually all capabilities it provides will be migrated to this version, at which point maintenance on SLUG version 2 will be discontinued. Users are therefore encouraged to migrate to this version.
Documentation
See https://markkrumholz.github.io/slug3/ for full documentation, including detailed instructions on compiling and running the code.
Layout of this repository
This repository is structured as follows:
- .github: GitHub workflows
- cmake: helper CMake build files
- data: data files, divided by type of data
- data/cloudy: template files for the SLUG-Cloudy interface
- data/elem: elemental and atomic data
- data/extinct: extinction curves
- data/filters: filter response curves and similar data
- data/imfs: stellar initial mass functions
- data/nebular: tabulated nebular emission
- data/spectra: stellar atmosphere and spectral library data
- data/tools: scripts for fetching and manipulating data
- data/tracks: libraries of stellar evolutionary tracks
- data/yields: libraries of nucleosynthetic yields
- doc/sphinx: documentation
- examples: example applications of SLUG, each in a separate subdirectory
- slugpy: the Python frontend for SLUG
- slugpy/cloudy: the interface between SLUG and Cloudy
- src: the main C++ codebase
- src/core: the core C++ classes that run the simulation
- src/elem: elemental, isotopic, and atomic data
- src/extern: external dependencies
- src/extinct: extinction physics
- src/feedback: stellar feedback physics
- src/interpolation: low-level interpolation machinery
- src/io: input/output management
- src/nebular: nebular emission physics
- src/pdfs: low-level mathematical description of probability distribution functions
- src/phot: photometry and filter calculations
- src/pybind: C++ / Python binding layer
- src/specsyn: spectral synthesis and stellar atmosphere routines
- src/tracks: stellar evolutionary track routines
- src/utils: miscellaneous utilities
- src/yields: calculation of nucleosynthetic yields
- tests: unit tests; the subdirectory structure mirrors that of src (except for the vendored src/extern), plus tests/slugpy for the Python frontend and tests/mpi for end-to-end MPI tests
Contact
If you have questions about SLUG, have discovered any bugs, or want to contribute to ongoing development, please contact Mark Krumholz, mark.krumholz@anu.edu.au.
Metadata
Release files for slugpy 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slugpy-3.0.1.tar.gz | 18.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| slugpy-3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| slugpy-3.0.1-cp314-cp314-manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ ARM64 | Details |
| slugpy-3.0.1-cp314-cp314-macosx_14_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 14.0+ ARM64 | Details |
| slugpy-3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| slugpy-3.0.1-cp313-cp313-manylinux_2_28_aarch64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ ARM64 | Details |
| slugpy-3.0.1-cp313-cp313-macosx_14_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 14.0+ ARM64 | Details |
| slugpy-3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| slugpy-3.0.1-cp312-cp312-manylinux_2_28_aarch64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ ARM64 | Details |
| slugpy-3.0.1-cp312-cp312-macosx_14_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 14.0+ ARM64 | Details |
Total release size: 90.3 MB
Release files / slugpy-3.0.1.tar.gz
| Download URL | slugpy-3.0.1.tar.gz |
|---|---|
| Size | 18.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
448062f01d25c786169dab05cf4ccee1c2c28fadba1ab583cfc05027433e0dd5
|
|
BLAKE2b-256 checksum How to use checksums |
ad9161f1a581d5c1df46a27c09b31023dd134de4d517175cbf4b045d681933a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | slugpy-3.0.1-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5a3584d930e3daa2a1805505a3a5c38727001109b4958a23a0e7920f4a990a59
|
|
BLAKE2b-256 checksum How to use checksums |
0e3a1235a9f428d552cc605a0c042383edb6db0a550dbbf56cc70bc9821307c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp314-cp314-manylinux_2_28_aarch64.whl
| Download URL | slugpy-3.0.1-cp314-cp314-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
4ecf4dbc41e633e9e0d3692b65d7afbfb306d97ab45eb9981ca4481ac9c370c9
|
|
BLAKE2b-256 checksum How to use checksums |
f4a1ed821fdaaa33a8edbdc4703ab052033f740041107e171a22ff45bdaa1035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | slugpy-3.0.1-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4a1f4221d387ef618accb8aefaa3ba245c186d047b08b9d41f2ceb165433d93e
|
|
BLAKE2b-256 checksum How to use checksums |
75f2f64c29cb4778e0182a1151b35b191e9033280b0ed4170b15501532da02ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | slugpy-3.0.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
90f4739aeb0e776d9010a7a781e1a8f14979479a14949d7f1d84061071e7b865
|
|
BLAKE2b-256 checksum How to use checksums |
7e9bc78a304d98542d9d71be90b263572108f077455c833ab396366d0d4150d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp313-cp313-manylinux_2_28_aarch64.whl
| Download URL | slugpy-3.0.1-cp313-cp313-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
83c2ea841479e532c765fa13fe481ca378887ade41b9292051ff0548d96c8ab8
|
|
BLAKE2b-256 checksum How to use checksums |
b965bb222035c07e2afcfbc68cc4026a2921153d0c5001b7316a1aad5d827da0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | slugpy-3.0.1-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8c9c36860d330422431c374c24b026c2776bdb586604b4caa7ffbfc85eba5cca
|
|
BLAKE2b-256 checksum How to use checksums |
8bc2975e64a44c5995fedab038b3a279285c67c7f88f8c1955ca4f3f92a78568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | slugpy-3.0.1-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6ce2714204bde0a488b5235b98f79ecb8dde503581ae6977babd046ce9fd8b7a
|
|
BLAKE2b-256 checksum How to use checksums |
7109ddd78fa936675f2718b1d3cfc73c960a6cf924f8c2f9b410048703545a7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | slugpy-3.0.1-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
afe7e6289befcf1a0d869bbba9fe53f729d02df8fd3ff8a9acdb3b9e26dd0ef8
|
|
BLAKE2b-256 checksum How to use checksums |
75f1af553287a2a0d0a989b61bee42b6191c844283aad5564ddce98931134f74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / slugpy-3.0.1-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | slugpy-3.0.1-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5b377334443dfad4662ddb3896422d1d5f02fe480cec35e16169f18b8f222ce6
|
|
BLAKE2b-256 checksum How to use checksums |
c57cd7e0791dd70a8fcef71ba4af0d871264fc711928c0b20f9e1024fabc0b92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log