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.
  • Technical notes + additional help:

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 = calculate monocrystal diffraction patterns
  • ediff.pcryst = calculate 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* Technical notes + additional help:
13    - CIF files can be obtained from www - see ediff.pcryst for details.
14    - Quick start examples/demos - https://mirekslouf.github.io/ediff/docs
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 = calculate monocrystal diffraction patterns
25* ediff.pcryst = calculate polycrystal/powder diffraction patterns
26* ediff.radial = calculate the 1D-radial profile from a 2D-diffraction pattern
27'''
28
29__version__ = "1.0.1"
30
31
32# Import of modules so that we could use the package as follows:
33# >>> import ediff as ed
34# >>> ed.io.Diffractogram.read...
35import ediff.calibration
36import ediff.center
37import ediff.gcryst
38import ediff.io
39import ediff.pcryst
40import ediff.radial
41
42
43# This is a slightly special import:
44# * ediff (1) imports ediff.bkg, which (2) imports external bground package
45# * see additional imports in ediff.bkg module to see how it is performed 
46# * this "two-step import" enables us to use the ediff module as follows:
47# >>> import ediff as ed
48# >>> DATA  = ed.bkg.InputData ...
49# >>> PPAR  = ed.bkg.PlotParams ...
50# >>> IPLOT = ed.bkg.InteractivePlot ...
51import ediff.bkg
52
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()