tomwer 1.4.19__py3-none-any.whl → 1.5.0rc3__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 (124) hide show
  1. orangecontrib/tomwer/tutorials/simple_volume_local_reconstruction.ows +11 -8
  2. orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +12 -9
  3. orangecontrib/tomwer/widgets/control/DataDiscoveryOW.py +1 -1
  4. orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +21 -10
  5. tomwer/app/axis.py +1 -1
  6. tomwer/app/reducedarkflat.py +2 -2
  7. tomwer/core/process/control/datalistener/rpcserver.py +2 -8
  8. tomwer/core/process/drac/binning.py +2 -2
  9. tomwer/core/process/drac/output.py +1 -1
  10. tomwer/core/process/edit/imagekeyeditor.py +4 -6
  11. tomwer/core/process/edit/nxtomoeditor.py +58 -20
  12. tomwer/core/process/output.py +6 -5
  13. tomwer/core/process/reconstruction/axis/anglemode.py +2 -2
  14. tomwer/core/process/reconstruction/axis/axis.py +1 -0
  15. tomwer/core/process/reconstruction/axis/mode.py +2 -2
  16. tomwer/core/process/reconstruction/axis/params.py +4 -4
  17. tomwer/core/process/reconstruction/axis/projectiontype.py +1 -1
  18. tomwer/core/process/reconstruction/axis/side.py +1 -1
  19. tomwer/core/process/reconstruction/darkref/darkrefs.py +2 -2
  20. tomwer/core/process/reconstruction/darkref/darkrefscopy.py +1 -1
  21. tomwer/core/process/reconstruction/darkref/params.py +2 -3
  22. tomwer/core/process/reconstruction/nabu/castvolume.py +4 -1
  23. tomwer/core/process/reconstruction/nabu/helical.py +3 -1
  24. tomwer/core/process/reconstruction/nabu/nabucommon.py +2 -2
  25. tomwer/core/process/reconstruction/nabu/nabuscores.py +1 -1
  26. tomwer/core/process/reconstruction/nabu/nabuslices.py +4 -4
  27. tomwer/core/process/reconstruction/nabu/plane.py +2 -2
  28. tomwer/core/process/reconstruction/nabu/target.py +1 -1
  29. tomwer/core/process/reconstruction/nabu/test/test_castvolume.py +2 -0
  30. tomwer/core/process/reconstruction/nabu/test/test_nabu_utils.py +9 -0
  31. tomwer/core/process/reconstruction/nabu/utils.py +18 -14
  32. tomwer/core/process/reconstruction/normalization/normalization.py +1 -1
  33. tomwer/core/process/reconstruction/normalization/params.py +4 -4
  34. tomwer/core/process/reconstruction/output.py +2 -2
  35. tomwer/core/process/reconstruction/saaxis/params.py +3 -3
  36. tomwer/core/process/reconstruction/saaxis/saaxis.py +1 -1
  37. tomwer/core/process/reconstruction/scores/params.py +2 -2
  38. tomwer/core/process/reconstruction/scores/scores.py +3 -3
  39. tomwer/core/process/reconstruction/tests/test_axis.py +1 -1
  40. tomwer/core/process/stitching/metadataholder.py +5 -5
  41. tomwer/core/process/stitching/nabustitcher.py +1 -4
  42. tomwer/core/process/tests/test_normalization.py +2 -1
  43. tomwer/core/scan/edfscan.py +3 -3
  44. tomwer/core/scan/nxtomoscan.py +3 -3
  45. tomwer/core/scan/scanbase.py +3 -3
  46. tomwer/core/scan/scantype.py +1 -1
  47. tomwer/core/settings.py +1 -1
  48. tomwer/core/tomwer_object.py +1 -1
  49. tomwer/core/utils/nxtomoutils.py +2 -2
  50. tomwer/core/utils/spec.py +6 -3
  51. tomwer/gui/cluster/slurm.py +3 -3
  52. tomwer/gui/configuration/level.py +1 -1
  53. tomwer/gui/control/actions.py +1 -1
  54. tomwer/gui/control/datadiscovery.py +1 -1
  55. tomwer/gui/control/datalist.py +1 -1
  56. tomwer/gui/control/reducedarkflatselector.py +4 -4
  57. tomwer/gui/control/series/seriescreator.py +5 -5
  58. tomwer/gui/control/tomoobjdisplaymode.py +1 -1
  59. tomwer/gui/dataportal/gallery.py +6 -6
  60. tomwer/gui/edit/imagekeyeditor.py +7 -9
  61. tomwer/gui/edit/nxtomoeditor.py +420 -112
  62. tomwer/gui/edit/tests/test_nx_editor.py +155 -83
  63. tomwer/gui/reconstruction/axis/CalculationWidget.py +1 -1
  64. tomwer/gui/reconstruction/axis/EstimatedCORWidget.py +12 -8
  65. tomwer/gui/reconstruction/axis/EstimatedCorComboBox.py +2 -2
  66. tomwer/gui/reconstruction/axis/InputWidget.py +3 -3
  67. tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -2
  68. tomwer/gui/reconstruction/nabu/castvolume.py +16 -1
  69. tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
  70. tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +6 -6
  71. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +1 -1
  72. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +5 -5
  73. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +2 -4
  74. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +78 -52
  75. tomwer/gui/reconstruction/nabu/nabuflow.py +3 -13
  76. tomwer/gui/reconstruction/nabu/slices.py +11 -11
  77. tomwer/gui/reconstruction/nabu/test/test_cast_volume.py +19 -0
  78. tomwer/gui/reconstruction/nabu/volume.py +1 -1
  79. tomwer/gui/reconstruction/normalization/intensity.py +8 -12
  80. tomwer/gui/reconstruction/saaxis/corrangeselector.py +2 -2
  81. tomwer/gui/reconstruction/saaxis/dimensionwidget.py +71 -67
  82. tomwer/gui/reconstruction/sacommon.py +1 -1
  83. tomwer/gui/reconstruction/scores/scoreplot.py +18 -10
  84. tomwer/gui/reconstruction/tests/test_saaxis.py +18 -16
  85. tomwer/gui/stitching/SingleAxisStitchingWidget.py +8 -8
  86. tomwer/gui/stitching/StitchingOptionsWidget.py +1 -1
  87. tomwer/gui/stitching/alignment.py +8 -8
  88. tomwer/gui/stitching/config/axisparams.py +2 -2
  89. tomwer/gui/stitching/config/output.py +1 -1
  90. tomwer/gui/stitching/config/positionoveraxis.py +1 -1
  91. tomwer/gui/stitching/config/stitchingstrategies.py +4 -6
  92. tomwer/gui/stitching/config/tomoobjdetails.py +21 -13
  93. tomwer/gui/stitching/normalization.py +6 -6
  94. tomwer/gui/stitching/tests/test_ZStitchingWindow.py +8 -1
  95. tomwer/gui/stitching/tests/test_preview.py +10 -7
  96. tomwer/gui/stitching/tests/utils.py +27 -18
  97. tomwer/gui/stitching/z_stitching/fineestimation.py +7 -9
  98. tomwer/gui/stitching/z_stitching/tests/test_raw_estimation.py +18 -7
  99. tomwer/gui/stitching/z_stitching/tests/test_stitching_window.py +7 -2
  100. tomwer/gui/utils/buttons.py +53 -35
  101. tomwer/gui/utils/flow.py +2 -2
  102. tomwer/gui/utils/loadingmode.py +1 -1
  103. tomwer/gui/utils/unitsystem.py +44 -33
  104. tomwer/gui/utils/vignettes.py +1 -1
  105. tomwer/gui/visualization/dataviewer.py +7 -7
  106. tomwer/gui/visualization/diffviewer/diffviewer.py +4 -4
  107. tomwer/gui/visualization/diffviewer/shiftwidget.py +4 -6
  108. tomwer/gui/visualization/reconstructionparameters.py +35 -23
  109. tomwer/gui/visualization/scanoverview.py +28 -11
  110. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +25 -13
  111. tomwer/gui/visualization/test/test_reconstruction_parameters.py +2 -2
  112. tomwer/model/dataset.py +0 -0
  113. tomwer/synctools/utils/scanstages.py +3 -3
  114. tomwer/tasks/reconstruction/cleardarkflat.py +42 -0
  115. tomwer/tests/app/test_stitching.py +1 -1
  116. tomwer/tests/orangecontrib/tomwer/widgets/edit/tests/test_nxtomo_editor.py +32 -20
  117. tomwer/tests/orangecontrib/tomwer/widgets/reconstruction/tests/test_nabu_widget.py +1 -1
  118. tomwer/version.py +4 -4
  119. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/METADATA +8 -8
  120. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/RECORD +124 -122
  121. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/WHEEL +1 -1
  122. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/entry_points.txt +0 -0
  123. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/licenses/LICENSE +0 -0
  124. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc3.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@ from typing import Iterable
6
6
 
7
7
  from silx.gui import qt
8
8
  from silx.gui.utils import blockSignals
9
- from silx.utils.enum import Enum as _Enum
9
+ from enum import Enum as _Enum
10
10
  from tomoscan.series import Series
11
11
 
12
12
  from tomwer.core.scan.scanbase import TomwerScanBase
@@ -144,8 +144,8 @@ class SeriesDefinition(qt.QWidget):
144
144
  self.layout().addWidget(self._modeLabel, 0, 0, 1, 1)
145
145
 
146
146
  self._modeCB = qt.QComboBox(self)
147
- for mode in _SeriesDefinitionMode.values():
148
- self._modeCB.addItem(mode)
147
+ for mode in _SeriesDefinitionMode:
148
+ self._modeCB.addItem(mode.value)
149
149
  self.layout().addWidget(self._modeCB, 0, 1, 1, 1)
150
150
 
151
151
  self._manualDefWidget = SeriesManualFromTomoObj(parent=self)
@@ -169,10 +169,10 @@ class SeriesDefinition(qt.QWidget):
169
169
  raise ValueError(f"mode {self.getMode()} is not handled yet")
170
170
 
171
171
  def getMode(self) -> str:
172
- return _SeriesDefinitionMode.from_value(self._modeCB.currentText())
172
+ return _SeriesDefinitionMode(self._modeCB.currentText())
173
173
 
174
174
  def setMode(self, mode: str):
175
- mode = _SeriesDefinitionMode.from_value(mode)
175
+ mode = _SeriesDefinitionMode(mode)
176
176
  idx = self._modeCB.findText(mode.value)
177
177
  self._modeCB.setCurrentIndex(idx)
178
178
 
@@ -1,4 +1,4 @@
1
- from silx.utils.enum import Enum as _Enum
1
+ from enum import Enum as _Enum
2
2
 
3
3
 
4
4
  class DisplayMode(_Enum):
@@ -29,7 +29,7 @@ class GalleryWidget(qt.QWidget):
29
29
  self.layout().addRow("precision", self._precisionQCB)
30
30
  # binning
31
31
  self._binningQCB = qt.QComboBox(self)
32
- self._binningQCB.addItems(Binning.values())
32
+ self._binningQCB.addItems([item.value for item in Binning])
33
33
  self.layout().addRow("binning", self._binningQCB)
34
34
  self._binningQCB.setCurrentText(Binning.SIXTEEN_BY_SIXTEEN.value)
35
35
  self._binningQCB.setToolTip(
@@ -37,7 +37,7 @@ class GalleryWidget(qt.QWidget):
37
37
  ) # recommended size: 5ko for the entire gallery
38
38
  # output format
39
39
  self._outputFormat = qt.QComboBox(self)
40
- self._outputFormat.addItems(OutputFormat.values())
40
+ self._outputFormat.addItems([item.value for item in OutputFormat])
41
41
  self.layout().addRow("output format", self._outputFormat)
42
42
  # overwrite
43
43
  self._overwriteCB = qt.QCheckBox("overwrite", self)
@@ -49,17 +49,17 @@ class GalleryWidget(qt.QWidget):
49
49
  self._binningQCB.currentIndexChanged.connect(self._configChanged)
50
50
 
51
51
  def getOutputFormat(self) -> OutputFormat:
52
- return OutputFormat.from_value(self._outputFormat.currentText())
52
+ return OutputFormat(self._outputFormat.currentText())
53
53
 
54
54
  def setOutputFormat(self, format: OutputFormat):
55
- format = OutputFormat.from_value(format)
55
+ format = OutputFormat(format)
56
56
  self._outputFormat.setCurrentText(format.value)
57
57
 
58
58
  def getBinning(self) -> Binning:
59
- return Binning.from_value(self._binningQCB.currentText())
59
+ return Binning(self._binningQCB.currentText())
60
60
 
61
61
  def setBinning(self, binning: Binning):
62
- binning = Binning.from_value(binning)
62
+ binning = Binning(binning)
63
63
  self._binningQCB.setCurrentText(binning.value)
64
64
 
65
65
  def overwrite(self) -> bool:
@@ -112,9 +112,7 @@ class ImageKeyWindow(qt.QMainWindow):
112
112
  def setModifications(self, modifications):
113
113
  self._mainWindow.clearModifcations()
114
114
  image_keys_set = set(modifications.values())
115
- image_keys_set = set(
116
- [_ImageKey.from_value(image_key) for image_key in image_keys_set]
117
- )
115
+ image_keys_set = set([_ImageKey(image_key) for image_key in image_keys_set])
118
116
  for image_key_type in image_keys_set:
119
117
  self._mainWindow.applyModifications(
120
118
  modifications=modifications, new_image_key=image_key_type
@@ -432,7 +430,7 @@ class _ImageKeyList(qt.QTableWidget):
432
430
  self.setItem(i_frame, 0, _item)
433
431
 
434
432
  # current image key
435
- current_image_key = _ImageKey.from_value(frame.image_key)
433
+ current_image_key = _ImageKey(frame.image_key)
436
434
  current_image_key = self._IMAGE_KEYS_INV[current_image_key]
437
435
  currentImgKeyItem = qt.QLabel(current_image_key, self)
438
436
  self.setCellWidget(i_frame, 1, currentImgKeyItem)
@@ -442,7 +440,7 @@ class _ImageKeyList(qt.QTableWidget):
442
440
  new_image_key = frames_new_keys[frame.index]
443
441
  else:
444
442
  new_image_key = frame.image_key
445
- new_image_key = _ImageKey.from_value(new_image_key)
443
+ new_image_key = _ImageKey(new_image_key)
446
444
  new_image_key = self._IMAGE_KEYS_INV[new_image_key]
447
445
  newImgKeyItem = _ImageKeyComboBox(parent=self, image_key=new_image_key)
448
446
  self._imageKeyComboboxes[index] = newImgKeyItem
@@ -694,16 +692,16 @@ class ImageKeyUpgraderList(qt.QTableWidget):
694
692
  self.setCellWidget(i_operation, 1, remove_button)
695
693
 
696
694
  def addOperation(self, from_image_key: _ImageKey, to_image_key: _ImageKey):
697
- from_image_key = _ImageKey.from_value(from_image_key)
698
- to_image_key = _ImageKey.from_value(to_image_key)
695
+ from_image_key = _ImageKey(from_image_key)
696
+ to_image_key = _ImageKey(to_image_key)
699
697
 
700
698
  self._operations[from_image_key] = to_image_key
701
699
  self._update()
702
700
  self.sigOperationsChanged.emit()
703
701
 
704
702
  def removeOperation(self, from_image_key: _ImageKey, to_image_key: _ImageKey):
705
- from_image_key = _ImageKey.from_value(from_image_key)
706
- to_image_key = _ImageKey.from_value(to_image_key)
703
+ from_image_key = _ImageKey(from_image_key)
704
+ to_image_key = _ImageKey(to_image_key)
707
705
  if (
708
706
  from_image_key not in self._operations
709
707
  or self._operations[from_image_key] != to_image_key