STEMDIFF :: 4D-STEM dataset to 2D-diffractogram
- The STEMDIFF package converts...
... a 4D-STEM dataset from a SEM microscope (huge and complex)
... to a 2D-powder diffraction pattern (simple and easy to work with). - If you use EDIFF in your research, please cite our recent paper:
- Microscopy and Microanalysis 31, 2025, ozaf045.
https://doi.org/10.1093/mam/ozaf045
- Microscopy and Microanalysis 31, 2025, ozaf045.
Principle
Installation
- Requirement: Python with sci-modules = numpy, matplotlib, scipy, pandas
pip install scikit-image= 3rd party package for advanced image processingpip install tqdm= to show progress meter during long summationspip install idiff= to improve diffractograms (remove noise, background ...)pip install stemdiff= STEMDIFF package itself (uses all packages above)
Quick start
- Worked example shows the STEMDIFF package in action.
- Help on GitHub with complete package documentation and additional examples.
Documentation, help and examples
- PyPI repository - the stable version to install.
- GitHub repository - the current version under development.
- GitHub Pages - the more user-friendly version of GitHub website.
Versions of STEMDIFF
- Version 1.0 = Matlab: just a simple summation of 4D-dataset
- Version 2.0 = like v.1.0 + post-processing in Jupyter
- Version 3.0 = Python scripts: summation + S-filtering
- Version 4.0 = Python package: summation + S-filtering + deconvolution
- summation = summation of all 2D-diffractograms
- S-filtering = sum only diffractograms with strong diffractions = high S
- deconvolution = reduce the primary beam spread effect ⇒ better resolution
- Version 4.2 = like v.4.0 + a few important improvements, such as:
- sum just the central region with the strongest diffractions ⇒ higher speed
- 3 centering types: (0) geometry, (1) center of 1st, (2) individual centers
- improved definition of summation and better documentation
- Version 5.0 = complete rewrite of v.4.2
- conversion 2D-diffractogram → 1D-profile moved to package EDIFF
- better filtering (including estimated number of diffractions)
- more detectors + more types of deconvolution (beta; to finish in v.6.0)
- Version 5.1 = (beta) support for parallel processing
- Version 5.2 = (beta) improvement of diff.patterns in sister package idiff
Acknowledgement
The development was co-funded by TACR, program NCK, project TN02000020.
Metadata
Release files for stemdiff 5.2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| stemdiff-5.2.11.tar.gz | 27.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stemdiff-5.2.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.5 kB
Release files / stemdiff-5.2.11.tar.gz
| Download URL | stemdiff-5.2.11.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c814c02cbb66fef850ff25d803c27c7e25149893711d5414e1997d2f4d89198
|
|
BLAKE2b-256 checksum How to use checksums |
93470744af6156549e8d92660ad688c3d59ab32d8ea561c19a714279c057baa4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / stemdiff-5.2.11-py3-none-any.whl
| Download URL | stemdiff-5.2.11-py3-none-any.whl |
|---|---|
| Size | 29.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3da4c116417a84b038bfab5e7db672de472ca4815191566fae1d4e8cbc1aa2ce
|
|
BLAKE2b-256 checksum How to use checksums |
5bd5db16cd90012890173386eeb7f1567c573e682616e7131bf28fa862ba26d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for stemdiff 5.2.11
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.