Janssen
Optical microscopy & phase retrieval
I built Janssen around modularity: small, reusable optical units that I can string together to model a wide variety of optical setups. The same composition supports forward simulation and inversion, so I can fit physical parameters to measurements without writing a separate reconstruction model.
My contribution: I built a modular wave-optics package that reuses optical components in forward simulation and inversion.
Architecture & differentiation for janssen
Architecture
- Separate optical components. Propagation, lenses, apertures, and microscope models live in separate modules. Functions transform a wavefront into a new wavefront, so optical systems can be assembled and their components reused in reconstruction.
- Fields retain amplitude and phase.
OpticalWavefrontcarries the complex field together with wavelength and sampling information. Keeping phase available is essential for interference, focusing, and phase retrieval. - Partial coherence is explicit.
CoherentModeSetrepresents illumination as weighted modes. The coherence and reconstruction modules support partially coherent sources, so the source model can be included in the imaging problem.
JAX & differentiation
- Data structures for JAX. Wavefronts and mode sets are PyTrees: containers whose numerical arrays can pass through JAX transformations together. Validated factories and array-shape annotations help catch incompatible inputs.
- Reuse the model for fitting. Automatic differentiation connects a measurement residual to the continuous parameters of the assembled optical setup. Jacobian-free Gauss–Newton with Levenberg–Marquardt damping supports inversion of that same model, using JAX derivatives and conjugate-gradient solves.
- Compilation and batching. Compatible kernels use
jax.jitfor compilation andjax.vmapfor batches or modes. Grid sizes and other shape-defining choices must stay static; setup and numerical execution have different roles.
Design notes: Architecture ↗ · PyTrees ↗








