Skip to main content

The py4DSTEM GUI

This repository hosts the pyqt based graphical 4D--STEM data browser that was originally part of py4DSTEM until version 0.13.11.

Installation

The GUI is available on PyPI and conda-forge:

pip install py4D-browser

conda install -c conda-forge py4d-browser

Usage

Run py4DGUI in your terminal to open the GUI. Then just drag and drop a 4D-STEM dataset into the window!

Demonstration

Controls

  • Move the virtual detector and the real-space selector using the mouse or using the keyboard shortcuts: WASD moves the detector and IJKL moves the selector, and holding down shift moves 5 pixels at a time. Double-clicking in the diffraction or virtual-image pane jumps the detector or selector so that its center is on the clicked point.
  • Auto scaling of both views is on by default. Press the "Autoscale" buttons in the bottom right to disable. Press either button to apply automatic scaling once, or Shift + click to lock autoscaling back on.
  • Different shapes of virtual detector are available in the "Detector Shape" menu, and different detector responses are available in the "Detector Response" menu.
  • The information in the bottom bar contains the details of the virtual detector used to generate the images, and can be entered into py4DSTEM to generate the same image.
  • The FFT pane can be switched between displaying the FFT of the virtual image and displaying the exit wave power cepstrum.
  • Virtual images can be exported either as the scaled and clipped displays shown in the GUI or as raw data. The exact datatype stored in the raw TIFF image depends on both the datatype of the dataset and the type of virtual image being displayed (in particular, integer datatypes are converted internally to floating point to prevent overflows when generating any synthesized virtual images).

Configuration

Preferences and UI state are stored in a single INI file (GUI_config.ini in the platform user-config directory). CONFIG.md documents every setting the browser and its built-in plugins read, and how plugins should use the shared settings object.

New in Version 1.6

  • Virtual image tabs — the virtual-image pane now holds multiple tabs. Switch between them with Ctrl+Tab / Ctrl+Shift+Tab.
  • 3D volumes — a tab can display a 3D volume in an interactive view (orbit, pan, zoom) with color and alpha transfer functions and a voxel-size slider. With a volume tab visible, the result pane can render its 3D FFT, kept in sync with the volume.
  • Copy to clipboard — Ctrl+C copies the virtual image, Ctrl+Alt+C the diffraction pattern, and Ctrl+Shift+C the result pane.
  • Debug console — Ctrl+Shift+D opens a Python console, with full access to the DataViewer object.
  • The keyboard map in the Help menu is now rendered in-app (Help → Show Keyboard Map).

Plugin interface

As of version 1.3.0, the browser supports plugins that extend its functionality. The current v1.6 plugin API lets a plugin add virtual-image tabs and 3D volume tabs, set scale bars, respond to data and result updates, and place ROIs on the built-in views. A few plugins ship with the browser and make good examples:

  • Calibration — calibrates the scale bars using known physical distances.
  • Copy Image to Tab — copies the currently-displayed virtual image or diffraction pattern into a new tab.
  • Volume Viewer - open a TIFF image stack in a volume tab.
  • Open Raw - Open arbitrary raw data files. (Note: the GUI can read EMPAD-G1 *.raw files by drag and drop; other raw files need to be opened manually with this menu.)

About

py4DSTEM logo

py4DSTEM is an open source set of python tools for processing and analysis of four-dimensional scanning transmission electron microscopy (4D-STEM) data. Additional information:

License

GNU GPLv3

py4DSTEM is open source software distributed under a GPLv3 license. It is free to use, alter, or build on, provided that any work derived from py4DSTEM is also kept free and open.

Metadata

Release files for py4D-browser 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py4D-browser 1.6.0
File Size Uploaded Provenance Actions
py4d_browser-1.6.0.tar.gz 292.3 kB Without provenance Details for py4d_browser-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py4D-browser 1.6.0
File Interpreter ABI Platform Actions
py4d_browser-1.6.0-py3-none-any.whl Python 3 none any Details for py4d_browser-1.6.0-py3-none-any.whl

Total release size: 568.5 kB

Release files / py4d_browser-1.6.0.tar.gz

Download URL py4d_browser-1.6.0.tar.gz
Size 292.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7c0b8c29bb6042530fcf949f82e51522545325755b0b5ad7a621124a86cb2cf2
BLAKE2b-256 checksum
How to use checksums
8297b95a8ae16d7c69a04f0504d5283bb02a4a1e262b1042d3c091c76e868100
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / py4d_browser-1.6.0-py3-none-any.whl

Download URL py4d_browser-1.6.0-py3-none-any.whl
Size 276.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3792d0ecd210ad65baefac4fabf63a7eb46a5e40f2a798ac5dc6acd79f83f50d
BLAKE2b-256 checksum
How to use checksums
b9dd73bb7e115a4ffa8f6c6ef7400c006dee31a477b93636c7ad96231956f78b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for py4D-browser 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page