EBSDsquare.transformReferenceFrame edit page

store a gridded map in a given matrix layout

Description

A gridded map has a layout of its own - the row index advances along d1 and the column index along d2 - and this puts it into another one. Nothing is resampled and no value is invented: a transpose and two flips are all that is ever applied, so a layout no permutation can reach is approached as closely as one can, the same way gridify does.

NB this changes the SHAPE of the map whenever the two layouts differ by a quarter turn - an r x c map comes back c x r.

Syntax

ebsd = transformReferenceFrame(ebsd,gridLayout(yvector,xvector))
ebsd = transformReferenceFrame(ebsd,gridLayout(otherMap))
[ebsd,newId] = transformReferenceFrame(ebsd,gL)

Input

ebsd EBSDsquare
gL gridLayout the matrix indices are to advance along

Output

ebsd EBSDsquare, the same data reindexed
newId where each element of the old matrix sits in the new one

See also

EBSD.gridify gridLayout.layoutIndex EBSDsquare.rotate