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
30293719
Commit
30293719
authored
Jul 27, 2019
by
Tobias WEBER
Browse files
small change
parent
69d7cee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/tascalc/cov.py
View file @
30293719
...
...
@@ -60,7 +60,7 @@ def filter_events(Q, E, w):
w
=
w
[
nonzero_idx
]
return
[
Q
,
E
,
w
]
return
[
Q
,
E
,
w
]
...
...
@@ -214,14 +214,14 @@ def calc_ellipses(Qres_Q):
if
verbose
:
print
(
"4d resolution ellipsoid diagonal elements fwhm (coherent-elastic scattering) lengths:
\n
%s
\n
"
\
%
(
1.
/
np
.
sqrt
(
np
.
diag
(
Qres_Q
))
*
sig2fwhm
))
%
(
1.
/
np
.
sqrt
(
np
.
abs
(
np
.
diag
(
Qres_Q
))
)
*
sig2fwhm
))
print
(
"4d resolution ellipsoid principal axes fwhm lengths:
\n
%s
\n
"
%
fwhms
)
Qres_proj
=
proj_quad
(
Qres_Q
,
2
)
Qres_proj
=
proj_quad
(
Qres_proj
,
1
)
Qres_proj
=
proj_quad
(
Qres_proj
,
0
)
print
(
"Incoherent-elastic fwhm width: %s meV
\n
"
%
(
1.
/
np
.
sqrt
(
Qres_proj
[
0
,
0
])
*
sig2fwhm
))
print
(
"Incoherent-elastic fwhm width: %s meV
\n
"
%
(
1.
/
np
.
sqrt
(
np
.
abs
(
Qres_proj
[
0
,
0
])
)
*
sig2fwhm
))
# 2d sliced ellipses
...
...
@@ -274,7 +274,7 @@ def calc_ellipses(Qres_Q):
[
fwhms_QxQy_proj
,
angles_QxQy_proj
,
rot_QxQy_proj
]
=
descr_ellipse
(
Qres_QxQy_proj
)
if
verbose
:
print
(
"2d Qx,Qy projected ellipse fwhm lengths and slope angle:
\n
%s, %f
\n
"
%
(
fwhms_QxQy_proj
,
angles_QxQy_proj
[
0
]))
return
[
fwhms_QxE
,
rot_QxE
,
fwhms_QyE
,
rot_QyE
,
\
...
...
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