EBSD.gridify edit page

extend EBSD data to an grid

Description

In the default column major layout the first dimension of the resulting matrix is the grid direction closest to y and the second one the grid direction closest to x, both oriented such that the coordinates increase. Accordingly ebsd(i,j) is the j-th pixel of the i-th scan row and ebsd(1,1) is the corner with the smallest coordinates. Hexagonal grids are always stored this way, the flags apply to square grids only.

Syntax

[ebsdGrid,newId] = gridify(ebsd)
[ebsdGrid,newId] = gridify(ebsd,'unitCell',unitCell)
[ebsdGrid,newId] = gridify(ebsd,'rowMajor')

Input

ebsd an EBSD data set with a non regular grid

Output

ebsd EBSDsquare, EBSDhex data on a regular grid
newId closest regular grid point for every non regular grid point

Options

extent extend of gridded map
unitCell unit cell of the gridded map

Flags

columnMajor one scan row per matrix row, i.e. size(ebsd) = [numRows numCols] (default)
rowMajor the transposed layout, i.e. size(ebsd) = [numCols numRows]

Example

mtexdata twins
ebsdMg = ebsd('Magnesium').gridify
plot(ebsdMg, ebsdMg.orientations)
ebsd = EBSD (y↑→x)
 
 Phase  Orientations     Mineral         Color  Symmetry  Crystal reference frame
     0     46 (0.2%)  notIndexed          none                                   
     1  22833 (100%)   Magnesium  LightSkyBlue     6/mmm        X||a*, Y||b, Z||c
 
 Properties: bands, bc, bs, error, mad
 Scan unit : um
 X x Y x Z : [0, 50] x [0, 41] x [0, 0]
 Normal vector: (0,0,1)
 
 
ebsdMg = EBSDsquare (y↑→x)
 
 Phase  Orientations    Mineral         Color  Symmetry  Crystal reference frame
     1  22833 (100%)  Magnesium  LightSkyBlue     6/mmm        X||a*, Y||b, Z||c
 
 Properties: bands, bc, bs, error, mad, oldId
 Scan unit : um
 X x Y x Z : [0, 50] x [0, 41] x [0, 0]
 Normal vector: (0,0,1)
 Square grid  :137 x 167