Interactive demo route#
Start with a crystal, then inspect a volume. These three notebooks are the short route through the crystal and volume widgets. Run each notebook from the top in JupyterLab; the final expression in a widget cell displays the interactive view.
Step |
Notebook |
Try during the demo |
|---|---|---|
1 · Crystal and phase |
Change unit-cell repeats, hide a species, tilt the object, and play through potential slabs |
|
2 · Depth playback |
Scrub, play, compare Avg 1 with Avg 3, and inspect the FFT |
|
3 · Depth comparison |
Move the crosshair, rotate an oblique cut, and inspect the linked 3D view |
ShowCIF uses an explicit idealized BaTiO₃ cell. Show3D downloads a public HAADF image and builds a moving-crop stack. Show3DSlices uses a synthetic scalar volume. None is presented as an experimental reconstruction or a quantitative multislice simulation.
Prepare once#
Follow Installation in the same environment as the Jupyter
kernel. The ShowCIF potential preview needs the crystal extra (abTEM). Each notebook calls
qw.profile() so a presenter can record the actual environment.
The ShowCIF example requires a source build containing that API. For a clone of this revision:
python -m pip install -e '.[crystal]'
npm ci
npm run build
python -m jupyter lab
Select that environment’s Python kernel and restart it after changing the installation. Use a WebGPU-capable browser on localhost or HTTPS. If WebGPU is unavailable, check the browser’s graphics support and secure origin before the demo. An ordinary HTTP LAN/IP URL is not equivalent to localhost.
Run the notebooks once before presenting. Show3D’s public example needs network access on the first run to download its data. Standalone widget HTML carries its widget-manager runtime and opens with the network disconnected.
What the audience should take away#
A CIF supplies atomic positions and cell geometry. Species visibility and camera rotation help inspection; they do not refine a structure.
ShowCIF’s expected phase is the interaction constant times projected independent-atom potential. It is not a thick-specimen exit-wave simulation.
A moving average is a display mean across planes. It is distinct from a full depth projection and leaves the reconstruction unchanged.
Other tools#
Task |
Starting notebook or guide |
|---|---|
Image, FFT, contrast, ROI |
|
Maps with physical coordinates |
|
Time traces and metrics |
|
Scan positions and virtual detectors |
|
SSB phase and aberrations |
|
Diffraction spots and rings |
|
Lattice basis selection |
|
Growing acquisition folders |
These are separate workflows, not additional prerequisites for the three-step demo. ShowPtycho’s linked page is a workflow guide, not a newly validated standalone notebook. See the API index for complete parameters and HTML export for sharing an interactive result.