Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
ec796c0d
Commit
ec796c0d
authored
12 years ago
by
Yoann Guilhem
Committed by
Nicola Vigano
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Slight modifications to crystal cmap functions
Signed-off-by:
Yoann Guilhem
<
yoann.guilhem@esrf.fr
>
parent
6814c728
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
6_rendering/gtCrystAxisCmap_key.m
+4
-3
4 additions, 3 deletions
6_rendering/gtCrystAxisCmap_key.m
6_rendering/gtIPFCmap.m
+16
-7
16 additions, 7 deletions
6_rendering/gtIPFCmap.m
6_rendering/gtIPFCmapCubicKey.m
+0
-1
0 additions, 1 deletion
6_rendering/gtIPFCmapCubicKey.m
with
20 additions
and
11 deletions
6_rendering/gtCrystAxisCmap_key.m
+
4
−
3
View file @
ec796c0d
...
@@ -32,7 +32,7 @@ function [hf, ha, hp] = gtCrystAxisCmap_key(N, XYZlabels, cardinal)
...
@@ -32,7 +32,7 @@ function [hf, ha, hp] = gtCrystAxisCmap_key(N, XYZlabels, cardinal)
% - x: // y tomo;
% - x: // y tomo;
% - y: // x tomo;
% - y: // x tomo;
% - z: // negative z tomo
% - z: // negative z tomo
%
% Version 002 16-01-2013 by YGuilhem
% Version 002 16-01-2013 by YGuilhem
% Factorized and vectorized function, add some optional arguments
% Factorized and vectorized function, add some optional arguments
%
%
...
@@ -42,8 +42,9 @@ Nmin = 10;
...
@@ -42,8 +42,9 @@ Nmin = 10;
if
~
exist
(
'N'
,
'var'
)
||
isempty
(
N
)
if
~
exist
(
'N'
,
'var'
)
||
isempty
(
N
)
N
=
90
;
N
=
90
;
elseif
N
<
Nmin
elseif
N
<
Nmin
warning
([
'You should use at least '
num2str
(
Nmin
)
...
warning
(
'gtCrystAxisCmap_key:wrong_argument'
,
...
' increments, setting it so!'
]);
[
'You should use at least '
num2str
(
Nmin
)
...
' increments, setting it so !'
]);
N
=
Nmin
;
N
=
Nmin
;
end
end
...
...
This diff is collapsed.
Click to expand it.
6_rendering/gtIPFCmap.m
+
16
−
7
View file @
ec796c0d
...
@@ -17,6 +17,7 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
...
@@ -17,6 +17,7 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
% {true}
% {true}
% 'crystal_system' = <string> Legacy to set (force) the crystal system
% 'crystal_system' = <string> Legacy to set (force) the crystal system
% for old datasets
% for old datasets
% 'r_vectors' = <double> Rodrigues vectors as N x 3 array
%
%
% OUTPUT:
% OUTPUT:
% cmap = <double> RGB color map, color code is the inverse
% cmap = <double> RGB color map, color code is the inverse
...
@@ -25,6 +26,8 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
...
@@ -25,6 +26,8 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
% moved to the SST triangle
% moved to the SST triangle
% Vc_symm = <double> Row vectors expressed in crystal frame
% Vc_symm = <double> Row vectors expressed in crystal frame
%
%
% Version 002 08-02-2013 by YGuilhem
% Add r_vectors as optional input
%
%
% Version 003 08-01-2013 by LNervo
% Version 003 08-01-2013 by LNervo
% Added second output argument: Vsst
% Added second output argument: Vsst
...
@@ -39,6 +42,7 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
...
@@ -39,6 +42,7 @@ function [cmap, Vsst, Vc_symm] = gtIPFCmap(phaseid, LD, varargin)
par
.
saturate
=
true
;
par
.
saturate
=
true
;
par
.
save
=
false
;
par
.
save
=
false
;
par
.
crystal_system
=
''
;
par
.
crystal_system
=
''
;
par
.
r_vectors
=
[];
par
=
parse_pv_pairs
(
par
,
varargin
);
par
=
parse_pv_pairs
(
par
,
varargin
);
% Set default phaseid
% Set default phaseid
...
@@ -53,19 +57,24 @@ end
...
@@ -53,19 +57,24 @@ end
% Get the r-vectors
% Get the r-vectors
r_vectors
=
[];
r_vectors
=
[];
if
exist
(
fullfile
(
'4_grains'
,
sprintf
(
'phase_%02d'
,
phaseid
)
,
'r_vectors.mat'
),
'file'
)
phaseDir
=
fullfile
(
'4_grains'
,
sprintf
(
'phase_%02d'
,
phaseid
))
;
load
(
fullfile
(
'4_grains'
,
sprintf
(
'phase_%02d'
,
phaseid
),
'
r_vectors
.mat'
));
if
~
isempty
(
par
.
r_vectors
)
if
size
(
r_vectors
,
2
)
==
4
r_vectors
=
par
.
r_vectors
;
r_vectors
=
r_vectors
(:,
2
:
4
);
elseif
exist
(
fullfile
(
phaseDir
,
'r_vectors.mat'
),
'file'
)
end
load
(
fullfile
(
phaseDir
,
'r_vectors.mat'
));
elseif
exist
(
fullfile
(
'4_grains'
,
sprintf
(
'phase_%02d'
,
phaseid
)
,
'index.mat'
),
'file'
)
elseif
exist
(
fullfile
(
phaseDir
,
'index.mat'
),
'file'
)
grain
=
[];
grain
=
[];
load
(
fullfile
(
'4_grains'
,
sprintf
(
'phase_%02d'
,
phaseid
)
,
'index.mat'
),
'grain'
);
load
(
fullfile
(
phaseDir
,
'index.mat'
),
'grain'
);
r_vectors
=
gtIndexAllGrainValues
(
grain
,
'R_vector'
,
[],
1
:
3
,
[]);
r_vectors
=
gtIndexAllGrainValues
(
grain
,
'R_vector'
,
[],
1
:
3
,
[]);
else
else
gtError
(
'gtIPFCmap:missing_file'
,
'Could not find r_vectors.mat or index.mat file!'
);
gtError
(
'gtIPFCmap:missing_file'
,
'Could not find r_vectors.mat or index.mat file!'
);
end
end
% Resize r_vectors if needed
if
size
(
r_vectors
,
2
)
==
4
r_vectors
=
r_vectors
(:,
2
:
4
);
end
% Get the symmetry operators
% Get the symmetry operators
if
isempty
(
par
.
crystal_system
)
if
isempty
(
par
.
crystal_system
)
parameters
=
load
(
'parameters.mat'
);
parameters
=
load
(
'parameters.mat'
);
...
...
This diff is collapsed.
Click to expand it.
6_rendering/gtIPFCmapCubicKey.m
+
0
−
1
View file @
ec796c0d
...
@@ -39,7 +39,6 @@ inc = phimax/N;
...
@@ -39,7 +39,6 @@ inc = phimax/N;
psimin
=
0
;
psimin
=
0
;
psimax
=
atan
(
sqrt
(
2
))
+
inc
;
psimax
=
atan
(
sqrt
(
2
))
+
inc
;
chimin
=
0
;
chimax
=
pi
/
4
;
chimax
=
pi
/
4
;
for
phi
=
phimin
:
inc
:(
phimax
-
inc
)
% Rotation around z-axis
for
phi
=
phimin
:
inc
:(
phimax
-
inc
)
% Rotation around z-axis
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment