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
252591b1
Commit
252591b1
authored
11 years ago
by
Laura Nervo
Browse files
Options
Downloads
Patches
Plain Diff
gtCrystSignedHKLs : given input 'symm' if needed; sorted hkls according to h > k > l
Signed-off-by:
Laura Nervo
<
laura.nervo@esrf.fr
>
parent
dbd35b3f
No related branches found
Branches containing commit
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
+29
-14
29 additions, 14 deletions
zUtil_Cryst/gtCrystSignedHKLs.m
with
29 additions
and
14 deletions
zUtil_Cryst/gtCrystSignedHKLs.m
+
29
−
14
View file @
252591b1
function
[
allshkls
,
allhklinds
,
mult
]
=
gtCrystSignedHKLs
(
hkl
,
spacegroup
)
function
[
allshkls
,
allhklinds
,
mult
]
=
gtCrystSignedHKLs
(
hkl
,
symm
)
% GTCRYSTSIGNEDHKLS Gives a complete list of signed hkl planes, by
% applying symmetry operators of the specified spacegroup to the input
% list of plane families.
...
...
@@ -6,20 +6,21 @@ function [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl,spacegroup)
% 'lattice_system' and 'crystal_system' instead of spacegroups should
% be considered.
%
% [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl,s
pacegroup
)
% ----------------------------------------------------------
------
% [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl,s
ymm
)
% ----------------------------------------------------------
%
% INPUT:
% hkl = plane families (one in a row)
% nx3,class double for cubic lattices
% nx4,class double for hexagonal lattices
% spacegroup = space group
% hkl = <double> plane families (one in a column)
% (3,n) for cubic lattices
% (4,n) for hexagonal lattices
% symm = <struct> structure containing .g3/.g with symmetry
% operators
%
% OUTPUT:
% allshkls = complete list of signed hkl planes
% (including Friedel pairs)
% allhklinds = indices in allshkls according to input hkl
% mult = multiplicity of hkl families
% allshkls =
complete list of signed hkl planes
%
(including Friedel pairs)
% allhklinds =
indices in allshkls according to input hkl
% mult =
<int8>
multiplicity of hkl families
(1,k)
%
% Version 002 10-07-2013 by LNervo
% Added check of class for hkl list
...
...
@@ -28,15 +29,26 @@ function [allshkls, allhklinds, mult] = gtCrystSignedHKLs(hkl,spacegroup)
if
~
isa
(
hkl
,
'double'
)
hkl
=
double
(
hkl
);
end
% reflections in rows
hkl
=
hkl
'
;
if
~
exist
(
'symm'
,
'var'
)
||
isempty
(
symm
)
load
parameters
spacegroup
=
parameters
.
cryst
.
spacegroup
;
[
~
,
crystal_system
,
~
]
=
gtReadSpaceGroup
(
spacegroup
);
% Get symmetry operators
symm
=
gtCrystGetSymmetryOperators
(
crystal_system
,
spacegroup
);
end
% Get symmetry operators
symm
=
gtCrystGetSymmetryOperators
([],
spacegroup
);
if
size
(
hkl
,
2
)
==
4
symm
=
{
symm
.
g
};
elseif
size
(
hkl
,
2
)
==
3
symm
=
{
symm
.
g3
};
end
ncols
=
size
(
hkl
,
2
);
allshkls
=
[];
allhklinds
=
[];
...
...
@@ -51,8 +63,11 @@ for ii = 1:size(hkl,1)
shkls
(
2
*
jj
,:)
=
-
shkls
(
2
*
jj
-
1
,:);
% Friedel pair of previous one
end
% Remove duplicates and add to the complete list
% Remove duplicates and add to the complete list
newshkls
=
unique
(
shkls
,
'rows'
);
% sort according to h > k > l
newshkls
=
sortrows
(
newshkls
,
[
-
1
-
2
-
ncols
]);
allshkls
=
[
allshkls
;
newshkls
];
mult
(
ii
,
1
)
=
size
(
newshkls
,
1
);
...
...
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