Skip to content

Commit

Permalink
Allo to skip unneeded data
Browse files Browse the repository at this point in the history
  • Loading branch information
kilir committed Oct 5, 2023
1 parent 43229c1 commit 1e537ca
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions interfaces/loadEBSD_h5oina.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
%
% Options
% CS0 - use sample primary coordinates (default - use acquisition
% coordinates CS1)
%
% coordinates CS1)
% skipAllButEBSD - only read EBSD data
% skipEDS - do not read EDS data
% skipEimage - do not read electron images
% skipDataProcessing - do not read data processing (whatever Aztec
% Crystal saves in the file)
%
%
% TODO
% 1) Test if EBSDheader.Specimen_Orientation_Euler does what it's supposed
Expand All @@ -36,30 +41,36 @@
m=1;
p=1;
q=1;

%search for EBSD data
for i = 1:length(all.Groups) % map site on sample
if ~isempty(all.Groups(i).Groups) % data on map site ('EBSD, EDS, Electron iamge etc)
for j=1:length(all.Groups(i).Groups)

if contains(all.Groups(i).Groups(j).Name,'EBSD')
EBSD_index{n} = [i j];
n = n+1;
end
if contains(all.Groups(i).Groups(j).Name,'EDS')
EDS_index{m} = [i j];
m = m+1;
end
if contains(all.Groups(i).Groups(j).Name,'Electron Image')
Image_index{p} = [i j];
p = p+1;
end

if contains(all.Groups(i).Groups(j).Name,'Data Processing')
Processing_index{q} = [i j];
q = q+1;
end
if ~check_option(varargin,'skipAllButEBSD')

if contains(all.Groups(i).Groups(j).Name,'EDS') & ~check_option(varargin,'skipEDS')
EDS_index{m} = [i j];
m = m+1;
end

if contains(all.Groups(i).Groups(j).Name,'Electron Image') & ~check_option(varargin,'skipEimage')
Image_index{p} = [i j];
p = p+1;
end

if contains(all.Groups(i).Groups(j).Name,'Data Processing') & ~check_option(varargin,'skipDataProcessing')
Processing_index{q} = [i j];
q = q+1;
end

end
end

end
end

Expand Down

0 comments on commit 1e537ca

Please sign in to comment.