$\texttt{geko}$: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations
A. Lola Danhaive, Sandro Tacchella
TL;DR
JWST/NIRCam slitless spectroscopy offers high-resolution kinematic information but is hampered by morphology–kinematics degeneracies in 2D grism maps. geko provides a forward-modeling, Bayesian framework that jointly infers emission-line morphology and gas kinematics by convolving a Sérsic morphology with an arctangent rotation curve through a full instrument model and using gradient-based sampling on GPUs. The paper demonstrates extensive mock-data validation across position angles, S/N, and morphologies, and applies geko to real FRESCO Hα emitters at z≈4–6, recovering both rotation- and dispersion-dominated systems and deriving v_rot(r_e), v/σ_0, v_circ, and M_dyn. This approach enables robust, scalable dynamical studies of galaxies in the early universe and provides a public tool for the community to perform statistical analyses of galaxy dynamics with JWST data.
Abstract
Wide-field slitless spectroscopy (WFSS) is a powerful tool for studying large samples of galaxies across cosmic times. With the arrival of JWST, and its NIRCAM grism mode, slitless spectroscopy can reach a medium spectral resolution of $(R\sim 1600)$, allowing it to spatially resolve the ionised-gas kinematics out to $z\sim 9$. However, the kinematic information is convolved with morphology along the dispersion axis, a degeneracy that must be modelled to recover intrinsic properties. We present the Grism Emission-line Kinematics tOol ($\texttt{geko}$), a Python package that forward-models NIRCam grism observations and infers emission-line morphologies and kinematics within a Bayesian framework. $\texttt{geko}$ combines Sérsic surface-brightness models with arctangent rotation curves, includes full point-spread function (PSF) and line-spread function (LSF) convolution, and leverages gradient-based sampling via $\texttt{jax}$/$\texttt{numpyro}$ for efficient inference. It recovers parameters such as effective radius, velocity dispersion, rotational velocity, rotational support, and dynamical mass, with typical run times of $\sim$20 minutes per galaxy on GPUs. We validate performance using extensive mock data spanning position angle, S/N, and morphology, quantifying where degeneracies limit recovery. Finally, we demonstrate applications to real FRESCO H$α$ emitters at $z\approx 4-6$, recovering both rotation- and dispersion-dominated systems. $\texttt{geko}$ opens the way to statistical studies of galaxy dynamics in the early Universe and is publicly available at https://github.com/angelicalola-danhaive/geko.
