EXPANSE is a Python package to perform resolved SED fitting and display and analyze the results. It has primarily been used for JWST and HST imaging, but should be transferable other space and ground-based observations.
- Multiple SED Fitting Tools: Interfaces with Bagpipes, Prospector, EAZY-py, Synference and Dense Basis for flexible SED fitting options.
- Portable File Format: Data stored in single compressed HDF5 file for portability.
- Interactive Viewer: A web-based viewer to display results of SED fitting.
- PSF Modelling and Homogenization: Tools to model PSFs and homogenize imaging.
- Morphological Fitting: Supports multi-component models and complex priors using
.
- Testing with Simulated Galaxies: Forward modelling of simulated galaxies from hydro sims to test fitting and analysis methods.
- Radial/Annular Analysis: Interfaces with PIXEDFit, Voronoi binning, or single pixel binning to perform spatially resolved analysis.
- Population Analysis: Tools to analyze populations of galaxies, including spatially resolved main sequence and outshining effects.
- Photometric Inference: Directly infer Beta slope, MUV, emission line EWs, UV slope, D4000 break, and other photometric properties directly from resolved photometry.
- Interactive Aperture Placement: Place apertures and regions interactively in the viewer to extract photometry and fit SEDs. Run EAZY and Dense Basis fits directly in the viewer.
Here is a real
gal_rotation.mp4
- Direct conversion of cutouts with modelled morphology into components for Pandeia - e.g. to plan JWST observations.
- Better integration with spectroscopic, IFU and slit stepping observations.
- Incorporating de-lensing models to work with lensed galaxies.
- Bug fixes, documentation and examples.
from EXPANSE import ResolvedGalaxy
galaxy = ResolvedGalaxy.init('JOF_16.h5')To create a new galaxy file from your own imaging data, see this notebook for a full example.
Here are a couple of examples of the GUI features, including an interface to plot and compare the SED fitting results.
This example shows an example of the interactive interface for EAZY SED fitting, which lets you place manual apertures and regions and fit their photometry with EAZY-py.

To launch the viewer, run expanse-viewer in the terminal after installation.
The easiest way to install is from the PyPI repository. If you have pip installed just run:
pip install astro-expanseIf you plan to modify or edit the code, you may prefer a manual install. To manually install, clone the repository:
git clone https://github.com/tHarvey303/EXPANSE.git
cd EXPANSE
pip install -e .If you plan to use Bagpipes best results will be with my fork from here.
pip install git+https://github.com/aabdurrouf/piXedfit@main
pip install git+https://github.com/tHarvey303/bagpipes/
There is a notebook here which goes over the basic features of EXPANSE from the beginning of loading in the data. All the plots for the EXPANSE paper are available here which show more advanced usage. The examples/documentation are a work in progress.
Please get in touch if you're interested in using the code, I'm happy to chat!
To lauch the viewer, run expanse-viewer in the terminal after installation.
If you have a problem, find a bug or would like some advice please open an issue or email me!
If you use EXPANSE in your work please cite this paper.
@ARTICLE{2025MNRAS.542.2998H,
author = {{Harvey}, Thomas and {Conselice}, Christopher J. and {Adams}, Nathan J. and {Austin}, Duncan and {Li}, Qiong and {Rusakov}, Vadim and {Westcott}, Lewi and {Goolsby}, Caio M. and {Lovell}, Christopher C. and {Cochrane}, Rachel K. and {Vijayan}, Aswin P. and {Trussler}, James},
title = "{Behind the spotlight: a systematic assessment of outshining using NIRCam medium bands in the JADES Origins Field}",
journal = {\mnras},
keywords = {galaxies: evolution, galaxies: high-redshift, galaxies: photometry, galaxies: star formation, galaxies: stellar content, Astrophysics of Galaxies},
year = 2025,
month = oct,
volume = {542},
number = {4},
pages = {2998-3027},
doi = {10.1093/mnras/staf1396},
archivePrefix = {arXiv},
eprint = {2504.05244},
primaryClass = {astro-ph.GA},
adsurl = {https://ui.adsabs.harvard.edu/abs/2025MNRAS.542.2998H},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

