Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
1e6d213f
Commit
1e6d213f
authored
May 31, 2021
by
Julia Garriga Ferrer
Browse files
[gui][rsm] Change axes to 2teta and eta
parent
b5ed5d08
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/rsmWidget.py
View file @
1e6d213f
...
...
@@ -26,12 +26,16 @@
__authors__
=
[
"J. Garriga"
]
__license__
=
"MIT"
__date__
=
"28/05/2021"
__date__
=
"31/05/2021"
import
numpy
from
silx.gui
import
qt
from
silx.gui.plot
import
Plot2D
from
.operationThread
import
OperationThread
from
darfix.core.dimension
import
POSITIONER_METADATA
class
RSMWidget
(
qt
.
QMainWindow
):
...
...
@@ -75,7 +79,17 @@ class RSMWidget(qt.QMainWindow):
self
.
_thread
.
finished
.
disconnect
(
self
.
_updateData
)
if
self
.
_thread
.
data
is
not
None
:
self
.
_moments
=
self
.
_thread
.
data
self
.
_plotWidget
.
addImage
(
self
.
_moments
[
0
][
0
])
ffz
=
self
.
dataset
.
get_metadata_values
(
POSITIONER_METADATA
,
"ffz"
)
mainx
=
self
.
dataset
.
get_metadata_values
(
POSITIONER_METADATA
,
"mainx"
)
d
=
0.051
s
,
h
,
w
=
self
.
dataset
.
get_data
().
shape
X
=
numpy
.
arange
(
-
int
(
h
/
2
),
int
(
h
/
2
),
dtype
=
numpy
.
float64
)
*
d
Y
=
numpy
.
arange
(
-
(
w
/
2
),
w
/
2
,
dtype
=
numpy
.
float64
)
*
d
teta
=
numpy
.
arctan2
(
ffz
+
X
,
mainx
)
az
=
numpy
.
arctan2
(
Y
,
mainx
)
xscale
=
(
teta
[
-
1
]
-
teta
[
0
])
/
h
yscale
=
(
az
[
-
1
]
-
az
[
0
])
/
w
self
.
_plotWidget
.
addImage
(
self
.
_moments
[
0
][
0
],
origin
=
(
az
[
0
],
teta
[
0
]),
scale
=
(
yscale
,
xscale
))
else
:
print
(
"
\n
Computation aborted"
)
...
...
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