Skip to main content

Functions for analysis of high resolution electron microscopy and spectroscopy data.

Project description

TEMUL

TopoTEM coverage TEMUL coverage excl. external

Functions for image and signal processing, based on the packages Scikit-image, Hyperspy, Atomap, PyPrismatic, ASE, periodictable etc. Written by members of the TEMUL group from the University of Limerick, Ireland (though we welco`me all help, hints and contributions!)

Documentation & Installation

pip install temul-toolkit

For full installation instructions and documentation, go to temul-toolkit.readthedocs.io.

Optional PyPrismatic Environment

temul.model_refiner and temul.simulations use pyprismatic for STEM simulation workflows. We do not install pyprismatic from PyPI by default in pyproject.toml, because the current PyPI project only exposes an old source distribution rather than maintained platform wheels.

For simulation work, create the conda environment in environment-pyprismatic.yml:

conda env create -f environment-pyprismatic.yml
conda activate temul-pyprismatic

This environment installs:

  • pyprismatic
  • prismatic_cli
  • pytest
  • flake8
  • TEMUL in editable mode via pip install -e .

After activation, you can run the simulation-oriented tests with:

pytest tests/test_simulations.py tests/test_model_refiner_active.py

The GitHub Actions CI also has a dedicated conda job that builds this environment and runs the pyprismatic-related tests separately from the standard pip-based matrix.

To use the vast majority of the temul functionality, import it from the api module::

import temul.api as tml

Interactive Notebooks in the Browser

Jupyter Notebooks and MyBinder allow us to analyse data in the browser without needing any downloads using the below "launch binder" button.

Binder

If the button does not work, try this link instead. You also share this link with others for quick access.

  • To run through some code documentation tutorials, go to the "code_tutorials" folder after clicking the above button.

  • To analyse data published in the listed scientific papers, go to the "publication_examples" folder after clicking the above button.

Example Publications that have used the TEMUL Toolkit

Publication Details Folder Location in TEMUL
M. Hadjimichael, Y. Li et al, Metal-ferroelectric supercrystals with periodically curved metallic layers, Nature Materials 2021 publication_examples/PTO_supercrystal_hadjimichael
K. Moore et al Highly charged 180 degree head-to-head domain walls in lead titanate, Nature Communications Physics 2020 publication_examples/PTO_Junction_moore
K. Moore et al Charged Domain Wall and Polar Vortex Topologies in a Room-Temperature Magnetoelectric Multiferroic Thin Film, ACS Appl. Mater. Interfaces 2022, 14, 4 Coming soon
E.N. O'Connell et al TopoTEM: A Python Package for Quantifying and Visualizing Scanning Transmission Electron Microscopy Data of Polar Topologies, Microsc Microanal. 2022 doi:10.1017/S1431927622000435 Arxiv Version See the Docs

Cite TEMUL Toolkit/TopoTEM

To cite the latest TEMUL toolkit, use the following DOI:

  • DOI

To cite all TEMUL Toolkit versions, use this DOI:

  • DOI

You can also cite the TopoTEM publication if you only worked with polarisation-type analysis.

Information for developers

Linting (PEP8)

We use flake8 to enforce coding style:

pip install -r tests/requirements.txt
flake8 temul
flake8 tests
flake8 docs

Testing

Tests are carried out with pytest:

pip install -r tests/requirements.txt
pytest tests

Documentation (docs)

To build the docs, do the following::

pip install -r docs/requirements.txt
sphinx-build docs _build  # open "index.html" in the "_build" directory

Make sure that the docs build locally and online (if you have the rights to check that).

Incrementing version

temul gets its version from the latest git tag. If you think that a new version should be published, create a tag on the master branch (if you have the necessary permissions to do so):

git tag -a 'x.y.z' -m 'new tag'
git push --tags <remote>

GitHub Actions will then automatically build source package and wheels and publish them on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

temul_toolkit-0.1.9.tar.gz (13.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

temul_toolkit-0.1.9-py3-none-any.whl (13.0 MB view details)

Uploaded Python 3

File details

Details for the file temul_toolkit-0.1.9.tar.gz.

File metadata

  • Download URL: temul_toolkit-0.1.9.tar.gz
  • Upload date:
  • Size: 13.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for temul_toolkit-0.1.9.tar.gz
Algorithm Hash digest
SHA256 b3a5055ce65047c170cdb21511f23637af19ea07d6a1a7bbce331058641b3bab
MD5 c440238bcaa782afcc25e76d73851827
BLAKE2b-256 3feb9eb0222dbbec46bcb588c23471e91c00d5763d2b4ce1469c81a549fe6be1

See more details on using hashes here.

File details

Details for the file temul_toolkit-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: temul_toolkit-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for temul_toolkit-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 570bf69a4daf73d182829ca9eb9e1b3cfc0da2cdebdce8a701081d56ca6d7ad5
MD5 bbce82d6f99b257301c17f7496be9190
BLAKE2b-256 ae6ef4b789e9d3a561bf2405c5950e1a0cc3d4b6d91aa10ffc2e555aa9054395

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page