pyXem - Crystallographic Electron Microscopy in Python

https://travis-ci.org/pyxem/pyxem.svg?branch=master https://ci.appveyor.com/api/projects/status/github/pyxem/pyxem?svg=true&branch=master https://coveralls.io/repos/github/pyxem/pyxem/badge.svg?branch=master http://img.shields.io/pypi/v/pyxem.svg?style=flat https://zenodo.org/badge/DOI/10.5281/zenodo.2649351.svg

pyXem is an open-source Python library for crystallographic electron microscopy. The code is primarily developed as a platform for hybrid diffraction-imaging microscopy based on scanning electron diffraction (SED) data.


pyXem is released under the GPL v3 license.

If analysis using pyxem forms a part of published work please consider recognizing the code development by citing the DOI at the top of this page.


pyXem requires python 3 and conda - we suggest using the python 3 version of Miniconda and creating a new environment for pyxem using the following commands in the anaconda prompt::

$ conda create -n pyxem
$ conda activate pyxem

The recommended way to install pyXem is then from conda-forge using::

$ conda install -c conda-forge pyxem

Note that pyxem is also available via pip::

$ pip install pyxem

Getting Started

To get started using pyxem, especially if you are unfamiliar with python, we recommend using jupyter notebooks. Having installed pyxem as above, a jupyter notebook can be opened using the following commands entered into an anaconda prompt or terminal::

$ conda activate pyxem
$ jupyter notebook

Tutorials and Example Workflows have been curated as a series of jupyter notebooks that you can work through and modify to perform many common analyses.


Documentation, in the form of Docstrings are available for all pyxem modules at the following links:


If you have a question about pyxem, an issue using the code, or find a bug - we want to know!

We prefer if you let us know by raising an issue on our Github page so that we can answer in “public” and potentially help someone else who has the same question. You can also e-mail the development team via: pyxem.team@gmail.com

Contributing and Feature Requests

Developers are recommended to install pyXem by downloading the source code and using the following commands entered into the anaconda promt (or terminal) when located in the pyxem directory::

$ conda install -c conda-forge pyxem --only-deps
$ pip install -e .

Feature requests, if pyxem doesn’t do something you want it to, can be made by raising an issue or e-mailing the development team via pyxem.team@gmail.com

Contributions from new developers are strongly encouraged. Many potential contributors may be scientists with little or no open-source development experience and we have written a contributing guide particularly for this audience.