Skip to content

Commit 408e72e

Browse files
committed
loadEBSD_ang should not remove 4*pi values but rather set them to notIndexed see #2191
1 parent b1cbd0f commit 408e72e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

interfaces/loadEBSD_ang.m

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
laue = readByToken(str,'# Symmetry');
5151
lattice = readByToken(str,'# LatticeConstants',[1 1 1 90 90 90]);
5252

53-
% setup crytsal symmetry
53+
% setup crystal symmetry
5454
options = {};
5555
switch laue
5656
case {'-3m' '32' '3' '62' '6'}
@@ -121,7 +121,7 @@
121121
% # NOTES: End
122122
%
123123

124-
% set up columnnames
124+
% set up column names
125125
version = readByToken(hl,'# VERSION','x');
126126
switch version
127127
case {'2', '3', '4', '5', '6'}
@@ -158,7 +158,7 @@
158158

159159
% import the data
160160
ebsd = loadEBSD_generic(fname,'cs',cs,'bunge','radiant',...
161-
'ColumnNames',ColumnNames,varargin{:},'header',nh,ReplaceExpr{:});
161+
'ColumnNames',ColumnNames,varargin{:},'header',nh,ReplaceExpr{:},'keepNaN');
162162

163163
% Explicitly non-indexed phases appear to have 4*pi for all Euler angles
164164
% which are filtered by loadHelper() already AND ci==-1.
@@ -174,13 +174,7 @@
174174
notIndexedID = -1;
175175
end
176176
ebsd.phaseMap(1) = notIndexedID;
177-
ebsd(ebsd.prop.ci<0).phase=notIndexedID;
178-
179-
% reconstruct empty points previously removed by loadHelper
180-
% gridify might be easiest
181-
ebsd=ebsd.gridify;
182-
ind_no = isnan(ebsd.rotations);
183-
ebsd(ind_no).phase=notIndexedID;
177+
ebsd(ebsd.rotations.isnan | ebsd.prop.ci<0).phase = notIndexedID;
184178

185179
catch
186180
interfaceError(fname);

0 commit comments

Comments
 (0)