mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
292 stars 186 forks source link

converting EBSD with rectangular grid to hexagonal or hexagonal to rectangular grid #221

Closed DavidMainprice closed 7 years ago

DavidMainprice commented 8 years ago

In MTEX 4.4 beta1 we have

xy = [ebsd.x,ebsd.y]' % this transposed % rectangular to hexagonal unitCell = calcUnitCell(xy,'GridType','hexagonal','GridRotation',0*degree) % update unitCell ebsd_hex = updateUnitCell(ebsd) this does not seem to work

It is quite possible I do not have syntax right.

all the best David

ralfHielscher commented 8 years ago

Hi David,

conversion from square to hex grid is not supported in MTEX. you can do the other way round with

ebsd.gridify

So far I did not have this on my todo list as in MTEX there are more functions that work for rectangular grids then for hex grids. Why do you want to have hex grid?

Ralf.

DavidMainprice commented 8 years ago

Dear Ralf, What is utility of calcUnitCell(xy,'GridType','hexagonal','GridRotation',0*degree) as I clearly missed the point ! all the best David

ralfHielscher commented 8 years ago

Its more an internal function which I use to determine the unit cell from given data.

Ralf.