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.

SLUG also provides tools to use the outputs of its simulations to perform Bayesian inference on the light emitted by stellar populations, using measurements of this output to derive probability distributions for the physical properties of the stellar population responsible for producing the light.

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). Optionally also do

python -m slugpy.download_data --subdir cluster_slug

to download the large (33 GB) default library for Bayesian inference. 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.
  • Bayesian inference has been significantly sped up compared to version 2, and the outputs are more flexible.

Version 2 of SLUG remains available at https://bitbucket.org/krumholz/slug2/, but is no longer being developed. From this point forward, version 2 will receive only critical bug fixes, and eventually all support for it will cease. 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/cluster_slug: library of clusters for the cluster_slug Bayesian inference tool
    • 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: 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/kden: kernel density estimation routines
    • 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/cli for the command line interface, 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.1.0

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.1.0
File Size Uploaded Provenance
slugpy-3.1.0.tar.gz 18.9 MB With provenance Details

Built distributions (wheels)

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

Total release size: 93.0 MB

Release files / slugpy-3.1.0.tar.gz

Download URL slugpy-3.1.0.tar.gz
Size 18.9 MB
Tags Source
SHA-256 checksum
How to use checksums
b55ab58912db259edcefc9e1e37c19ffba4751a887067a9010f4ebb149f91842
BLAKE2b-256 checksum
How to use checksums
c781b5ea7daf80d58deab41d95d02d7270fee418da8bfe94cea59008876ff9ec
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-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
d00e6f213c7d3f234bae9612071471a24880a953b5c0b21a86d275c2eca56e3f
BLAKE2b-256 checksum
How to use checksums
7195db46af73cbc6d51fc24ec61d67fdb0bcaff388e6ab35f0801423edc1d040
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 8.6 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
1bd69e28ab46232b9a71cad697f78940f3954f0c9309a14b581f9fb16367c99d
BLAKE2b-256 checksum
How to use checksums
235b34ae91295b3cd3890f9b68262ca94595d74b664ba9b365de6951c420dd2a
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp314-cp314-macosx_14_0_arm64.whl
Size 7.3 MB
Tags CPython 3.14 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
0a9ae4565ee77ebe633b0542ee27e2639f313c6700f050d56cecb4b11e0fa252
BLAKE2b-256 checksum
How to use checksums
ce489cfe3d6228deccdbe683311bea808855a11bb78cf3e0740a787397f75ce6
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-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
30d3b0174ce2489d4bb1e52e4bf68bf33aa9be0d88c0b69a283f25709954e002
BLAKE2b-256 checksum
How to use checksums
b700a8c10fedb9fa8565b7197245dbcbd2d272d94ba869ecb27b8b38242ebd60
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 8.6 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
9d08bdd3eb4990ec3f1abf7b6f07087e8c443379a364c8f67e228535ca0ecc26
BLAKE2b-256 checksum
How to use checksums
348ceb0e6c2f6f2d240f48f411c9eb7fa8a41e122b4edf99c3bf2a0fab30001e
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp313-cp313-macosx_14_0_arm64.whl
Size 7.3 MB
Tags CPython 3.13 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
11beddf34adab2743cd4f947aa6893fd2752b68315cd0b20daa419acfc85ce94
BLAKE2b-256 checksum
How to use checksums
b3783c415e68d7f6f36d6449864dbca72290219bf9344cc4933fa977aad16ceb
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-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
6f21158783b1c8eb5a5527ff17d4354dd6b615a75eab79db0d6336ee80fd6b32
BLAKE2b-256 checksum
How to use checksums
82d68def50351085b344bd6d82c8770c1e900cc353758e2bcb4533c04eeaebed
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 8.6 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
647f38609a9c586b981eb82e02b1dd4e10b4a971b4973c53ccd0f79f5a55fa97
BLAKE2b-256 checksum
How to use checksums
de928f72478247106d3a854fc0a25f00dcc15c22bd045d5d9454de22899311d6
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 25, 2026.

Transparency log

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

Download URL slugpy-3.1.0-cp312-cp312-macosx_14_0_arm64.whl
Size 7.3 MB
Tags CPython 3.12 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
6efc1f2c6c7a5271131939605b6dae4055e32ac3212c3b261b8697f7c482d9c0
BLAKE2b-256 checksum
How to use checksums
5baf06e615c7fc46f69b68edaa7612808f4fc7bfeb4bcd3587f2a1d424c1dfe3
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 25, 2026.

Transparency log

Security for slugpy 3.1.0

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.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for slugpy-3.1.0.tar.gz

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 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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