Open-source tools for resolved galaxies
I build public, documented Python packages that connect observations and theory: GalSyn simulates, GalSyn-SBI infers, and piXedfit and its successor piXedfit2 fit. They are designed for the volume of data from JWST, Euclid, Rubin, and Roman, and released through GitHub with full documentation.

GalSyn
A modular Python package for generating realistic synthetic observations of galaxies from hydrodynamical simulations.
GalSyn produces spectrophotometric data cubes of simulated galaxies, including broadband imaging and IFU spectroscopy, with flexible stellar population synthesis, IMF, nebular emission, and dust recipes, instrument PSFs, noise, and real sky backgrounds. Every mock comes with 2D ground-truth maps of physical properties and star-formation histories, which makes it a natural training set for machine-learning inference. The first data release is built from IllustrisTNG.

piXedfit
A Python package for analyzing spatially resolved spectral energy distributions of galaxies, from raw images to physical-property maps.
piXedfit provides an end-to-end workflow: image processing (background subtraction, PSF matching, registration), spatial matching between broadband imaging and IFS data, pixel binning to reach the required S/N, and Bayesian SED fitting with tools to analyze the results. It has been used to study galaxies from the local Universe (e.g., MaNGA, CALIFA, multiwavelength nearby galaxies) to JWST deep fields at z ~ 10.

piXedfit2
A modular, pythonic rewrite of piXedfit for spatially resolved SED analysis, from survey mosaics to physical-property maps.
piXedfit2 keeps everything the original piXedfit does, but every step now runs in memory and can be used either as one automatic call in a script or step by step and interactively in a notebook. Instead of pre-cut images, it takes full survey mosaics plus a galaxy catalog and processes galaxies in batch.
For turning SEDs into property maps, it offers five inference backends behind one interface, and every backend writes the same property-map format.
// what’s inside
- Image processing: mosaic cutouts, PSF matching, reprojection, and a single inverse-variance detection image for source segmentation, with flexible flux-unit handling for any survey.
- Spectrophotometry: combines IFU spectroscopy, including JWST/NIRSpec IFU, with multiband imaging.
- Pixel binning: a flexible region-growing binning engine based on SED-shape similarity.
- SED modeling: FSPS model generation with flexible SFHs, IGM attenuation, and redshift-binned model grids.
- Inference: Bayesian RDSPS, MCMC, Dense Basis (non-parametric SFH), Bagpipes, and SBI. The SBI backend applies pre-trained models to produce per-pixel maps and will connect to GalSyn-SBI.
- Extras: aperture photometry (including NIRSpec MSA slits) and resolved photometric redshifts with EAZY.

GalSyn-SBI
Amortized simulation-based inference of resolved galaxy properties from multiband imaging.
GalSyn-SBI is trained on GalSyn synthetic images paired with their true property maps. A U-Net encodes each pixel together with its surroundings (PSF blending, galaxy structure), and a shared conditional normalizing flow returns a calibrated joint posterior of stellar mass, SFR, age, stellar and gas metallicity, and dust attenuation for every pixel. A companion global model infers integrated properties and star-formation histories. Both run in under a second per galaxy, more than 1000× faster than traditional resolved SED fitting, with piXedfit as the benchmark.
Pre-trained models will be released with standard validation: simulation-based calibration, posterior coverage tests, and out-of-distribution flags.


