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
439687ad
Commit
439687ad
authored
Jun 04, 2021
by
Julia Garriga Ferrer
Browse files
[gui][magnification] Update widget to use correct dataset method
parent
4fa69f53
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/magnificationWidget.py
View file @
439687ad
...
...
@@ -26,7 +26,7 @@
__authors__
=
[
"J. Garriga"
]
__license__
=
"MIT"
__date__
=
"0
2
/06/2021"
__date__
=
"0
4
/06/2021"
from
silx.gui
import
qt
...
...
@@ -34,7 +34,7 @@ from silx.gui import qt
class
MagnificationWidget
(
qt
.
QMainWindow
):
"""
Widget to apply
PCA to a set of images and plot the eigenvalues found
.
Widget to apply
magnification transformation to the data axes
.
"""
sigComputed
=
qt
.
Signal
()
...
...
@@ -80,7 +80,15 @@ class MagnificationWidget(qt.QMainWindow):
self
.
indices
=
indices
self
.
bg_indices
=
bg_indices
self
.
bg_dataset
=
bg_dataset
self
.
_okButton
.
setEnabled
(
True
)
if
not
self
.
dataset
.
dims
:
msg
=
qt
.
QMessageBox
()
msg
.
setIcon
(
qt
.
QMessageBox
.
Warning
)
msg
.
setText
(
"This widget has to be used before selecting any region of
\
interest and after selecting the dimensions"
)
msg
.
exec_
()
else
:
self
.
_okButton
.
setEnabled
(
True
)
def
getDataset
(
self
):
return
self
.
dataset
,
self
.
indices
,
self
.
bg_indices
,
self
.
bg_dataset
...
...
@@ -108,9 +116,9 @@ class MagnificationWidget(qt.QMainWindow):
def
_saveMagnification
(
self
):
if
self
.
_checkbox2x
.
isChecked
():
self
.
dataset
.
magnification
=
0.003
75
d
=
3.
75
elif
self
.
_checkbox10x
.
isChecked
():
self
.
dataset
.
magnification
=
0.
000
75
d
=
0.75
else
:
magnification
=
self
.
_manualLE
.
text
()
if
magnification
==
""
:
...
...
@@ -119,7 +127,7 @@ class MagnificationWidget(qt.QMainWindow):
msg
.
setText
(
"Magnification value has to be entered when choosing manual"
)
msg
.
exec_
()
return
else
:
self
.
dataset
.
magnification
=
float
(
magnific
ation
)
self
.
dataset
.
compute_transform
ation
(
d
)
self
.
sigComputed
.
emit
()
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