Skip to main content
slug

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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slugpy 3.0.3
File Size Uploaded
slugpy-3.0.3.tar.gz 18.8 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for slugpy 3.0.3
File
slugpy-3.0.3-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
slugpy-3.0.3-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
slugpy-3.0.3-cp314-cp314-macosx_14_0_arm64.whl CPython 3.14 CPython 3.14 macOS 14.0+ ARM64 Details
slugpy-3.0.3-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
slugpy-3.0.3-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
slugpy-3.0.3-cp313-cp313-macosx_14_0_arm64.whl CPython 3.13 CPython 3.13 macOS 14.0+ ARM64 Details
slugpy-3.0.3-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
slugpy-3.0.3-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
slugpy-3.0.3-cp312-cp312-macosx_14_0_arm64.whl CPython 3.12 CPython 3.12 macOS 14.0+ ARM64 Details

Total release size: 92.3 MB

Release files / slugpy-3.0.3.tar.gz

Download URL slugpy-3.0.3.tar.gz
Size 18.8 MB
Tags Source
SHA-256 checksum
How to use checksums
ec706f7b95e4511ad3b22c8e7f71b80aa139d8e658bcb45123b5918b424a8fc3
BLAKE2b-256 checksum
How to use checksums
09a2f6b7b0d4c38f349b3372b0d344de359d2c9e991bb4fe4da3aa405b1c6621
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.3-cp314-cp314-manylinux_2_28_x86_64.whl
Size 8.8 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d38ad6e77676295ca0ed177eb30a115c414802744e6537fe5652ad129820b129
BLAKE2b-256 checksum
How to use checksums
ba7f20a4f15c373dfa6e51ec45bf2b2e4fa926d5a395a24ea70df904c96ab0d2
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.3-cp314-cp314-manylinux_2_28_aarch64.whl
Size 8.5 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5d8f51a72270590b13f94bbd0da57f6934d99434c58451563656749dfa98c39a
BLAKE2b-256 checksum
How to use checksums
f0d3b49bbb3d0418bb269c1f4d07fdfe7819420c137e6ea5e74def208bacce9a
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp314-cp314-macosx_14_0_arm64.whl

Download URL slugpy-3.0.3-cp314-cp314-macosx_14_0_arm64.whl
Size 7.2 MB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
3dfa5631cad10f9a2e089fe3f02ce92fab85cb9f8f0274e52a5c07119a6f7fbf
BLAKE2b-256 checksum
How to use checksums
4ed6f961201a5030b1e837a150f39741da95853c2c74cdb4965f35a64fe694f6
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.3-cp313-cp313-manylinux_2_28_x86_64.whl
Size 8.8 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6edafd348de1f097cfb826f4992125ce601d028bee738489fab160b4f091d794
BLAKE2b-256 checksum
How to use checksums
952d999453135a595727010aba7acae96614f81dfaf4287a873124d0a73c5470
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.3-cp313-cp313-manylinux_2_28_aarch64.whl
Size 8.5 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
597b26f511fe736812deecf42766800b83f4a07ed22d6be94147bc90d0d80c8c
BLAKE2b-256 checksum
How to use checksums
389314a895ae9bbca2670c9f0c1f1ace463db7b6656577311c395c63c8d6b585
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp313-cp313-macosx_14_0_arm64.whl

Download URL slugpy-3.0.3-cp313-cp313-macosx_14_0_arm64.whl
Size 7.2 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
f596ba6c9e4ad8de83fabef55bc288725c56b1df36a8c10cb7c95e611b4146d3
BLAKE2b-256 checksum
How to use checksums
8b3e9454a92aa1f7275b53a4c3e80d040841b3d3fdf126763e98eb1de0dbf657
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.3-cp312-cp312-manylinux_2_28_x86_64.whl
Size 8.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d331a3b2240b8833b6040e62624b02afde660034576f2486f4d951fae4fdc5b2
BLAKE2b-256 checksum
How to use checksums
643e4d764c18398d9fe9999ed23e389c031209e8eea474018cbefe68efd74066
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.3-cp312-cp312-manylinux_2_28_aarch64.whl
Size 8.5 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
e405dec0c04cca521a064d7dd416820aca8edd145542207b6f625f8ea444873f
BLAKE2b-256 checksum
How to use checksums
4e733bb6862b993e9b89b863bd4c4ac55a39b7bc716137ed5cbf034db2d042b1
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 18, 2026.

Transparency log

Release files / slugpy-3.0.3-cp312-cp312-macosx_14_0_arm64.whl

Download URL slugpy-3.0.3-cp312-cp312-macosx_14_0_arm64.whl
Size 7.2 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
770ba322df95e50b8c5a4e3e89d0128c8688fe620420a79060fdc069ff55308b
BLAKE2b-256 checksum
How to use checksums
9d6e9ef45da307436e36477e61f05fce79665ad11b33327a3b88dbd9ccc8b2f2
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.3 This release

10 release files

3.0.2

10 release files

3.0.1

10 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page