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