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
Provided
A 50x50 pixel large cutout from sample No.5 is provided in the no5_02um.mat file
no5_02um.zip
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)
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');
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)
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