.. highlight:: rest .. _sec-examples: Examples ======== The repository contains a number of examples under ``examples``. Each of these illustrates a different feature of SLUG. Examples that are intended to be run from the command line contain a ``README.md`` file that describes the test and how to run it, while examples that are intended to be run from Python provide a .py file that is a `marimo `_ notebook, which contains documentation and comments explaining the example. The examples currently available are: * ``examples/cloudy``: demonstrates how to perform cloudy post-processing (see :ref:`sec-cloudy-slug`) on SLUG outputs * ``examples/clusterlib``: demonstrates using the command line to carry out a large Monte Carlo simulation of star clusters, a simplified version of the library used in `Tang, Grasha, & Krumholz (2024, MNRAS, 532, 4583) `_ * ``examples/QHIFUVstats``: demonstrates how to use SLUG to study the statistics of the ratio of ionizing photons to FUV luminosity, a simplified version of the calculation in `da Silva, Fumagalli, & Krumholz (2014, MNRAS, 444, 3275) `_ * ``examples/QHIstats``: demonstrates how to use SLUG to study the distribution of ionizing luminosity per unit mass for star clusters of different masses; a simplified version of the calculation in the appendix of `Kim, Kim, & Ostriker (2016, ApJ, 819, 137) `_ * ``examples/yieldslib``: demonstrates nucleosynthetic yield output (see :ref:`sec-yields`) from a small galaxy-type simulation using MIST tracks and blackbody spectra, with yields from both the ``ccsn`` and ``massive_star_winds`` channels of the ``sukhbold16`` yield model, reported separately for each channel. The directory also contains a pre-computed output file, ``yieldslib.h5``, which is useful for testing software that reads yield output.