Repository navigation
Releases: HohlbeinLab/webSMLM
Release list
v0.13.0 — Physically modelled simulator, Compare to GT & MLE shape test
Full details in CHANGELOG.md.
Highlights
- A physically modelled simulator with a known answer (Simulate movie). A labelled 3D structure — microtubule networks in whole cells (the inSiliScope world model, compiled to WebAssembly), nuclear pore complexes, filaments, a tilted plane, a uniform volume or a spherical shell — with blinking and bleaching molecules, a structured background, an sCMOS or EMCCD camera and a vectorial Gibson-Lanni PSF with Zernike aberrations (astigmatism, coma, extended-depth presets). Seeded runs are exactly reproducible; frames render on the GPU when available. Show movie, Save sim. movie (16-bit TIFF + ground-truth CSV) and Save/Load ground truth keep a simulation reusable; Calib. 3D stack simulates a matching bead stack.
- Compare to GT scores a Localize result against the simulation's ground truth: detection, lateral and axial error (median and percentiles), per molecule and per depth, photometry, and measured precision against both the fit's own CRLB and the theoretical CRLB of the true emitters — also for phasor. A step-by-step Simulation guide with worked recipes is in the documentation.
- MLE shape test (after Smith et al., Nat. Methods 2010): every MLE fit reports its mean per-pixel log-likelihood ratio (
llr, also a CSV and table column) and fits scoring below −1 are dropped — mostly windows with a second emitter in reach. On by default for the MLE methods; switch it off for aberrated PSFs. Identical on CPU, worker pool and GPU. - Interface: refusals, failures and warnings in the log start with a bold red
!!!and say what to do; the Simulation section sits below 3D calibration (Alt+Shift hotkeys follow); View/Hide ground truth and small panel resizes keep the reconstruction's zoom.
Credits. The simulator and Compare to GT come from PR #10 by Koen J. A. Martens (Zernike-aberrated PSF and 3D simulation, structure library, the inSiliScope cell field — BSD-3-Clause, licence text in the page source — and the nuclear-pore-complex model) and Carlas Smith (photophysics, background, illumination, EMCCD camera, test structures, engineered PSFs, ground-truth scoring).
Archived on Zenodo with its own version DOI — the concept DOI 10.5281/zenodo.21445041 always resolves to the latest.
v0.12.0 — Live streaming (experimental) & precision-informed rendering
Full details in CHANGELOG.md.
Highlights
- Live streaming (
window.webSMLM.liveStream) — experimental: an external process pushes frame chunks in as they're acquired (a Micro-Manager/pycromanager bridge, or a WebSocket connection into an already-open tab), each localized and rendered into the reconstruction live, no full stack loaded upfront. Drift correction/NeNA/FRC and the locs table are all available while a session is still running; the top-level Stop button ends a session either way it was fed. New and less battle-tested than the rest of the app — several real bugs were found and fixed via actual openframe-rig/Playwright testing this cycle. - Render mode (Rendering settings) — each localization now renders as its own Gaussian sized by its real fitted CRLB precision by default (matching Picasso's own convention), replacing the old always-uniform-blur behaviour. A new dithered mode trades a little visual smoothness for 10–24× faster rendering on large/dense datasets (measured on a real 4.2M-localization dataset).
- Reconstruction rendering now runs on a dedicated Worker+OffscreenCanvas instead of blocking the main thread, fixing a real regression where a large/dense Run's live preview could get stuck on "Rendering…".
Archived on Zenodo with its own version DOI — the concept DOI 10.5281/zenodo.21445041 always resolves to the latest.
v0.11.0
v0.10.0 — Scriptable / headless pipeline
Full details in CHANGELOG.md.
Highlights
window.webSMLM.analyze(config)— runs the whole load → detect/fit → drift → CSV/log/settings pipeline from the browser console in one call, returning every result as in-memory data (no DOM, no downloads).- URL-param autorun (
webSMLM.html?autorun=1&fileUrl=...&pxnm=160&...) — runsanalyze()automatically on page load,&download=1to also save results as files. tools/webSMLM-cli.mjs— a true-headless Node + Playwright CLI:node webSMLM-cli.mjs --file stack.tif --pxnm 160 --method gaussmle. Live terminal progress bar + log streaming.- Headless 3D calibration — build an astigmatic calibration from a bead z-stack without clicking through the UI, via
config.calibrationFile/--calibration beadstack.tif. - Two dependency-free parameter-sweep drivers (
tools/browser_sweep.py,tools/browser-sweep.sh) for quick multi-value comparisons with nonpm install. - UI polish: auto-shown drift plot after Correct drift; fitted localizations now overlay in the raw-panel live preview during Localize, not just detected ROIs; smoother raw-panel preview cadence.
See docs/DOCUMENTATION.md §8 for the full headless API/CLI reference.
webSMLM v0.9.0 — Poisson MLE fitting + localizations table
Minor release. Archived on Zenodo (new version DOI; the concept DOI 10.5281/zenodo.21445041 always resolves to the latest).
Highlights
- Gaussian MLE 2D — integrated-Gaussian Poisson maximum-likelihood fit (Smith, Joseph, Rieger & Lidke, Nat. Methods 2010; ported from Picasso
gaussmle.py), full Fisher-scoring Newton (~5 iterations). Now the default method, and it reports a proper per-localization CRLB uncertainty (CSV "uncertainty" column + a median-precision log line). - Gaussian MLE 3D — astigmatic σx/σy fit → z from the Gaussian-width calibration, an independent cross-check on Phasor 3D. The calibration carries both models (phasor-magnitude and Gaussian-width), tagged, with a guard so a 3D fit can't run against the wrong one.
- Display table — a sortable, cumulatively filterable view of the localizations (
intensity > 1000 and uncertainty < 20, Enter to apply, removable chips, Reset). Filtering drives the reconstruction live (with an "active filter" note), and any column can be histogrammed in the raw panel (x-zoom/pan, x-axis from 0). - Fit methods renamed for consistency (Phasor 2D/3D, Gaussian LS 2D, Gaussian MLE 2D/3D); calibration JSON records its
source_file; Compute [s] now reports the whole-Run wall clock.
MLE is validated offline (unbiased; CRLB matches empirical scatter); MLE 3D vs Phasor 3D is not yet cross-validated on real bead data.
🤖 Generated with Claude Code
webSMLM v0.8.0 — localization precision (NeNA + FRC, experimental)
Adds two localization-precision / resolution measures — the milestone this minor release is about.
⚠️ Experimental. NeNA and FRC are new here and have not yet been cross-validated against established tools (ThunderSTORM, Picasso, FRCbar) or previously-analysed datasets. Treat the numbers as indicative until verified.
NeNA — per-localization precision
Nearest-neighbour distance to the next frame; the distance histogram (signal Rayleigh, scale √2·σ, on a smooth background) is fit by Levenberg–Marquardt and σ = b/√2 reported with a fit-covariance error. The histogram + fit is plotted on the left panel. Validated against synthetic data (recovers injected σ within ~2%).
- Endesfelder et al., Histochem. Cell Biol. 141, 629–638 (2014), doi:10.1007/s00418-014-1192-3.
- Caveat: assumes a static structure — a diffusing probe (e.g. Nile Red membrane PAINT) inflates σ; use a fixed target such as DNA-PAINT.
FRC — image resolution
Fourier ring correlation of two random halves at the 1/7 threshold; resolution = 1/(crossing), error from the split-to-split spread. Uses a compact inline radix-2 (Float32) FFT — no dependency, still one self-contained HTML file. Reports "< Nyquist" when the resolution is finer than the sampling. Curve + 1/7 line + resolution marker plotted on the left panel.
- Nieuwenhuizen et al., Nat. Methods 10, 557–562 (2013), doi:10.1038/nmeth.2448.
- FRC folds in labelling density and drift, so run it after drift correction.
Both plots can be saved via Save image. FSC (3D) is not yet implemented.
Single self-contained webSMLM.html — download and open in any modern browser.
webSMLM v0.7.0 — drift correction (AIM)
Phase 6 complete: drift correction via AIM (adaptive intersection maximization) — a point-based estimator with no image rendering and no FFT, working natively in 2D and 3D.
Highlights
- 2D + 3D drift correction. x/y grid search plus a separate z search on the Phasor-3D output. Validated against simulated ground truth (RMS ~2.7/4.4 nm in x/y; ~5–8 nm in z at realistic axial precision).
- Robust z estimation. Fixed a z sawtooth artifact (broad/noisy intersection peaks) with a linear-preserving segment smooth; clamped out-of-calibration z is excluded, with a warning when >20% is clamped (sample z-range exceeds the calibration).
- Reproducible experimentation. Each run re-estimates from the raw localizations, so segment size and search radius can be swept and compared without stacking residuals.
- Drift curve plotted in the left panel (reconstruction stays visible), corrected coordinates drive the render and CSV, raw coordinates are kept.
References
AIM — Ma, Chen, Nguyen & Liu, Toward drift-free high-throughput nanoscopy through adaptive intersection maximization, Sci. Adv. 10(21), eadm7765 (2024), doi:10.1126/sciadv.adm7765. Adapted from the reference implementation in Picasso (picasso/aim.py; Schnitzbauer et al., Nat. Protoc. 12, 1198–1228, 2017).
Single self-contained webSMLM.html — download and open in any modern browser.
webSMLM v0.6.1 — large multi-IFD stacks
Patch on top of v0.6.0. (v0.6.0's Zenodo archive failed on Zenodo's side, so v0.6.1 is the archived release for the 0.6.x line — it includes everything in 0.6.0.)
Try it: https://hohlbeinlab.github.io/webSMLM/
New
- Large multi-IFD stacks now load — files too big to hold in one ArrayBuffer that are not single-IFD contiguous (e.g. multi-GB Micro-Manager MMStacks, which put a per-frame IFD between frames at a varying stride) are handled by walking the IFD chain to index each frame's offset, then reading frames on demand with
File.slice(). Validated on a 4.1 GB / ~31,585-frame MMStack. Uncompressed strips only.
Included from v0.6.0
- Reorganised sidebar (clustered buttons, number inputs, grouped collapsibles, Save/Load settings), zoom/pan on both panels, sub-pixel localization crosshairs, reconstruction pixel-size readout.
- Fixes: large-multi-IFD-stack freeze, blank-input render crash, O(n²) live-preview slowdown on big 3D stacks; throttled reconstruction preview.
Known limitations
3D is astigmatism-only (Phasor 3D); Gaussian fit is 2D least-squares; dense overlapping PSFs bias single-emitter fits; intensities are ADU unless a camera gain is set; streamed stacks re-read from disk on each run (uncompressed only).
Licensed CC BY 4.0.
webSMLM v0.6.0 — UI overhaul & pipeline polish
A large usability and robustness pass over the 3D-capable pipeline from 0.5.0.
Try it: https://hohlbeinlab.github.io/webSMLM/
Interface
- Reorganised sidebar — action buttons clustered at the top (Load / Simulate, Load / Save settings, Run / Stop, Save localisations, Help), fit method beneath them, and grouped collapsible panels (Memory & streaming · Simulation settings · 3D astigmatism calibration) with a clearer expand affordance.
- Number inputs replace sliders throughout (compact, exact); Fit radius replaces fit window so it is always odd.
- Save / Load settings as JSON to reproduce an analysis configuration.
- Compact statistics row.
Visualisation
- Both panels zoom & pan — wheel or pinch, drag, double-click/tap to reset — via one shared navigator, plus a frame slider to scrub the stack.
- Sub-pixel overlays — accepted localizations drawn as fixed-size magenta crosshairs at their true sub-pixel position (and during calibration too); they stay crisp at any zoom because they are rendered at display resolution.
- Reconstruction reports its pixel size (camera px / magnification, e.g. 160 nm / 10× = 16 nm/px).
Robustness & speed
- Fixed a freeze on large multi-IFD stacks (e.g. a 147 MB MMStack): only files too big to load whole (>1.5 GB) use the on-demand slice path; smaller stacks use the cached path, as before.
- Fixed a render crash from browser-restored blank inputs (a blank magnification produced a 0-size image).
- Fixed an O(n²) live-preview slowdown on big 3D stacks, and throttled the reconstruction preview (~once/second) while keeping the raw frame responsive.
Known limitations
3D is astigmatism-only (Phasor 3D); the Gaussian fitter is 2D least-squares; dense overlapping PSFs bias single-emitter fits; intensities are ADU unless a camera gain is set.
Licensed CC BY 4.0.
webSMLM v0.5.0 — 3D astigmatism
Adds astigmatism-based 3D localization (Phasor 3D), a full calibration workflow, and depth-coded rendering.
Try it: https://hohlbeinlab.github.io/webSMLM/
3D astigmatism
- Calibration. Load a bead z-stack, set the frame range and z-step, and Calibrate. Every spot in each plane is detected and fitted with an elliptical Gaussian (independent σ_x, σ_y), pooled across the field (a stage z-scan means all emitters in a plane share z). The right panel shows a scatter of σ_x (green) / σ_y (magenta) vs z with vertex-quadratic fits σ = a(z−c)² + b, and z=0 is placed at the σ_x=σ_y focus. Calibrations save/load as JSON.
- Phasor 3D fit method. Assigns z per localization from the phasor width ratio via a monotonic z(ratio) fit (~137 nm axial RMS on the test beads). "Phasor (fast)" is now "Phasor 2D".
- Depth-coded rendering. Colour by z (hue = z, brightness = density) with an adjustable z range (out-of-range renders black, so you can optically section), a depth colourbar, and a Turbo blue-green-red map.
z [nm]is added to the CSV export.
Also in this release
- Frame scrubber under the raw panel (slider or mouse-wheel) to browse any stack.
- Loader fix: contiguous ImageJ stacks with trailing ROI/overlay metadata now load fully (previously such a stack could load as one frame).
- Consistent Save-As handling for CSV and calibration exports, with a clear note on the
file://download limitation.
Known limitations
3D is astigmatism-only; the Gaussian fitter is 2D least-squares (not MLE); dense overlapping PSFs bias single-emitter fits; intensities are ADU unless a camera gain is set. The astigmatism calibration is a vertex-quadratic per axis — a local approximation, best over a cropped z-range.
Licensed CC BY 4.0.