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.gui = graphical user interface to ediff package
- 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.gui = graphical user interface to ediff package 25* ediff.mcryst = process monocrystal diffraction patterns 26* ediff.pcryst = process polycrystal/powder diffraction patterns 27* ediff.radial = calculate the 1D-radial profile from a 2D-diffraction pattern 28''' 29 30__version__ = "1.2.7" 31 32 33# Import of modules so that we could use the package as follows: 34# >>> import ediff as ed 35# >>> ed.io.Diffractogram1D.show... 36from ediff import bkg 37from ediff import bkg2d 38from ediff import center 39from ediff import gcryst 40from ediff import gui 41from ediff import io 42from ediff import mcryst 43from ediff import pcryst 44from ediff import radial 45 46# List of all ediff modules, which: 47# 1) enables >>> from ediff import * 48# 2) defines all sub-modules clearly and helps tools like VSCode/Pylance 49__all__ = [ 50 "bkg", "bkg2d", "calibration", "center", "gcryst", 51 "gui", "io", "pcryst", "mcryst", "radial"] 52 53# Technical notes - special imports 54# ---------------------------------- 55# 1) ediff.bkg => imports external bground package 56# 2) ediff.bkg2d => under development - call funcs in auxiliary IDIFF package 57# 3) ediff.gui => graphical user interface - sub-package in its own subdir 58 59# Obligatory acknowledgement -- the development was co-funded by TACR 60# ------------------------------------------------------------------- 61# TACR requires that the acknowledgement is printed when we run the program. 62# Nevertheless, Python packages run within other programs, not directly. 63# The following code ensures that the acknowledgement is printed when: 64# (1) You run this file: __init__.py 65# (2) You run the package from command line: python -m ediff 66# Technical notes: 67# To get item (2) above, we define __main__.py (next to __init__.py). 68# The usage of __main__.py is not too common, but still quite standard. 69 70def acknowledgement(): 71 print('EDIFF package - process electron diffraction patterns.') 72 print('------') 73 print('The development of the package was co-funded by') 74 print('the Technology agency of the Czech Republic,') 75 print('program NCK, project TN02000020.') 76 77if __name__ == '__main__': 78 acknowledgement()