SHINE (SHear INference Environment) is a modern, high-performance framework for probabilistic shear estimation in weak gravitational lensing studies. Built on JAX, it leverages automatic differentiation and just-in-time compilation to deliver fast, scalable inference for cosmological applications.
- 🚀 JAX-powered: Automatic differentiation and JIT compilation for optimal performance
- 📊 Probabilistic Inference: Full posterior distributions for shear estimates
- 🔧 Modular Design: Flexible architecture for easy extension and customization
- 🎯 GPU Acceleration: Seamless GPU support for large-scale analyses
- 📈 Scalable: Efficient handling of large imaging surveys
pip install shine-wlFor development (editable install from source):
git clone https://github.com/CosmoStat/SHINE.git
cd SHINE
pip install -e ".[dev,test]"SHINE includes a full instrument backend for Euclid VIS multi-exposure shear inference (shine.euclid):
- Reads quadrant-level FITS exposures, PSF grids, background maps, and MER source catalogs
- Forward-models the scene as Sersic galaxies convolved with spatially-varying PSFs via JAX-GalSim
- Multi-tier stamp rendering (64/128/256 px) assigned per source by half-light radius
- Catalog filtering by SNR,
det_quality_flag, size, and footprint visibility - MAP and NUTS inference for shared shear (g1, g2) and per-source morphology
See notebooks/euclid_vis_map.ipynb for an interactive demo.
SHINE is driven by YAML configuration files. Any parameter specified as a
distribution (e.g. type: Normal) becomes a latent variable; everything else
is fixed. To run the full pipeline (data generation → model building → MCMC):
python -m shine.main --config configs/test_run.yamlResults (posterior samples in NetCDF format) are saved to the results/
directory by default. Override with --output:
python -m shine.main --config configs/test_run.yaml --output my_output/For a step-by-step walkthrough that builds the config inline and plots
diagnostics, see examples/shear_inference.py:
python examples/shear_inference.pyFull documentation is available at cosmostat.github.io/SHINE, including:
- Getting Started — installation and first run
- Configuration Reference — YAML config specification
- Validation Pipeline — bias measurement infrastructure
- API Reference — auto-generated from docstrings
We welcome contributions! This project is in early development, and we're excited to collaborate with the community. Thanks goes to these wonderful people (emoji key):
Ezequiel Centofanti 🤔 📆 |
Samuel Farrens 🤔 📆 |
Emma Ayçoberry 🤔 📆 |
Francois Lanusse 🤔 📆 |
This project follows the all-contributors specification. Contributions of any kind welcome!
