Error Importing One Select .ang File For Reconstruction

61 views
Skip to first unread message

Alec Saville

unread,
Aug 6, 2020, 5:33:50 PM8/6/20
to MTEX
Hi everyone,

I recently ran into an issue trying to load a select EBSD .ang file into MTEX version 5.40. Oddly enough, only one .ang file is giving me the following issue. All other files work flawlessly.

The script I've created (see below) generates a variable "ebsd" to store the ebsd data and extract the pertinent information for later processing. For some reason, the ebsd.phaseMap property will show up not as [0 1 2] but instead as [-1 1 2]. All other .ang files which work with this code display a [0 1 2] ebsd.phaseMap property. Other differences may be hiding in the workspace variable properties, but at this time I haven't found anything else significant.

In an attempt to remedy this, I hard coded the ebsd.phaseMap property to [0 1 2]. This did change the workspace property, but the error was still thrown regardless. I also inspected the .ang file in a text editor to look for any issues and recreated the file via OIM a number of different ways, but so far have yet to find a solution.

Searching through the forums I saw other people had encountered a similar issue in the past. I wanted to inquire specifically here why only one of my .ang files was having issues importing correctly and identify a possible remedy if one such thing exists? I can provide the file in question if necessary for troubleshooting.

The Error
Array indices must be positive integers or logical values.

Error in EBSD/subsind (line 64)
    ind = ind & phases(phaseId);

Error in EBSD/subsref (line 17)
    ind = subsind(ebsd,s(1).subs);

Error in MTEXBetaReconstructionUD (line 43)
beta2alpha = orientation.Burger(ebsd('Titanium (Beta)').CS,ebsd('Titanium (Alpha)').CS);

The Code
%% Import the Data

% create an EBSD variable containing the data
ebsd = EBSD.load(fname,CS,'interface','ang',...
  'convertEuler2SpatialReferenceFrame','setting 2');

%% Begin Processing
beta2alpha = orientation.Burger(ebsd('Titanium (Beta)').CS,ebsd('Titanium (Alpha)').CS); --> Error thrown here.
round2Miller(beta2alpha)

Thanks in advance,
Alec

Rüdiger

unread,
Aug 6, 2020, 5:40:19 PM8/6/20
to mtex...@googlegroups.com
Hi Alec,
providing the file would certainly be helpful.
Cheers,
Rüdiger



Alec Saville

unread,
Aug 6, 2020, 6:31:07 PM8/6/20
to MTEX
Hi Rudiger,

My file is either too large to upload to the forum (the server rejects my upload requests) or there's another issue somewhere. Do you have another preferred method of file exchange? For reference, the .ang is ~ 300 MB in size.

All the best,
Alec

Rüdiger

unread,
Aug 7, 2020, 4:51:50 AM8/7/20
to mtex...@googlegroups.com
Maybe the header and the first couple of lines is enough.

head -n 100000 yourfile.ang > shortfile.ang

Cheers,
Rüdiger


Alec Saville

unread,
Aug 7, 2020, 11:42:24 AM8/7/20
to MTEX
Hi Rudiger,

I've attached a short version of the .ang file below. It seems the issue stems from a certain region of the .ang file as selecting only the first 100000 lines did not return the error. The lines in shortfile2.ang do return the error described above, and hopefully can cast some light on the issue at hand.

Thanks again,
Alec
ShortFile2.ang

Rüdiger

unread,
Aug 7, 2020, 5:46:18 PM8/7/20
to mtex...@googlegroups.com
Hi Alec,

can you try and see if this works for you?
https://github.com/mtex-toolbox/mtex/commit/702e8e4c6d08df0875c5109995be9e52f2d1f935

Cheers,
Rüdiger

Alec Saville

unread,
Aug 10, 2020, 3:23:13 PM8/10/20
to MTEX
Hi Rüdiger,

That seems to have done the trick, thanks for your help!

And also, kudos to you and the MTEX team for getting the reconstruction programs up and running in 5.40.

Thanks again,
Alec
Reply all
Reply to author
Forward
0 new messages