Welcome to TEMUL Toolkit’s documentation!

The TEMUL Toolkit is a suit of functions and classes for analysis and visualisation of atomic resolution images. It is mostly built upon the data structure of HyperSpy and Atomap.


The TEMUL Toolkit can be installed easily with PIP.

$ pip install temul-toolkit

Then, it can be imported with the name “temul”. For example, to import the polarisation.py module, use:

import temul.polarisation as tmlpol

Note 1: If you wish to use the simulations.py or model_refiner.py modules, you will need to install PyPrismatic.

Note 2: If you’re using any of the functions or classes that require element quantification:

  • navigate to the “temul/external” directory, copy the “atomap_devel_012” folder and paste that in your “site-packages” directory.
  • Then, when using atomap to create sublattices and quantify elements call atomap like this: import atomap_devel_012.api as am.
  • This development version is slowly being folded into the master branch here: https://gitlab.com/atomap/atomap/-/issues/93 and any help or tips on implementation are welcome!

Getting started

There are many aspects to the TEMUL Toolkit, such as polarisation analysis, element quantification, and automatic image simulation (through pyprismatic).

Checkout the tutorials in the table of contents above or on the left of the page. One can also view the extensive documentation, where each function is described and examples of their use given.

Code Documentation

See the API documentation for examples and a full list of modules and functions.


If you are having issues, please let us know in the issue tracker on GitHub.


The project is licensed under the GPL-3.0 License.

Indices and tables