Skip to content

debangshu-mukherjee/janssen

PyPI Downloads License PyPI version Python Versions Documentation Status DOI Code style: black codecov jax_badge Lines of Code

Janssen: Optical Microscopy with JAX

Janssen is a JAX-based library for optical microscopy simulations and ptychographic reconstructions. It provides differentiable implementations of optical propagation, lens simulations, and phase retrieval algorithms, all optimized for GPU acceleration through JAX.

Architecture

Janssen Architecture

Janssen follows a layered architecture built on JAX's functional paradigm:

  • Foundation Layer: Core data structures (types) as JAX PyTrees for automatic differentiation, plus math utilities (utils) including Bessel functions and Wirtinger gradients
  • Physics Core: Optical propagation (prop), lens models (lenses), beam profiles (models), and wavefront manipulation (optics)
  • Coherence Layer: Partial coherence simulation (cohere) with spatial/temporal modes and source models
  • Application Layer: Forward microscope models (scopes), phase retrieval algorithms (invert), and visualization (plots)

Every optical element is a pure function Wavefront → Wavefront, enabling JAX to trace computation graphs and compute gradients automatically for inverse problems like ptychography.

About

Differentiable and Modular Optical Microscopy Simulations and Inversions

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors