Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vedadb opened this issue Jun 14, 2023 · 1 comment
Open

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

vedadb opened this issue Jun 14, 2023 · 1 comment

Comments

@vedadb
Copy link

vedadb commented Jun 14, 2023

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

@kilir
Copy link
Contributor

kilir commented Jul 13, 2023

Hi, this should be solved with the following commits 6c86a5f and fb40dea.

Cheers,
Rüdiger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants