Skip to main content

Resolved Galaxy Analysis and Exploration

Project description

Contributions welcome workflow pre-commit Ruff License: GPLv3 PyPI version

EXPANSE

logo

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

  1. Multiple SED Fitting Tools: Interfaces with Bagpipes, Prospector, EAZY-py, Synference and Dense Basis for flexible SED fitting options.
  2. Portable File Format: Data stored in single compressed HDF5 file for portability.
  3. Interactive Viewer: A web-based viewer to display results of SED fitting.
  4. PSF Modelling and Homogenization: Tools to model PSFs and homogenize imaging.
  5. Morphological Fitting: Supports multi-component models and complex priors using pysersic.
  6. Testing with Simulated Galaxies: Forward modelling of simulated galaxies from hydro sims to test fitting and analysis methods.
  7. Radial/Annular Analysis: Interfaces with PIXEDFit, Voronoi binning, or single pixel binning to perform spatially resolved analysis.
  8. Population Analysis: Tools to analyze populations of galaxies, including spatially resolved main sequence and outshining effects.
  9. Photometric Inference: Directly infer Beta slope, MUV, emission line EWs, UV slope, D4000 break, and other photometric properties directly from resolved photometry.
  10. 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

  1. Direct conversion of cutouts with modelled morphology into components for Pandeia - e.g. to plan JWST observations.
  2. Better integration with spectroscopic, IFU and slit stepping observations.
  3. Incorporating de-lensing models to work with lensed galaxies.
  4. 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.

GUI 1

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. GUI 2

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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astro_expanse-0.1.10.dev0.tar.gz (86.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astro_expanse-0.1.10.dev0-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file astro_expanse-0.1.10.dev0.tar.gz.

File metadata

  • Download URL: astro_expanse-0.1.10.dev0.tar.gz
  • Upload date:
  • Size: 86.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astro_expanse-0.1.10.dev0.tar.gz
Algorithm Hash digest
SHA256 ac3ec2c0f4467542ac51b0d67d77bfc038597bfca1e35b278d6c28f69f7464ec
MD5 aec14f7326bbc26d94cad9c2925bcafb
BLAKE2b-256 8b7ae1f5356469a4ed1e62c19ba2bbe145e19b6bf7c5ea4538593e25ceb1a81c

See more details on using hashes here.

Provenance

The following attestation bundles were made for astro_expanse-0.1.10.dev0.tar.gz:

Publisher: python-publish.yml on tHarvey303/EXPANSE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astro_expanse-0.1.10.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for astro_expanse-0.1.10.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 775d85a30850941b35f2e2d6f77e8953448f714bcbe4d335abfaa1f390291edd
MD5 8930384f7f2e79b99f35a0557ad289c9
BLAKE2b-256 436e7ef3da3417f98933080bb4f43d2ec9cf7df63929bcd0fc73f2ed315718f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for astro_expanse-0.1.10.dev0-py3-none-any.whl:

Publisher: python-publish.yml on tHarvey303/EXPANSE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page