Skip to main content

Synthetic absorber catalog generator from astrophysical simulations

Project description

SALSA

Build Status Documentation Status

DOI DOI

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 Astropy QTable is 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astro_salsa-2.0.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astro_salsa-2.0.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file astro_salsa-2.0.0.tar.gz.

File metadata

  • Download URL: astro_salsa-2.0.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for astro_salsa-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1e7eb393f7b8ae21574326e8a5d4608d1b8349b0b0afd7f428e036e65ec0c8f5
MD5 c9ab9174a140600bd72f58efea5c0283
BLAKE2b-256 78d214eb755531bf7f0e6a9499d523f0a99c8cb5540a9844267fe7dcc02582ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for astro_salsa-2.0.0.tar.gz:

Publisher: python-publish.yml on biboyd/SALSA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astro_salsa-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: astro_salsa-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for astro_salsa-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9ceea9389e06729c5d78daabdf446daabd7ba5e2c5b18e49960a3f5764c212a
MD5 c3cffcb6f65119feb02e450a2523e277
BLAKE2b-256 9431d9a48451bf0bd25f9da75774de181734ccfcadede7f2fdc7c1e954dda10f

See more details on using hashes here.

Provenance

The following attestation bundles were made for astro_salsa-2.0.0-py3-none-any.whl:

Publisher: python-publish.yml on biboyd/SALSA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page