Skip to content

CosmoStat/SHINE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

83 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SHINE: SHear INference Environment

SHINE Logo

A JAX-powered framework for probabilistic shear estimation in weak gravitational lensing

Python JAX PyPI Docs License All Contributors


๐ŸŒŸ Overview

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.

โœจ Key Features

  • ๐Ÿš€ 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

๐Ÿ“ฆ Installation

pip install shine-wl

For development (editable install from source):

git clone https://github.com/CosmoStat/SHINE.git
cd SHINE
pip install -e ".[dev,test]"

Euclid VIS Support

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.

Quick Start

Run inference from a config file

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.yaml

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

Pedagogical example

For a step-by-step walkthrough that builds the config inline and plots diagnostics, see examples/shear_inference.py:

python examples/shear_inference.py

๐Ÿ“– Documentation

Full documentation is available at cosmostat.github.io/SHINE, including:

๐Ÿ—๏ธ Status

โš ๏ธ Early Development: This project is under active development. APIs may change.

๐Ÿค Contributing

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
Ezequiel Centofanti

๐Ÿค” ๐Ÿ“†
Samuel Farrens
Samuel Farrens

๐Ÿค” ๐Ÿ“†
Emma Ayรงoberry
Emma Ayรงoberry

๐Ÿค” ๐Ÿ“†
Francois Lanusse
Francois Lanusse

๐Ÿค” ๐Ÿ“†

This project follows the all-contributors specification. Contributions of any kind welcome!


Born at CosmoStat, built with โค๏ธ for the astro community.

About

CosmoStat's SEear INference Environment

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors