derive the lattice basis and neighbour stencil from a unit cell
The unit cell is the list of corner vertices of one pixel (4 for a square grid, 6 for a hexagonal grid), as returned by ebsd.unitCell. The cell-to-cell translation vectors are twice the edge-midpoint vectors; from these we pick a 2D basis A = [a1 a2] such that
pos = [i j] * A' + origin
and a neighbour stencil in (i,j) coordinates. The construction makes no assumption on the grid orientation, so it also works for rotated maps.
Syntax
[A,stencil,dxy] = latticeBasis(unitCell)Input
| unitCell | vector3d, 4 (square) or 6 (hex) corner vertices |
Output
| A | 2x2 basis, columns a1,a2 (physical units) |
| stencil | k × 2 integer neighbour offsets (k = 4 square, 6 hex) |
| dxy | representative spacing = mean column norm of A |
| NB the derived (i,j) indexing is PRIVATE to the decomposition and need not agree with the matrix layout of a gridified EBSDsquare/EBSDhex object. | |
Citing this page.
This page is part of the documentation of
MTEX, a free and open
source MATLAB toolbox for analyzing and modeling crystallographic textures.
It was written by The MTEX Developers and is published at
https://mtex-toolbox.github.io/latticeBasis.html.
If you use MTEX, or reuse text or figures from this page, in your research,
please cite
F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63
BibTeX
@article{bachmann2010mtex,
author = {F. Bachmann and R. Hielscher and H. Schaeben},
title = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
journal = {Solid State Phenomena},
volume = {160},
pages = {63-68},
year = {2010},
doi = {10.4028/www.scientific.net/SSP.160.63},
url = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}
Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.