get_decomposition_model#

EBSD.get_decomposition_model(components: Optional[Union[int, List[int]]] = None, dtype_out: Union[str, dtype, type] = 'float32') Union[EBSD, LazyEBSD][source]#

Get the model signal generated with the selected number of principal components from a decomposition.

Calls HyperSpy’s get_decomposition_model(). Learning results are preconditioned before this call, doing the following:

  1. Set numpy.dtype to desired dtype_out.

  2. Remove unwanted components.

  3. Rechunk to suitable chunks if Array.

Parameters:
components

If not given, rebuilds the signal from all components. If int, rebuilds signal from components in range 0-given int. If list of ints, rebuilds signal from only components in given list.

dtype_out

Data type to cast learning results to (default is "float32). Note that HyperSpy casts to "float64".

Returns:
s_model

Model signal.