tomwer 1.4.17__py3-none-any.whl → 1.4.19__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.
@@ -10,6 +10,7 @@ from orangewidget.widget import Output, OWBaseWidget
10
10
 
11
11
  from tomwer.core.cluster import SlurmClusterConfiguration
12
12
  from tomwer.gui.cluster.slurm import SlurmSettingsWindow
13
+ from tomwer.core.settings import SlurmSettingsMode
13
14
 
14
15
  _logger = logging.getLogger(__name__)
15
16
 
@@ -32,6 +33,7 @@ class SlurmClusterOW(OWBaseWidget, openclass=True):
32
33
  resizing_enabled = True
33
34
 
34
35
  _ewoks_default_inputs = Setting(dict())
36
+ slurm_mode_name = Setting(SlurmSettingsMode.GENERIC.name)
35
37
 
36
38
  class Outputs:
37
39
  config_out = Output(name="cluster_config", type=SlurmClusterConfiguration)
@@ -46,6 +48,14 @@ class SlurmClusterOW(OWBaseWidget, openclass=True):
46
48
  if self._ewoks_default_inputs != {}:
47
49
  self._widget.setConfiguration(self._ewoks_default_inputs)
48
50
 
51
+ try:
52
+ mode = SlurmSettingsMode[self.slurm_mode_name]
53
+ self._widget.setMode(mode)
54
+ except Exception:
55
+ _logger.exception(
56
+ f"Could not restore saved SlurmSettingsMode {self.slurm_mode_name!r}"
57
+ )
58
+
49
59
  # trigger the signal to avoid any user request
50
60
  self.Outputs.config_out.send(self.getConfiguration())
51
61
 
@@ -66,6 +76,7 @@ class SlurmClusterOW(OWBaseWidget, openclass=True):
66
76
  slurmClusterconfiguration = self.getConfiguration()
67
77
  self.Outputs.config_out.send(slurmClusterconfiguration)
68
78
  self._ewoks_default_inputs = slurmClusterconfiguration.to_dict()
79
+ self.slurm_mode_name = self._widget.mode().name
69
80
 
70
81
  def getConfiguration(self):
71
82
  return self._widget.getSlurmClusterConfiguration()
tomwer/app/nabuapp.py CHANGED
@@ -95,7 +95,9 @@ class NabuWindow(NabuDialog):
95
95
 
96
96
  # add center of rotation widget
97
97
  self._corWidget = _CORWidget(parent=self)
98
- rw = self._widget._mainWidget._configuration._reconstructionWidget
98
+ rw = (
99
+ self._widget._mainWidget._nabuSettingsWidget._configuration._reconstructionWidget
100
+ )
99
101
  rw.layout().addWidget(self._corWidget, 99, 0, 1, 2)
100
102
 
101
103
  self._dataViewer = None
@@ -427,7 +427,7 @@ class NXtomoScan(_tsNXtomoScan, TomwerScanBase):
427
427
  )
428
428
  return {
429
429
  "hdf5_entry": self.entry,
430
- "location": os.path.basename(self.master_file),
430
+ "location": filter_esrf_mounting_points(os.path.abspath(self.master_file)),
431
431
  "binning": binning,
432
432
  "binning_z": binning_z,
433
433
  "projections_subsampling": proj_subsampling,
@@ -110,6 +110,7 @@ class SlurmSettingsWindow(qt.QMainWindow):
110
110
  # connect signal / slot
111
111
  self._modeCombox.currentIndexChanged.connect(self._reloadPredefinedSettings)
112
112
  self._settingsWidget.sigConfigChanged.connect(self._configChanged)
113
+ self._modeCombox.currentIndexChanged.connect(self.sigConfigChanged)
113
114
  # when the settings widget is edited them we automatically move to 'manual' settings. To notify visually the user
114
115
  self._settingsWidget.sigConfigChanged.connect(self._switchToManual)
115
116
 
@@ -160,6 +161,14 @@ class SlurmSettingsWindow(qt.QMainWindow):
160
161
  mode = SlurmSettingsMode.from_value(mode)
161
162
  self._modeCombox.setCurrentText(mode.value)
162
163
 
164
+ def setMode(self, mode: SlurmSettingsMode) -> None:
165
+ """Alias for setCurrentSettingsMode(), used by SlurmClusterOW."""
166
+ self.setCurrentSettingsMode(mode)
167
+
168
+ def mode(self) -> SlurmSettingsMode:
169
+ """Alias for getCurrentSettingsMode(), used by SlurmClusterOW."""
170
+ return self.getCurrentSettingsMode()
171
+
163
172
  # expose API
164
173
  def getConfiguration(self) -> dict:
165
174
  return self._settingsWidget.getConfiguration()
tomwer/gui/utils/utils.py CHANGED
@@ -49,7 +49,7 @@ def open_url_with_image_j(url: DataUrl) -> threading.Thread:
49
49
 
50
50
  :param url: url we want to open in imagej
51
51
  """
52
- global __image_j_from
52
+ global __image_j_from # noqa: F824
53
53
  if not has_imagej():
54
54
  raise OSError("ImageJ is not installed")
55
55
  thread = ImageJthread(url=url, image_j_from=__image_j_from)
tomwer/version.py CHANGED
@@ -77,7 +77,7 @@ RELEASE_LEVEL_VALUE = {
77
77
 
78
78
  MAJOR = 1
79
79
  MINOR = 4
80
- MICRO = 17
80
+ MICRO = 19
81
81
  RELEV = "final" # <16
82
82
  SERIAL = 0 # <16
83
83
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tomwer
3
- Version: 1.4.17
3
+ Version: 1.4.19
4
4
  Summary: "tomography workflow tools"
5
5
  Home-page: https://gitlab.esrf.fr/tomotools/tomwer
6
6
  Author: Henri Payno, Pierre Paleo, Pierre-Olivier Autran, Jérôme Lesaint, Alessandro Mirone
@@ -26,7 +26,7 @@ Requires-Dist: setuptools
26
26
  Requires-Dist: psutil
27
27
  Requires-Dist: silx[full]<2.1.1,>=2.0
28
28
  Requires-Dist: tomoscan>=2.1.0a18
29
- Requires-Dist: nxtomo>=1.3.0dev4
29
+ Requires-Dist: nxtomo<2.0,>=1.3.0dev4
30
30
  Requires-Dist: nxtomomill>=1.1.0a0
31
31
  Requires-Dist: processview>=1.5.0
32
32
  Requires-Dist: ewoks>=0.1.1
@@ -48,7 +48,7 @@ Requires-Dist: werkzeug; extra == "full-base"
48
48
  Requires-Dist: json-rpc; extra == "full-base"
49
49
  Requires-Dist: scipy; extra == "full-base"
50
50
  Requires-Dist: Pillow; extra == "full-base"
51
- Requires-Dist: glymur; extra == "full-base"
51
+ Requires-Dist: glymur<0.14; extra == "full-base"
52
52
  Requires-Dist: resource; extra == "full-base"
53
53
  Requires-Dist: tifffile; extra == "full-base"
54
54
  Requires-Dist: hdf5plugin; extra == "full-base"
@@ -68,7 +68,7 @@ Requires-Dist: werkzeug; extra == "full-no-nabu"
68
68
  Requires-Dist: json-rpc; extra == "full-no-nabu"
69
69
  Requires-Dist: scipy; extra == "full-no-nabu"
70
70
  Requires-Dist: Pillow; extra == "full-no-nabu"
71
- Requires-Dist: glymur; extra == "full-no-nabu"
71
+ Requires-Dist: glymur<0.14; extra == "full-no-nabu"
72
72
  Requires-Dist: resource; extra == "full-no-nabu"
73
73
  Requires-Dist: tifffile; extra == "full-no-nabu"
74
74
  Requires-Dist: hdf5plugin; extra == "full-no-nabu"
@@ -88,7 +88,7 @@ Requires-Dist: werkzeug; extra == "full-no-cuda"
88
88
  Requires-Dist: json-rpc; extra == "full-no-cuda"
89
89
  Requires-Dist: scipy; extra == "full-no-cuda"
90
90
  Requires-Dist: Pillow; extra == "full-no-cuda"
91
- Requires-Dist: glymur; extra == "full-no-cuda"
91
+ Requires-Dist: glymur<0.14; extra == "full-no-cuda"
92
92
  Requires-Dist: resource; extra == "full-no-cuda"
93
93
  Requires-Dist: tifffile; extra == "full-no-cuda"
94
94
  Requires-Dist: hdf5plugin; extra == "full-no-cuda"
@@ -109,7 +109,7 @@ Requires-Dist: werkzeug; extra == "full"
109
109
  Requires-Dist: json-rpc; extra == "full"
110
110
  Requires-Dist: scipy; extra == "full"
111
111
  Requires-Dist: Pillow; extra == "full"
112
- Requires-Dist: glymur; extra == "full"
112
+ Requires-Dist: glymur<0.14; extra == "full"
113
113
  Requires-Dist: resource; extra == "full"
114
114
  Requires-Dist: tifffile; extra == "full"
115
115
  Requires-Dist: hdf5plugin; extra == "full"
@@ -132,7 +132,7 @@ Requires-Dist: werkzeug; extra == "doc"
132
132
  Requires-Dist: json-rpc; extra == "doc"
133
133
  Requires-Dist: scipy; extra == "doc"
134
134
  Requires-Dist: Pillow; extra == "doc"
135
- Requires-Dist: glymur; extra == "doc"
135
+ Requires-Dist: glymur<0.14; extra == "doc"
136
136
  Requires-Dist: resource; extra == "doc"
137
137
  Requires-Dist: tifffile; extra == "doc"
138
138
  Requires-Dist: hdf5plugin; extra == "doc"
@@ -166,7 +166,7 @@ Requires-Dist: werkzeug; extra == "dev"
166
166
  Requires-Dist: json-rpc; extra == "dev"
167
167
  Requires-Dist: scipy; extra == "dev"
168
168
  Requires-Dist: Pillow; extra == "dev"
169
- Requires-Dist: glymur; extra == "dev"
169
+ Requires-Dist: glymur<0.14; extra == "dev"
170
170
  Requires-Dist: resource; extra == "dev"
171
171
  Requires-Dist: tifffile; extra == "dev"
172
172
  Requires-Dist: hdf5plugin; extra == "dev"
@@ -193,7 +193,7 @@ Requires-Dist: werkzeug; extra == "dev-no-cuda"
193
193
  Requires-Dist: json-rpc; extra == "dev-no-cuda"
194
194
  Requires-Dist: scipy; extra == "dev-no-cuda"
195
195
  Requires-Dist: Pillow; extra == "dev-no-cuda"
196
- Requires-Dist: glymur; extra == "dev-no-cuda"
196
+ Requires-Dist: glymur<0.14; extra == "dev-no-cuda"
197
197
  Requires-Dist: resource; extra == "dev-no-cuda"
198
198
  Requires-Dist: tifffile; extra == "dev-no-cuda"
199
199
  Requires-Dist: hdf5plugin; extra == "dev-no-cuda"
@@ -218,7 +218,7 @@ Requires-Dist: werkzeug; extra == "test"
218
218
  Requires-Dist: json-rpc; extra == "test"
219
219
  Requires-Dist: scipy; extra == "test"
220
220
  Requires-Dist: Pillow; extra == "test"
221
- Requires-Dist: glymur; extra == "test"
221
+ Requires-Dist: glymur<0.14; extra == "test"
222
222
  Requires-Dist: resource; extra == "test"
223
223
  Requires-Dist: tifffile; extra == "test"
224
224
  Requires-Dist: hdf5plugin; extra == "test"
@@ -27,7 +27,7 @@ orangecontrib/tomwer/tutorials/id16b/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
27
27
  orangecontrib/tomwer/widgets/__init__.py,sha256=dX_TpkBh3mVsrj3EeGglEESsnZAEVq7V0Nb9bnBrb-8,1214
28
28
  orangecontrib/tomwer/widgets/utils.py,sha256=yq1wZfpfY3iVAhwMRBls57q02lhljO89WRKN7MxMMNg,983
29
29
  orangecontrib/tomwer/widgets/cluster/FutureSupervisorOW.py,sha256=zXjddYmkhyBnoRCstZ6AYN1mG84xiOKaIntg5tqe4jw,9927
30
- orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py,sha256=L_fX3EFyyx71Fg-FI8ab34ZPSUzrwKGJLcS2FnYCY_c,2565
30
+ orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py,sha256=O44AZGt7cC1KaAl4U9f78OuzKKMXOSm22voUodyvqnk,3003
31
31
  orangecontrib/tomwer/widgets/cluster/__init__.py,sha256=vOOJnIIaLWAj8tnxD9MRzWDyYgk-cyuBsN7QQ5FrIoQ,385
32
32
  orangecontrib/tomwer/widgets/cluster/icons/slurm.png,sha256=C-YBLwXCnh0oo4nvEt80WxX_jKYGUAFpWMUSlzt6ke0,1995
33
33
  orangecontrib/tomwer/widgets/cluster/icons/slurm.svg,sha256=9LqiU88NH3ACxtZ8A7gTm-C_0ACR8iq0k_N2W1IFf9Q,9790
@@ -219,7 +219,7 @@ orangecontrib/tomwer/widgets/visualization/tests/__init__.py,sha256=47DEQpj8HBSa
219
219
  tomwer/__init__.py,sha256=cMIyH-uRxpa9WVnAuWjiBD7k9TK57WO21RzP_S-Mb8I,460
220
220
  tomwer/__main__.py,sha256=7tCADiS4u7k1PCxFhlRAcYSIOpxQTGUTx8sCEQ-hi1E,8707
221
221
  tomwer/utils.py,sha256=7h7dEgKAEUmQ43jkULvC1B9Adl55nkCty-SEKUKCl4U,7008
222
- tomwer/version.py,sha256=bLV36WJKGROMwVXzqAZ8PSBx-f4ml945UwWkG4kKaug,4387
222
+ tomwer/version.py,sha256=iXKo54sHforGo1rCtg1WrAihg0qB1fT92sRCOtDm7EA,4387
223
223
  tomwer/app/__init__.py,sha256=h1FKED7Tw5f99yikygt7ruXsdrxQhcJxO7kagLGxhJg,84
224
224
  tomwer/app/axis.py,sha256=lB-IZx1o6KTWLIelITvYCIu2flFTB9NhuIfD2MhUZZA,5826
225
225
  tomwer/app/canvas.py,sha256=y8rYOiwmv6ug7JcjgkOzEiGQnNXjKWNNmKofT0n8TFg,1538
@@ -231,7 +231,7 @@ tomwer/app/imagekeyupgrader.py,sha256=qLbfWPz68b2DxMYNd5MlIyZdQ12YQ7F-KUA92RcI01
231
231
  tomwer/app/intensitynormalization.py,sha256=5uT8xQWjjq7uV8-0jru_2Qf9SIN5ooVCPH8Ok8inMYE,5998
232
232
  tomwer/app/multicor.py,sha256=NgSYIh1CTM1ssD5fXfH4j9MM3HU_NUEx_4EIWehijMs,8900
233
233
  tomwer/app/multipag.py,sha256=LHk4-97aYqFQ9UgQb8mYW1_nkUQBbgUxee4RinloCjk,12016
234
- tomwer/app/nabuapp.py,sha256=f8mao2GprCN-CCTFHUlrCLoxFNZmMpzegrlMNnyE_XI,7643
234
+ tomwer/app/nabuapp.py,sha256=1kBQlyzkEYW-iEH6hdYlrXuvg1MPQfPLmDIA5P6oXE4,7687
235
235
  tomwer/app/nxtomoeditor.py,sha256=1Wj59ZF3QvDBmUkUosxZlxvOM-mCvs74l1YJe3tFtwQ,3012
236
236
  tomwer/app/patchrawdarkflat.py,sha256=0s4Uk7rlF6VYcwKAysxj5ncP7jTgDL9XIiMPqZUktvg,3779
237
237
  tomwer/app/radiostack.py,sha256=S6VB7BSmpfFdnGEyX_7wvLFiOtbtlEwgP7PEUAJLN4w,2640
@@ -408,7 +408,7 @@ tomwer/core/scan/edfscan.py,sha256=5brP6ewiDRaT0ssSf35kAYzfWwynyTaoSPcOjmNxf0o,2
408
408
  tomwer/core/scan/futurescan.py,sha256=chXjteQ4_6cSyFBoCil-DeHkHGGzM-xb21xJRYLEfhI,213
409
409
  tomwer/core/scan/hdf5scan.py,sha256=rQ-WtbOIgNtnMxA2kC23fEAcJIJIKboAv7UQColkrBg,966
410
410
  tomwer/core/scan/helicalmetadata.py,sha256=JRBxqHkyTe5f3FDlbIeDfN31P6Ms48SqGiFRXHuZ8sw,472
411
- tomwer/core/scan/nxtomoscan.py,sha256=wfyTtgxSaazxacUyUxdESJldUTbpJ8G-NhF09xO1XGI,18413
411
+ tomwer/core/scan/nxtomoscan.py,sha256=juA5so5YpiLDC4-JMCcR5xNovCRbLmcEkWN65QfWkzk,18441
412
412
  tomwer/core/scan/scanbase.py,sha256=GO5DgYHtLZJwLW1-Y4ztHxgfdGMPUIhx1rhBG9lWBeM,25627
413
413
  tomwer/core/scan/scanfactory.py,sha256=-bF0Ru9bn8bnGk4MKXhbt5Oli19qN1WvFPDMtqw81BA,9116
414
414
  tomwer/core/scan/scantype.py,sha256=pQjWuCy_014uK5cdb8pFAkE_EPHJvPdSo3NM8aWTo58,137
@@ -416,7 +416,6 @@ tomwer/core/scan/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
416
416
  tomwer/core/scan/tests/test_edf.py,sha256=JI7wH5emdjlYl08OhmjIO_8mui7rHa-aRCUwmkCRyys,830
417
417
  tomwer/core/scan/tests/test_future_scan.py,sha256=tsF9p57dCOmW0fPyl6BP2lLSo0rRYRF6hSF-kryLMDM,848
418
418
  tomwer/core/scan/tests/test_nxtomoscan.py,sha256=w2mNuCsfWMl1b9jP_-vkTDkCD_z9oM02yx42f6-DzY8,4751
419
- tomwer/core/scan/tests/test_process_registration.py,sha256=g4Toef92SjxCBUE82MTbjonFJpc3PQqfpF6FSCarN5U,1988
420
419
  tomwer/core/scan/tests/test_scan.py,sha256=mHFPi2Tc7Z2_5rWvAp3YmObVSTB5yi-sTkHm1iOJlDo,12228
421
420
  tomwer/core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
422
421
  tomwer/core/tests/test_scanutils.py,sha256=xWwd1nycVDWmFaIaL2gQ_xxrUMhVCARaNHI2SxT9NOI,844
@@ -465,7 +464,7 @@ tomwer/gui/settings.py,sha256=7LH-v6DM_V82j--aoHO7BaRawCsJsfgE3_6yI90TD7E,405
465
464
  tomwer/gui/stackplot.py,sha256=WE_GOa0RzwPcMiop98ljM_r-4g4bSy-Jee9h8v3kwO8,3552
466
465
  tomwer/gui/stacks.py,sha256=4lPRUjqGhif_oxArV7HHllbFsmLTdPJgHe4QD8TRz8k,13558
467
466
  tomwer/gui/cluster/__init__.py,sha256=QeukFHF5SISl4dsVtIGc8UoAlgMiXdAeG2nksocycic,36
468
- tomwer/gui/cluster/slurm.py,sha256=FIp9e7E48KEORabOKBVu7Wm7N9oQBKKUanBSs62hqs0,34374
467
+ tomwer/gui/cluster/slurm.py,sha256=_W3mfgj4doAO64nkzhZIBIPgeflong0Gmff8tG7rA6k,34784
469
468
  tomwer/gui/cluster/supervisor.py,sha256=5qgAbRoFQvQeZ1jy5Z-5p98QqdZxNM9hieOce2Dn_uE,15794
470
469
  tomwer/gui/cluster/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
471
470
  tomwer/gui/cluster/tests/test_cluster.py,sha256=Yz0nzPQmMhMj3lRsJ8lB3_d9tpeJ9iC-K24IgdhV08w,3205
@@ -651,7 +650,7 @@ tomwer/gui/utils/slider.py,sha256=NLooxIa_2dMv60UAt_PV2BKcd15WuNv1EiV1JRdVcu0,21
651
650
  tomwer/gui/utils/splashscreen.py,sha256=Wt6lDby3irZn6Vc52whPRTbJOzmMA66VH6d5cIXy_dI,489
652
651
  tomwer/gui/utils/step.py,sha256=epEKQwj2byRFH_Lc2XUuMGOVcrKR0m1iFP7HPqb5iG0,5397
653
652
  tomwer/gui/utils/unitsystem.py,sha256=0g6pYemy2MpkGQJGuuR9yCwbZ9mt3nPA1dqAvAqUHRo,5994
654
- tomwer/gui/utils/utils.py,sha256=e_PA4P8GjBW17uemqSDjMy5YLYgVIy2qppmP2kYTALU,2673
653
+ tomwer/gui/utils/utils.py,sha256=FbzvEkJacSdZXe4lvrYOge9csQGx50hH-R8gbx5E0sI,2687
655
654
  tomwer/gui/utils/vignettes.py,sha256=1HoABQcreptH6GIuo5nrLZmPcsTWuQlRuSW5IHJTRT4,17792
656
655
  tomwer/gui/utils/waiterthread.py,sha256=lyRCzVDAyxquO3JbXxDhVTCv_YjzOQd7PAPsGWjKBrE,494
657
656
  tomwer/gui/utils/lineselector/__init__.py,sha256=GZ847ef5X2wk_sAHxg6h24TarPYmb4NZjQI3jjkc7jE,75
@@ -849,7 +848,6 @@ tomwer/synctools/tests/test_darkRefs.py,sha256=1OgWaV-hgDmi4rkh0hxjCW_codBAnxNhp
849
848
  tomwer/synctools/tests/test_foldertransfer.py,sha256=ZFIJWSjgYAWw3ktzamid5DJZNnMkAV6Pj72dKG69cJc,12024
850
849
  tomwer/synctools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
851
850
  tomwer/synctools/utils/scanstages.py,sha256=vIUKVDSfM2UwPjjmZTiIN1tNg4antnGcSPv1aYapJCY,7830
852
- tomwer/tasks/reconstruction/cleardarkflat.py,sha256=_V_x7W8vp1_AqqtQ9xk2VRgwlivn4IPTLEpWySjSZRE,1353
853
851
  tomwer/tests/__init__.py,sha256=dPPaIvpzHssjwxsMzYJM_gxQ2e0cnRyQHXxi9ux6ZOY,19
854
852
  tomwer/tests/conftest.py,sha256=0XlKfOrVtPg8VmyQn4BoK_mzcliFUtacDGLlZ5wD_PM,1912
855
853
  tomwer/tests/datasets.py,sha256=QXQ3jSwgWzfq4CaELOSrk9kHg5GmrP7kGHsdOlNSEIE,336
@@ -906,9 +904,9 @@ tomwer/tests/orangecontrib/tomwer/widgets/visualization/tests/test_volume_viewer
906
904
  tomwer/tests/test_ewoks/test_conversion.py,sha256=a8cEWbErXiFCAkaapi0jeEoRKYxcFQCoa-Jr_u77_OM,3656
907
905
  tomwer/tests/test_ewoks/test_single_node_execution.py,sha256=YBUHfiAnkciv_kjj7biC5fOs7c7ofNImM_azGMn4LZM,2813
908
906
  tomwer/tests/test_ewoks/test_workflows.py,sha256=Eq80eexf5NVL7SzvwctLOaUeuQ8V3vDiFiHgbJA4Yb8,4871
909
- tomwer-1.4.17.dist-info/licenses/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
910
- tomwer-1.4.17.dist-info/METADATA,sha256=XwIaehtXQw8A82CKM2JkllfIOo_lKcvLJ5HFrsSCPpA,13438
911
- tomwer-1.4.17.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
912
- tomwer-1.4.17.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
913
- tomwer-1.4.17.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
914
- tomwer-1.4.17.dist-info/RECORD,,
907
+ tomwer-1.4.19.dist-info/licenses/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
908
+ tomwer-1.4.19.dist-info/METADATA,sha256=I1y8TToS_xRYj6YtVTmqjCJ-sYzaUxajagOtBZ9lYfE,13483
909
+ tomwer-1.4.19.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
910
+ tomwer-1.4.19.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
911
+ tomwer-1.4.19.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
912
+ tomwer-1.4.19.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.3)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,64 +0,0 @@
1
- # coding: utf-8
2
- from __future__ import annotations
3
-
4
- import shutil
5
- import tempfile
6
- import unittest
7
-
8
- from tomoscan.io import HDF5File, get_swmr_mode
9
-
10
- from tomwer.core.process.task import Task
11
- from tomwer.core.utils.scanutils import MockNXtomo
12
-
13
-
14
- class TestProcessRegistration(unittest.TestCase):
15
- """
16
- Make sure utils link to the process registration are
17
- correctly working
18
- """
19
-
20
- class DummyProcess(Task):
21
- @staticmethod
22
- def program_name():
23
- """Name of the program used for this processing"""
24
- return "dummy program"
25
-
26
- @staticmethod
27
- def program_version():
28
- """version of the program used for this processing"""
29
- return "0.0.0"
30
-
31
- @staticmethod
32
- def definition():
33
- """definition of the process"""
34
- return "no definition"
35
-
36
- def setUp(self):
37
- self.tmp_dir = tempfile.mkdtemp()
38
- self.scan = MockNXtomo(scan_path=self.tmp_dir, n_proj=2).scan
39
-
40
- def tearDown(self):
41
- shutil.rmtree(self.tmp_dir)
42
-
43
- def testGetProcessNodes(self):
44
- """insure it return the last dark process based on the processing index"""
45
-
46
- for i in range(20):
47
- Task._register_process(
48
- self.scan.process_file,
49
- process=self.DummyProcess,
50
- entry=self.scan.entry,
51
- configuration=None,
52
- results={"output": i},
53
- process_index=i,
54
- )
55
-
56
- with HDF5File(self.scan.process_file, "r", swmr=get_swmr_mode()) as h5f:
57
- nodes = Task._get_process_nodes(
58
- root_node=h5f[self.scan.entry], process=self.DummyProcess
59
- )
60
- self.assertEqual(len(nodes), 20)
61
- self.assertTrue("/entry/tomwer_process_16" in nodes)
62
- self.assertEqual(nodes["/entry/tomwer_process_16"], 16)
63
- self.assertTrue("/entry/tomwer_process_1" in nodes)
64
- self.assertEqual(nodes["/entry/tomwer_process_1"], 1)
@@ -1,42 +0,0 @@
1
- """
2
- Contains task to clear reduced dark and flat frames
3
- """
4
-
5
- from __future__ import annotations
6
-
7
- from tomoscan.scanbase import TomoScanBase as TomoscanScanBase
8
-
9
- from processview.core.manager import DatasetState, ProcessManager
10
- from processview.core.superviseprocess import SuperviseProcess
11
-
12
- from tomwer.tasks.task import Task
13
- from tomwer.core.scan.scanbase import TomwerScanBase
14
- from tomwer.core.scan.scanfactory import ScanFactory
15
- from tomwer.core.utils.scanutils import data_identifier_to_scan
16
- from tomwer.core.reconstruction.darkflat import params as dkrf_reconsparams
17
- from tomwer.utils import docstring
18
-
19
-
20
- class ClearReducedDarkAndFlat(
21
- Task,
22
- SuperviseProcess,
23
- input_names=("data",),
24
- output_names=("data",),
25
- ):
26
- """
27
- Task to clear reduced darks and flats. Both on disk and on the object cache.
28
- th goal of this task is to make sure the scan is cleared of any reduced frames to reprocess it later.
29
- """
30
-
31
- def run(self):
32
- scan = self.inputs.data
33
- if not isinstance(scan, TomoscanScanBase):
34
- raise TypeError(
35
- f"scan should be an instance of {TomoscanScanBase}. Got {type(scan)}"
36
- )
37
- scan.set_reduced_flats(None)
38
- scan.reduced_flats_infos = None
39
- scan.set_reduced_darks(None)
40
- scan.reduced_darks_infos = None
41
-
42
- self.outputs.data = scan