Skip to content

pySRX

Super-resolution and world-model reconstruction for microscopy, from the Oxford-ZEISS Centre of Excellence. Private while in development.

pySRX brings the reconstruction code that used to live in separate project repositories (light-field deconvolution, neural fields, benchmark metrics, SR-Metrics) into one tested library. Every modality is described the same way: a physical forward operator that maps the sample to the raw camera data, a Poisson noise model, and a reconstruction that inverts it, either a classical solver (Richardson-Lucy, MAP) or a world model (a hash-grid neural field fitted through the operator). See Concepts.

Modalities

Modality Status Forward operator
Light field (ZEISS Lightfield 4D) done pysrx.forward.lightfield.Projector (37 sub-aperture views, z-chunked FFT)
Lattice SIM (ZEISS Elyra) in progress structured-illumination operator, planned
Confocal / widefield (reference) PSFs only pysrx.optics.confocal

Subpackages

Package Contents
pysrx.io tanoa OME-Zarr in and out (raw CZI is converted by tanoa, never read here)
pysrx.optics PSFs: widefield and confocal scalar Debye, light-field sub-apertures; structured illumination planned
pysrx.forward forward and adjoint operators (light field; SIM planned)
pysrx.solvers Richardson-Lucy (with optional TV), MAP
pysrx.field the world model: a hash-grid neural field fitted through any forward operator
pysrx.metrics one metrics library: resolution, fidelity, sharpness, noise, axial extent
pysrx.simulate forward simulation and camera noise for in-silico ground truth

Unified metrics

pysrx.metrics absorbs SR-Metrics and the LF4D benchmark metrics into one API:

  • resolution: FRC, self-FRC, decorrelation analysis (an FRC_SR_METRICS preset reproduces SR-Metrics)
  • fidelity: nMSE, PSNR, SSIM, PCC, mutual information
  • sharpness: Tenengrad (on a fixed physical grid, so values compare across pixel sizes)
  • noise: signal, noise and SNR estimates on a single plane
  • axial extent: FWHM of bright features along z

Quick start

pixi run test            # CPU (as in CI)
pixi run -e cuda test    # GPU
pixi run -e docs site    # this site and the slides into site/

Project repos vendor pySRX as a git submodule at dependency/pySRX; see Getting started.

Where the site lives

The repository is private, so the site is not published on GitHub Pages. CI builds it on every push and pull request and uploads it as the workflow artifact pysrx-site; tagged releases attach it as a zip. Download and unzip it, then serve it locally (the slides and search need HTTP, not file://):

python -m http.server -d site 8000   # then open http://127.0.0.1:8000

or build it yourself with pixi run -e docs site.