-
Notifications
You must be signed in to change notification settings - Fork 0
/
loadPatternMatched.m
49 lines (38 loc) · 1.78 KB
/
loadPatternMatched.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%% script portion to load pattern matched data
% load h5oina file after pattern matching
% Note: this is WIP - functional but will be rewritten soon
% 23/08/23 RB
%% MTEX
location_mtex='H:\MTEX\mtex-5.8.1'; % MTEX folder location
run(fullfile(location_mtex,'startup_mtex.m')); % load MTEX
setMTEXpref('xAxisDirection','east'); %aztec
setMTEXpref('zAxisDirection','outofPlane'); %aztec
%% File locations
fullfile1 = 'E:\Ruth\h5oina\1mm map Specimen 1 Site 1 Map Data 1-Subset 1.h5oina'; %location of original h5oina file
fullfile2 = 'E:\Ruth\h5oina\1mm map Specimen 1 Site 1 Map Data 1-Subset 1-PatternMatching.h5oina'; %location of pattern matched h5oina file
%% Load data - pattern matched
% Load data - pattern matched
[ebsd_o,~,opt_o] = loadEBSD_h5oina_getopt(fullfile1);
[ebsd1,ebsd,~,MSdata2] = loadEBSD_h5oina_PatMatch(fullfile2,ebsd_o,opt_o) ;
% ebsdDP,EBSDdata,DPdata1,DPdata3
% sort extra parts
ebsd.prop.CrossCorr=MSdata2.Cross_Correlation_Coefficient;
ebsd.prop.Band_Contrast=ebsd1.prop.Band_Contrast;
ebsd.prop.Band_Slope=ebsd1.prop.Band_Slope;
ebsd.prop.Pattern_Quality=ebsd_o.prop.Pattern_Quality;
ebsd.prop.X=ebsd1.prop.X;
ebsd.prop.Y=ebsd1.prop.Y;
% create header
header=ebsd_o.opt.Header;
% optional clean up
clear ebsd_o opt_o ebsd1 MSdata2
clear fullfile1 fullfile2 location_mtex
%% Load data - h5oina (normal output)
% simple version if required
%file location
% fullfile1 = 'C:\Users\rmb07\OneDrive - UBC\7 - Projects\7 - Mg slices\WBV - shared\Mg 1 Specimen 1 SLICE_0156 SLICE_0156 161.h5oina'; %location of original h5oina file
% Load data - simple
% [ebsd,~]=loadEBSD_h5oina_1(fullfile1); % load ebsd
% header=ebsd.opt.Header; % get header data
% optional clean up
% clear fullfile1 location_mtex