Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
0217ad0e
Verified
Commit
0217ad0e
authored
Oct 06, 2021
by
Tobias WEBER
Browse files
ref
parent
95bbf0a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/tascalc/tas.py
View file @
0217ad0e
...
...
@@ -47,9 +47,9 @@ def cross(a, b, B):
return
la
.
det
(
M
)
metric_inv
=
la
.
inv
(
get_metric
(
B
))
eps
=
[[[
levi
(
i
,
j
,
k
,
B
)
for
k
in
range
(
0
,
3
)
]
for
j
in
range
(
0
,
3
)
]
eps
=
[[[
levi
(
i
,
j
,
k
,
B
)
for
k
in
range
(
0
,
3
)
]
for
j
in
range
(
0
,
3
)
]
for
i
in
range
(
0
,
3
)
]
return
np
.
einsum
(
"ijk,j,k,li -> l"
,
eps
,
a
,
b
,
metric_inv
)
...
...
@@ -177,6 +177,7 @@ def get_UB(B, orient1_rlu, orient2_rlu, orientup_rlu):
# a3 & a4 angles
# see https://dx.doi.org/10.1107/S0021889805004875
def
get_a3a4
(
ki
,
kf
,
Q_rlu
,
orient_rlu
,
orient_up_rlu
,
B
,
sense_sample
=
1.
,
a3_offs
=
np
.
pi
):
metric
=
get_metric
(
B
)
#print("Metric: " + str(metric))
...
...
@@ -204,6 +205,8 @@ def get_a3a4(ki, kf, Q_rlu, orient_rlu, orient_up_rlu, B, sense_sample=1., a3_of
return
[
a3
,
a4
,
dist_Q_plane
]
# hkl position
# see https://dx.doi.org/10.1107/S0021889805004875
def
get_hkl
(
ki
,
kf
,
a3
,
Qlen
,
orient_rlu
,
orient_up_rlu
,
B
,
sense_sample
=
1.
,
a3_offs
=
np
.
pi
):
B_inv
=
la
.
inv
(
B
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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