average_neighbour_patterns#

EBSD.average_neighbour_patterns(window: Union[str, ndarray, Array, Window] = 'circular', window_shape: Tuple[int, ...] = (3, 3), show_progressbar: Optional[bool] = None, **kwargs) None[source]#

Average patterns inplace with its neighbours within a window.

The amount of averaging is specified by the window coefficients. All patterns are averaged with the same window. Map borders are extended with zeros. Resulting pattern intensities are rescaled to fill the input patterns’ data type range individually.

Averaging is accomplished by correlating the window with the extended array of patterns using scipy.ndimage.correlate().

Parameters:
window

Name of averaging window or an array. Available types are listed in scipy.signal.windows.get_window(), in addition to a "circular" window (default) filled with ones in which corner coefficients are set to zero. A window element is considered to be in a corner if its radial distance to the origin (window center) is shorter or equal to the half width of the window’s longest axis. A 1D or 2D ndarray, Array or Window can also be passed.

window_shape

Shape of averaging window. Not used if a custom window or Window is passed to window. This can be either 1D or 2D, and can be asymmetrical. Default is (3, 3).

show_progressbar

Whether to show a progressbar. If not given, the value of hyperspy.api.preferences.General.show_progressbar is used.

**kwargs

Keyword arguments passed to the available window type listed in get_window(). If not given, the default values of that particular window are used.

Examples using EBSD.average_neighbour_patterns#