ediff
Package: EDIFF
Processing of electron diffraction patterns.
- Input:
- Image file = an experimental 2D electron diffraction pattern.
- CIF file = a description the expected/theoretical crystal structure.
- Output:
- Comparison of the experimental and theoretical diffractogram.
- If the two difractograms are equivalent, the sample has been identified.
- Documentation, help, additional notes:
- Quick start examples/demos - https://mirekslouf.github.io/ediff/docs
- CIF files can be obtained from www - https://www.crystallography.net/cod
EDIFF modules:
- ediff.bkg = background subtraction for 1D diffraction profiles
- ediff.bkg2d = background subtraction for 2D diffraction patterns
- ediff.calibration = calibration of SAED diffractograms (pixels -> q-vectors)
- ediff.center = find the center of an arbitrary 2D-diffraction pattern
- ediff.io = input/output operations (read diffractogram, set plot params...)
- ediff.gcryst = functions from geometric/general crystallography
- ediff.mcryst = process monocrystal diffraction patterns
- ediff.pcryst = process polycrystal/powder diffraction patterns
- ediff.radial = calculate the 1D-radial profile from a 2D-diffraction pattern
1''' 2Package: EDIFF 3-------------- 4Processing of electron diffraction patterns. 5 6* Input: 7 - Image file = an experimental 2D electron diffraction pattern. 8 - CIF file = a description the expected/theoretical crystal structure. 9* Output: 10 - Comparison of the *experimental* and *theoretical* diffractogram. 11 - If the two difractograms are equivalent, the sample has been identified. 12* Documentation, help, additional notes: 13 - Quick start examples/demos - https://mirekslouf.github.io/ediff/docs 14 - CIF files can be obtained from www - https://www.crystallography.net/cod 15 16EDIFF modules: 17 18* ediff.bkg = background subtraction for 1D diffraction profiles 19* ediff.bkg2d = background subtraction for 2D diffraction patterns 20* ediff.calibration = calibration of SAED diffractograms (pixels -> q-vectors) 21* ediff.center = find the center of an arbitrary 2D-diffraction pattern 22* ediff.io = input/output operations (read diffractogram, set plot params...) 23* ediff.gcryst = functions from geometric/general crystallography 24* ediff.mcryst = process monocrystal diffraction patterns 25* ediff.pcryst = process polycrystal/powder diffraction patterns 26* ediff.radial = calculate the 1D-radial profile from a 2D-diffraction pattern 27''' 28 29__version__ = "1.2.5" 30 31 32# Import of modules so that we could use the package as follows: 33# >>> import ediff as ed 34# >>> ed.io.Diffractogram1D.show... 35from ediff import calibration 36from ediff import center 37from ediff import gcryst 38from ediff import io 39from ediff import mcryst 40from ediff import pcryst 41from ediff import radial 42 43# This is a slightly special import: 44# (ediff (1) imports ediff.bkg, which (2) imports external bground package 45# (at the end, we can use all relevant bkg objects like: >>> ed.bkg.any_object 46from ediff import bkg 47 48# List of all ediff modules, which: 49# (enables >>> from ediff import * 50# (defines all sub-modules clearly and helps tools like VSCode/Pylance 51__all__ = [ 52 "bkg", "calibration", "center", "gcryst", "io", "pcryst", "mcryst", "radial"] 53 54# Obligatory acknowledgement -- the development was co-funded by TACR. 55# TACR requires that the acknowledgement is printed when we run the program. 56# Nevertheless, Python packages run within other programs, not directly. 57# The following code ensures that the acknowledgement is printed when: 58# (1) You run this file: __init__.py 59# (2) You run the package from command line: python -m ediff 60# Technical notes: 61# To get item (2) above, we define __main__.py (next to __init__.py). 62# The usage of __main__.py is not very common, but still quite standard. 63 64def acknowledgement(): 65 print('EDIFF package - process electron diffraction patterns.') 66 print('------') 67 print('The development of the package was co-funded by') 68 print('the Technology agency of the Czech Republic,') 69 print('program NCK, project TN02000020.') 70 71if __name__ == '__main__': 72 acknowledgement()