MTEX 5.3 GND calculation error

73 views
Skip to first unread message

yang liu

unread,
Oct 12, 2020, 9:55:59 PM10/12/20
to MTEX
Dear MTEX users and developers,

Here is a weird error I have during GND calculation.

I am using MTEX 5.3 and Matlab 2020a.

I modified the GND calculation example from MTEX tutorial (https://mtex-toolbox.github.io/GND.html) to fit my Mg GND calculation. The code works fine for most of my EBSD data. The expect GND was calculated soomthly.

But there is only one EBSD data this code could not process. In fact, the code did not make it to the "GND calculation" but stucked at the very beginning. 

Here is the error reported from Matlab:

Array indices must be positive integers or logical values.

Error in quaternion/subsref (line 7)
    q.a = subsref(q.a,s(1));

Error in orientation/axis (line 72)
  q = reshape(inv(r(irMax)),size(q21)) .* q21 .* reshape(l(ilMax),size(q21));

Error in axisAngleColorKey/orientation2color (line 50)
        v = axis(ori,oM.oriRef);

Error in GNDbasal (line 31)
plot(ebsd,ipfKey.orientation2color(ebsd('indexed').orientations),'micronBar','off','figSize','medium')

It seems to me that the code does not get to the denoising EBSD data part before the error occurs.

I thought this may be related to the color key setting, but the same data can be plotted successfully to an IPF+GB map.

Here is the beginning part of my GND code
%plot EBSD
plot(ebsd)
% reconstruct grains 
[grains,ebsd.grainId] = calcGrains(ebsd,'angle',5*degree);

% remove small grains 
ebsd(grains(grains.grainSize<=5)) = [];

% redo grain reconstruction
[grains,ebsd.grainId] = calcGrains(ebsd,'angle',2.5*degree);

% smooth grain boundaries grains = smooth(grains,5);

%GB
hold on
plot(grains.boundary,'linewidth',2)
hold off



ebsd= ebsd('Magnesium')
%a key the colorizes according to misorientation angle and axis
ipfKey = axisAngleColorKey(ebsd);

% set the grain mean orientations as reference orinetations
ipfKey.oriRef = grains(ebsd('indexed').grainId).meanOrientation;

% plot the data
plot(ebsd,ipfKey.orientation2color(ebsd('indexed').orientations),'micronBar','off','figSize','medium')

hold on
plot(grains.boundary,'linewidth',2)
hold off

Many thanks for your help in advance.

Yang

Ralf Hielscher

unread,
Oct 12, 2020, 11:47:40 PM10/12/20
to mtex...@googlegroups.com
Could you please post the output of 

ebsd('indexed').orientations

Ralf.

********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.hi...@mathematik.tu-chemnitz.de
D-09126 Chemnitz                 http://www.tu-chemnitz.de/~rahi
********************************************************************


--
If you want to reduce the number of emails you get through this forum login to https://groups.google.com/forum/?fromgroups=#!forum/mtexmail, click "My membership" and select "Don't send me email updates". You can still get emails on selected topics by staring them.
---
You received this message because you are subscribed to the Google Groups "MTEX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtexmail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mtexmail/96b4a007-6e2a-4a51-8f54-c4702983077eo%40googlegroups.com.

yang liu

unread,
Oct 13, 2020, 8:58:45 AM10/13/20
to MTEX
Hi Ralf,

Sorry I did not get your meaning. Do you mean to run this code? It will feed me back with a figure.
plot (ebsd('indexed').orientations)

I have attached my EBSD data in the zip file along with the figure in the following link. Hope this could help.


Regards,

Yang

在 2020年10月12日星期一 UTC-4下午11:47:40,Ralf Hielscher写道:
Could you please post the output of 

ebsd('indexed').orientations

Ralf.
********************************************************************
Ralf Hielscher                   Tel: +371-531-38556
Fakultät für Mathematik               +371-531-22200 (Sekr.)
Technische Universität Chemnitz  Fax: +371-531-22109
Reichenhainer Str. 39            E-mail: ralf.h...@mathematik.tu-chemnitz.de
To unsubscribe from this group and stop receiving emails from it, send an email to mtex...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages