Refactor rocking curves
For #133 (closed)
Merge request reports
Activity
mentioned in issue #133 (closed)
added 5 commits
-
48143d9b...ba9b763a - 3 commits from branch
main
- 906518de - Move RockingCurves ewoks task in its own file
- 5b9f7b31 - Refactor RockingCurves Orange widget
-
48143d9b...ba9b763a - 3 commits from branch
requested review from @payno
added 1 commit
- 64b621b2 - RockingCurves: Decouple the Ewoks computation from the GUI widget
mentioned in merge request !373 (closed)
@payno Now ready for review
Edited by Loic Huder- Resolved by Loic Huder
When I try to process (with the
strain
dataset) it I have the following error when I ask to 'fit data':Traceback (most recent call last): File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/taskexecutor.py", line 38, in execute_task self.__task.execute() File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewokscore/task.py", line 407, in execute raise RuntimeError(f"Task '{self.label}' failed") from e RuntimeError: Task 'rocking curves' failed ----------------------------- TypeError Exception ----------------------------- Traceback (most recent call last): File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 629, in _ewoks_task_finished_callback with self._ewoks_task_finished_context(): File "/usr/lib/python3.11/contextlib.py", line 144, in __exit__ next(self.gen) File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 564, in _ewoks_task_finished_context self.__ewoks_task_finished() File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 573, in __ewoks_task_finished self._output_changed() File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 387, in _output_changed self.__post_task_execute(self.__task_output_changed_callbacks) File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 394, in __post_task_execute callbacks[0]() File "/home/payno/Documents/dev/diffraction/darfix/src/orangecontrib/darfix/widgets/rockingcurves.py", line 56, in task_output_changed self._widget.updateDataset(dataset, maps) File "/home/payno/Documents/dev/diffraction/darfix/src/darfix/gui/rockingCurvesWidget.py", line 511, in updateDataset self._updatePlot(self._methodCB.currentText()) File "/home/payno/Documents/dev/diffraction/darfix/src/darfix/gui/rockingCurvesWidget.py", line 437, in _updatePlot self._addImage(self.maps[maps_idx]) ~~~~~~~~~^^^^^^^^^^
Actually, this is expected to fail since the
strain
dataset does not have the required number of dimensions to be able to fit the rocking curves: https://gitlab.esrf.fr/XRD/darfix/-/blob/ba9b763a12acb6a1f32f5823c9d9c025ff6d3196/src/darfix/core/dataset.py?page=2#L1850I regardless changed the check to raise an error instead of returning
None
so it is more explicit: 39aa3a74Thanks for checking
added 1 commit
- b4081359 - Raise errors in dataset.apply fit instead of returning None
added 1 commit
- e15dfd5a - Hide some inputs/outputs in the Orange widget of RockingCurves
requested review from @payno
assigned to @loic.huder
added 16 commits
-
9b541b97...7278f4b6 - 8 commits from branch
main
- 06f6e0ab - Move RockingCurves ewoks task in its own file
- 59c5f0f6 - Refactor RockingCurves Orange widget
- 83e8c878 - RockingCurves: Decouple the Ewoks computation from the GUI widget
- b4db5194 - Raise errors in dataset.apply fit instead of returning None
- a7ba7653 - Hide some inputs/outputs in the Orange widget of RockingCurves
- 53f3b350 - Update rockingcurves.py
- 009e5428 - RockingCurvesWidgetOW: import annotation
- 6a717704 - Implement `cancel` for RockingCurve task
Toggle commit list-
9b541b97...7278f4b6 - 8 commits from branch
added 1 commit
- a41c3202 - Keep Abort button hidden since it doesn't work
removed review request for @payno
requested review from @payno
- Resolved by Loic Huder
13 13 from silx.gui import qt 14 14 from darfix.core.dimension import POSITIONER_METADATA 15 15 from darfix.tests.utils import createRandomEDFDataset, createRandomHDF5Dataset 16 from darfix.gui.rockingCurvesWidget import RockingCurvesWidget 17 16 from darfix import dtypes 17 from orangecontrib.darfix.widgets.rockingcurves import RockingCurvesWidgetOW 18 18 19 19 20 20 def exec_(argv=None): When executing the example (press on
Fit data
) I get the following error:Output signal 'maps' does not exist File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 635, in _ewoks_task_finished_callback self.propagate_downstream() File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 433, in propagate_downstream self.__post_task_execute([self.trigger_downstream]) File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 397, in __post_task_execute callbacks[0]() File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 379, in trigger_downstream channel = self._get_output_signal(ewoksname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/payno/.local/share/virtualenvs/darfix_venv/lib/python3.11/site-packages/ewoksorange/bindings/owwidgets.py", line 359, in _get_output_signal raise RuntimeError(f"Output signal '{ewoksname}' does not exist")
Actually, it is part of a bigger problem: workflow/ewoks/ewoksorange#46
I cannot hide
maps
from the Orange widget outputs for this reason.
requested review from @payno
added 11 commits
-
0870b2d3...0e29c5a0 - 2 commits from branch
main
- e2610e35 - Move RockingCurves ewoks task in its own file
- cfee607a - Refactor RockingCurves Orange widget
- 35d353dd - RockingCurves: Decouple the Ewoks computation from the GUI widget
- df856256 - Raise errors in dataset.apply fit instead of returning None
- 0105491d - Hide some inputs/outputs in the Orange widget of RockingCurves
- bcfbaf3d - Update rockingcurves.py
- 9b57d0e5 - RockingCurvesWidgetOW: import annotation
- 1c7923e5 - Keep Abort button hidden since it doesn't work
- ae2107f5 - Review
Toggle commit list-
0870b2d3...0e29c5a0 - 2 commits from branch
enabled an automatic merge when all merge checks for ae2107f5 pass
mentioned in commit 16b4cc9a