The raw EBSD signal can be empirically evaluated as a superposition of a Kikuchi diffraction pattern and a smooth background intensity. For pattern indexing, the latter intensity is undesirable, while for so-called virtual backscatter electron (VBSE) imaging, this intensity can reveal important topographical, compositional or diffraction contrast. This section details methods to enhance the Kikuchi diffraction pattern.
Static background correction¶
The slowly varying diffuse background in raw patterns can be removed by either
subtracting or dividing by a static background via
>>> s.static_background_correction(operation='subtract', relative=True)
Here the static background pattern is assumed to be stored as part of the signal
metadata, which can be loaded via
set_experimental_parameters(). The static
background pattern can also be passed to the
static_bg parameter. Passing
relative=True ensures that relative intensities between patterns are kept
when the patterns are scaled after correction to fill the intensity range
available for the data type, e.g. [0, 255] for
Dynamic background correction¶
Uneven intensity in a static background subtracted pattern can be corrected by
subtracting or dividing by a dynamic background obtained by Gaussian blurring.
This so-called flat fielding is done with
possibilities of setting the
operation and standard deviation of the
>>> s.dynamic_background_correction(operation='subtract', sigma=2)
Patterns are rescaled to fill the available data type range.
Adaptive histogram equalization¶
Enhancing the pattern contrast with adaptive histogram equalization has been
found useful when comparing patterns for dictionary indexing [Marquardt2017].
intensities in the pattern histogram are spread to cover the available range,
e.g. [0, 255] for patterns of
uint8 data type:
>>> s.adaptive_histogram_equalization(kernel_size=(15, 15))
K. Marquardt, M. De Graef, S. Singh, H. Marquardt, A. Rosenthal, S. Koizuimi, “Quantitative electron backscatter diffraction (EBSD) data analyses using the dictionary indexing (DI) approach: Overcoming indexing difficulties on geological materials,” American Mineralogist 102 (2017), doi: https://doi.org/10.2138/am-2017-6062.
M. A. Jackson, E. Pascal, M. De Graef, “Dictionary Indexing of Electron Back-Scatter Diffraction Patterns: a Hands-On Tutorial,” Integrating Materials and Manufacturing Innovation 8 (2019), doi: https://doi.org/10.1007/s40192-019-00137-4.
Only changing the data type using
change_dtype() does not rescale pattern
intensities, leading to patterns not using the full available data type range,
e.g. [0, 65535] for
>>> print(s.data.dtype, s.data.max()) uint8 255 >>> s.change_dtype(np.uint16) >>> print(s.data.dtype, s.data.max()) uint16 255 >>> s.plot(vmax=1000)
In these cases it is convenient to rescale intensities to a desired data type
range, either keeping relative intensities between patterns or not, by using
>>> s.rescale_intensities(relative=True) >>> print(s.data.dtype, s.data.max()) uint16 65535 >>> s.plot(vmax=65535)