Add ShowDiffraction notebook, analysis modules, UI update, phase ID - #194
Open
henryhng wants to merge 538 commits into
Open
Add ShowDiffraction notebook, analysis modules, UI update, phase ID#194henryhng wants to merge 538 commits into
henryhng wants to merge 538 commits into
Conversation
…ebook # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce a complete ShowDiffraction workflow and matching UI (Auto pipeline, Phase/Exclude menus, profile/azimuthal/quality panels) with mobile support
Checklist
PYTHONPATH=src pytest -qandnpm run build, or runscripts/widget_local_signoff.sh.git status --shortandgit diff --stat; do not commit generated HTML, docs builds, screenshots, local notebooks, private data, or machine-specific notes.Python API and docs — new widget, loader, or API change
(row, col)coordinate wording where positions are shown.display(...)and extra display imports; let the returned widget render naturally.UI design and theming — frontend / viewer changes
Auto,Smooth,Zoom,Pan,Contrast,fps,avg, and similar labels must not separate from their switch, menu, slider, or button.Scale,Color,Auto,Link,Zoom,Pan, andROIin dense toolbar rows; keep colons for explanatory prose and tooltips.Copy,Export,Reset,Add,Clear, andUndo. Keep scientific acronyms and file formats uppercase, for exampleFFT,ROI,BF,ADF,HTML,PNG, andMP4.Performance and real-time interaction — drag, live controls, big data paths
*_master.h5acquisitions into the same live viewer without rebuilding the notebook. Verify new masters appear in the Dataset slider, partial files are skipped until ready, and detector/scan interactions remain real time after append. See Show4DSTEM live scope folders. n/a — this PR does not touch Show4DSTEM.verbose=Trueoutput that users and agents can copy; usequantem.widget.profile_widgetfor profiling notebooks when possible. See performance notes.scripts/widget_local_signoff.sh --quick --browserfor exported HTML/UI paths, fix issues immediately, rebuild, refresh, and redrive before claiming the widget is ready. See Automation and Agent signoff.Measured on the real Fe3O4 SAED (512x512 float32, 1.0 MB, CPU backend, exact full-precision export, no crop/bin/quantize): data load 7 ms, widget build 85 ms, Auto pipeline 303 ms, export 37 ms (1.9 MB single-file HTML), first contentful paint 1.98 s; drag FPS in exported HTML: canvas pan 49, wheel zoom 59, histogram thumbs 60; live JupyterLab canvas drag 53 FPS; saved-state check: interact, Ctrl+S, reload without rerun restores the full view (metadata.widgets present). Zero page errors in all drives.
widget_local_signoff.sh --quick --browserbrowser smoke: showdiffraction.html passed at 61.7 FPS; the two failing pages (Show3D reorder drag, Show3DSlices WebGPU-unavailable) are in widgets this PR does not touch, in a headless container without WebGPU.Data honesty and repo size — data loaders, tutorial data, CI fixtures
uint8.mainlightweight: small real rendered examples are fine, but large tutorial arrays or HTML payloads should be generated during docs builds or downloaded from public data hosting only when the size justifies it.Export and saved state — HTML export, widget state, sharing
export_html(path=None, title=None, mode="single", encoding="full", downsample=None)when it can be exported. Follow the HTML export protocol.This PR workflow follows the packaging standards for reproducible scientific software described in scikit-package: S. Lee, C. Myers, A. Yang, T. Zhang, Y. Xiao, and S. J. L. Billinge, Digital Discovery (2026), DOI 10.1039/d6dd00121a.