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
275 stars 182 forks source link

Error when calcGrains() after applying interp() #1870

Open vedadb opened 1 year ago

vedadb commented 1 year ago

For the sake of comparing GND/KAM maps, the EBSD step size needs to be equal within the data set, which is not always the case. Two out of eleven maps were recorded with a step-size of 0.2 um, while the rest were recorded using a 0.1 um step size.

One of the maps (No. 5, original step size 0.2 um) fails calcGrains(ebsd_new) after having interpolated the step size to 0.1 um

The interpolation was performed using the following code: [X,Y]=meshgrid(0:0.1:max(no5_02.x,[],'all'),0:0.1:max(no5_02.y,[],'all')) no5_01=interp(no5_02,X,Y)

and error received when running: grains=calcGrains(no5_01)

image

Error Message Index exceeds the number of array elements. Index must not exceed 254.

Error in quaternion/accumarray (line 53) omega = real(acos(flip./s(subs) .* ...

Error in EBSD/calcGrains (line 140) [meanRotation, GOS] = accumarray(grainId(:),q(:),'robust');

What MTEX version do you use? 5.9 and 5.10

kilir commented 1 year ago

Hi, this should be solved with the following commits 6c86a5fa8be014cce1dd51d2e02374e266ea4b0c and fb40dea58945aa7333a5a5ee0c688fb8cc71de1a.

Cheers, Rüdiger