SALSA
SALSA (Synthetic Absorption Line Surveyor Application) is a Python tool that constructs synthetic absorber catalogs from hydrodynamic galaxy simulations. SALSA heavily utilizes yt to access simulation data and Trident to create light rays/sight lines and generate synthetic spectra.
Observational studies generate large absorber catalogs by studying the absorption line spectra of distant quasars, as their light passes through intervening galaxies. SALSA can generate similar catalogs from cosmological and galactic simulations, allowing research to study these simulations from an observers perspective. This can give new insights into the data as well as help facilitate comparisons and collaboration between simulations and observations.
SALSA allows us to dip into galactic simulations and start to chip away at the many unknowns of the universe
A JOSS paper was published for SALSA and we recommend reading it for an overview of the package and its possible uses. If you do use SALSA in a project we ask that you cite this paper.
For detailed information on how to install and run SALSA, Read the Docs here
Install
We recommending checking the documentation for advice on installing the core dependencies.
Once you have the trickier dependencies installed, you can use pip and run these commands to install the most stable version:
$ pip install astro-salsa
$ python
>>> import salsa
If you want to install the latest development version, you can clone the repository and run these commands to install the additional dependencies necessary for testing and building the documentation:
$ git clone https://github.com/biboyd/SALSA.git
$ cd SALSA
$ pip install -e .[dev]
$ python
>>> import salsa
Now you should be all set to code!
Installing dependencies
The requirements.txt file contains the minimum dependencies needed to run SALSA.
Note that you need gcc compiler installed (which it often already is on most machines). For a more detailed description see the installation guide which also includes tips if you want to install dependencies on your own.
To install the basic dependencies with pip, run
pip install -r requirements.txt
If you prefer to use conda, you cannot use the requirements.txt file
directly as Trident is not available via conda.
You'll also still need to install SALSA with pip as above. Make sure pip is
installed in your conda environment!
Getting Started
For an annotated example go here. Or launch an interactive jupyter hosted on Binder here (note that the notebook may take some time to load as it generally has to build the repository).
If you want to explore on your own, the easiest way to get started is use
salsa.generate_catalog(). This takes:
- The simulation dataset (either as a path or an object loaded by yt)
- Number of light rays/sightlines to make
- Directory to save those light rays
- A list of ions
- Some other optional parameters.
This creates a number light rays and then extracts absorbers for each ion. An AstropyQTableis returned with information about all the absorbers which can then be further analyzed.
Building the Documentation
If you installed SALSA with
pip install astro-salsa[dev] or pip install -e .[dev], you'll be able to build the documentation locally:
$ cd docs
$ make html # or latexpdf if you prefer
This will create a docs/build/ folder that contains the documentation.
Contributing Guidelines
All contributions are welcome! This is an open-source project, built on many other open-source projects. Contributing can take many forms including: contributing code, testing and experimenting, or offering ideas for different features.
If you are interested in contributing you can contact us directly at kopenhaf@msu.edu or add an issue on this Github page.
Metadata
Release files for astro-salsa 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| astro_salsa-2.0.0.tar.gz | 25.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astro_salsa-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.8 kB
Release files / astro_salsa-2.0.0.tar.gz
| Download URL | astro_salsa-2.0.0.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e7eb393f7b8ae21574326e8a5d4608d1b8349b0b0afd7f428e036e65ec0c8f5
|
|
BLAKE2b-256 checksum How to use checksums |
78d214eb755531bf7f0e6a9499d523f0a99c8cb5540a9844267fe7dcc02582ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 13, 2026.
Transparency logRelease files / astro_salsa-2.0.0-py3-none-any.whl
| Download URL | astro_salsa-2.0.0-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9ceea9389e06729c5d78daabdf446daabd7ba5e2c5b18e49960a3f5764c212a
|
|
BLAKE2b-256 checksum How to use checksums |
9431d9a48451bf0bd25f9da75774de181734ccfcadede7f2fdc7c1e954dda10f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 13, 2026.
Transparency log