Installation

You can install galsbi using pip:

pip install galsbi

The pip installation constains only the phenomenological version of galsbi. To use the stellar population synthesis version, you need galsbi>=0.3.0.

To generate and save realistic galaxy SEDs in the stellar population synthesis model GalSBI-SPS, the user is required to install the R package ProSpect (Robotham+2020) following the guide in the page Saving Galaxy Spectra.. The stellar population synthesis version can be used in absence of ProSpect, but it will return magnitudes only.

The same can be done with uv:

uv pip install galsbi

To install the latest development version directly from the GitLab repository:

# Using SSH (requires SSH key setup)
pip install git+ssh://git@gitlab.com/cosmology-ethz/galsbi.git
# Or using HTTPS
pip install git+https://gitlab.com/cosmology-ethz/galsbi.git

Or with uv:

# Using SSH (requires SSH key setup)
uv pip install git+ssh://git@gitlab.com/cosmology-ethz/galsbi.git
# Or using HTTPS
uv pip install git+https://gitlab.com/cosmology-ethz/galsbi.git

If you want to install the development version and have the source code available for modifications or contributions, clone the repository and install it in editable mode:

# Using SSH (requires SSH key setup)
git clone git@gitlab.com:cosmology-ethz/galsbi.git
# Or using HTTPS
git clone https://gitlab.com/cosmology-ethz/galsbi.git

cd galsbi
pip install -e .

Or with uv:

# Using SSH (requires SSH key setup)
git clone git@gitlab.com:cosmology-ethz/galsbi.git
# Or using HTTPS
git clone https://gitlab.com/cosmology-ethz/galsbi.git

cd galsbi
uv pip install -e .

After installation, some additional data files may be downloaded automatically the first time you run galsbi. This is normal and will only occur once to cache the necessary files locally. The first time you sample galaxies may also take longer due to PyCosmo initialization. For more information, see the FAQ if you encounter any issues.