quantem.widget#

TestPyPI

Interactive Jupyter widgets for electron microscopy visualization. Works with NumPy, CuPy, and PyTorch arrays.

This package is currently on TestPyPI as a prototype. It will be merged into quantem’s main repository once matured.

How do I install quantem.widget?#

conda create -n widget-env python=3.14 -y
conda activate widget-env
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ quantem-widget
pip install jupyterlab
jupyter lab

Verify:

python -c "import quantem.widget; print(quantem.widget.__version__)"

How do I update quantem.widget?#

New features and fixes are released frequently. Check the badge above for the latest version, see what’s new in the changelog, and run:

conda activate widget-env
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --upgrade quantem-widget
python -c "import quantem.widget; print(quantem.widget.__version__)"

How do I report bugs or request features?#

Open an issue at github.com/bobleesj/quantem.widget/issues. Please follow the issue guidelines.

IO#

Load any electron microscopy file with one line:

from quantem.widget import IO

result = IO.file("image.dm4")         # single file (DM3/DM4/MRC/EMD/TIFF/PNG/NPY/...)
result = IO.folder("scans/")          # folder → stack
data   = IO.arina_file("master.h5", det_bin=2)  # GPU-accelerated arina 4D-STEM

See the IO API reference for full documentation and examples.

widgets#

widget

description

Show1D

1D viewer for spectra, profiles, and time series

Show2D

2D image viewer with gallery, FFT, histogram

Show3D

3D stack viewer with playback, ROI, FFT, export

Show3DVolume

orthogonal slice viewer (XY, XZ, YZ)

Show4D

general 4D data viewer with dual navigation/signal panels

Show4DSTEM

4D-STEM diffraction pattern viewer with virtual imaging

ShowComplex2D

complex-valued 2D viewer (amplitude/phase/HSV)

Mark2D

interactive point picker for 2D images

Edit2D

interactive crop/pad/mask editor

Align2D

image alignment overlay with phase correlation

Bin

calibration-aware binning + BF/ADF quality control