Skip to content

Repository files navigation

quantem.widget

TestPyPI

Interactive, GPU-accelerated visualization widgets for 4D-STEM and electron microscopy. Use them in Jupyter or open data directly from the command line; NumPy, PyTorch, CuPy, CUDA, Apple Silicon, and browser WebGPU workflows are supported.

quantem.widget is currently a prototype on TestPyPI and is built on the quantem core.

Install

pip install -i https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ quantem.widget

See the installation guide for backend setup, Colab instructions, and verification.

Quick start

Open an image or microscopy dataset without writing a notebook:

quantem show image.tif
quantem show3d ./frames/
quantem show4dstem ./masters/

Or construct widgets directly in Python:

import numpy as np
from quantem.widget import Show2D, Show4DSTEM

Show2D(np.random.random((512, 512)))
Show4DSTEM(np.random.random((64, 64, 128, 128)))

For real 4D-STEM data, load a master file onto the available GPU:

from quantem.gpu.io import load
from quantem.widget import Show4DSTEM

Show4DSTEM(load("scan_master.h5"))

The command-line guide and tutorials cover data loading, HTML export, public example datasets, and complete workflows.

Widgets

Widget Use it for Learn more
Show1D Scientific traces, reconstruction metrics, and live monitors API
Show2D Images, contrast, FFTs, ROIs, profiles, and scale bars tutorial · API
Show3D Scrub and play through image or volume stacks tutorial · API
Show3DSlices Inspect orthogonal slices through a 3D volume tutorial · API
Show4DSTEM Live virtual detectors, multi-dataset review, and WebGPU HTML export tutorial · export guide · API
ShowPtycho Interactive SSB phase and aberration review API
ShowDiffraction Measure diffraction spots, rings, spacing, and angles tutorial · API
ChooseLattice Select an origin and lattice vectors API
ShowEDS Explore linked EDS/EELS maps and spectra
ShowFolder Browse, group, and select microscopy session files tutorial · API

Documentation

Visit the quantem.widget documentation for installation, tutorials, API references, command-line workflows, data I/O, HTML sharing, and WebGPU export guidance.

Citing quantem.widget

If the quantEM interactive framework—including quantem.widget, GPU-accelerated I/O, analysis, or reconstruction workflows on MPS or CUDA—contributed to your research, please consider citing Lee et al., Interactive Framework for Real-Time 4DSTEM Analysis and Reconstruction, Microscopy and Microanalysis 32 (Supplement 1), ozag053.941 (2026), https://doi.org/10.1093/mam/ozag053.941.

Contributing

Contributions are welcome. Read CONTRIBUTING.md for setup, tests, documentation standards, and the pull-request workflow. That workflow follows the reproducible scientific-software procedures described by scikit-package.

Questions and bug reports belong in the issue tracker.

About

Interactive Framework for Real-Time Multidimensional Dataset

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages