get_dynamic_background#

kikuchipy.pattern.get_dynamic_background(pattern: ndarray, filter_domain: str = 'frequency', std: Union[None, int, float] = None, truncate: Union[int, float] = 4.0) ndarray[source]#

Get the dynamic background in an EBSD pattern.

The background is obtained either in the frequency domain, by a low pass Fast Fourier Transform (FFT) Gaussian filter, or in the spatial domain by a Gaussian filter.

Data type is preserved.

Parameters:
pattern

EBSD pattern.

filter_domain

Whether to obtain the dynamic background by applying a Gaussian convolution filter in the "frequency" (default) or "spatial" domain.

std

Standard deviation of the Gaussian window. If not given, a deviation of pattern width/8 is chosen.

truncate

Truncate the Gaussian window at this many standard deviations. Default is 4.0.

Returns:
dynamic_bg

The dynamic background.