Skip to main content

pyEMAPS

pyEMAPS is a Python package for transmission electron diffraction simulations and

crystallographic computing, for all crystal systems. Its simulations are based on the theories of

kinematical and dynamical electron diffraction described by J. C. H. Spence and J. M. Zuo in

Electron Microdiffraction (Plenum Press, New York, 1992).

Documentation ·

Get started ·

Examples ·

Release notes ·

Issues

Features

The base features are free, under the GNU General Public License v3.0:

  • Crystallography

    • Crystal construction, from your own data or the built-in crystal library

    • CIF import

    • Crystallographic transformations

    • Real and reciprocal space vector calculations

    • Stereodiagrams

    • Crystal structure factors

  • Kinematical electron diffraction

    • Selected area diffraction

    • Kikuchi and higher order Laue zone (HOLZ) line geometry

    • Convergent beam electron diffraction (CBED)

    • Electron powder diffraction

  • Dynamical electron diffraction (Bloch wave)

    • Convergent beam electron diffraction, including large-angle CBED

    • The electron scattering matrix

    • Electron dispersion (the eigenvalues of the Bloch wave solution)

The extended 4D-STEM features need a license:

  • Building and searching diffraction pattern databases

  • Indexing experimental diffraction patterns

  • Annular bright and dark field images

  • Masked images

Requirements

  • 64-bit Windows

  • Python 3.12, 3.13, 3.14 or 3.15

  • 8 GB of RAM or more is recommended

pip also installs NumPy (2.0 or later), matplotlib (3.8.4 or later) and emaps, the compiled

simulation backend for your Python version. On Python 3.7, pip installs pyEMAPS 1.1.x.

Installation

Install pyEMAPS in its own virtual environment, so its dependencies don't clash with your other

packages:


python -m venv .venv

.venv\Scripts\activate

pip install pyemaps

Check the installation:


pyemaps --version

pyemaps --sample

--version prints the pyEMAPS version, and --sample runs a short kinematical simulation and

shows the pattern. If the installation fails, see the

FAQ.

Quick start

Load Silicon from the built-in crystal library, generate its kinematical diffraction pattern with

the default settings, and show it:

from pyemaps import Crystal, DPList, showDif



if __name__ == '__main__':

    si = Crystal.from_builtin('Silicon')

    emc, si_dp = si.generateDP()



    dpl = DPList('Silicon')

    dpl.add(emc, si_dp)

    showDif(dpl)

Keep the if __name__ == '__main__': line in scripts. The show functions draw in a separate

process, which on Windows runs your script again. Jupyter notebooks don't need it.

pyemaps -cp copies the sample scripts into a pyemaps_samples folder and the Jupyter

notebooks into pyemaps_notebooks; pyemaps -cp samples or pyemaps -cp notebooks copies just

one set.

The documentation has a user guide, an examples

gallery and the full API reference.

Licensing

pyEMAPS is free software under the

GNU General Public License v3.0 or later,

for personal and commercial use, with a linking exception

(license-exception.txt)

that allows its use with emaps, the proprietary simulation engine it runs on. emaps' 4D-STEM

features need a license:

  • pyemaps --license trial activates a 7-day trial license. It needs an internet connection.

  • pyemaps --license <token> activates a trial or production license with a license activation

    token, online or offline. Write to support@emlabsoftware.com for a token.

  • pyemaps --license info shows the current license.

After activation, all license checks are offline. See

License Activation

for details.

Support

Report bugs and request features on GitHub,

and send other questions to support@emlabsoftware.com.

If pyEMAPS helps your microscopy and crystallography research or teaching, please consider a

donation. Donations keep us providing software

tools to the education and research communities.

Contributing

We're looking for experts in electron microscopy and crystallography, and Python enthusiasts, to

join the project. Contact us at support@emlabsoftware.com if you're interested.

pyEMAPS is developed by EMLab Solutions, Inc.

Metadata

Release files for pyemaps 2.2.1

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

Source distribution (sdist)

Source distribution for pyemaps 2.2.1
File Size Uploaded Provenance Actions
pyemaps-2.2.1.tar.gz 3.7 MB With provenance Details for pyemaps-2.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyemaps 2.2.1
File Interpreter ABI Platform Actions
pyemaps-2.2.1-py3-none-any.whl Python 3 none any Details for pyemaps-2.2.1-py3-none-any.whl

Total release size: 4.2 MB

Release files / pyemaps-2.2.1.tar.gz

Download URL pyemaps-2.2.1.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
49ed6c0ca070cd6b21b93a3baebb0a1480ff8b3f2796ebbaa76b3698c877de1e
BLAKE2b-256 checksum
How to use checksums
37d3275c783cbb2b9cb596f95d4502669baee806453e2d86ddcfe2692af99681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / pyemaps-2.2.1-py3-none-any.whl

Download URL pyemaps-2.2.1-py3-none-any.whl
Size 559.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
907fdb943a693759dcae5e0d18ade1bc8ce49e4ea0d8195eeffe7c8ae804e21e
BLAKE2b-256 checksum
How to use checksums
e9fbe274485c0829c28ca781de42a1421f89fca8f87ba54080fae7c5329956cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for pyemaps 2.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyemaps-2.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

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