Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Whitfield, Ross
wand
Commits
7e47b0b7
Commit
7e47b0b7
authored
Apr 10, 2019
by
Whitfield, Ross
Browse files
Update calculate_HKL_range.py
parent
01ace5d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
calculate_HKL_range.py
View file @
7e47b0b7
...
...
@@ -28,7 +28,8 @@ W[:,2] = Wproj
UBW
=
np
.
dot
(
UB
,
W
)
Umin
=
HKL_min
=
np
.
array
([
1e9
,
1e9
,
1e9
])
HKL_max
=
np
.
array
([
-
1e9
,
-
1e9
,
-
1e9
])
for
rot
in
s1
:
R
=
np
.
array
([[
np
.
cos
(
rot
),
0
,
np
.
sin
(
rot
)],
...
...
@@ -36,4 +37,8 @@ for rot in s1:
[
-
np
.
sin
(
rot
),
0
,
np
.
cos
(
rot
)]])
RUBW
=
np
.
dot
(
R
,
UBW
)
HKL
=
np
.
dot
(
np
.
linalg
.
inv
(
RUBW
),
qlab
.
T
)
HKL_min
=
np
.
minimum
(
HKL_min
,
HKL
.
min
(
axis
=
1
))
HKL_max
=
np
.
maximum
(
HKL_max
,
HKL
.
max
(
axis
=
1
))
print
(
HKL_min
)
print
(
HKL_max
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment