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
0badedfa
Commit
0badedfa
authored
11 years ago
by
Laura Nervo
Browse files
Options
Downloads
Patches
Plain Diff
gtCrystSignedHKLs : added output hklsp and thtype
Signed-off-by:
Laura Nervo
<
laura.nervo@esrf.fr
>
parent
d32aa4a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zUtil_Cryst/gtCrystSignedHKLs.m
+25
-12
25 additions, 12 deletions
zUtil_Cryst/gtCrystSignedHKLs.m
with
25 additions
and
12 deletions
zUtil_Cryst/gtCrystSignedHKLs.m
+
25
−
12
View file @
0badedfa
function
[
allshkls
,
allhklinds
,
mult
]
=
gtCrystSignedHKLs
(
hkl
,
symm
)
function
[
allshkls
,
allhklinds
,
mult
,
hklsp
,
thtype
]
=
gtCrystSignedHKLs
(
hkl
,
symm
)
% GTCRYSTSIGNEDHKLS Gives a complete list of signed hkl planes, by
% GTCRYSTSIGNEDHKLS Gives a complete list of signed hkl planes, by
% applying symmetry operators of the specified spacegroup to the input
% applying symmetry operators of the specified spacegroup to the input
% list of plane families.
% list of plane families.
...
@@ -6,21 +6,29 @@ function [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl, symm)
...
@@ -6,21 +6,29 @@ function [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl, symm)
% 'lattice_system' and 'crystal_system' instead of spacegroups should
% 'lattice_system' and 'crystal_system' instead of spacegroups should
% be considered.
% be considered.
%
%
% [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl,symm)
% [allshkls, allhklinds, mult
, hklsp, thtype
] = gtCrystSignedHKLs(hkl,
symm)
% ----------------------------------------------------------
% ----------------------------------------------------------
----------------
%
%
% INPUT:
% INPUT:
% hkl = <double> plane families (one in a column)
% hkl = <double> plane families (one in a column) as in
% parameters.cryst
% (3,n) for cubic lattices
% (3,n) for cubic lattices
% (4,n) for hexagonal lattices
% (4,n) for hexagonal lattices
% symm = <struct> structure containing .g3/.g with symmetry
% symm = <struct> structure containing .g3/.g with symmetry
% operators
% operators
%
%
% OUTPUT:
% OUTPUT:
% allshkls =
complete list of signed hkl planes
% allshkls =
<double>
complete list of signed hkl planes
% (including Friedel pairs)
% (including Friedel pairs)
% allhklinds = indices in allshkls according to input hkl
% allhklinds = <double> indices in allshkls according to input hkl
% mult = <int8> multiplicity of hkl families (1,k)
% mult = <double> multiplicity of hkl families (1,k)
% hklsp = <double> list of all the hkls (friedel not considered)
% thtype = <double> theta types among the given reflections
% according to input hkl
%
%
% Version 003 21-08-2013 by LNervo
% Added output hklsp and thtype to simplify calculation
%
%
% Version 002 10-07-2013 by LNervo
% Version 002 10-07-2013 by LNervo
% Added check of class for hkl list
% Added check of class for hkl list
...
@@ -54,6 +62,9 @@ ncols = size(hkl,2);
...
@@ -54,6 +62,9 @@ ncols = size(hkl,2);
allshkls
=
[];
allshkls
=
[];
allhklinds
=
[];
allhklinds
=
[];
mult
=
[];
hklsp
=
[];
thtype
=
[];
% Loop through input hkl types
% Loop through input hkl types
for
ii
=
1
:
size
(
hkl
,
1
)
for
ii
=
1
:
size
(
hkl
,
1
)
...
@@ -70,12 +81,14 @@ for ii = 1:size(hkl,1)
...
@@ -70,12 +81,14 @@ for ii = 1:size(hkl,1)
newshkls
=
unique
(
shkls
,
'rows'
);
newshkls
=
unique
(
shkls
,
'rows'
);
% sort according to h > k > l
% sort according to h > k > l
newshkls
=
sortrows
(
newshkls
,
[
-
1
-
2
-
ncols
]);
newshkls
=
sortrows
(
newshkls
,
[
-
1
-
2
-
ncols
]);
nhkls
=
size
(
newshkls
,
1
)/
2
;
allshkls
=
[
allshkls
;
newshkls
];
mult
=
[
mult
;
nhkls
*
2
];
allshkls
=
[
allshkls
;
newshkls
];
mult
(
ii
,
1
)
=
size
(
newshkls
,
1
);
allhklinds
=
[
allhklinds
;
repmat
(
ii
,
nhkls
*
2
,
1
)];
%newshkls = sortrows(newshkls, [ncols 1 2]);
allhklinds
=
[
allhklinds
;
repmat
(
ii
,
size
(
newshkls
,
1
),
1
)];
hklsp
=
[
hklsp
;
newshkls
(
nhkls
+
1
:
end
,:)];
thtype
=
[
thtype
;
repmat
(
ii
,
nhkls
,
1
)];
end
end
...
...
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