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
281 stars 185 forks source link

Error in output for merged grains #78

Closed kilir closed 9 years ago

kilir commented 9 years ago

Hello Ralf, on 4.1.beta (still with today 4.1.beta6) I get the following error for grain objects that have been merged. Plotting works and calculations as well, it's just the output for some grains:

>> ebsd_merged
ebsd = EBSD (show methods, plot)
 Phase    Orientations  Mineral       Color  Symmetry  Crystal reference frame
     0  1003901 (100%)   Quartz  light blue       321        X||a, Y||b*, Z||c
 Properties: ci, iq, sem_signal, x, y, grainId, mis2mean
 Scan unit : um

>> grains_merged
grains _merged= grain2d (show methods, plot)
 Phase  Grains   Pixels  Mineral  Symmetry  Crystal reference frame
     0    1368  1003901   Quartz       321        X||a, Y||b*, Z||c
 Properties: GOS, meanRotation

>> grains_merged(1)
ans = grain2d (show methods, plot)
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     0       1      13   Quartz       321        X||a, Y||b*, Z||c
    Id   Phase   Pixels     GOS     phi1       Phi     phi2   phi2   Id   Phase   Pixels   GOS   phi1   Phi
 (1 5)   (1 7)    (1 7)   (1 1)   (1 13)   (1 141)   (3 61)      5    6       7        1    13    141    61

>> grains_merged(2)
ans = grain2d (show methods, plot)
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     0       1      11   Quartz       321        X||a, Y||b*, Z||c

Attempted to access ix(9.5); index must be a positive integer or logical.
Error in cprintf>CPRINTF_cell (line 2036)
            cb=ix(i+nx);
Error in cprintf>CPRINTF_number (line 1927)
        [t,par]=CPRINTF_cell(par,t,find(in),paro.opt.s);
Error in cprintf>CPRINTF_cell2ascii (line 1549)
        [ctbl,par]=fh(par,ctbl,par.fpar(i,:));
Error in cprintf (line 311)
        [ctbl,par]=CPRINTF_cell2ascii(par,ctbl);
Error in dynProp/char (line 169)
        c  = cprintf(d,'-Lc',fn_ext,'-L',' ','-d','   ','-ic',true);
Error in grain2d/display (line 66)
disp(char(dynProp(grains.prop),...

>> grains_merged(1:2)
ans = grain2d (show methods, plot)
 Phase  Grains  Pixels  Mineral  Symmetry  Crystal reference frame
     0       2      24   Quartz       321        X||a, Y||b*, Z||c
    Id         Phase
 (1 1)             1
 (2 1)             2
 (1 3)            13
 (2 3)            11
 (2 4)   4.21468e-08
 (1 5)           141
 (2 5)           153
 (1 6)            61
 (2 6)           106
 (1 7)            79
 (2 7)           275

Merging was done the following way:

[grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd,'angle',10*degree,'unitcell')
gb_qtz = grains.boundary('Quartz','Quartz');
rot1 = rotation('axis',Miller(0,0,0,1,CS{2}),'angle',60*degree);
ind1 = angle(gb_qtz('Quartz','Quartz').misorientation,rot1)<3*degree; 
twinBoundary1 = gb_qtz(ind1);
[grains_merged,parentID_grains]= merge(grains,twinBoundary1);
ebsd_merged = ebsd;
ebsd_merged.grainId  = parentID_grains(ebsd.grainId);

Does the above error make any sense to you or did I do something wrong? I could send you example input data if needed. All the best, Rüdiger

PS: Any chance to see some sort of changelog for the .beta versions as well?

ralfHielscher commented 9 years ago

Hi Rüdiger,

thank you for reporting this. I fixed these bugs.

Ralf.

PS: I'm a bit lazy with the changelog. You could look here https://github.com/ralfHielscher/mtex/commits/plotAngleSections?page=1 but surely I should explain changes in more detail in the changelog

kilir commented 9 years ago

Hi Ralf, thanks for the link. Most likely it isn't necessary to explain all the changes in detail for a beta version. However having some idea where changes were made would help to figure out whether for example my script stopped working (e.g. because you changed the syntax of a function) or it is really a bug somewhere. Thanks a lot and all the best, Rüdiger

Rüdiger Kilian Bernoullistrasse 32 4056 Basel Switzerland Phone: +41 61 267 3610


From: Ralf Hielscher [notifications@github.com] Sent: Wednesday, August 26, 2015 9:55 PM To: mtex-toolbox/mtex Cc: Rüdiger Kilian Subject: Re: [mtex] Error in output for merged grains (#78)

Hi Rüdiger,

thank you for reporting this. I fixed these bugs.

Ralf.

PS: I'm a bit lazy with the changelog. You could look here https://github.com/ralfHielscher/mtex/commits/plotAngleSections?page=1 but surely I should explain changes in more detail in the changelog

— Reply to this email directly or view it on GitHubhttps://github.com/mtex-toolbox/mtex/issues/78#issuecomment-135153512.

ajcross89 commented 9 years ago

Hello Ralf,

I also found this bug today, using MTEX-4.1.beta6. Is your fix included in this version, or will it appear in MTEX-4.1.beta7 ?

Best regards, Andrew