geko: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations

summary

The gist

Wide-field slitless spectroscopy (WFSS) is a powerful tool for studying large samples of galaxies across cosmic times The Grism Emission-line Kinematics tOol (geko)…

In short

geko is a Python tool that uses AI to model galaxy shapes and movements from wide-field slitless spectroscopy data. It combines forward modeling of NIRCam grism observations with Bayesian inference to find important galaxy properties like size, rotation speed, and mass. This allows for statistical studies of galaxy dynamics in the early Universe.

Key concepts

Wide-field Slitless Spectroscopy (WFSS)
This is a powerful technique used to study many galaxies at once across different cosmic times. It involves taking a broad view of a galaxy and analyzing its light across many spatial points simultaneously, rather than focusing on just one narrow slit.
geko
geko is the Python package that performs the modeling. It uses forward-modeling to simulate how a galaxy's structure and motion should look in the observed data, then uses Bayesian inference to figure out what those underlying physical properties are.
Sérsic Profile
This is a mathematical model used to describe the surface brightness (how bright the galaxy is) as it fades away from its center. It helps define the overall shape and size of the galaxy being studied.
Bayesian Inference
This is a statistical method used to update our beliefs about unknown parameters (like velocity or mass) as we get new data. geko uses this to find the best possible values for galaxy properties by comparing theoretical models to actual observations.

Terminology used across episodes

This episode discusses

The paper

geko: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations · Read on arXiv

Kavli Institute for Cosmology, University of Cambridge · Cavendish Laboratory, University of Cambridge

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 about 1600), allowing it to spatially resolve the ionised-gas kinematics out to z about 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 (geko), a Python package that forward-models NIRCam grism observations and infers emission-line morphologies and kinematics within a Bayesian framework. 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 jax / 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 about 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 about 4-6, recovering both rotation- and dispersion-dominated systems. 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.

DOI: 10.1093/mnras/stag1965

Transcript

Introduction to the show: ident: Astrophysics Radio. Generated commentary on the latest astrophysics papers.

Vera: I'm Vera.

Jocelyn: And I'm Jocelyn, here with Subrahmanyan.

Vera: We're looking at the paper: "geko: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations".

Jocelyn: Here's the gist of the paper. Wide-field slitless spectroscopy (WFSS) is a powerful tool for studying large samples of galaxies across cosmic times The Grism Emission-line Kinematics tOol (geko), a Python package that forward-models NIRCam grism observations and infers emission-line morphologies and kinematics within a Bayesian framework, recovers parameters such as effective radius, velocity dispersion, rotational velocity, rotational support, and dynamical mass Tool Development geko combines forward-modelling of the grism instrument with a Bayesian inference framework to infer the model parameters of the galaxy The tool leverages optimized gradient-based sampling algorithms via jax/numpyro for efficient inference, allowing a galaxy to be fit in approximately twenty minutes on GPUs The framework accounts for instrumental effects by convolving the 3D model cube with the PSF and LSF kernels before projecting it onto the grism detector plane Model Components The tool combines forward-modelling of the grism instrument with a Bayesian inference framework to infer the model parameters of the galaxy The morphological modeling uses a Sérsic profile as a base model for surface brightness, requiring seven free parameters including inclination, position angle, effective radius, and Sérsic index Kinematic modeling utilizes an idealized thin disk model where the rotational velocity is described by an arctangent function and the velocity dispersion is modeled as a constant isotropic value across the disk Inference Methodology The inference process uses numpyro, which is based on jax, allowing for automatic differentiation and just-in-time (JIT) compilation to boost performance The likelihood function is Gaussian, defined by the comparison between the 2D model spectrum and the observed grism map The sampling employs The No-U-Turn-Sampler (NUTS), an adaptation of Hamiltonian Monte Carlo (HMC), which is optimized for GPUs to sample posterior distributions efficiently Validation and Application Performance is validated using extensive mock data spanning position angle, S/N, and morphology to quantify where degeneracies limit recovery Applications are demonstrated on real FRESCO Halpha emitters at z ≈ 4 − 6, recovering both rotation- and dispersion-dominated systems The tool opens the door to statistical studies of galaxy dynamics in the early Universe Future Directions Planned developments include implementing morphological fitting directly within the code, incorporating multiple component fitting for mergers and clumpy systems, and implementing joint fitting of emission lines using both dispersion directions (R and C) to recover intrinsic maps with more flexibility This methodology aims to reconstruct a spatially resolved emission line map without assuming a Sérsic light distribution geko fits the emission line morphology and kinematics using parametric models, namely a Sérsic profile and an arctangent velocity curve, which are projected onto the sky based on the inclination and position angle of the galaxy The tool opens the door to statistical analyses of galaxy kinematics at high redshift, ushering in the study of early galaxy formation through a dynamical lens Acknowledgements We thank Benjamin D.

Vera: Johnson, Fengwu Sun and Eiichi Egami for technical insights which helped in the development of the code We thank Hannah Übler, Emily Wisnioski, William McClymont and the JADES collaboration for helpful discussions ALD thanks the University of Cambridge Harding Distinguished Postgraduate Scholars Programme and Technology Facilities Council (STFC) Center for Doctoral Training (CDT) in Data intensive science at the University of Cambridge (STFC grant number 2742605) for a PhD studentship ALD and ST acknowledge support by the Royal Society Research Grant G125142 References Arribas S., et al., 2024, A&A, 688, A146 Bingham E., et al., 2018, arXiv e-prints, p.

Jocelyn: arXiv:1810.09538 Bouwens R.

Vera: J., et al., 2022, ApJ, 931, 160 Bradley J., et al., 2018, JAX: composable transformations of Python+NumPy programs, http://github.com/jax-ml/jax Brook C.

Title and authors: Vera: So we've seen that geko is a tool designed to model galaxy kinematics and morphology using NIRCam grism data, and now we’re looking at what the authors actually put into that title: "geko: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations."

Jocelyn: That title really gets to the point about what the paper is trying to achieve—it’s not just some abstract fitting routine; it’s a specific tool built for the slitless spectroscopy data coming from JWST and NIRCam. The authors are clearly emphasizing that this isn't just a general method, but one tailored to these specific instruments.

Subrahmanyan: For structure formation studies, this is important because it tackles the problem that comes up when you have these large surveys; you can see the light distribution, but you need the kinematics to understand how that matter is assembling itself into galaxies over time. The paper shows how they tackle that linkage specifically for JWST observations.

Vera: If we think about this in terms of what it means for us observing the sky, it means we can now start getting spatially resolved maps of emission lines across cosmic times, which was a major hurdle before. This tool provides the framework to move beyond just measuring average properties and actually map out where things are happening in the galaxy.

Jocelyn: It’s about moving from a global picture to a local one; you can finally see velocity gradients and dispersion variations within a single galaxy, which tells us about internal structure, not just bulk motion. The authors are showing that this is achievable with these specific grism observations.

Subrahmanyan: And for the cosmology side, getting these detailed kinematic constraints on high redshift galaxies helps us test our models of how dark matter halos grow; if the kinematics don't match what we predict for a given galaxy mass at that epoch, it gives us a constraint.

Vera: So in short, they’re giving astronomers a concrete way to extract physical parameters from these complex observations using a rigorous statistical framework. The name itself highlights the tool and the specific observational technique being used.

Jocelyn: And for the listener who is interested in time-domain astronomy, it suggests that follow-up observations could be guided by these initial kinematic maps, helping us decide which galaxies to spend telescope time on next.

Subrahmanyan: It opens the door for statistical studies of galaxy dynamics at high redshift; this kind of detailed mapping is what we need to build the statistical foundations for understanding how structure forms in the early Universe.

The paper's summary: Vera: So, what’s the actual substance of this paper? Essentially, they present geko as a Python package that forward models NIRCam grism observations and then infers the emission-line morphologies and kinematics using a Bayesian framework. They are solving that degeneracy problem we talked about earlier.

Jocelyn: That's right, the core summary is about using this forward modelling approach to infer intrinsic properties like effective radius, velocity dispersion, rotational velocity, rotational support, and dynamical mass from the observed data. They’re systematically accounting for instrumental effects by convolving the three dee model cube with the point spread function and line spread function before projecting it onto the grism detector plane <ref:2510.07369#pg2>.

Subrahmanyan: The key takeaway here is that they take a 2D image and a spectrum, and through this process of likelihood comparison, they sample the posterior distributions of all those parameters simultaneously <ref:2510.07369#pg1>. They are not just fitting one thing; they are inferring the entire physical state of the galaxy from the data.

Vera: They use a specific set of model components: a Sérsic profile for surface brightness and an idealized thin disk model for kinematics, which uses an arctangent function for rotation and a constant isotropic value for dispersion.

Jocelyn: And they do this all within a framework where the likelihood is Gaussian, comparing their constructed 2D model to the actual grism map <ref:2510.07369#pg1>. It’s a very structured way to handle the comparison between theory and observation in this context.

Subrahmanyan: The paper summarizes that the code takes as input continuum subtracted grism data and priors for morphology, then outputs spatially resolved emission line maps and kinematic maps based on sampled parameters. This is a complete pipeline from raw data to physical interpretation.

Vera: So, the summary is that they provide a complete inference process where they take an image and a spectrum, build a model based on some assumed parameters—like Sérsic and thin disk—and then compare it to what you actually see in the grism map.

Jocelyn: And the implication is that this allows us to derive spatially resolved emission line maps and velocity fields, which are constrained by the derived model parameters. It’s a powerful way to get detailed internal information from these observations.

Subrahmanyan: This moves us toward constraining galaxy dynamics at high redshift, which is where we can start building the statistical foundation for understanding how structure forms in the early Universe based on these detailed measurements.

The paper's improvements: Vera: Now let’s talk about what they suggest are improvements to this work. They acknowledge that while it works well for idealized cases, there are ways to make it more robust when dealing with more complex objects.

Jocelyn: One key suggestion is incorporating morphological fitting directly within the code, which means making the code more flexible so you don't have to manually change every parameter every time you want to model something new. They also suggest adding multiple component fitting for mergers or clumpy systems, maybe using a non-parametric grid delta v over x and y.

Subrahmanyan: That’s interesting because it suggests moving away from the fixed thin disk assumption; if galaxies are mergers or clumpy, a simple disk model won't capture the complexity. Modeling those complex systems requires more sophisticated components than just one simple disk.

Vera: Another major improvement mentioned is joint fitting of emission lines across different filters and both dispersion directions, which is the R and C modes. This allows them to recover intrinsic maps with more flexibility because they aren't stuck assuming a single direction for velocity or dispersion.

Jocelyn: So, combining the R and C modes means you can get richer information about the intrinsic maps and velocity gradients without having to assume a specific orientation for the galaxy, which is a big deal for getting more accurate physical results.

Subrahmanyan: From a theoretical standpoint, this joint fitting capability helps us constrain the underlying physics of gas dynamics; if we can map both dispersion directions, we get a much better handle on how turbulent and supported the gas is in that system.

Vera: The paper also points out that their current setup uses priors for the free parameters to guide the inference, which is good for stability, but it also means you have to be careful about those priors not biasing your results too much.

Jocelyn: That’s a fair point; they are using optimized gradient-based sampling algorithms, which makes the process fast on GPUs, fitting a galaxy in about twenty minutes. So the improvement is both in robustness for complex objects and speed for running these fits.

Subrahmanyan: The paper does flag that one limitation of their current approach is that it relies on parametric models like Sérsic and an arctangent velocity curve to derive the kinematics; if those underlying assumptions are wrong, the resulting maps will be flawed.

Conclusion: Vera: Wrapping up this discussion on "geko: A tool for modelling galaxy kinematics and morphology in JWST/NIRCam slitless spectroscopic observations," it’s clear that this work provides a powerful computational framework for extracting physical properties from these challenging JWST data.

Jocelyn: It moves us toward being able to get spatially resolved emission line maps, which is a big step forward in understanding galaxy structure at high redshift, especially when we combine it with the improved flexibility discussed in the paper.

Subrahmanyan: For cosmology, this tool provides the means to build statistical studies of galaxy dynamics at high redshift; it’s a key piece of the puzzle for testing structure formation models as we look further back in cosmic time.

Vera: So, what does this all mean practically? It means future JWST observations won't just be about looking at average properties anymore; they’ll be about mapping out the internal dynamics of individual galaxies.

Jocelyn: And the next steps involve applying these improvements to complex systems and joint fitting across filters and dispersion directions to push those observational limits further.

Subrahmanyan: That's where we go next, pushing those limits on what we can constrain for structure formation in the early Universe using these detailed kinematic maps.

Vera: So that’s our time on this paper, a tool that helps us map out the internal dynamics of galaxies using JWST slitless spectroscopy.

Jocelyn: We’ll be back after the break.

More episodes

← Home