Skip to content
Snippets Groups Projects

Refactor rocking curves

Merged Loic Huder requested to merge refactor-rocking-curves into main
4 unresolved threads
Edited by Loic Huder

Merge request reports

Merge request pipeline #204633 passed

Merge request pipeline passed for ae2107f5

Test coverage 63.00% (0.00%) from 1 job

Merged by Loic HuderLoic Huder 2 months ago (Oct 30, 2024 4:26pm UTC)

Loading

Pipeline #208320 passed

Pipeline passed for 16b4cc9a on main

Test coverage 63.00% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • 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])
                         ~~~~~~~~~^^^^^^^^^^
      

      workflow: image

    • 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#L1850

      I regardless changed the check to raise an error instead of returning None so it is more explicit: 39aa3a74

      Thanks for checking :thumbsup:

    • Please register or sign in to reply
  • payno requested changes

    requested changes

  • Loic Huder added 1 commit

    added 1 commit

    • b4081359 - Raise errors in dataset.apply fit instead of returning None

    Compare with previous version

  • Loic Huder added 1 commit

    added 1 commit

    • e15dfd5a - Hide some inputs/outputs in the Orange widget of RockingCurves

    Compare with previous version

  • Loic Huder added 2 commits

    added 2 commits

    • 39aa3a74 - Raise errors in dataset.apply fit instead of returning None
    • 48fb8a5a - Hide some inputs/outputs in the Orange widget of RockingCurves

    Compare with previous version

  • Loic Huder requested review from @payno

    requested review from @payno

  • payno added 1 commit

    added 1 commit

    Compare with previous version

  • payno added 1 commit

    added 1 commit

    • 9b541b97 - RockingCurvesWidgetOW: import annotation

    Compare with previous version

    • Doesn't looks like the abort button is connected :cry: But we should have the mechanism now to do the cancellation

    • As discussed, the Abort button does not work since 1.1. I remove the slot that makes it visible so it should be kept hidden until we fix the issue.

    • Please register or sign in to reply
  • Loic Huder added 16 commits

    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

    Compare with previous version

  • Loic Huder added 1 commit

    added 1 commit

    • b294ed2a - Implement `cancel` for RockingCurve task

    Compare with previous version

  • Loic Huder added 1 commit

    added 1 commit

    • a41c3202 - Keep Abort button hidden since it doesn't work

    Compare with previous version

  • Loic Huder removed review request for @payno

    removed review request for @payno

  • Loic Huder requested review from @payno

    requested review from @payno

  • payno
  • payno
    payno @payno started a thread on the diff
  • 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")
      
    • Ah sorry, I fixed this error but it got lost in the rebase.

      Thanks for testing :relieved:

    • Actually, it is part of a bigger problem: workflow/ewoks/ewoksorange#46

      I cannot hide maps from the Orange widget outputs for this reason.

    • Please register or sign in to reply
  • payno requested changes

    requested changes

  • Loic Huder added 1 commit

    added 1 commit

    Compare with previous version

  • Loic Huder requested review from @payno

    requested review from @payno

  • payno
    payno @payno started a thread on an outdated change in commit 0870b2d3
  • 16 16 want_control_area = False
    17 17
    18 18 _ewoks_inputs_to_hide_from_orange = ("int_thresh", "method")
    19 _ewoks_outputs_to_hide_from_orange = ("maps",)
  • payno approved this merge request

    approved this merge request

  • Loic Huder added 11 commits

    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

    Compare with previous version

  • Loic Huder enabled an automatic merge when all merge checks for ae2107f5 pass

    enabled an automatic merge when all merge checks for ae2107f5 pass

  • merged

  • Loic Huder mentioned in commit 16b4cc9a

    mentioned in commit 16b4cc9a

  • Please register or sign in to reply
    Loading