API Reference

Ptychography through differentiable programming in JAX.

Extended Summary

A comprehensive toolkit for ptychography simulations and reconstructions using JAX for automatic differentiation and acceleration. Supports both optical and electron microscopy applications with fully differentiable and JIT-compilable functions.

Routine Listings

cohere

Partial coherence support for spatial and temporal coherence effects.

invert

Inversion algorithms for phase retrieval and ptychography.

lenses

Lens implementations and optical calculations.

models

Models for generating datasets for testing and validation.

optics

Variety of different optical elements.

plots

Plotting utilities for optical data visualization.

prop

Propagation methods for optical wavefronts.

scopes

Microscope implementations and forward models.

types

Type definitions and factory functions for PyTree dataclasses.

utils

Utility functions for distributed computing and math operations.

Examples

>>> import janssen as js
>>> wavefront = js.models.collimated_gaussian(
...     wavelength=632.8e-9, waist=1e-3, grid_size=(256, 256), dx=10e-6
... )
>>> propagated = js.prop.angular_spectrum_prop(wavefront, distance=0.1)
>>> js.plots.plot_intensity(propagated)

Notes

All computations are JAX-compatible and support automatic differentiation for gradient-based optimization of optical systems and phase retrieval.

Submodules