This release is a pre-release and may not be stable for production use.
EXPANSE
EXtended Pixel-resolved ANalysis of SEDs
Overview
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.
Features
- 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.
Galaxy Example
Here is a real $$z=1$$ spiral galaxy in the GOODS-South field, fitting using EXPANSE, showing the inferred property maps.
https://github.com/user-attachments/assets/d64b422b-5ba1-483f-9f93-21d2533d38f0
Planned Features
- 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.
Quickstart
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.
GUI Examples
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.
Installation
The easiest way to install is from the PyPI repository. If you have pip installed just run:
pip install astro-expanse
If 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/
Examples
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.
Support
If you have a problem, find a bug or would like some advice please open an issue or email me!
Citation
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}
}
Metadata
Release files for astro-expanse 0.1.10.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| astro_expanse-0.1.10.dev0.tar.gz | 86.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astro_expanse-0.1.10.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.7 MB
Release files / astro_expanse-0.1.10.dev0.tar.gz
| Download URL | astro_expanse-0.1.10.dev0.tar.gz |
|---|---|
| Size | 86.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac3ec2c0f4467542ac51b0d67d77bfc038597bfca1e35b278d6c28f69f7464ec
|
|
BLAKE2b-256 checksum How to use checksums |
8b7ae1f5356469a4ed1e62c19ba2bbe145e19b6bf7c5ea4538593e25ceb1a81c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / astro_expanse-0.1.10.dev0-py3-none-any.whl
| Download URL | astro_expanse-0.1.10.dev0-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
775d85a30850941b35f2e2d6f77e8953448f714bcbe4d335abfaa1f390291edd
|
|
BLAKE2b-256 checksum How to use checksums |
436e7ef3da3417f98933080bb4f43d2ec9cf7df63929bcd0fc73f2ed315718f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency log