VirtualBSEGenerator#

class kikuchipy.generators.VirtualBSEGenerator(signal: Union[EBSD, LazyEBSD])[source]#

Bases: object

Generates virtual backscatter electron (BSE) images for an electron backscatter diffraction (EBSD) signal and a set of EBSD detector areas in a convenient manner.

Parameters:
signal

EBSD signal.

Attributes

VirtualBSEGenerator.grid_cols

Return the detector grid columns, defined by grid_shape.

VirtualBSEGenerator.grid_rows

Return the detector grid rows, defined by grid_shape.

VirtualBSEGenerator.grid_shape

Return or set the generator grid shape.

Methods

VirtualBSEGenerator.get_images_from_grid([...])

Return an in-memory signal with a stack of virtual backscatter electron (BSE) images by integrating the intensities within regions of interest (ROI) defined by the generator grid_shape.

VirtualBSEGenerator.get_rgb_image(r, g, b[, ...])

Return an in-memory RGB virtual BSE image from three regions of interest (ROIs) on the EBSD detector, with a potential "alpha channel" in which all three arrays are multiplied by a fourth.

VirtualBSEGenerator.plot_grid([pattern_idx, ...])

Plot a pattern with the detector grid superimposed, potentially coloring the edges of three grid tiles red, green and blue.

VirtualBSEGenerator.roi_from_grid(index)

Return a rectangular region of interest (ROI) on the EBSD detector from one or multiple generator grid tile indices as row(s) and column(s).