pyEMAPS

Electron diffraction simulation and crystallography in Python: kinematic and dynamical (Bloch wave) diffraction, stereodiagrams, powder patterns, structure factors, supercells and 4D-STEM pattern indexing.

pip install pyemaps

Version 2.4.0 Stable · Python 3.12–3.15 · Windows 64-bit · Free base features, licensed 4D-STEM

What you can simulate#

Kinematic diffraction

Spot patterns, Kikuchi and HOLZ lines, and CBED disks for any zone axis.

Kinematic diffraction
Dynamic diffraction

Bloch-wave CBED and large-angle CBED, with the scattering matrix and thickness series.

Dynamic diffraction (Bloch wave)
Stereodiagrams

Indexed stereographic projections for any orientation.

Stereodiagrams
Powder diffraction

Electron powder profiles, with and without absorption.

Examples
Crystal structures

44 built-in crystals, CIF import, structure factors and supercells.

Crystals
4D-STEM indexing Licensed

Index experimental patterns against a simulated database to find orientation and phase.

4D-STEM pattern indexing

Your first diffraction pattern#

Load Silicon from the built-in library and simulate its kinematic diffraction pattern:

from pyemaps import Crystal, DPList, showDif

if __name__ == '__main__':
    si = Crystal.from_builtin('Silicon')
    emc, dp = si.generateDP()

    dpl = DPList('Silicon')
    dpl.add(emc, dp)
    showDif(dpl)

Continue with Get Started.

Learn more#

Get Started

Install, check the setup and run a first simulation.

Get Started
User Guide

Each feature explained, with examples.

User Guide
Examples

Sample scripts with their output.

Examples
API Reference

Every class and function.

API Reference

pyEMAPS is developed by EMLab Solutions. The simulations follow the kinematic and dynamical theory in Spence and Zuo, Electron Microdiffraction (Plenum, 1992). Questions: support@emlabsoftware.com.