Geko: the Grism Emission-line Kinematics tOol
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astro_geko-1.0.0.tar.gz.
File metadata
- Download URL: astro_geko-1.0.0.tar.gz
- Upload date:
- Size: 65.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc33c18c5eb035c25100f8dad346e8b32c0b48ae885fbc8e48e557f1170c71ab
|
|
| MD5 |
b858efbf91fea77c7b7f7a2859d0aff3
|
|
| BLAKE2b-256 |
16b9ad963fe8f5617d5939fc62deb438e5e4f817231e35bb9fea176d06cb0596
|
File details
Details for the file astro_geko-1.0.0-py3-none-any.whl.
File metadata
- Download URL: astro_geko-1.0.0-py3-none-any.whl
- Upload date:
- Size: 63.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057802c3e2d8bc8903646bc7d0993a014c998c13f10181474ccb925dcd56d01e
|
|
| MD5 |
4539dbbcf5be4b1213c534a037924c04
|
|
| BLAKE2b-256 |
eeb392b45b3518a366bdfdbd06b2defb10e7fa16a9c632a6b1e00d1185abfa1a
|