Skip to main content

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 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

EU Funding “ELSA: Euclid Legacy Science Advanced analysis tools” (Grant Agreement no. 101135203) is funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or Innovate UK. Neither the European Union nor the granting authority can be held responsible for them. UK participation is funded through the UK Horizon guarantee scheme under Innovate UK grant 10093177.

Metadata

Release files for gelsa 4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gelsa 4.0
File Size Uploaded
gelsa-4.0.tar.gz 222.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gelsa 4.0
File Interpreter ABI Platform
gelsa-4.0-py3-none-any.whl Python 3 none any Details

Total release size: 455.8 kB

Release files / gelsa-4.0.tar.gz

Download URL gelsa-4.0.tar.gz
Size 222.1 kB
Tags Source
SHA-256 checksum
How to use checksums
50a3fde2a83b8f9f764a41d79afc9e2b5fe0f9ad105c3642106a5de4316daa71
BLAKE2b-256 checksum
How to use checksums
619e4cf9e23a595e742f3566de4feb12ebe064dbd4d3b4b7932b13b59c110d33
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 Sep 28, 2026.

Transparency log

Release files / gelsa-4.0-py3-none-any.whl

Download URL gelsa-4.0-py3-none-any.whl
Size 233.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bdd7384988dae8064aa5c028e3807c6ea048f55c79ced28b2d3a55a59ff4829
BLAKE2b-256 checksum
How to use checksums
420019df573ffb16d1ff8759d864d39efda7bf5dc7d3a5b48117780f2cae8a4e
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 Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

4.1

2 release files

This release

4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page