GELSA: Advanced tools for Euclid grism spectroscopy
Overview
GELSA is a Python library to facilitate the analysis of 2D dispersed images from Euclid's slitless spectroscopic observations. Developed as part of the ELSA project (Euclid Legacy Science Advanced analysis tools), GELSA builds on the products of the Euclid Science Ground Segment and SIR processing function.
Links
Key Features:
- Data handling: Read Euclid SGS data products.
- Spectra location: Map between sky (RA, Dec), wavelength, and detector pixel coordinates using SIR instrument models.
- Simulation: Generate NISP spectrograms based on source properties and instrument models.
- Spectral extraction: Extract 1D and 2D spectra with decontamination modelling.
- Emission line maps: Remap spectra to make spatial emission line maps.
- Visualization: Routines for displaying spectrograms and associated data.
Contributors
Ben Granett (benjamin.granett@inaf.it), Louis Gabarra, Fabio Rigamonti, Francesca Passalacqua, Federico Lepri, Nadir El Ariny
Install
python -m pip install gelsa
The development version can be installed from GitHub with
python -m pip install git+https://github.com/elsa-euclid/gelsa.git.
For development, clone the repository and install in editable mode:
python -m pip install -e ".[dev]"
Usage
On ESA Datalabs the SIR calibration files are found automatically; elsewhere, pass calibdir.
The following code loads a SIR science frame, cuts out the spectrum of a source, and displays it.
import gelsa
from gelsa import visu
G = gelsa.Gelsa()
frame = G.load_spec_frame("EUC_SIR_W-SCIFRM_....fits")
ra, dec, z = 150.09382, 2.503955, 0.751
crops = frame.cutout(ra, dec, z) # one SpecCrop per detector the trace falls on
for det, crop in crops.items():
visu.show(crop, levels=(1, 99))
See the documentation for simulations, stacking many exposures and emission line maps.
License
gelsa is released under the MIT License (see LICENSE).
Third-party code
gelsa/_vendor/fast_interp.py is a lightly modified copy of fast_interp by David Stein, distributed under the Apache License 2.0 (see gelsa/_vendor/LICENSE.fast_interp).
Acknowledgments
Metadata
Release files for gelsa 4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gelsa-4.1.tar.gz | 224.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gelsa-4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 461.5 kB
Release files / gelsa-4.1.tar.gz
| Download URL | gelsa-4.1.tar.gz |
|---|---|
| Size | 224.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e90cfde9d347d7e9734ff7e2190fe4690fc74f6458270cda0966f652f838dc63
|
|
BLAKE2b-256 checksum How to use checksums |
f6005c0b04c004d850d6187b2291d22a2708c0dd698e5d759d9b2be314bf5850
|
| 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 13, 2026.
Transparency logRelease files / gelsa-4.1-py3-none-any.whl
| Download URL | gelsa-4.1-py3-none-any.whl |
|---|---|
| Size | 236.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8395de73a47328264afa16e881c50264a6c1ddc54eef888b1a96e5f13e9dfc96
|
|
BLAKE2b-256 checksum How to use checksums |
11292dea2110e714e2b26d6c9778480a511d0e1705aa6ee845d90ba9e4ded4aa
|
| 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 13, 2026.
Transparency log