From 1e537cabac348b3388e73c4c57bcc9002fb84abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kilian?= Date: Thu, 5 Oct 2023 15:07:58 +0200 Subject: [PATCH] Allo to skip unneeded data --- interfaces/loadEBSD_h5oina.m | 41 +++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/interfaces/loadEBSD_h5oina.m b/interfaces/loadEBSD_h5oina.m index a01aff644..7a7a917a5 100644 --- a/interfaces/loadEBSD_h5oina.m +++ b/interfaces/loadEBSD_h5oina.m @@ -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 @@ -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