mtex icon indicating copy to clipboard operation
mtex copied to clipboard

Error when calcGrains() after applying interp()

Open vedadb opened this issue 2 years ago • 1 comments

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)

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

vedadb avatar Jun 14 '23 13:06 vedadb