tomwer 1.0.3__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. orangecontrib/tomwer/tutorials/EBS_tomo_listener.ows +39 -0
  2. orangecontrib/tomwer/tutorials/cast_volume.ows +34 -0
  3. orangecontrib/tomwer/tutorials/simple_slice_reconstruction.ows +39 -0
  4. orangecontrib/tomwer/tutorials/simple_volume_local_reconstruction.ows +49 -0
  5. orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +59 -0
  6. orangecontrib/tomwer/tutorials/using_saaxis_to_find_cor.ows +44 -0
  7. orangecontrib/tomwer/widgets/cluster/FutureSupervisorOW.py +1 -1
  8. orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py +14 -4
  9. orangecontrib/tomwer/widgets/cluster/__init__.py +1 -1
  10. orangecontrib/tomwer/widgets/control/DataListOW.py +12 -5
  11. orangecontrib/tomwer/widgets/control/DataListenerOW.py +18 -9
  12. orangecontrib/tomwer/widgets/control/DataSelectorOW.py +13 -6
  13. orangecontrib/tomwer/widgets/control/DataTransfertOW.py +3 -5
  14. orangecontrib/tomwer/widgets/control/DataValidatorOW.py +8 -4
  15. orangecontrib/tomwer/widgets/control/DataWatcherOW.py +4 -6
  16. orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +49 -62
  17. orangecontrib/tomwer/widgets/control/FilterOW.py +2 -4
  18. orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +93 -0
  19. orangecontrib/tomwer/widgets/control/NXTomomillOW.py +135 -129
  20. orangecontrib/tomwer/widgets/control/NotifierOW.py +34 -9
  21. orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +3 -5
  22. orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py +19 -13
  23. orangecontrib/tomwer/widgets/control/VolumeSelector.py +12 -4
  24. orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +11 -7
  25. orangecontrib/tomwer/widgets/control/icons/notification.svg +4 -4
  26. orangecontrib/tomwer/widgets/control/icons/nxtomomill.png +0 -0
  27. orangecontrib/tomwer/widgets/control/icons/nxtomomill.svg +8 -5
  28. orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png +0 -0
  29. orangecontrib/tomwer/widgets/control/icons/tomoobjserie.svg +73 -78
  30. orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +16 -4
  31. orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +100 -0
  32. orangecontrib/tomwer/widgets/edit/icons/image_key_editor.png +0 -0
  33. orangecontrib/tomwer/widgets/edit/icons/image_key_upgrader.png +0 -0
  34. orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.png +0 -0
  35. orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.svg +123 -0
  36. orangecontrib/tomwer/widgets/edit/test/test_dark_flat_patch.py +21 -1
  37. orangecontrib/tomwer/widgets/edit/test/test_image_key_editor.py +1 -1
  38. orangecontrib/tomwer/widgets/edit/test/test_image_key_upgrader.py +1 -1
  39. orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +25 -0
  40. orangecontrib/tomwer/widgets/other/PythonScriptOW.py +19 -11
  41. orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +20 -14
  42. orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +24 -10
  43. orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +26 -21
  44. orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +29 -12
  45. orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +44 -17
  46. orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +28 -20
  47. orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +24 -18
  48. orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +6 -6
  49. orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +4 -2
  50. orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.png +0 -0
  51. orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.svg +11 -8
  52. orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +10 -4
  53. orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
  54. orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +69 -0
  55. orangecontrib/tomwer/widgets/visualization/SampleMovedOW.py +2 -4
  56. orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.png +0 -0
  57. orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.svg +105 -0
  58. tomwer/__main__.py +10 -5
  59. tomwer/app/canvas_launcher/config.py +10 -10
  60. tomwer/app/canvas_launcher/mainwindow.py +68 -6
  61. tomwer/app/canvas_launcher/widgetsscheme.py +1 -3
  62. tomwer/app/darkref.py +16 -12
  63. tomwer/app/imagekeyeditor.py +2 -2
  64. tomwer/app/imagekeyupgrader.py +104 -0
  65. tomwer/app/intensitynormalization.py +0 -1
  66. tomwer/app/nxtomoeditor.py +103 -0
  67. tomwer/app/rsync.py +1 -1
  68. tomwer/core/cluster/cluster.py +1 -1
  69. tomwer/core/futureobject.py +1 -0
  70. tomwer/core/process/control/datalistener/datalistener.py +7 -1
  71. tomwer/core/process/control/datalistener/rpcserver.py +3 -4
  72. tomwer/core/process/control/datawatcher/datawatcher.py +18 -18
  73. tomwer/core/process/control/datawatcher/datawatcherobserver.py +5 -8
  74. tomwer/core/process/control/datawatcher/datawatcherprocess.py +2 -3
  75. tomwer/core/process/control/datawatcher/edfdwprocess.py +2 -2
  76. tomwer/core/process/control/nxtomomill.py +33 -58
  77. tomwer/core/process/control/scanlist.py +2 -1
  78. tomwer/core/process/control/scanselector.py +7 -0
  79. tomwer/core/process/control/scantransfer.py +2 -2
  80. tomwer/core/process/control/scanvalidator.py +6 -5
  81. tomwer/core/process/control/singletomoobj.py +2 -1
  82. tomwer/core/process/control/timer.py +2 -1
  83. tomwer/core/process/control/tomoobjserie.py +8 -2
  84. tomwer/core/process/control/volumeselector.py +2 -1
  85. tomwer/core/process/control/volumesymlink.py +2 -1
  86. tomwer/core/process/edit/darkflatpatch.py +2 -1
  87. tomwer/core/process/edit/imagekeyeditor.py +4 -3
  88. tomwer/core/process/reconstruction/axis/axis.py +29 -32
  89. tomwer/core/process/reconstruction/axis/mode.py +3 -2
  90. tomwer/core/process/reconstruction/axis/params.py +35 -16
  91. tomwer/core/process/reconstruction/darkref/darkrefs.py +90 -707
  92. tomwer/core/process/reconstruction/darkref/darkrefscopy.py +44 -16
  93. tomwer/core/process/reconstruction/darkref/params.py +62 -67
  94. tomwer/core/process/reconstruction/lamino/tofu.py +1 -2
  95. tomwer/core/process/reconstruction/nabu/castvolume.py +21 -26
  96. tomwer/core/process/reconstruction/nabu/nabucommon.py +36 -38
  97. tomwer/core/process/reconstruction/nabu/nabuscores.py +28 -13
  98. tomwer/core/process/reconstruction/nabu/nabuslices.py +41 -14
  99. tomwer/core/process/reconstruction/nabu/nabuvolume.py +21 -12
  100. tomwer/core/process/reconstruction/nabu/utils.py +32 -3
  101. tomwer/core/process/reconstruction/normalization/normalization.py +9 -8
  102. tomwer/core/process/reconstruction/saaxis/saaxis.py +46 -20
  103. tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +38 -12
  104. tomwer/core/process/reconstruction/test/__init__.py +0 -39
  105. tomwer/core/process/reconstruction/test/test_axis_params.py +25 -3
  106. tomwer/core/process/reconstruction/test/test_darkref_copy.py +117 -1
  107. tomwer/core/process/script/python.py +16 -12
  108. tomwer/core/process/task.py +3 -7
  109. tomwer/core/process/test/test_axis.py +1 -1
  110. tomwer/core/process/test/test_dark_and_flat.py +41 -111
  111. tomwer/core/process/test/test_data_listener.py +0 -29
  112. tomwer/core/process/test/test_data_transfer.py +10 -14
  113. tomwer/core/process/test/test_nabu.py +1 -1
  114. tomwer/core/process/test/test_normalization.py +1 -1
  115. tomwer/core/process/visualization/liveslice.py +6 -0
  116. tomwer/core/scan/blissscan.py +37 -2
  117. tomwer/core/scan/edfscan.py +19 -8
  118. tomwer/core/scan/hdf5scan.py +10 -4
  119. tomwer/core/scan/scanbase.py +35 -29
  120. tomwer/core/scan/scanfactory.py +3 -17
  121. tomwer/core/scan/test/test_h5.py +1 -1
  122. tomwer/core/scan/test/test_process_registration.py +0 -11
  123. tomwer/core/scan/test/test_scan.py +32 -30
  124. tomwer/core/settings.py +2 -2
  125. tomwer/core/test/test_utils.py +1 -1
  126. tomwer/core/tomwer_object.py +19 -0
  127. tomwer/core/utils/__init__.py +0 -45
  128. tomwer/core/utils/char.py +2 -0
  129. tomwer/core/utils/gpu.py +5 -5
  130. tomwer/core/utils/nxtomoutils.py +2 -2
  131. tomwer/core/utils/scanutils.py +50 -0
  132. tomwer/core/utils/volumeutils.py +13 -0
  133. tomwer/core/volume/edfvolume.py +4 -0
  134. tomwer/core/volume/hdf5volume.py +4 -0
  135. tomwer/core/volume/jp2kvolume.py +4 -0
  136. tomwer/core/volume/rawvolume.py +22 -5
  137. tomwer/core/volume/tiffvolume.py +4 -0
  138. tomwer/core/volume/volumebase.py +19 -12
  139. tomwer/core/volume/volumefactory.py +20 -1
  140. tomwer/gui/cluster/slurm.py +1 -1
  141. tomwer/gui/cluster/supervisor.py +0 -2
  142. tomwer/gui/cluster/test/test_cluster.py +2 -2
  143. tomwer/gui/control/datalist.py +109 -36
  144. tomwer/gui/control/datatransfert.py +1 -1
  145. tomwer/gui/control/datawatcher/configuration.py +0 -2
  146. tomwer/gui/control/datawatcher/datawatcher.py +23 -13
  147. tomwer/gui/control/datawatcher/datawatcherobserver.py +1 -1
  148. tomwer/gui/control/observations.py +0 -3
  149. tomwer/gui/control/selectorwidgetbase.py +42 -12
  150. tomwer/gui/control/serie/seriecreator.py +967 -0
  151. tomwer/{web/__init__.py → gui/control/serie/seriewaiter.py} +5 -7
  152. tomwer/gui/control/singletomoobj.py +15 -4
  153. tomwer/gui/control/test/test_datalist.py +1 -1
  154. tomwer/gui/control/test/test_datalistener.py +1 -1
  155. tomwer/gui/control/test/test_inputwidget.py +1 -1
  156. tomwer/gui/control/test/test_process_manager.py +1 -13
  157. tomwer/gui/control/test/test_scanselector.py +1 -1
  158. tomwer/gui/control/test/test_scanvalidator.py +1 -1
  159. tomwer/gui/control/test/test_single_tomo_obj.py +1 -1
  160. tomwer/gui/control/test/test_volume_dialog.py +19 -7
  161. tomwer/gui/control/test/test_volumeselector.py +4 -4
  162. tomwer/gui/debugtools/datasetgenerator.py +1 -9
  163. tomwer/gui/edit/dkrfpatch.py +2 -3
  164. tomwer/gui/edit/imagekeyeditor.py +12 -11
  165. tomwer/gui/edit/nxtomoeditor.py +475 -0
  166. tomwer/gui/edit/test/test_dkrf_patch.py +2 -14
  167. tomwer/gui/edit/test/test_image_key_editor.py +2 -2
  168. tomwer/gui/edit/test/test_nx_editor.py +155 -0
  169. tomwer/gui/icons.py +0 -1
  170. tomwer/gui/qfolderdialog.py +11 -0
  171. tomwer/gui/reconstruction/axis/CompareImages.py +27 -29
  172. tomwer/gui/reconstruction/axis/axis.py +2 -0
  173. tomwer/gui/reconstruction/axis/radioaxis.py +70 -14
  174. tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +7 -9
  175. tomwer/gui/reconstruction/darkref/darkrefwidget.py +22 -24
  176. tomwer/gui/reconstruction/lamino/tofu/projections.py +1 -1
  177. tomwer/gui/reconstruction/lamino/tofu/tofu.py +3 -3
  178. tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +4 -4
  179. tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +10 -5
  180. tomwer/gui/reconstruction/nabu/castvolume.py +103 -24
  181. tomwer/gui/reconstruction/nabu/check.py +1 -1
  182. tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +352 -0
  183. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +0 -9
  184. tomwer/gui/reconstruction/nabu/nabuconfig/output.py +1 -1
  185. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +18 -19
  186. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +30 -7
  187. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +26 -15
  188. tomwer/gui/reconstruction/nabu/slices.py +10 -4
  189. tomwer/gui/reconstruction/nabu/slurm.py +1 -1
  190. tomwer/gui/reconstruction/nabu/volume.py +13 -7
  191. tomwer/gui/reconstruction/normalization/intensity.py +1 -5
  192. tomwer/gui/reconstruction/saaxis/corrangeselector.py +10 -37
  193. tomwer/gui/reconstruction/saaxis/saaxis.py +11 -7
  194. tomwer/gui/reconstruction/saaxis/sliceselector.py +11 -26
  195. tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +13 -8
  196. tomwer/gui/reconstruction/scores/scoreplot.py +67 -62
  197. tomwer/gui/reconstruction/test/test_axis.py +2 -2
  198. tomwer/gui/reconstruction/test/test_lamino.py +2 -2
  199. tomwer/gui/reconstruction/test/test_nabu.py +14 -1
  200. tomwer/gui/reconstruction/test/test_saaxis.py +8 -17
  201. tomwer/gui/reconstruction/test/test_sadeltabeta.py +7 -13
  202. tomwer/gui/stackplot.py +11 -28
  203. tomwer/gui/test/test_axis_gui.py +4 -4
  204. tomwer/gui/test/test_qfolder_dialog.py +12 -0
  205. tomwer/gui/utils/inputwidget.py +42 -22
  206. tomwer/gui/utils/lineselector/lineselector.py +13 -21
  207. tomwer/gui/utils/scandescription.py +2 -4
  208. tomwer/gui/utils/slider.py +1 -102
  209. tomwer/gui/utils/unitsystem.py +48 -11
  210. tomwer/gui/visualization/dataviewer.py +24 -17
  211. tomwer/gui/visualization/diffviewer/diffviewer.py +2 -11
  212. tomwer/gui/visualization/nxtomometadata.py +21 -0
  213. tomwer/gui/visualization/scanoverview.py +0 -1
  214. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +72 -0
  215. tomwer/gui/visualization/test/test_stacks.py +1 -1
  216. tomwer/gui/visualization/tomoobjoverview.py +49 -0
  217. tomwer/gui/visualization/volumeoverview.py +64 -0
  218. tomwer/gui/visualization/volumeviewer.py +1 -1
  219. tomwer/io/utils/utils.py +2 -2
  220. tomwer/resources/gui/icons/multi-document-save.png +0 -0
  221. tomwer/resources/gui/icons/multi-document-save.svg +101 -0
  222. tomwer/resources/gui/illustrations/ctf_z1.png +0 -0
  223. tomwer/resources/gui/illustrations/ctf_z1.svg +471 -0
  224. tomwer/synctools/axis.py +0 -1
  225. tomwer/synctools/darkref.py +0 -1
  226. tomwer/synctools/datalistener.py +5 -1
  227. tomwer/synctools/imageloaderthread.py +2 -2
  228. tomwer/synctools/saaxis.py +0 -1
  229. tomwer/synctools/sadeltabeta.py +0 -1
  230. tomwer/synctools/stacks/edit/imagekeyeditor.py +1 -1
  231. tomwer/synctools/stacks/processingstack.py +2 -2
  232. tomwer/synctools/stacks/reconstruction/castvolume.py +1 -0
  233. tomwer/synctools/stacks/reconstruction/dkrefcopy.py +1 -1
  234. tomwer/synctools/stacks/reconstruction/lamino.py +1 -3
  235. tomwer/synctools/stacks/reconstruction/sadeltabeta.py +0 -2
  236. tomwer/synctools/test/test_darkRefs.py +32 -149
  237. tomwer/synctools/test/test_foldertransfer.py +1 -1
  238. tomwer/synctools/test/test_scanstages.py +2 -2
  239. tomwer/tests/conftest.py +51 -0
  240. tomwer/{test → tests}/test_scripts.py +1 -1
  241. tomwer/tests/test_utils.py +10 -0
  242. tomwer/{test → tests}/utils/utilstest.py +0 -11
  243. tomwer/version.py +3 -3
  244. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/METADATA +14 -16
  245. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/RECORD +255 -235
  246. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/WHEEL +1 -1
  247. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/entry_points.txt +6 -0
  248. orangecontrib/tomwer/setup.py +0 -45
  249. orangecontrib/tomwer/widgets/setup.py +0 -49
  250. tomwer/app/process.py +0 -153
  251. tomwer/core/process/reconstruction/nabu/slurm.py +0 -36
  252. tomwer/core/process/reconstruction/utils/nabu_slice_exec.py +0 -10
  253. tomwer/core/utils/laminoutils.py +0 -80
  254. tomwer/gui/utils/lineselector/lineselection.py +0 -76
  255. tomwer/setup.py +0 -52
  256. tomwer/slurm/executor.py +0 -36
  257. tomwer/slurm/job.py +0 -349
  258. tomwer/slurm/utils.py +0 -44
  259. tomwer/web/client.py +0 -43
  260. tomwer/web/config.py +0 -36
  261. tomwer/web/test/test_graylog_connection.py +0 -59
  262. {tomwer/slurm → orangecontrib/tomwer/tutorials}/__init__.py +0 -0
  263. /tomwer/{test → gui/control/serie}/__init__.py +0 -0
  264. /tomwer/{web/test → tests}/__init__.py +0 -0
  265. /tomwer/{test → tests}/utils/__init__.py +0 -0
  266. /tomwer-1.0.3-py3.8-nspkg.pth → /tomwer-1.1.0-py3.9-nspkg.pth +0 -0
  267. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/LICENSE +0 -0
  268. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/namespace_packages.txt +0 -0
  269. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/top_level.txt +0 -0
@@ -13,13 +13,13 @@ from silx.gui import qt
13
13
  from orangewidget import widget, gui
14
14
  from orangewidget.utils import itemmodels
15
15
  from orangewidget.settings import Setting, SettingsHandler
16
- from orangewidget.utils.widgetpreview import WidgetPreview
17
16
  from orangewidget.widget import OWBaseWidget, Input, Output
18
17
  import tomwer.core.process.script.python
19
18
  from tomwer.core.cluster.cluster import SlurmClusterConfiguration
20
19
  from tomwer.core.futureobject import FutureTomwerObject
21
20
  from tomwer.core.scan.scanbase import TomwerScanBase
22
21
  from tomwer.core.volume.volumebase import TomwerVolumeBase
22
+ from tomoscan.serie import Serie
23
23
 
24
24
  __all__ = ["OWPythonScript"]
25
25
 
@@ -33,7 +33,6 @@ def text_format(foreground=qt.Qt.black, weight=qt.QFont.Normal):
33
33
 
34
34
  class PythonSyntaxHighlighter(qt.QSyntaxHighlighter):
35
35
  def __init__(self, parent=None):
36
-
37
36
  self.keywordFormat = text_format(qt.Qt.blue, qt.QFont.Bold)
38
37
  self.stringFormat = text_format(qt.Qt.darkGreen)
39
38
  self.defFormat = text_format(qt.Qt.black, qt.QFont.Bold)
@@ -414,6 +413,13 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
414
413
  default=True,
415
414
  multiple=True,
416
415
  )
416
+ serie = Input(
417
+ "serie",
418
+ Serie,
419
+ replaces=["in_serie"],
420
+ default=True,
421
+ multiple=True,
422
+ )
417
423
 
418
424
  class Outputs:
419
425
  data = Output("data", TomwerScanBase, replaces=["out_data"])
@@ -426,6 +432,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
426
432
  cluster_config = Output(
427
433
  "cluster_config", SlurmClusterConfiguration, replaces=["out_cluster_config"]
428
434
  )
435
+ serie = Output("serie", dict, replaces=["out_serie"])
429
436
 
430
437
  signal_names = (
431
438
  "data",
@@ -434,6 +441,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
434
441
  "object",
435
442
  "configuration",
436
443
  "cluster_config",
444
+ "serie",
437
445
  )
438
446
 
439
447
  settingsHandler = PrepareSavingSettingsHandler()
@@ -454,7 +462,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
454
462
  for name in self.signal_names:
455
463
  setattr(self, name, {})
456
464
 
457
- for s in self.libraryListSource:
465
+ for s in self.libraryListSource: # pylint: disable=E1133
458
466
  s.flags = 0
459
467
 
460
468
  self._cachedDocuments = {}
@@ -620,13 +628,17 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
620
628
  self.handle_input(data, id, "configuration")
621
629
 
622
630
  @Inputs.future_tomo_obj # noqa F811
623
- def set_object(self, data, id): # noqa F811
631
+ def set_future_tomo_object(self, data, id): # noqa F811 pylint: disable=E0102
624
632
  self.handle_input(data, id, "future_tomo_obj")
625
633
 
626
634
  @Inputs.cluster_config # noqa F811
627
- def set_object(self, data, id): # noqa F811
635
+ def set_cluster_config(self, data, id): # noqa F811 pylint: disable=E0102
628
636
  self.handle_input(data, id, "cluster_config")
629
637
 
638
+ @Inputs.serie # noqa F811
639
+ def set_serie(self, data, id):
640
+ self.handle_input(data, id, "serie")
641
+
630
642
  def handleNewSignals(self):
631
643
  self.commit()
632
644
 
@@ -644,7 +656,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
644
656
  self.libraryList.append(Script("New script", self.text.toPlainText(), 0))
645
657
  self.setSelectedScript(len(self.libraryList) - 1)
646
658
 
647
- def onAddScriptFromFile(self, *args):
659
+ def onAddScriptFromFile(self, *args): # pragma: no cover
648
660
  filename, _ = qt.QFileDialog.getOpenFileName(
649
661
  self,
650
662
  "Open Python Script",
@@ -717,7 +729,7 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
717
729
  self.text.document().setPlainText(self.libraryList[index].script)
718
730
  self.text.document().setModified(False)
719
731
 
720
- def saveScript(self):
732
+ def saveScript(self): # pragma: no cover
721
733
  index = self.selectedScriptIndex()
722
734
  if index is not None:
723
735
  script = self.libraryList[index]
@@ -773,7 +785,3 @@ class OWPythonScript(widget.OWBaseWidget, openclass=True):
773
785
  getattr(self.Error, signal)()
774
786
  out_var = None
775
787
  getattr(self.Outputs, signal).send(out_var)
776
-
777
-
778
- if __name__ == "__main__": # pragma: no cover
779
- WidgetPreview(OWPythonScript).run()
@@ -93,11 +93,7 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
93
93
  sigScanReady = qt.Signal(TomwerScanBase)
94
94
  """Signal emitted when a scan is ready"""
95
95
 
96
- _rpSetting = Setting(dict())
97
- "AxisRP store as dict"
98
- # this one is keep for backward compatibility. Will be removed on 0.10 I guess
99
-
100
- static_input = Setting({"data": None, "axis_params": None})
96
+ _ewoks_default_inputs = Setting({"data": None, "axis_params": None, "gui": None})
101
97
 
102
98
  class Inputs:
103
99
  data = Input(name="data", type=TomwerScanBase, doc="one scan to be process")
@@ -126,17 +122,18 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
126
122
  self._axis_params = axis_params or QAxisRP()
127
123
 
128
124
  # handle settings
129
- axis_params_settings = self.static_input.get("axis_params", None)
130
- if axis_params_settings is None:
131
- axis_params_settings = self._rpSetting.copy()
132
- if axis_params_settings != dict():
125
+ # axis params settings
126
+ axis_params_settings = self._ewoks_default_inputs.get("axis_params", None)
127
+ if axis_params_settings not in (None, dict()):
133
128
  try:
134
129
  self._axis_params.load_from_dict(axis_params_settings)
135
130
  except Exception as e:
136
- logger.error("fail to load reconstruction settings:", str(e))
137
- gui_settings = self.static_input.get("gui", None)
131
+ logger.error(f"fail to load reconstruction settings: {str(e)}")
132
+
133
+ # gui settings
134
+ gui_settings = self._ewoks_default_inputs.get("gui", {})
138
135
  if gui_settings is None:
139
- gui_settings = self._rpSetting.get("gui", {})
136
+ gui_settings = {}
140
137
 
141
138
  original_mode = self._axis_params.mode
142
139
  if original_mode is AxisMode.manual:
@@ -236,6 +233,16 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
236
233
  relative_cor=original_cor, abs_cor=None
237
234
  )
238
235
 
236
+ def __new__(cls, *args, **kwargs):
237
+ # ensure backward compatibility with 'static_input'
238
+ static_input = kwargs.get("stored_settings", {}).get("static_input", None)
239
+ if static_input not in (None, {}):
240
+ logger.warning(
241
+ "static_input has been deprecated. Will be replaced by _ewoks_default_inputs in the workflow file. Please save the workflow to apply modifications"
242
+ )
243
+ kwargs["stored_settings"]["_ewoks_default_inputs"] = static_input
244
+ return super().__new__(cls, *args, **kwargs)
245
+
239
246
  def _processingStart(self, *args, **kwargs):
240
247
  WidgetLongProcessing._startProcessing(self)
241
248
 
@@ -362,8 +369,7 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
362
369
 
363
370
  def _updateSettingsVals(self):
364
371
  # remove rp setting to the advantage of 'static_input'
365
- self._rpSetting = {}
366
- self.static_input = {
372
+ self._ewoks_default_inputs = {
367
373
  "data": None,
368
374
  "axis_params": self._axis_params.to_dict(),
369
375
  "gui": {
@@ -31,7 +31,6 @@ from typing import Optional
31
31
 
32
32
  from processview.core.manager.manager import DatasetState, ProcessManager
33
33
  from tomwer.core import settings
34
- from orangecontrib.tomwer.widgets import utils
35
34
  from tomwer.core.cluster.cluster import SlurmClusterConfiguration
36
35
  from tomwer.core.futureobject import FutureTomwerObject
37
36
  from ...orange.managedprocess import SuperviseOW
@@ -45,6 +44,7 @@ from tomwer.synctools.stacks.reconstruction.castvolume import CastVolumeProcessS
45
44
  import tomwer.core.process.reconstruction.nabu.castvolume
46
45
  from tomwer.gui.reconstruction.nabu.castvolume import CastVolumeWidget
47
46
  from tomwer.core.volume.volumebase import TomwerVolumeBase
47
+ from tomwer.core.utils import isLowOnMemory
48
48
  import logging
49
49
 
50
50
  _logger = logging.getLogger(__name__)
@@ -88,10 +88,7 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
88
88
  compress_signal = False
89
89
  allows_cycle = True
90
90
 
91
- _rpSetting = Setting(dict())
92
- # kept for compatibility
93
-
94
- static_input = Setting({"data": None, "cast_volume_params": {}})
91
+ _ewoks_default_inputs = Setting({"data": None, "cast_volume_params": {}})
95
92
 
96
93
  sigScanReady = qt.Signal(TomwerScanBase)
97
94
  "Signal emitted when a scan is ended"
@@ -123,7 +120,10 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
123
120
 
124
121
  class Outputs:
125
122
  data = Output(name="data", type=TomwerScanBase, doc="one scan to be process")
126
- volume = Output(name="volume", type=TomwerVolumeBase, doc="cast volumes")
123
+ volume = Output(name="volume", type=TomwerVolumeBase, doc="raw volume")
124
+ cast_volume = Output(
125
+ name="cast volume", type=TomwerVolumeBase, doc="cast volume"
126
+ )
127
127
  future_tomo_obj = Output(
128
128
  name="future_tomo_obj",
129
129
  type=FutureTomwerObject,
@@ -144,14 +144,24 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
144
144
 
145
145
  self._layout.addWidget(self._window)
146
146
 
147
- self.setConfiguration(self.static_input.get("cast_volume_params", {}))
147
+ cast_volume_params = self._ewoks_default_inputs.get("cast_volume_params", {})
148
+ self.setConfiguration(cast_volume_params)
148
149
 
149
150
  # connect signal / slot
150
151
  self._window.sigConfigChanged.connect(self._updateConfig)
151
- # connect signal / slot
152
152
  self._processingStack.sigComputationStarted.connect(self._startProcessing)
153
153
  self._processingStack.sigComputationEnded.connect(self._endProcessing)
154
154
 
155
+ def __new__(cls, *args, **kwargs):
156
+ # ensure backward compatibility with 'static_input'
157
+ static_input = kwargs.get("stored_settings", {}).get("static_input", None)
158
+ if static_input not in (None, {}):
159
+ _logger.warning(
160
+ "static_input has been deprecated. Will be replaced by _ewoks_default_inputs in the workflow file. Please save the workflow to apply modifications"
161
+ )
162
+ kwargs["stored_settings"]["_ewoks_default_inputs"] = static_input
163
+ return super().__new__(cls, *args, **kwargs)
164
+
155
165
  @Inputs.data
156
166
  def process_data(self, scan: Optional[TomwerScanBase]):
157
167
  if scan is None:
@@ -162,7 +172,7 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
162
172
  )
163
173
  if (
164
174
  settings.isOnLbsram(scan)
165
- and utils.isLowOnMemory(settings.get_lbsram_path()) is True
175
+ and isLowOnMemory(settings.get_lbsram_path()) is True
166
176
  ):
167
177
  ProcessManager().notify_dataset_state(
168
178
  dataset=scan,
@@ -203,7 +213,7 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
203
213
  self._window.setConfiguration(configuration)
204
214
 
205
215
  def _updateConfig(self):
206
- self.static_input = {
216
+ self._ewoks_default_inputs = {
207
217
  "data": None,
208
218
  "cast_volume_params": self.getConfiguration(),
209
219
  }
@@ -217,3 +227,7 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
217
227
  self.Outputs.data.send(obj)
218
228
  elif isinstance(obj, TomwerVolumeBase):
219
229
  self.Outputs.volume.send(obj)
230
+ # for now we store a cast_volume to the object but this is not very well design.
231
+ # I guess this will be removed once we move to ewoks or we need to redesign the stack approach
232
+ if obj.cast_volume is not None:
233
+ self.Outputs.cast_volume.send(obj.cast_volume)
@@ -38,7 +38,6 @@ from orangewidget.widget import Input, Output
38
38
  from tomwer.core.scan.scanbase import TomwerScanBase
39
39
  from tomwer.gui.reconstruction.darkref.darkrefcopywidget import DarkRefAndCopyWidget
40
40
  from tomwer.synctools.darkref import QDKRFRP
41
- from tomwer.web.client import OWClient
42
41
  from tomwer.synctools.stacks.reconstruction.dkrefcopy import DarkRefCopyProcessStack
43
42
  from processview.core.manager import DatasetState
44
43
  from processview.core.manager import ProcessManager
@@ -50,7 +49,7 @@ import copy
50
49
  _logger = logging.getLogger(__name__)
51
50
 
52
51
 
53
- class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
52
+ class DarkRefAndCopyOW(SuperviseOW, WidgetLongProcessing):
54
53
  """
55
54
  A simple widget managing the copy of an incoming folder to an other one
56
55
 
@@ -58,9 +57,11 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
58
57
  """
59
58
 
60
59
  # note of this widget should be the one registered on the documentation
61
- name = "dark and flat field construction"
60
+ name = "reduced darks and flats"
62
61
  id = "orange.widgets.tomwer.darkrefs"
63
- description = "This widget will generate dark refs for a received scan "
62
+ description = (
63
+ "This widget will generate reduced darks and flats for a received scan "
64
+ )
64
65
  icon = "icons/darkref.svg"
65
66
  priority = 15
66
67
  keywords = ["tomography", "dark", "darks", "ref", "refs", "flat", "flats"]
@@ -69,11 +70,7 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
69
70
  resizing_enabled = True
70
71
  compress_signal = False
71
72
 
72
- _rpSetting = Setting(dict())
73
- """Setting to load and save DarkRefAndCopyWidget settings"""
74
- # this one is keep for backward compatibility. Will be removed on 0.10 I guess
75
-
76
- static_input = Setting({"data": None, "dark_ref_params": None})
73
+ _ewoks_default_inputs = Setting({"data": None, "dark_ref_params": None})
77
74
 
78
75
  sigScanReady = qt.Signal(TomwerScanBase)
79
76
  """Signal emitted when a scan is ready"""
@@ -112,15 +109,12 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
112
109
  :param QKRFRP reconsparams: reconstruction parameters
113
110
  """
114
111
  SuperviseOW.__init__(self, parent)
115
- OWClient.__init__(self)
116
112
  WidgetLongProcessing.__init__(self)
117
113
  recons_params = reconsparams or QDKRFRP()
118
114
  self._processing_stack = DarkRefCopyProcessStack(process_id=self.process_id)
119
115
 
120
- dark_ref_params = self.static_input.get("dark_ref_params", None)
121
- if dark_ref_params is None:
122
- dark_ref_params = self._rpSetting
123
- if dark_ref_params != dict():
116
+ dark_ref_params = self._ewoks_default_inputs.get("dark_ref_params", None)
117
+ if dark_ref_params not in ({}, None):
124
118
  try:
125
119
  recons_params.dkrf.load_from_dict(dark_ref_params)
126
120
  except Exception:
@@ -153,7 +147,7 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
153
147
  self._processing_stack.sigRefSetted.connect(self.widget.setRefSetBy)
154
148
 
155
149
  # load some other copy parameters
156
- if dark_ref_params != dict():
150
+ if dark_ref_params not in ({}, None):
157
151
  try:
158
152
  if "activate" in dark_ref_params:
159
153
  self.widget.setCopyActive(dark_ref_params.pop("activate"))
@@ -168,6 +162,16 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
168
162
 
169
163
  self.setCaption(self.windowTitle())
170
164
 
165
+ def __new__(cls, *args, **kwargs):
166
+ # ensure backward compatibility with 'static_input'
167
+ static_input = kwargs.get("stored_settings", {}).get("static_input", None)
168
+ if static_input not in (None, {}):
169
+ _logger.warning(
170
+ "static_input has been deprecated. Will be replaced by _ewoks_default_inputs in the workflow file. Please save the workflow to apply modifications"
171
+ )
172
+ kwargs["stored_settings"]["_ewoks_default_inputs"] = static_input
173
+ return super().__new__(cls, *args, **kwargs)
174
+
171
175
  @Inputs.data
172
176
  def process(self, scanID):
173
177
  if scanID is None:
@@ -204,15 +208,16 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
204
208
  self.sigScanReady.emit(scanID)
205
209
 
206
210
  def _updateSettingsVals(self):
207
- self._rpSetting = self.widget.recons_params.to_dict()
208
- self._rpSetting["auto"] = self.widget.isOnModeAuto()
209
- self._rpSetting["activate"] = self.widget.isCopyActive()
210
- self.static_input = {
211
+ self._ewoks_default_inputs = {
211
212
  "data": None,
212
213
  "dark_ref_params": self.widget.recons_params.to_dict(),
213
214
  }
214
- self.static_input["dark_ref_params"]["auto"] = self.widget.isOnModeAuto()
215
- self.static_input["dark_ref_params"]["activate"] = self.widget.isCopyActive()
215
+ self._ewoks_default_inputs["dark_ref_params"][
216
+ "auto"
217
+ ] = self.widget.isOnModeAuto()
218
+ self._ewoks_default_inputs["dark_ref_params"][
219
+ "activate"
220
+ ] = self.widget.isCopyActive()
216
221
 
217
222
  @property
218
223
  def recons_params(self):
@@ -30,7 +30,7 @@ __date__ = "14/02/2020"
30
30
 
31
31
  import logging
32
32
  from typing import Optional
33
-
33
+ from tomwer.core.volume.volumefactory import VolumeFactory
34
34
  import tomwer.core.process.reconstruction.nabu.nabuslices
35
35
  from contextlib import AbstractContextManager
36
36
  from silx.gui import qt
@@ -71,11 +71,7 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
71
71
  compress_signal = False
72
72
  allows_cycle = True
73
73
 
74
- # TODO: replace Nabu by default nabu recons by the new orange contrib
75
- static_input = Setting({"data": None, "nabu_params": None})
76
-
77
- _rpSetting = Setting(dict())
78
- # this one is keep for backward compatibility. Will be removed on 0.10 I guess
74
+ _ewoks_default_inputs = Setting({"data": None, "nabu_params": None})
79
75
 
80
76
  ewokstaskclass = tomwer.core.process.reconstruction.nabu.nabuslices.NabuSlices
81
77
 
@@ -111,6 +107,8 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
111
107
  doc="data with some remote processing",
112
108
  )
113
109
 
110
+ slice_urls = Output(name="slice urls", type=tuple, doc="tuple of urls created")
111
+
114
112
  class DialogCM(AbstractContextManager):
115
113
  """Simple context manager to hide / show button dialogs"""
116
114
 
@@ -157,10 +155,8 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
157
155
  self._buttons.hide()
158
156
 
159
157
  # load settings
160
- nabu_params = self.static_input.get("nabu_params", None)
161
- if nabu_params is None:
162
- nabu_params = self._rpSetting
163
- if nabu_params != dict():
158
+ nabu_params = self._ewoks_default_inputs.get("nabu_params", None)
159
+ if nabu_params not in (dict(), None):
164
160
  try:
165
161
  self._nabuWidget.setConfiguration(nabu_params)
166
162
  except Exception:
@@ -176,6 +172,16 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
176
172
  self._buttons.button(qt.QDialogButtonBox.Ok).clicked.connect(self.accept)
177
173
  self._nabuWidget.sigConfigChanged.connect(self._updateSettingsVals)
178
174
 
175
+ def __new__(cls, *args, **kwargs):
176
+ # ensure backward compatibility with 'static_input'
177
+ static_input = kwargs.get("stored_settings", {}).get("static_input", None)
178
+ if static_input not in (None, {}):
179
+ _logger.warning(
180
+ "static_input has been deprecated. Will be replaced by _ewoks_default_inputs in the workflow file. Please save the workflow to apply modifications"
181
+ )
182
+ kwargs["stored_settings"]["_ewoks_default_inputs"] = static_input
183
+ return super().__new__(cls, *args, **kwargs)
184
+
179
185
  @Inputs.data
180
186
  def process(self, scan: TomwerScanBase):
181
187
  assert isinstance(scan, (TomwerScanBase, type(None)))
@@ -231,9 +237,21 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
231
237
  def _endProcessing(self, scan, future_tomo_obj):
232
238
  WidgetLongProcessing._endProcessing(self, scan)
233
239
  if scan is not None:
240
+ # send scan
234
241
  self.Outputs.data.send(scan)
242
+ # send slice urls
243
+ slice_urls = []
244
+ for rec_identifier in scan.latest_reconstructions:
245
+ slice_urls.extend(
246
+ VolumeFactory.from_identifier_to_vol_urls(rec_identifier)
247
+ )
248
+ if len(slice_urls) > 0:
249
+ slice_urls = tuple(slice_urls)
250
+ self.Outputs.slice_urls.send(slice_urls)
251
+
235
252
  self.sigScanReady.emit(scan)
236
253
  if future_tomo_obj is not None:
254
+ # send future scan
237
255
  self.Outputs.future_out.send(future_tomo_obj)
238
256
 
239
257
  def setDryRun(self, dry_run):
@@ -249,11 +267,10 @@ class NabuOW(WidgetLongProcessing, SuperviseOW):
249
267
  self.__exec_for_ci = True
250
268
 
251
269
  def _updateSettingsVals(self):
252
- self.static_input = {
270
+ self._ewoks_default_inputs = {
253
271
  "data": None,
254
272
  "nabu_params": self.getConfiguration(),
255
273
  }
256
- self._rpSetting = self.getConfiguration()
257
274
 
258
275
  def getConfiguration(self):
259
276
  config = self._nabuWidget.getConfiguration()
@@ -32,12 +32,13 @@ import logging
32
32
  from contextlib import AbstractContextManager
33
33
  from silx.gui import qt
34
34
  from tomwer.synctools.stacks.reconstruction.nabu import NabuVolumeProcessStack
35
- from tomwer.core.process.reconstruction.nabu.nabuvolume import NabuVolume, VolumeRunner
35
+ from tomwer.core.process.reconstruction.nabu.nabuvolume import NabuVolume
36
36
  from tomwer.gui.reconstruction.nabu.volume import NabuVolumeWindow
37
37
  from tomwer.core.scan.scanbase import TomwerScanBase
38
38
  from tomwer.core.cluster import SlurmClusterConfiguration
39
39
  from tomwer.core.futureobject import FutureTomwerObject
40
40
  from orangecontrib.tomwer.widgets.utils import WidgetLongProcessing
41
+ from tomwer.core.volume.volumefactory import VolumeFactory
41
42
  from orangewidget.settings import Setting
42
43
  from orangewidget import gui
43
44
  from orangewidget.widget import Input, Output
@@ -49,6 +50,8 @@ from tomwer.utils import docstring
49
50
  from tomwer.core import settings
50
51
  import tomwer.core.process.reconstruction.nabu.nabuvolume
51
52
  from tomwer.core.volume.volumebase import TomwerVolumeBase
53
+ from tomwer.core.utils.scanutils import format_output_location
54
+ from tomoscan.identifier import VolumeIdentifier
52
55
  import functools
53
56
  import copy
54
57
 
@@ -79,10 +82,7 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
79
82
  compress_signal = False
80
83
  allows_cycle = True
81
84
 
82
- _rpSetting = Setting(dict())
83
- # kept for compatibility
84
-
85
- static_input = Setting(
85
+ _ewoks_default_inputs = Setting(
86
86
  {"data": None, "nabu_volume_params": None, "nabu_params": None}
87
87
  )
88
88
 
@@ -119,6 +119,9 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
119
119
  type=TomwerVolumeBase,
120
120
  doc="volume(s) created",
121
121
  )
122
+ volume_urls = Output(
123
+ name="volume urls", type=tuple, doc="url of the volume(s) reconstructed"
124
+ )
122
125
 
123
126
  class DialogCM(AbstractContextManager):
124
127
  """Simple context manager to hida / show button dialogs"""
@@ -132,7 +135,7 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
132
135
  def __exit__(self, exc_type, exc_val, exc_tb):
133
136
  self._dialogButtonsBox.hide()
134
137
 
135
- def __init__(self, parent=None):
138
+ def __init__(self, parent=None, *args, **kwargs):
136
139
  """
137
140
  Widget which read the .hdf5 generated by octave and modify it.
138
141
  Then run a subprocess to call octave and run ftseries
@@ -164,10 +167,9 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
164
167
  self._buttons.hide()
165
168
 
166
169
  # load settings
167
- nabu_volume_params = self.static_input.get("nabu_volume_params", None)
168
- if nabu_volume_params is None:
169
- nabu_volume_params = self._rpSetting
170
- if nabu_volume_params != dict():
170
+ nabu_volume_params = self._ewoks_default_inputs.get("nabu_volume_params", None)
171
+
172
+ if nabu_volume_params not in (dict(), None):
171
173
  try:
172
174
  self._nabuWidget.setConfiguration(nabu_volume_params)
173
175
  except Exception:
@@ -179,6 +181,16 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
179
181
  self._buttons.button(qt.QDialogButtonBox.Ok).clicked.connect(self.accept)
180
182
  self._nabuWidget.sigConfigChanged.connect(self._updateSettingsVals)
181
183
 
184
+ def __new__(cls, *args, **kwargs):
185
+ # ensure backward compatibility with 'static_input'
186
+ static_input = kwargs.get("stored_settings", {}).get("static_input", None)
187
+ if static_input not in (None, {}):
188
+ _logger.warning(
189
+ "static_input has been deprecated. Will be replaced by _ewoks_default_inputs in the workflow file. Please save the workflow to apply modifications"
190
+ )
191
+ kwargs["stored_settings"]["_ewoks_default_inputs"] = static_input
192
+ return super().__new__(cls, *args, **kwargs)
193
+
182
194
  @Inputs.data
183
195
  def process(self, scan: TomwerScanBase):
184
196
  assert isinstance(scan, (TomwerScanBase, type(None)))
@@ -207,7 +219,7 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
207
219
  ] = self._nabuWidget._mainWidget.getNabuFileFormat()
208
220
  # update output location if requested
209
221
  if self._nabuWidget._mainWidget.redefineOutputLocation():
210
- config.get("output")["location"] = VolumeRunner.format_output_location(
222
+ config.get("output")["location"] = format_output_location(
211
223
  location=self._nabuWidget._mainWidget.getNabuOutputLocation(),
212
224
  scan=scan,
213
225
  )
@@ -272,7 +284,7 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
272
284
  db = dialog.getSelectedValue()
273
285
  if db is not None:
274
286
  try:
275
- scan.nabu_recons_params["phase"]["delta_beta"] = db
287
+ scan.nabu_recons_params["phase"]["delta_beta"] = (db,)
276
288
  except Exception as e:
277
289
  logging.error(e)
278
290
  else:
@@ -281,10 +293,27 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
281
293
  def _endProcessing(self, scan, future_tomo_obj):
282
294
  WidgetLongProcessing._endProcessing(self, scan)
283
295
  if scan is not None:
296
+ # send scan
284
297
  self.Outputs.data.send(scan)
285
298
  self.sigScanReady.emit(scan)
286
- for vol in scan.latest_vol_reconstructions:
287
- self.Outputs.volume.send(vol)
299
+ # send volume urls
300
+ volume_urls = []
301
+ for volume_id in scan.latest_vol_reconstructions:
302
+ assert isinstance(volume_id, VolumeIdentifier)
303
+ volume_urls.extend(VolumeFactory.from_identifier_to_vol_urls(volume_id))
304
+ if len(volume_urls) > 0:
305
+ self.Outputs.volume_urls.send(tuple(volume_urls))
306
+ # send volume identifier(s) # only one expected
307
+ n_rec_volumes = len(scan.latest_vol_reconstructions)
308
+ if n_rec_volumes > 0:
309
+ if n_rec_volumes > 1:
310
+ _logger.warning(
311
+ f"{n_rec_volumes} volume reconstructed when at most one expected"
312
+ )
313
+ volume = VolumeFactory.create_tomo_object_from_identifier(
314
+ scan.latest_vol_reconstructions[0]
315
+ )
316
+ self.Outputs.volume.send(volume)
288
317
  if future_tomo_obj is not None:
289
318
  self.Outputs.future_out.send(future_tomo_obj)
290
319
 
@@ -297,9 +326,7 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
297
326
  self.show()
298
327
 
299
328
  def _updateSettingsVals(self):
300
- self._rpSetting = self.getConfiguration()
301
- # kept for compatibility
302
- self.static_input = {
329
+ self._ewoks_default_inputs = {
303
330
  "data": None,
304
331
  "nabu_volume_params": self.getConfiguration(),
305
332
  "nabu_params": None,