tomwer 1.4.7__py3-none-any.whl → 1.4.8__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.
@@ -13,6 +13,9 @@ from tomwer.core.cluster.cluster import SlurmClusterConfiguration
13
13
  from tomwer.core.futureobject import FutureTomwerObject
14
14
  from tomwer.core.scan.scanbase import TomwerScanBase
15
15
  from tomwer.core.volume.volumebase import TomwerVolumeBase
16
+ from tomwer.core.process.drac.processeddataset import (
17
+ DracReconstructedVolumeDataset,
18
+ )
16
19
  from tomwer.gui.reconstruction.nabu.castvolume import CastVolumeWidget
17
20
  from tomwer.gui.utils.qt_utils import block_signals
18
21
 
@@ -101,6 +104,11 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
101
104
  type=FutureTomwerObject,
102
105
  doc="future object (process remotely)",
103
106
  )
107
+ data_portal_processed_datasets = Output(
108
+ name="data_portal_processed_datasets",
109
+ type=tuple,
110
+ doc="data portal processed data to be saved",
111
+ )
104
112
 
105
113
  def __init__(self, parent=None):
106
114
  """ """
@@ -193,11 +201,28 @@ class CastNabuVolumeOW(WidgetLongProcessing, SuperviseOW):
193
201
  if future_tomo_obj is not None:
194
202
  self.Outputs.future_tomo_obj.send(future_tomo_obj)
195
203
  if obj is not None:
204
+ scan = None
196
205
  if isinstance(obj, TomwerScanBase):
206
+ # case the input object was a scan (expected)
197
207
  self.Outputs.data.send(obj)
208
+ scan = obj
198
209
  elif isinstance(obj, TomwerVolumeBase):
210
+ # case the input object was a volume
199
211
  self.Outputs.volume.send(obj)
200
212
  # for now we store a cast_volume to the object but this is not very well design.
201
213
  # I guess this will be removed once we move to ewoks or we need to redesign the stack approach
202
214
  if obj.cast_volume is not None:
215
+ assert isinstance(obj.cast_volume, TomwerVolumeBase)
203
216
  self.Outputs.cast_volume.send(obj.cast_volume)
217
+
218
+ if scan is not None:
219
+ # case the input object was a scan and we have succeeded to cast the volume
220
+ # then we can publish to the data portal
221
+ icatReconstructedDataset = DracReconstructedVolumeDataset(
222
+ tomo_obj=obj.cast_volume,
223
+ source_scan=scan,
224
+ )
225
+
226
+ self.Outputs.data_portal_processed_datasets.send(
227
+ (icatReconstructedDataset,)
228
+ )
@@ -10,6 +10,9 @@ from tomwer.core.process.reconstruction.nabu.plane import NabuPlane
10
10
  from tomwer.core.process.reconstruction.output import (
11
11
  PROCESS_FOLDER_RECONSTRUCTED_VOLUMES,
12
12
  )
13
+ from tomwer.core.process.reconstruction.output import (
14
+ PROCESS_FOLDER_CAST_VOLUME,
15
+ )
13
16
 
14
17
 
15
18
  __all__ = ["DracReconstructedVolumeDataset"]
@@ -145,3 +148,14 @@ class DracReconstructedVolumeDataset(DracDatasetBase):
145
148
  axis_folder,
146
149
  f"{basename}_capture_{axis.value}_{str(slice_index).zfill(6)}",
147
150
  )
151
+
152
+
153
+ class DracCastReconstructedVolume(DracReconstructedVolumeDataset):
154
+ """
155
+ Class to associate casted - reconstructed volume(s) to an drac (processed) dataset
156
+ """
157
+
158
+ @property
159
+ def dataset_name(self) -> str:
160
+ """name to give to the drac (processed) dataset."""
161
+ return PROCESS_FOLDER_CAST_VOLUME
@@ -28,11 +28,17 @@ from tomwer.core.utils.slurm import get_slurm_script_name
28
28
  from tomwer.core.utils.volumeutils import volume_identifier_to_volume
29
29
  from tomwer.core.volume.volumebase import TomwerVolumeBase
30
30
  from tomwer.core.volume.volumefactory import VolumeFactory
31
+ from tomwer.core.process.drac.processeddataset import (
32
+ DracReconstructedVolumeDataset,
33
+ )
31
34
 
32
35
  _logger = logging.getLogger(__name__)
33
36
 
37
+ CAST_VOLUME_WORKING_SUB_DIRECTORY = "cast_volume"
34
38
 
35
- DEFAULT_OUTPUT_DIR = "{volume_data_parent_folder}/cast_volume"
39
+ DEFAULT_OUTPUT_DIR = (
40
+ "{volume_data_parent_folder}" f"/{CAST_VOLUME_WORKING_SUB_DIRECTORY}"
41
+ )
36
42
 
37
43
 
38
44
  class CastVolumeTask(
@@ -46,6 +52,7 @@ class CastVolumeTask(
46
52
  output_names=(
47
53
  "volume",
48
54
  "future_tomo_obj",
55
+ "data_portal_processed_datasets",
49
56
  ),
50
57
  ):
51
58
  def __init__(
@@ -176,6 +183,7 @@ class CastVolumeTask(
176
183
  scan.cast_volume = output_volume.get_identifier()
177
184
  else:
178
185
  input_volume.cast_volume = output_volume.get_identifier()
186
+ self.outputs.data_portal_processed_datasets = tuple()
179
187
  # run volume cast remotely
180
188
  else:
181
189
 
@@ -230,6 +238,14 @@ class CastVolumeTask(
230
238
  )
231
239
  self.outputs.volume = output_volume
232
240
 
241
+ if scan is not None:
242
+ drac_reconstructed_dataset = DracReconstructedVolumeDataset(
243
+ tomo_obj=output_volume,
244
+ source_scan=scan,
245
+ )
246
+ self.outputs.data_portal_processed_datasets = (
247
+ drac_reconstructed_dataset,
248
+ )
233
249
  # for now at the task level we consider this is succeed if it has been submitted
234
250
  ProcessManager().notify_dataset_state(
235
251
  dataset=scan or input_volume,
@@ -16,6 +16,8 @@ PROCESS_FOLDER_RECONSTRUCTED_VOLUMES = "reconstructed_volumes"
16
16
 
17
17
  PROCESS_FOLDER_RECONSTRUCTED_SLICES = "reconstructed_slices"
18
18
 
19
+ PROCESS_FOLDER_CAST_VOLUME = "cast_volume"
20
+
19
21
 
20
22
  class NabuOutputFileFormat(_Enum):
21
23
  TIFF = "tiff"
tomwer/version.py CHANGED
@@ -77,7 +77,7 @@ RELEASE_LEVEL_VALUE = {
77
77
 
78
78
  MAJOR = 1
79
79
  MINOR = 4
80
- MICRO = 7
80
+ MICRO = 8
81
81
  RELEV = "final" # <16
82
82
  SERIAL = 0 # <16
83
83
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: tomwer
3
- Version: 1.4.7
3
+ Version: 1.4.8
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
@@ -148,7 +148,7 @@ orangecontrib/tomwer/widgets/other/icons/hub.png,sha256=wnKSaxw2WnBkSQjI86aLZfdm
148
148
  orangecontrib/tomwer/widgets/other/icons/hub.svg,sha256=9EYoBKY-P-cO17nM48OPA9VDZSCbyGtrMRc80BGHflk,3735
149
149
  orangecontrib/tomwer/widgets/other/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
150
  orangecontrib/tomwer/widgets/reconstruction/AxisOW.py,sha256=Qz6r34NdNgBvn-UwbIhPQDDCgtlXa_rSLnCEIuI_mrQ,20067
151
- orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py,sha256=E9hTJH_WfMsbOpKsGworVkqc16kWIRL1ajZbpnT_IAI,7614
151
+ orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py,sha256=sqpWF769TJ07ApEMqdz0BUWiXoKnZ8k2Fg1yfBaqdIc,8668
152
152
  orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py,sha256=flRgeOXimjzKEtL6h-0hwaa04G-BqMydv0Ju5r0Reao,9696
153
153
  orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py,sha256=NjMC0BEmPhDZ795Q-yyL81-hluAyGE8MRiq8xMdqAqY,6233
154
154
  orangecontrib/tomwer/widgets/reconstruction/NabuOW.py,sha256=UvCNwpAtQ1AdCl5kUw13QsKxesIDV8SIjIW9cWCXIMc,9946
@@ -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=kSCzrMOEuSMZFSQbR90fj1YYaNmCYltkc0D3FMs6UT0,4386
222
+ tomwer/version.py,sha256=9eVN2X5pHYpA_0DB79D32-UlghmotJxh_g2O_lUlL70,4386
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
@@ -303,7 +303,7 @@ tomwer/core/process/drac/binning.py,sha256=uWIyAzQMhUjh5d74DUnbDgjRv4zMZtdbi6U0W
303
303
  tomwer/core/process/drac/dracbase.py,sha256=_EYcZscvNpLpSc6cuy6nmNKYWo2C8u6Ke_oXrLjOBiM,5639
304
304
  tomwer/core/process/drac/gallery.py,sha256=bQosh4xbTWj8Vn_vqepyJ1QMfLcVGxh7uPJ0ysLtx5o,4790
305
305
  tomwer/core/process/drac/output.py,sha256=ySwvMigBVvtQqrkG67jq384uevVKeOX-Vd8E2urs_Lg,235
306
- tomwer/core/process/drac/processeddataset.py,sha256=yWFfb7-CeYwLm1g8hYt7zVRgV_XNHXzfONxYPW8me0A,5425
306
+ tomwer/core/process/drac/processeddataset.py,sha256=pp4uW249k7qFb1q1yZCtU1fbjoD9Y9onL5w3mOcxrWU,5839
307
307
  tomwer/core/process/drac/publish.py,sha256=S6UZ39Mv0I9A5bKQig5zohFenRPonu-oxK6DEUeAvD4,3845
308
308
  tomwer/core/process/drac/rawdataset.py,sha256=mB4sNTM1rx46n5whjIlY4xq1gz4_rbaS7yAS3QE2iT0,5175
309
309
  tomwer/core/process/drac/tests/test_gallery.py,sha256=WZaK42Y5S8sNrzgTToqctYvle8Xc1YBs3u6moei9ZMc,2319
@@ -316,7 +316,7 @@ tomwer/core/process/edit/nxtomoeditor.py,sha256=HUYInTVIUbqVtFXQKMCOpQ-tvgFz5w3U
316
316
  tomwer/core/process/edit/tests/test_darkflatpatch.py,sha256=0QOjUgiYkjuWDZvI5pkuiViK4HUJA5E2sXF5LXtf_vY,9366
317
317
  tomwer/core/process/edit/tests/test_imagekey_editor.py,sha256=ft-xDMRk6CRs7DehNEnh1uJ9gLKJ-SxZAb0GmsLek0w,2345
318
318
  tomwer/core/process/reconstruction/__init__.py,sha256=G_vePtIyh1WlXtcmOyQI3nRsP-F0bsaDSdLWHC0bVzo,159
319
- tomwer/core/process/reconstruction/output.py,sha256=_8kF_qhkXMW8f_u7xAi0u0KZLsD4GEiM6uaT7ZAco6g,4074
319
+ tomwer/core/process/reconstruction/output.py,sha256=LMVH71rybFR1j-DTCo48k5M3feKuLBq9jE4n01qJAec,4118
320
320
  tomwer/core/process/reconstruction/params_cache.py,sha256=GTchgCH1Db7fuYsSGxSF6wCTeV5grlYQh5ab198nmOk,1527
321
321
  tomwer/core/process/reconstruction/paramsbase.py,sha256=6PjFcO0yYs_apgv2MImGSDLsBgQ7UeK2TSBLz28HYgc,6344
322
322
  tomwer/core/process/reconstruction/axis/__init__.py,sha256=VSQkN6M6JvM_c55OiboNyJUW8Zs1wkkQgv1JYmzvIr8,80
@@ -332,7 +332,7 @@ tomwer/core/process/reconstruction/darkref/darkrefscopy.py,sha256=D0i__aTsEvfJg_
332
332
  tomwer/core/process/reconstruction/darkref/params.py,sha256=vrDN8bZu28E4zLuHJzNvIIyyZq-4yhX9k9itXYCJ2iM,8756
333
333
  tomwer/core/process/reconstruction/darkref/settings.py,sha256=35jliuOIjMKTOJjgn4uiotcDEr6RskpLHfRWWLm76dc,188
334
334
  tomwer/core/process/reconstruction/nabu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
335
- tomwer/core/process/reconstruction/nabu/castvolume.py,sha256=4VEVnJxWfG8_Ku2uhUSQAgGfvP_08mXswmC3bHU7E4M,9317
335
+ tomwer/core/process/reconstruction/nabu/castvolume.py,sha256=DGNj3YF97GRABy4xvhjjv8_IgyWoRb5TkBQcDFlpUDM,9945
336
336
  tomwer/core/process/reconstruction/nabu/helical.py,sha256=gauUkoPiShvnvMQrCQXv28g0yLe-GceML5kYMSXmNIg,1997
337
337
  tomwer/core/process/reconstruction/nabu/nabucommon.py,sha256=6jOdKpUW5MbRkf53evu4-ZBkQaNWMfl799-f0zQ9-1Q,24554
338
338
  tomwer/core/process/reconstruction/nabu/nabuscores.py,sha256=e5tRG1QtmVAdXb8KHMTMtBXA3KQXqKKcqipY2HzMURg,25275
@@ -903,9 +903,9 @@ tomwer/tests/orangecontrib/tomwer/widgets/visualization/tests/test_volume_viewer
903
903
  tomwer/tests/test_ewoks/test_conversion.py,sha256=a8cEWbErXiFCAkaapi0jeEoRKYxcFQCoa-Jr_u77_OM,3656
904
904
  tomwer/tests/test_ewoks/test_single_node_execution.py,sha256=YBUHfiAnkciv_kjj7biC5fOs7c7ofNImM_azGMn4LZM,2813
905
905
  tomwer/tests/test_ewoks/test_workflows.py,sha256=Eq80eexf5NVL7SzvwctLOaUeuQ8V3vDiFiHgbJA4Yb8,4871
906
- tomwer-1.4.7.dist-info/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
907
- tomwer-1.4.7.dist-info/METADATA,sha256=cTWcuTnfLh2DnmMNzen6jZRoBgRDp3VRqOv9U08BI80,13415
908
- tomwer-1.4.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
909
- tomwer-1.4.7.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
910
- tomwer-1.4.7.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
911
- tomwer-1.4.7.dist-info/RECORD,,
906
+ tomwer-1.4.8.dist-info/LICENSE,sha256=62p1wL0n9WMTu8x2YDv0odYgTqeSvTd9mQ0v6Mq7lzE,1876
907
+ tomwer-1.4.8.dist-info/METADATA,sha256=N3KGtY5cMcf1QBDrJWJsGSetIU0TUEdUfV0okormuLI,13415
908
+ tomwer-1.4.8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
909
+ tomwer-1.4.8.dist-info/entry_points.txt,sha256=py3ZUWvGnWGc5c7Yhw_uBTm8Fmew0BDw3aQZnWMBNZI,500
910
+ tomwer-1.4.8.dist-info/top_level.txt,sha256=Yz5zKh0FPiImtzHYcPuztG1AO8-6KEpUWgoChGbA0Ys,21
911
+ tomwer-1.4.8.dist-info/RECORD,,
File without changes