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
b1015398
Commit
b1015398
authored
10 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
gtFedPredictOmegaMultiple: made output consistent with gtFedPredictOmega
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
1d613a13
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
7_fed2/gtFedPredictOmegaMultiple.m
+32
-34
32 additions, 34 deletions
7_fed2/gtFedPredictOmegaMultiple.m
with
32 additions
and
34 deletions
7_fed2/gtFedPredictOmegaMultiple.m
+
32
−
34
View file @
b1015398
...
...
@@ -68,7 +68,7 @@ function [om, plrot, plsigned, rot, omind] = gtFedPredictOmegaMultiple(...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Quadratic equation for omega angles
%%
%
Quadratic equation for omega angles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
nn
=
size
(
pl
,
2
);
...
...
@@ -86,55 +86,53 @@ end
D
=
A
.^
2
+
B
.^
2
;
if
~
isempty
(
omind
)
if
(
~
isempty
(
omind
))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Single omega index
%%
%
Single omega index
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if
length
(
omind
)
==
1
omind
=
omind
(
1
,
ones
(
1
,
nn
));
if
(
length
(
omind
)
==
1
)
omind
=
omind
(
1
,
ones
(
1
,
nn
));
end
ssp
=
((
omind
==
1
)
|
(
omind
==
2
));
ssp
=
((
omind
==
1
)
|
(
omind
==
2
));
ss
=
ssp
-
~
ssp
;
ss3
=
ss
([
1
1
1
],:);
ss3
=
ss
([
1
1
1
],
:);
CC
=
C
+
ss
.*
sinth
;
DD
=
D
-
CC
.^
2
;
CC
=
C
+
ss
.*
sinth
;
DD
=
D
-
CC
.^
2
;
E
=
sqrt
(
DD
);
ok
=
DD
>
0
;
ssp
=
((
omind
==
2
)
|
(
omind
==
3
));
ssp
=
((
omind
==
1
)
|
(
omind
==
3
));
ss
=
ssp
-
~
ssp
;
ss
=
ss
.*
ok
;
om
=
2
*
atand
((
-
B
+
ss
.*
E
)
.
/
(
CC
-
A
));
ss
=
ss
.*
ok
;
om
=
2
*
atand
((
-
B
+
ss
.*
E
)
.
/
(
CC
-
A
));
om
(
~
ok
)
=
NaN
;
% Limit range
om
=
mod
(
om
,
360
);
om
=
mod
(
om
,
360
);
% ROTATION MATRICES AND PLANE NORMALS IN LAB
% Get rotation matrix and multpily the input plane normals to get
% them in the diffracting position
rot
=
gtMathsRotationTensor
(
om
,
rotcomp
);
% expand for multiplication
plt
=
reshape
(
pl
,
1
,[]);
plt
=
plt
([
1
1
1
],:);
plrot
=
reshape
(
rot
,
3
,[])
.*
plt
;
plrot
=
plrot
(:,
1
:
3
:
end
)
+
plrot
(:,
2
:
3
:
end
)
+
plrot
(:,
3
:
3
:
end
);
plrot
=
reshape
(
plrot
,
3
,[]);
plrot
=
ss3
.*
plrot
;
plsigned
=
ss3
.*
pl
;
plt
=
reshape
(
pl
,
1
,
3
,
[]);
plt
=
plt
([
1
1
1
],
:,
:);
plrot
=
rot
.*
plt
;
plrot
=
sum
(
plrot
,
2
);
plrot
=
reshape
(
plrot
,
3
,
[]);
plrot
=
ss3
.*
plrot
;
plsigned
=
ss3
.*
pl
;
else
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% All four omega indices
%%
%
All four omega indices
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
om
=
NaN
(
4
,
nn
);
...
...
@@ -146,8 +144,8 @@ else
ok
=
DD
>
0
;
E
=
sqrt
(
DD
(
ok
));
om
(
1
,
ok
)
=
2
*
atand
((
-
B
(
ok
)
-
E
)
.
/(
CC
(
ok
)
-
A
(
ok
)));
om
(
2
,
ok
)
=
2
*
atand
((
-
B
(
ok
)
+
E
)
.
/(
CC
(
ok
)
-
A
(
ok
)));
om
(
1
,
ok
)
=
2
*
atand
((
-
B
(
ok
)
+
E
)
.
/(
CC
(
ok
)
-
A
(
ok
)));
om
(
2
,
ok
)
=
2
*
atand
((
-
B
(
ok
)
-
E
)
.
/(
CC
(
ok
)
-
A
(
ok
)));
% Diffraction condition 2
% Pl_rot and beamdir dotproduct equals +sin(th)
...
...
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