4D-STEM analysis on the Mac: virtual images, calibration, strain, orientation, phase and EDS spectrum images, worked on interactively instead of in scripts.
4DSTEM Studio is the companion to Electron Microscopy Studio. Both are free, open source and built for Apple silicon.
Documentation: mac4dstem.com/docs/4dstem-studio, with step-by-step tutorials.
Get it from the Mac App Store, or get the signed and notarised DMG: 4DSTEM-Studio.dmg (all versions are on the releases page). Both need macOS 26 or later on an Apple silicon Mac. Everything it needs is inside the app. The App Store version follows each release once Apple has reviewed it, so it can be a version behind; the DMG updates itself.
Open a 4D-STEM dataset (py4DSTEM and other EMD/HDF5 files, Gatan DM3/DM4, and, less tested, Merlin MIB and EMPAD RAW) and work through the workspaces in the sidebar. Detector, calibration and fit settings change against a live view, so you see what a choice does while you make it.
- Prepare: inspect the dataset, crop, bin or filter hot pixels without touching the source file, and calibrate: probe and origin, elliptical distortion, the rotation between real and reciprocal space, and the reciprocal pixel size from a known crystal.
- Imaging: bright field, ADF and HAADF, and annular, rectangular or point detectors you place by hand.
- Bragg Disks: find the disks by cross-correlation with subpixel refinement, with diagnostics to judge the result. A learned disk detector runs on the Neural Engine.
- Crystal Maps: strain from a local lattice fit, orientation by template matching (ACOM) against your own CIF or a Materials Project structure, phase maps, and precipitate objects with their sizes, variants and number density.
- Reconstruction: DPC, iDPC, parallax and single-slice ptychography.
- Spectroscopy: EDS spectrum images, on their own or with the 4D scan. Auto ID suggests the elements, element maps and regions show where they are, and quantification gives wt% and at% with an uncertainty on every number.
- Results: review, save and export. Bragg vectors, datacubes and maps are written as EMD files that py4DSTEM reads.
Every quantity keeps its calibration and where it came from through display, export and reopening.
The 4D-STEM methods are ported from py4DSTEM and checked against it, pinned at
commit f050d207 (version 0.14.19). Where the app departs from py4DSTEM the source says so in a DEVIATION note with
the reason. The rest is computed by the suite's Swift packages, each checked against the Python package it ports:
CuboKit (the 4D-STEM core),
DiffractoKit (crystallography and orientation),
SpectroKit (EDS),
FormatoKit (file readers),
ImagoKit (FFT and image maths) and
EMSuiteUI (the window and controls both apps share). Every export names the method a
result came from and its reference.
Which function is checked against what, and to which tolerance, is in docs/parity.md; speed
measurements are in docs/performance.md.
You need Xcode 26.6 or later on an Apple silicon Mac. Open FourDSTEMStudio.xcodeproj, pick the FourDSTEMStudio scheme and press ⌘R. The
first build fetches the kits and EMSuiteUI from GitHub at the versions in Package.resolved. The tests run with
tools/run-tests.sh unit. How the code is organised is in docs/architecture.md, and how a
release is built and notarised is in tools/release/README.md.
Please open an issue. Reports with the file format, the dataset shape and what you expected help most, and a
difference from py4DSTEM with numbers attached is the most useful of all. CONTRIBUTING.md has
more, and SECURITY.md says how to report a security problem. What changed in each version is in
CHANGELOG.md.
If you use 4DSTEM Studio in published work, please cite it and py4DSTEM, where the methods come from. Both are in
CITATION.cff.
GPL-3.0-only (LICENSE). Third-party notices are in NOTICE.
Contact: mail@mac4dstem.com

