GalSyn

Galaxy Synthesizer · forward modeling

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.

IllustrisTNGHST · JWST · Euclid · LSST · Romanimaging · IFSPython
A TNG50 galaxy rendered by GalSyn as seen by HST, JWST, LSST, and Roman.
Fig. 1A TNG50 galaxy rendered by GalSyn as seen by HST, JWST, LSST, and Roman.
Synthetic NIRSpec IFU cube: emission-line maps and spectra.
Fig. 2Synthetic NIRSpec IFU cube: emission-line maps and spectra.
Fig. 3A simulated galaxy rendered by GalSyn as the viewing angle changes from face-on to edge-on, with dust attenuation (left) and without it (right). Dust reddens and dims the star-forming regions, most strongly when the disk is seen edge-on.

piXedfit

Pixelized SED fitting

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.

resolved SED fittingimaging + IFSBayesian inferencePython
Example workflow · a galaxy at z = 1.95
Color image of a galaxy at z = 1.95 and its PSF-matched images in 12 HST/ACS and JWST/NIRCam bands
Step 1Image processing: a galaxy at z = 1.95 (left) and its PSF-matched, spatially aligned images in 12 bands, from HST/ACS F435W to JWST/NIRCam F444W.
Pixel-binning map of the galaxy
Step 2Pixel binning: pixels with similar SED shapes are grouped to reach the required S/N in every band.
Maps of stellar mass, SFR, dust attenuation, metallicity, mass-weighted age, and formation times t25, t50, t75
Step 3SED fitting: maps of stellar mass and SFR surface density, dust attenuation (AV), metallicity, mass-weighted age, and the times at which 25%, 50%, and 75% of the stellar mass formed.

piXedfit2

The next generation of piXedfit · in development

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.

Bayesian RDSPSMCMC (emcee)Dense BasisBagpipesSBI
Original piXedfit ↑ Code coming soon

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

Resolved galaxy inference · in development

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.

SBIU-Netnormalizing flowsPyTorch · sbi
Research theme → Code coming soon
GalSyn-SBI logo: a galaxy shown as raw multiband pixels on the left and as a smooth inferred property map on the right
GalSyn-SBI recovery of ground truth on TNG50 mocks
GalSyn-SBIPreliminary validation on TNG50 mocks: global posteriors and SFHs (left) and resolved maps with pixel-level recovery (right).
Beyond galaxies

Other projects

Accurate Hijri Calculator (AHC)

positional astronomy

Software for calculating the position and visibility map of the new crescent moon at sunset, which marks the beginning of a new month in the Islamic lunar calendar.

Skyfieldvisibility maps