-
Notifications
You must be signed in to change notification settings - Fork 21
Show4DSTEM - Python widget for real-time 4D-STEM explorer and virtual detectors
#146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: widget
Are you sure you want to change the base?
Show4DSTEM - Python widget for real-time 4D-STEM explorer and virtual detectors
#146
Conversation
|
@dasol-yoon has agreed to test the API/features. Keeping it as a draft PR since folder clean-up is needed but it's a good starting point since the very basic features are done - virtual detectors, zoom, pan, color map, reset, zip, length, laster animation |
|
-Both sides have independent color controls, for cmap, vmin, vmax (and maybe linear/log/power scaling). |
|
@cophus Thanks and superb feedback from the very first alpha tester! Generous enough to even show mock designs as well. Will do:
Another layer of comments
|
- Add VI ROI for real-space region selection (circle/square/rect) - Add summed DP computation from VI ROI positions - Add dp_stats/vi_stats for mean/min/max/std display on both panels - Add scale modes (linear/log/power) for DP panel - Auto-detect center and BF radius on initialization - Move FFT toggle to VI header row - Hide crosshair when VI ROI is active - Fix annular slider overflow with smaller thumbs - Set reasonable initial sizes for VI ROI (~15% of scan) - Mask DC component for DP stats by default
- Python now sends raw float32 data for frame_bytes and virtual_image_bytes - JavaScript handles all display transformations (scale mode, colormap, vmin/vmax) - Scale mode (linear/log/power) changes are now instant without Python round-trip - Fix VI bytes parsing to correctly handle float32 data - Fix FFT scroll behavior to prevent page scroll when zooming
@cophus All done. @dasol-yoon I will upload v2 tmr or the day after. |
quantem.widget show4dstem ophus feedback self PR v1
|
v2 updated |
|
Hey @bobleesj -- nicely done, very impressive! Had a quick look on a large-ish Arina dataset (256,256,192,192) and here are my quick thoughts (video-real time): compressed_demo.mov
|
|
@gvarnavi Thanks George for testing! 🙏 Ah, I should have checked with unbinned Arina data. Will fix: george-v1 after ophus-v1
Regarding the reset button, for now, based on the following feedback (we can discuss of course)
|
|
I think it's working mostly with full ~9 Gb dataset. Will discuss more today's dev call |
…ton unactivated, fft scale
|
@bobleesj this looks much better indeed! Will try and check on the gold dataset before the dev call |
…v1-ophus-v1 Merge `Show4DSTEM` george v1 ophus v1
|
@gvarnavi indeed, much better with feedback. - Testing on my macbook now - it can't handle 9 Gb... but for smaller datasets (48x48x192x192(, VI is real-time
|
|
I will report back - loading full arina dataset to macbook/laptop for overriding defaults - I will make it easy to toggle on and off sth like this: I think it's eaiser than subclassing a widget since i haven't done subclassing yet |







What this PR does
A combination of
react,anywidget,WebGPUto get real-time 4D-STEM explorer.For developers:
Install Method 1.
quantem.widgetusing condaInstall Method 2.
quantem.widgetusinguvwithnodealready installed locallyAPI design:
Notebooks:
test_show4dstem_arina.ipynb
test_show4dstem_legacy_h5.ipynb