A Python library for training machine learning models for applications in electron microscopy.
Project description
Electron Microscopy Machine Learning (EMicroML)
emicroml is a Python library for training machine learning models for
applications in electron microscopy.
Visit the emicroml website for a web
version of the installation instructions, the reference guide, and the examples
archive.
The source code can be found in the emicroml GitHub
repository.
Table of contents
- Instructions for installing and uninstalling
emicroml - Learning how to use
emicroml - Reproducing data of preprints and published papers
Instructions for installing and uninstalling emicroml
Installing emicroml
For all installation scenarios, first open up the appropriate command line interface. On Unix-based systems, you could open e.g. a terminal. On Windows systems you could open e.g. an Anaconda Prompt as an administrator.
Before installing emicroml, it is recommended that users install PyTorch in
the same environment that they intend to install emicroml according to the
instructions given here for their
preferred PyTorch installation option.
Installing emicroml using pip
Before installing emicroml, make sure that you have activated the (virtual)
environment in which you intend to install said package. After which, simply run
the following command:
pip install emicroml
The above command will install the latest stable version of emicroml.
To install the latest development version from the main branch of the emicroml GitHub repository, one must first clone the repository by running the following command:
git clone https://github.com/mrfitzpa/emicroml.git
Next, change into the root of the cloned repository, and then run the following command:
pip install .
Note that you must include the period as well. The above command executes a
standard installation of emicroml.
Optionally, for additional features in emicroml, one can install additional
dependencies upon installing emicroml. To install a subset of additional
dependencies (along with the standard installation), run the following command
from the root of the repository:
pip install .[<selector>]
where <selector> can be one of the following:
tests: to install the dependencies necessary for running unit tests;examples: to install the dependencies necessary for executing files stored in<root>/examples, where<root>is the root of the repository;docs: to install the dependencies necessary for documentation generation;all: to install all of the above optional dependencies.
Alternatively, one can run:
pip install emicroml[<selector>]
elsewhere in order to install the latest stable version of emicroml, along
with the subset of additional dependencies specified by <selector>. Note that
the Python library pyprismatic>=2.0 must be installed prior to executing
either of the last two commands with <selector> set to examples. The easiest
way to install this additional dependency is within a conda virtual
environment, using the following command::
conda install -y pyprismatic=*=gpu* -c conda-forge
if CUDA version >= 11 is available on your machine, otherwise users should run instead the following command::
conda install -y pyprismatic=*=cpu* -c conda-forge
For further discussions on running examples, see the pages Prerequisites for running example scripts or Jupyter notebooks without using a SLURM workload manager and Prerequisites for running example scripts or Jupyter notebooks using a SLURM workload manager.
Installing emicroml using conda
Before proceeding, make sure that you have activated the (virtual) conda
environment in which you intend to install said package. For Windows systems,
users must install PyTorch separately prior to following the remaining
instructions below.
To install emicroml using the conda package manager, run the following
command:
conda install -c conda-forge emicroml
The above command will install the latest stable version of emicroml.
Uninstalling emicroml
If emicroml was installed using pip, then to uninstall, run the following
command:
pip uninstall emicroml
If emicroml was installed using conda, then to uninstall, run the following
command:
conda remove emicroml
Learning how to use emicroml
For those new to the emicroml library, it is recommended that they take a look
at the Examples page, which
contain code examples that show how one can use the emicroml library. While
going through the examples, readers can consult the emicroml reference
guide to
understand what each line of code is doing.
Reproducing data of preprints and published papers
arXiv:2509.01075 (2025)
The majority of the data presented in Ref. Fitzpatrick1 can be reproduced by running all of the examples listed on the page Examples of distortion estimation of CBED patterns.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file emicroml-0.0.6.tar.gz.
File metadata
- Download URL: emicroml-0.0.6.tar.gz
- Upload date:
- Size: 6.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2684c483a7ae8a72b19a9c20d362dde0cf1cd8148f248de66e7f975d9160e240
|
|
| MD5 |
2eb8bd66cf1787392224eef5aaf73ecb
|
|
| BLAKE2b-256 |
433ac9da1d3fda6eea244d3d5166ee5660b6c9a6d9123c32f895e57951519e7a
|
Provenance
The following attestation bundles were made for emicroml-0.0.6.tar.gz:
Publisher:
publish_release_to_pypi.yml on mrfitzpa/emicroml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emicroml-0.0.6.tar.gz -
Subject digest:
2684c483a7ae8a72b19a9c20d362dde0cf1cd8148f248de66e7f975d9160e240 - Sigstore transparency entry: 835791080
- Sigstore integration time:
-
Permalink:
mrfitzpa/emicroml@453955243c6ef4a450959c62ed596bd141afa55a -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/mrfitzpa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_release_to_pypi.yml@453955243c6ef4a450959c62ed596bd141afa55a -
Trigger Event:
release
-
Statement type:
File details
Details for the file emicroml-0.0.6-py3-none-any.whl.
File metadata
- Download URL: emicroml-0.0.6-py3-none-any.whl
- Upload date:
- Size: 130.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67382e0b4185656f398e0f7ae3d5c96be838c75a668606ba0ea195836c032d16
|
|
| MD5 |
e5a6175ce42ad577961488b54dd6159f
|
|
| BLAKE2b-256 |
d332d4b2b77e1c7f2c97a537aa4d4bcdef977630cc185f9c63130fb7a7378f01
|
Provenance
The following attestation bundles were made for emicroml-0.0.6-py3-none-any.whl:
Publisher:
publish_release_to_pypi.yml on mrfitzpa/emicroml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
emicroml-0.0.6-py3-none-any.whl -
Subject digest:
67382e0b4185656f398e0f7ae3d5c96be838c75a668606ba0ea195836c032d16 - Sigstore transparency entry: 835791083
- Sigstore integration time:
-
Permalink:
mrfitzpa/emicroml@453955243c6ef4a450959c62ed596bd141afa55a -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/mrfitzpa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_release_to_pypi.yml@453955243c6ef4a450959c62ed596bd141afa55a -
Trigger Event:
release
-
Statement type: