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
4d09651c
Commit
4d09651c
authored
Aug 17, 2021
by
Julia Garriga Ferrer
Browse files
[gui][shift] Apply shift on all values of dimension
parent
48f95237
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/shiftCorrectionWidget.py
View file @
4d09651c
...
...
@@ -150,11 +150,14 @@ class ShiftCorrectionWidget(qt.QMainWindow):
"""
dx
=
self
.
_inputDock
.
widget
.
getDx
()
dy
=
self
.
_inputDock
.
widget
.
getDy
()
self
.
shift
=
[
dy
,
dx
]
dimension
=
self
.
_dimension
if
not
self
.
_inputDock
.
widget
.
checkbox
.
isChecked
()
else
None
frames
=
numpy
.
arange
(
self
.
_update_dataset
.
get_data
(
indices
=
self
.
indices
,
dimension
=
dimension
).
shape
[
0
])
self
.
thread_correction
=
OperationThread
(
self
,
self
.
_update_dataset
.
apply_shift
)
self
.
thread_correction
.
setArgs
(
numpy
.
outer
(
self
.
shift
,
frames
),
dimension
,
indices
=
self
.
indices
)
self
.
shift
=
numpy
.
array
([
dy
,
dx
])
if
self
.
_filtered_shift
is
None
or
self
.
_inputDock
.
widget
.
checkbox
.
isChecked
():
frames
=
numpy
.
arange
(
self
.
_update_dataset
.
get_data
(
indices
=
self
.
indices
,
dimension
=
self
.
_dimension
).
shape
[
0
])
self
.
thread_correction
=
OperationThread
(
self
,
self
.
_update_dataset
.
apply_shift
)
self
.
thread_correction
.
setArgs
(
numpy
.
outer
(
self
.
shift
,
frames
),
self
.
_dimension
,
indices
=
self
.
indices
)
else
:
self
.
thread_correction
=
OperationThread
(
self
,
self
.
_update_dataset
.
apply_shift_along_dimension
)
self
.
thread_correction
.
setArgs
(
self
.
_filtered_shift
,
self
.
_dimension
[
0
],
indices
=
self
.
indices
)
self
.
thread_correction
.
finished
.
connect
(
self
.
_updateData
)
self
.
_inputDock
.
widget
.
correctionB
.
setEnabled
(
False
)
self
.
_inputDock
.
widget
.
abortB
.
show
()
...
...
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