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

Reading experimental patterns is free: TIFF, Gatan DigitalMicrograph (.dm3, .dm4), MRC,

Quantum Detectors Merlin (.mib), PNG, BMP, JPEG and NumPy files, single images, stacks and

4D-STEM scans, with no other package, and EMD files from Thermo Fisher Velox or in the Berkeley EMD format,

including py4DSTEM's 4D-STEM datacubes, with pip install "pyemaps[emd]".

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.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 pyemaps 2.6.0
File Size Uploaded Provenance Actions
pyemaps-2.6.0.tar.gz 3.8 MB With provenance Details for pyemaps-2.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 4.3 MB

Release files / pyemaps-2.6.0.tar.gz

Download URL pyemaps-2.6.0.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
41db0437151696085d6135d9b69325386f838514eff8093dc2ec6d4e1b9e108f
BLAKE2b-256 checksum
How to use checksums
42c9480ee569c41e08a284538b86aa74bb76b3411dc13b91fd5ca0995d9cf360
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 20, 2026.

Transparency log

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

Download URL pyemaps-2.6.0-py3-none-any.whl
Size 494.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8cfc45215cae4a0265484db30b92447634fb0fd45ca52986e3f91107c573fff
BLAKE2b-256 checksum
How to use checksums
fc51513b7bfdb5c3bf59d4fc47c14d4122b90e97d2a4d3a267fc68e39b700155
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 20, 2026.

Transparency log

Security for pyemaps 2.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.

Full provenance

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

Select from 2 files

Attestation for pyemaps-2.6.0.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 20, 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