Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 2.96 KB

index.md

File metadata and controls

55 lines (43 loc) · 2.96 KB

API reference

Complete reference for the widgets, tutorial datasets, HTML export, and data loading / I/O. Common display-chrome names and presets are documented in Viewer UI controls. Named tutorial datasets are documented in Tutorial Datasets. Widget pages have two halves:

  1. Reference - the constructor signature, every parameter, and every public method, generated directly from the source by static analysis (so it never drifts from the code).
  2. Interactive controls - the UI elements the widget exposes and the synced trait each one drives.

Environment report

Use one standard report when recording a notebook environment or asking for help:

import quantem.widget as qw

qw.profile()

It reports the installed QuantEM packages, active Torch device, and Python version. Colab tutorial installers call it automatically.

Doubles as a UI-test spec

The Interactive controls tables are the contract an automated agent drives the widget against. Each row names a control, the trait it mutates, and what should be observed after acting on it. A driving agent reads the table, performs the action over CDP, and asserts the trait moved and the canvas repainted (non-zero, no console error, no NaN frame). When a control changes, update the table here in the same commit; the published page is the source of truth for both human readers and test agents.

At a glance

Widget Class Offline export
Plot2D quantem.widget.Plot2D PNG from browser; Matplotlib figures via Python; no standalone HTML API
Show1D quantem.widget.show1d.Show1D state JSON, CSV, PNG/PDF via Python, interactive HTML
Show2D quantem.widget.show2d.Show2D state JSON, PNG, interactive HTML (encoding="full" / encoding="uint8")
Show3D quantem.widget.show3d.Show3D state JSON, PNG, interactive HTML (encoding="full" / encoding="uint8")
Show3DSlices quantem.widget.show3dslices.Show3DSlices state JSON, PNG, interactive HTML (encoding="full" / encoding="uint8")
Show4DSTEM quantem.widget.Show4DSTEM dispatcher state JSON, PNG, interactive WebGPU HTML; large exports use a companion data directory
ShowPtycho quantem.widget.ShowPtycho ptychography state JSON, WebGPU folder export with BF-indexed G(k) payload
ShowDiffraction quantem.widget.showdiffraction.ShowDiffraction state JSON, PNG, interactive HTML
ShowPDF quantem.widget.showpdf.ShowPDF state JSON, results zip (CSV), PNG/PDF/TIFF curves, interactive HTML (encoding="full" / encoding="uint8")
ChooseLattice quantem.widget.choose_lattice.ChooseLattice state JSON (save_state=True)
ShowCIF quantem.widget.ShowCIF Interactive HTML with embedded coordinates

All widget-level HTML exports follow the HTML export protocol.