Skip to main content
Geko Logo

the Grism Emission-line Kinematics tOol

License: MIT Python 3.8+ Tests

Description

Geko is a Python package for analyzing grism spectroscopy from JWST NIRCam observations. The package uses JAX for accelerated computation and Numpyro for Bayesian inference to recover emission-line kinematics and morphology from 2D slitless spectroscopy spectra.

Key Features:

  • JAX-accelerated: GPU support for fast inference
  • Bayesian inference: MCMC fitting using Numpyro's No-U-Turn Sampler (NUTS)
  • Flexible configuration: Easy-to-use configuration system for priors and MCMC parameters
  • Comprehensive visualization: Diagnostic plots and corner plots for fit results

Installation

Using pip (Recommended)

pip install astro-geko

Using Conda

For a complete environment with all dependencies:

# Clone the repository
git clone https://github.com/angelicalola-danhaive/geko.git
cd geko

# Create conda environment
conda env create -f environment.yml
conda activate geko_env

# Install geko
pip install astro-geko

Development Installation

If you want to install the development version:

# Clone the repository
git clone https://github.com/angelicalola-danhaive/geko.git
cd geko

# Install in editable mode
pip install -e .

Requirements

  • Python >= 3.8
  • JAX/JAXlib (with optional GPU support)
  • Numpyro
  • Astropy
  • Photutils
  • PySersic

For GPU acceleration, follow the JAX installation guide for CUDA support.

Quick Start

from geko.fitting import run_geko_fit

# Run a fit with minimal configuration
inference_data = run_geko_fit(
    output='my_fit',
    master_cat='path/to/catalog.cat',
    line='Ha',
    parametric=True,
    save_runs_path='./saves/',
    num_chains=2,
    num_warmup=500,
    num_samples=1000,
    source_id=12345,
    field='GOODS-S-FRESCO',
    grism_filter='F444W'
)

See the documentation for detailed usage examples and tutorials.

Citation

If you use Geko in your research, please cite the following paper:

@article{Danhaive:2025ac,
	author = {{Danhaive}, A. Lola and {Tacchella}, Sandro},
	journal = {arXiv e-prints},
	month = oct,
	pages = {arXiv:2510.07369},
	title = {{Modelling the kinematics and morphology of galaxies in slitless spectroscopy  with _geko_}},
	year = 2025}

Acknowledgements

We acknowledge support from the Royal Society Research Grants (G125142). We thank Amanda Stoffers for creating our beautiful logo.

This package makes use of:

  • JAX for accelerated numerical computing
  • Numpyro for probabilistic programming
  • Astropy for astronomical data handling

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for astro-geko 1.0.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 astro-geko 1.0.0
File Size Uploaded Provenance Actions
astro_geko-1.0.0.tar.gz 65.0 kB Without provenance Details for astro_geko-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astro-geko 1.0.0
File Interpreter ABI Platform Actions
astro_geko-1.0.0-py3-none-any.whl Python 3 none any Details for astro_geko-1.0.0-py3-none-any.whl

Total release size: 128.7 kB

Release files / astro_geko-1.0.0.tar.gz

Download URL astro_geko-1.0.0.tar.gz
Size 65.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc33c18c5eb035c25100f8dad346e8b32c0b48ae885fbc8e48e557f1170c71ab
BLAKE2b-256 checksum
How to use checksums
16b9ad963fe8f5617d5939fc62deb438e5e4f817231e35bb9fea176d06cb0596
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / astro_geko-1.0.0-py3-none-any.whl

Download URL astro_geko-1.0.0-py3-none-any.whl
Size 63.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
057802c3e2d8bc8903646bc7d0993a014c998c13f10181474ccb925dcd56d01e
BLAKE2b-256 checksum
How to use checksums
eeb392b45b3518a366bdfdbd06b2defb10e7fa16a9c632a6b1e00d1185abfa1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Security for astro-geko 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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