ediff

Package: EDIFF

Processing of powder electron diffraction patterns.

  • Input: 2D powder electron diffraction pattern (raw experimental data).
  • Output: 1D powder electron diffraction pattern (final, compared with PXRD).
    • The 1D pattern/profile is obtained by radial averaging of 2D pattern.
    • The 1D profile is calibrated and compared with the theoretical PXRD.
    • The calculation of theoretical PXRD patterns is a part of this package.

EDIFF modules:

  • ediff.background = background correction (employs sub-package BGROUND)
  • ediff.calibration = calibration of SAED diffractograms (pixels -> q-vectors)
  • ediff.center = find center of an arbitrary 2D-diffraction pattern
  • ediff.io = input/output operations (read diffractogram, set plot params...)
  • ediff.pxrd = calculate the 1D-PXRD pattern for a known structure
  • ediff.radial = calculate the 1D-radial profile from 2D-diffraction pattern

Auxiliary package BGROUND:

  • BGROUND is an external package, which enables a 1D background correction.
  • It is imported during initialization to be accesible as ediff.background.
 1'''
 2Package: EDIFF
 3--------------
 4Processing of powder electron diffraction patterns.
 5
 6* Input:  2D powder electron diffraction pattern (raw experimental data).
 7* Output: 1D powder electron diffraction pattern (final, compared with PXRD).
 8    - The 1D pattern/profile is obtained by radial averaging of 2D pattern.
 9    - The 1D profile is calibrated and compared with the theoretical PXRD.
10    - The calculation of theoretical PXRD patterns is a part of this package. 
11
12EDIFF modules:
13
14* ediff.background = background correction (employs sub-package BGROUND)    
15* ediff.calibration = calibration of SAED diffractograms (pixels -> q-vectors)
16* ediff.center = find center of an arbitrary 2D-diffraction pattern
17* ediff.io = input/output operations (read diffractogram, set plot params...)
18* ediff.pxrd = calculate the 1D-PXRD pattern for a known structure
19* ediff.radial = calculate the 1D-radial profile from 2D-diffraction pattern
20
21Auxiliary package BGROUND:
22
23* BGROUND is an external package, which enables a 1D background correction.
24* It is imported during initialization to be accesible as ediff.background.
25'''
26
27__version__ = "0.6.1"
28
29
30# Import of modules so that we could use the package as follows:
31# >>> import ediff as ed
32# >>> ed.io.read_image ...
33import ediff.calibration
34import ediff.center
35import ediff.io
36import ediff.pxrd
37import ediff.radial
38
39
40# This is a slightly special import:
41# * ediff (1) imports ediff.background, which (2) imports bground package
42# * see additional imports in ediff.background module to see what is done 
43# * this "two-step import" enables us to use the ediff module as follows:
44# >>> import ediff as ed
45# >>> DATA  = ed.background.InputData ...
46# >>> PPAR  = ed.background.PlotParams ...
47# >>> IPLOT = ed.background.InteractivePlot ...
48import ediff.background
49
50
51# Obligatory acknowledgement -- the development was co-funded by TACR.
52#  TACR requires that the acknowledgement is printed when we run the program.
53#  Nevertheless, Python packages run within other programs, not directly.
54# The following code ensures that the acknowledgement is printed when:
55#  (1) You run this file: __init__.py
56#  (2) You run the package from command line: python -m ediff
57# Technical notes:
58#  To get item (2) above, we define __main__.py (next to __init__.py).
59#  The usage of __main__.py is not very common, but still quite standard.
60
61def acknowledgement():
62    print('EDIFF package - process powder electron diffraction patterns.')
63    print('------')
64    print('The development of the package was co-funded by')
65    print('the Technology agency of the Czech Republic,')
66    print('program NCK, project TN02000020.')
67    
68if __name__ == '__main__':
69    acknowledgement()