quantem.widget#
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 |
|---|---|
1D viewer for spectra, profiles, and time series |
|
2D image viewer with gallery, FFT, histogram |
|
3D stack viewer with playback, ROI, FFT, export |
|
orthogonal slice viewer (XY, XZ, YZ) |
|
general 4D data viewer with dual navigation/signal panels |
|
4D-STEM diffraction pattern viewer with virtual imaging |
|
complex-valued 2D viewer (amplitude/phase/HSV) |
|
interactive point picker for 2D images |
|
interactive crop/pad/mask editor |
|
image alignment overlay with phase correlation |
|
calibration-aware binning + BF/ADF quality control |