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

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.2
File Size Uploaded
slugpy-3.0.2.tar.gz 18.7 MB Details

Built distributions (wheels)

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

Total release size: 92.1 MB

Release files / slugpy-3.0.2.tar.gz

Download URL slugpy-3.0.2.tar.gz
Size 18.7 MB
Tags Source
SHA-256 checksum
How to use checksums
2eca09c8a3c65c6c8d42eaff974afaaa2fc1ccf386feff35936dd556ce343f4a
BLAKE2b-256 checksum
How to use checksums
97dee0078f1f2db66e90272999b9ef21d8ca0a1c4f144bc60886f0532044c475
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.2-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.2-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
b56543d3ae3cfb42e7092ffa9395b786d1de17c664addfec417ba4c1c1ae6b1b
BLAKE2b-256 checksum
How to use checksums
4347084a977049def7eb929d5ba9811557ccbe64de77b9d9b2c4d3b16f2ce07e
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.2-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.2-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
85e856815655a728ae0eeb0d98facf3dc6583e299ca1688580424e64156529b2
BLAKE2b-256 checksum
How to use checksums
cd3489bd53d862bf097656c04e5b1386e15c435f228f1bc23f5148e09eb595f7
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.2-cp314-cp314-macosx_14_0_arm64.whl

Download URL slugpy-3.0.2-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
faa25dbe22999207e361d8e69dacf268cd53503e491c734ac80c1f7920700790
BLAKE2b-256 checksum
How to use checksums
4c2bf996a5578e502d589a93698ce98b77d92f3e8438b75a58a429cc6cfaff4b
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.2-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.2-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
ccae609a6e31bf6bd93b94a918e20b008cd26ad07edb7a5315dace819138d821
BLAKE2b-256 checksum
How to use checksums
65ce3d798eba4c9857f69eba797604a2044722e4de97908babbea1d70fcf0134
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.2-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.2-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
776b68b7c5a03b96d713b2189509dca8c491eda6a4495bc779dc6843afae3729
BLAKE2b-256 checksum
How to use checksums
c3394362e71ba5904cfa5136a70a19ae56ead635ead08ee819026ea9978c7d3d
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.2-cp313-cp313-macosx_14_0_arm64.whl

Download URL slugpy-3.0.2-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
38dcc0100adedab3dc7583062c5db9264f46f88e387c4ded5ce3724f85f2c801
BLAKE2b-256 checksum
How to use checksums
11e39f0a4460c68ce43b3277599f0dbfa3e81d24f70023a4eea6ab5e750dbe52
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.2-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL slugpy-3.0.2-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
b57fc2a5fef7fc41a73f17f7072aca861688bdd9a0063b65a287febc08812560
BLAKE2b-256 checksum
How to use checksums
6ae38ecaec861f119dfaf404953d00fd441aa89459bcd85ecfe441655e655f88
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.2-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL slugpy-3.0.2-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
6bbea51e149cec3638a60515c18b8471fc4ece82212eb72b46d682dcd5859e0b
BLAKE2b-256 checksum
How to use checksums
1302f266727c120e3d4a6b0c8d2590db49f9f2b98a2cba4311dce29899c7ee4f
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.2-cp312-cp312-macosx_14_0_arm64.whl

Download URL slugpy-3.0.2-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
d81c4e9715a2c65a66c0faaff1381a3a4e327f77a1c172f046f95cf00674331a
BLAKE2b-256 checksum
How to use checksums
4887098241fa7fe5380497106db87b684e7cc7dca1e2b2dda916b7e1ed7ffe44
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

3.0.3

10 release files

This release

3.0.2 This release

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