get_DisplacementGradientMap#
- pyxem.generators.get_DisplacementGradientMap(strained_vectors, unstrained_vectors, weights=None, return_residuals=False, **kwargs)[source]#
Calculates the displacement gradient tensor at each navigation position in a map.
Compares vectors to determine the 2 x 2 matrix, \(\\mathbf(L)\), that maps unstrained vectors, Vu, to strained vectors, Vs, using the np.lingalg.inv() function to find L that satisfies \(Vs = \\mathbf(L) Vu\).
The transformation is returned as a 3 x 3 displacement gradient tensor.
- Parameters:
strained_vectors (hyperspy.Signal2D) – Signal2D with a 2 x n array at each navigation position containing the Cartesian components of two strained basis vectors, V and U, defined as row vectors.
unstrained_vectors (numpy.array) – A 2 x n array containing the Cartesian components of two unstrained basis vectors, V and U, defined as row vectors.
weights (list) – of weights to be passed to the least squares optimiser, not used for n=2
return_residuals (Bool) – If the residuals for the least squares optimiser should be returned.
kwargs (dict) – Any additional keyword arguments passed to the hyperspy.signals.BaseSignal.map function.
- Returns:
D – The 3 x 3 displacement gradient tensor (measured in reciprocal space) at every navigation position.
- Return type:
Notes
n=2 now behaves the same as the n>2 case; see Release Notes for 0.10.0 for details.