tomwer 1.4.19__py3-none-any.whl → 1.5.2rc0__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 (123) 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/utils.py +15 -14
  31. tomwer/core/process/reconstruction/normalization/normalization.py +1 -1
  32. tomwer/core/process/reconstruction/normalization/params.py +4 -4
  33. tomwer/core/process/reconstruction/output.py +2 -2
  34. tomwer/core/process/reconstruction/saaxis/params.py +3 -3
  35. tomwer/core/process/reconstruction/saaxis/saaxis.py +1 -1
  36. tomwer/core/process/reconstruction/scores/params.py +2 -2
  37. tomwer/core/process/reconstruction/scores/scores.py +3 -3
  38. tomwer/core/process/reconstruction/tests/test_axis.py +1 -1
  39. tomwer/core/process/stitching/metadataholder.py +5 -5
  40. tomwer/core/process/stitching/nabustitcher.py +1 -4
  41. tomwer/core/process/tests/test_normalization.py +2 -1
  42. tomwer/core/scan/edfscan.py +3 -3
  43. tomwer/core/scan/nxtomoscan.py +3 -3
  44. tomwer/core/scan/scanbase.py +3 -3
  45. tomwer/core/scan/scantype.py +1 -1
  46. tomwer/core/settings.py +1 -1
  47. tomwer/core/tomwer_object.py +1 -1
  48. tomwer/core/utils/nxtomoutils.py +2 -2
  49. tomwer/core/utils/spec.py +6 -3
  50. tomwer/gui/cluster/slurm.py +3 -3
  51. tomwer/gui/configuration/level.py +1 -1
  52. tomwer/gui/control/actions.py +1 -1
  53. tomwer/gui/control/datadiscovery.py +1 -1
  54. tomwer/gui/control/datalist.py +1 -1
  55. tomwer/gui/control/reducedarkflatselector.py +4 -4
  56. tomwer/gui/control/series/seriescreator.py +5 -5
  57. tomwer/gui/control/tomoobjdisplaymode.py +1 -1
  58. tomwer/gui/dataportal/gallery.py +6 -6
  59. tomwer/gui/edit/imagekeyeditor.py +7 -9
  60. tomwer/gui/edit/nxtomoeditor.py +420 -112
  61. tomwer/gui/edit/tests/test_nx_editor.py +155 -83
  62. tomwer/gui/reconstruction/axis/CalculationWidget.py +1 -1
  63. tomwer/gui/reconstruction/axis/EstimatedCORWidget.py +12 -8
  64. tomwer/gui/reconstruction/axis/EstimatedCorComboBox.py +2 -2
  65. tomwer/gui/reconstruction/axis/InputWidget.py +3 -3
  66. tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -2
  67. tomwer/gui/reconstruction/nabu/castvolume.py +16 -1
  68. tomwer/gui/reconstruction/nabu/nabuconfig/base.py +2 -4
  69. tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +6 -6
  70. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +1 -1
  71. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +5 -5
  72. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +2 -4
  73. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +78 -52
  74. tomwer/gui/reconstruction/nabu/nabuflow.py +3 -13
  75. tomwer/gui/reconstruction/nabu/slices.py +11 -11
  76. tomwer/gui/reconstruction/nabu/test/test_cast_volume.py +19 -0
  77. tomwer/gui/reconstruction/nabu/volume.py +1 -1
  78. tomwer/gui/reconstruction/normalization/intensity.py +8 -12
  79. tomwer/gui/reconstruction/saaxis/corrangeselector.py +2 -2
  80. tomwer/gui/reconstruction/saaxis/dimensionwidget.py +71 -67
  81. tomwer/gui/reconstruction/sacommon.py +1 -1
  82. tomwer/gui/reconstruction/scores/scoreplot.py +18 -10
  83. tomwer/gui/reconstruction/tests/test_saaxis.py +18 -16
  84. tomwer/gui/stitching/SingleAxisStitchingWidget.py +8 -8
  85. tomwer/gui/stitching/StitchingOptionsWidget.py +1 -1
  86. tomwer/gui/stitching/alignment.py +8 -8
  87. tomwer/gui/stitching/config/axisparams.py +2 -2
  88. tomwer/gui/stitching/config/output.py +1 -1
  89. tomwer/gui/stitching/config/positionoveraxis.py +1 -1
  90. tomwer/gui/stitching/config/stitchingstrategies.py +4 -6
  91. tomwer/gui/stitching/config/tomoobjdetails.py +21 -13
  92. tomwer/gui/stitching/normalization.py +6 -6
  93. tomwer/gui/stitching/tests/test_ZStitchingWindow.py +8 -1
  94. tomwer/gui/stitching/tests/test_preview.py +10 -7
  95. tomwer/gui/stitching/tests/utils.py +27 -18
  96. tomwer/gui/stitching/z_stitching/fineestimation.py +7 -9
  97. tomwer/gui/stitching/z_stitching/tests/test_raw_estimation.py +18 -7
  98. tomwer/gui/stitching/z_stitching/tests/test_stitching_window.py +7 -2
  99. tomwer/gui/utils/buttons.py +53 -35
  100. tomwer/gui/utils/flow.py +2 -2
  101. tomwer/gui/utils/loadingmode.py +1 -1
  102. tomwer/gui/utils/unitsystem.py +44 -33
  103. tomwer/gui/utils/vignettes.py +1 -1
  104. tomwer/gui/visualization/dataviewer.py +7 -7
  105. tomwer/gui/visualization/diffviewer/diffviewer.py +4 -4
  106. tomwer/gui/visualization/diffviewer/shiftwidget.py +4 -6
  107. tomwer/gui/visualization/reconstructionparameters.py +35 -23
  108. tomwer/gui/visualization/scanoverview.py +28 -11
  109. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +25 -13
  110. tomwer/gui/visualization/test/test_reconstruction_parameters.py +2 -2
  111. tomwer/model/dataset.py +0 -0
  112. tomwer/synctools/utils/scanstages.py +3 -3
  113. tomwer/tasks/reconstruction/cleardarkflat.py +42 -0
  114. tomwer/tests/app/test_stitching.py +1 -1
  115. tomwer/tests/orangecontrib/tomwer/widgets/edit/tests/test_nxtomo_editor.py +32 -20
  116. tomwer/tests/orangecontrib/tomwer/widgets/reconstruction/tests/test_nabu_widget.py +1 -1
  117. tomwer/version.py +3 -3
  118. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/METADATA +8 -8
  119. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/RECORD +123 -121
  120. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/WHEEL +1 -1
  121. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/entry_points.txt +0 -0
  122. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/licenses/LICENSE +0 -0
  123. {tomwer-1.4.19.dist-info → tomwer-1.5.2rc0.dist-info}/top_level.txt +0 -0
@@ -3,19 +3,21 @@
3
3
  <nodes>
4
4
  <node id="0" name="scan selector" qualified_name="orangecontrib.tomwer.widgets.control.DataSelectorOW.DataSelectorOW" project_name="tomwer" version="" title="scan selector" position="(150, 150)" />
5
5
  <node id="1" name="reduced darks and flats" qualified_name="orangecontrib.tomwer.widgets.reconstruction.DarkRefAndCopyOW.DarkRefAndCopyOW" project_name="tomwer" version="" title="reduced darks and flats" position="(324.0, 183.0)" />
6
- <node id="2" name="default center of rotation" qualified_name="orangecontrib.tomwer.widgets.reconstruction.AxisOW.AxisOW" project_name="tomwer" version="" title="default center of rotation" position="(490.0, 218.0)" />
6
+ <node id="2" name="center of rotation finder" qualified_name="orangecontrib.tomwer.widgets.reconstruction.AxisOW.AxisOW" project_name="tomwer" version="" title="default center of rotation" position="(490.0, 218.0)" />
7
7
  <node id="3" name="nabu slice reconstruction" qualified_name="orangecontrib.tomwer.widgets.reconstruction.NabuOW.NabuOW" project_name="tomwer" version="" title="nabu slice reconstruction" position="(649.0, 261.0)" />
8
8
  <node id="4" name="data viewer" qualified_name="orangecontrib.tomwer.widgets.visualization.DataViewerOW.DataViewerOW" project_name="tomwer" version="" title="data viewer" position="(818.0, 248.0)" />
9
9
  <node id="5" name="nabu volume reconstruction" qualified_name="orangecontrib.tomwer.widgets.reconstruction.NabuVolumeOW.NabuVolumeOW" project_name="tomwer" version="" title="nabu volume reconstruction" position="(812.0, 391.0)" />
10
10
  <node id="6" name="volume viewer" qualified_name="orangecontrib.tomwer.widgets.visualization.VolumeViewerOW.VolumeViewerOW" project_name="tomwer" version="" title="volume viewer" position="(978.0, 424.0)" />
11
+ <node id="7" name="Data Portal Publishing" qualified_name="orangecontrib.tomwer.widgets.dataportal.PublishProcessedDataOW.PublishProcessedDataOW" project_name="tomwer" version="" title="Data Portal Publishing" position="(980.0, 580.0)" />
11
12
  </nodes>
12
13
  <links>
13
- <link id="0" source_node_id="0" sink_node_id="1" source_channel="data" sink_channel="data" enabled="true" />
14
- <link id="1" source_node_id="1" sink_node_id="2" source_channel="data" sink_channel="data" enabled="true" />
15
- <link id="2" source_node_id="2" sink_node_id="3" source_channel="data" sink_channel="data" enabled="true" />
16
- <link id="3" source_node_id="3" sink_node_id="4" source_channel="data" sink_channel="data" enabled="true" />
17
- <link id="4" source_node_id="3" sink_node_id="5" source_channel="data" sink_channel="data" enabled="true" />
18
- <link id="5" source_node_id="5" sink_node_id="6" source_channel="data" sink_channel="data" enabled="true" />
14
+ <link id="0" source_node_id="0" sink_node_id="1" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
15
+ <link id="1" source_node_id="1" sink_node_id="2" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
16
+ <link id="2" source_node_id="2" sink_node_id="3" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
17
+ <link id="3" source_node_id="3" sink_node_id="4" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
18
+ <link id="4" source_node_id="3" sink_node_id="5" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
19
+ <link id="5" source_node_id="5" sink_node_id="6" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
20
+ <link id="6" source_node_id="5" sink_node_id="7" source_channel="data_portal_processed_datasets" sink_channel="data_portal_processed_datasets" enabled="true" source_channel_id="data_portal_processed_datasets" sink_channel_id="data_portal_processed_datasets" />
19
21
  </links>
20
22
  <annotations>
21
23
  <arrow id="0" start="(267.0, 56.0)" end="(194.0, 105.0)" fill="#C1272D" />
@@ -37,11 +39,12 @@
37
39
  <node_properties>
38
40
  <properties node_id="0" format="literal">{'_scanIDs': [], 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
39
41
  <properties node_id="1" format="literal">{'_ewoks_default_inputs': {'data': None, 'dark_ref_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
40
- <properties node_id="2" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'manual', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'USE_SINOGRAM': False, 'SINOGRAM_LINE': '', 'SINOGRAM_SUBSAMPLING': 10, 'AXIS_URL_1': '', 'AXIS_URL_2': '', 'LOOK_AT_STDMAX': False, 'NEAR_WX': 5, 'FINE_STEP_X': 0.1, 'SCALE_IMG2_TO_IMG1': False, 'NEAR_POSITION': 0.0, 'PADDING_MODE': 'edge', 'FLIP_LR': True, 'COMPOSITE_OPTS': {'theta': 10, 'n_subsampling_y': 10, 'oversampling': 4, 'take_log': True, 'near_pos': 0, 'near_width': 20}, 'SIDE': 'all', 'COR_OPTIONS': ''}, 'gui': {'mode_is_lock': False, 'value_is_lock': False, 'auto_update_estimated_cor': True}}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
42
+ <properties node_id="2" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'manual', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'SINOGRAM_LINE': '', 'SINOGRAM_SUBSAMPLING': 10, 'AXIS_URL_1': '', 'AXIS_URL_2': '', 'LOOK_AT_STDMAX': False, 'NEAR_WX': 5, 'FINE_STEP_X': 0.1, 'SCALE_IMG2_TO_IMG1': False, 'NEAR_POSITION': 0.0, 'PADDING_MODE': 'edge', 'FLIP_LR': True, 'COMPOSITE_OPTS': {'theta': 10, 'oversampling': 4, 'n_subsampling_y': 10, 'take_log': True, 'near_width': 20}, 'COR_OPTIONS': '', 'MOTOR_OFFSET': 0.0, 'X_ROTATION_AXIS_PIXEL_POSITION': None}, 'gui': {'mode_is_lock': False, 'value_is_lock': False, 'auto_update_estimated_cor': True, 'y_axis_inverted': False}}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
41
43
  <properties node_id="3" format="literal">{'_ewoks_default_inputs': {'data': None, 'nabu_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
42
44
  <properties node_id="4" format="literal">{'_viewer_config': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
43
45
  <properties node_id="5" format="literal">{'_ewoks_default_inputs': {'data': None, 'nabu_volume_params': None, 'nabu_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
44
46
  <properties node_id="6" format="literal">{'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
47
+ <properties node_id="7" format="literal">{'_ewoks_default_inputs': {}, '_ewoks_execinfo': {}, '_ewoks_task_options': {}, '_ewoks_varinfo': {}, 'controlAreaVisible': True, 'default_inputs': {}, 'savedWidgetGeometry': None, '__version__': 1}</properties>
45
48
  </node_properties>
46
49
  <session_state>
47
50
  <window_groups />
@@ -7,22 +7,24 @@
7
7
  <node id="3" name="nabu slice reconstruction" qualified_name="orangecontrib.tomwer.widgets.reconstruction.NabuOW.NabuOW" project_name="tomwer" version="" title="nabu slice reconstruction" position="(649.0, 261.0)" />
8
8
  <node id="4" name="data viewer" qualified_name="orangecontrib.tomwer.widgets.visualization.DataViewerOW.DataViewerOW" project_name="tomwer" version="" title="data viewer" position="(930.222222222222, 248.00000000000003)" />
9
9
  <node id="5" name="nabu volume reconstruction" qualified_name="orangecontrib.tomwer.widgets.reconstruction.NabuVolumeOW.NabuVolumeOW" project_name="tomwer" version="" title="nabu volume reconstruction" position="(926.4444444444445, 404.3333333333334)" />
10
- <node id="6" name="volume viewer" qualified_name="orangecontrib.tomwer.widgets.visualization.VolumeViewerOW.VolumeViewerOW" project_name="tomwer" version="" title="volume viewer" position="(1186.7500000000002, 547.4722222222222)" />
10
+ <node id="6" name="volume viewer" qualified_name="orangecontrib.tomwer.widgets.visualization.VolumeViewerOW.VolumeViewerOW" project_name="tomwer" version="" title="volume viewer" position="(1199.75, 482.4722222222222)" />
11
11
  <node id="7" name="slurm cluster" qualified_name="orangecontrib.tomwer.widgets.cluster.SlurmClusterOW.SlurmClusterOW" project_name="tomwer" version="" title="slurm cluster" position="(475.0, 502.5)" />
12
12
  <node id="8" name="future supervisor" qualified_name="orangecontrib.tomwer.widgets.cluster.FutureSupervisorOW.FutureSupervisorOW" project_name="tomwer" version="" title="future supervisor" position="(1060.2222222222224, 489.9722222222221)" />
13
13
  <node id="9" name="future supervisor" qualified_name="orangecontrib.tomwer.widgets.cluster.FutureSupervisorOW.FutureSupervisorOW" project_name="tomwer" version="" title="future supervisor (1)" position="(800.4999999999997, 329.3333333333333)" />
14
+ <node id="10" name="Data Portal Publishing" qualified_name="orangecontrib.tomwer.widgets.dataportal.PublishProcessedDataOW.PublishProcessedDataOW" project_name="tomwer" version="" title="Data Portal Publishing" position="(1203.0, 707.0)" />
14
15
  </nodes>
15
16
  <links>
16
17
  <link id="0" source_node_id="0" sink_node_id="1" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
17
18
  <link id="1" source_node_id="1" sink_node_id="2" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
18
19
  <link id="2" source_node_id="2" sink_node_id="3" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
19
20
  <link id="3" source_node_id="7" sink_node_id="5" source_channel="cluster_config" sink_channel="cluster_config" enabled="true" source_channel_id="config_out" sink_channel_id="cluster_in" />
20
- <link id="4" source_node_id="5" sink_node_id="8" source_channel="future_tomo_obj" sink_channel="future_tomo_obj" enabled="true" source_channel_id="future_out" sink_channel_id="future_tomo_obj" />
21
+ <link id="4" source_node_id="5" sink_node_id="8" source_channel="future_tomo_obj" sink_channel="future_tomo_obj" enabled="true" source_channel_id="future_out" sink_channel_id="future_in" />
21
22
  <link id="5" source_node_id="8" sink_node_id="6" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
22
23
  <link id="6" source_node_id="7" sink_node_id="3" source_channel="cluster_config" sink_channel="cluster_config" enabled="true" source_channel_id="config_out" sink_channel_id="cluster_in" />
23
- <link id="7" source_node_id="3" sink_node_id="9" source_channel="future_tomo_obj" sink_channel="future_tomo_obj" enabled="true" source_channel_id="future_out" sink_channel_id="future_tomo_obj" />
24
+ <link id="7" source_node_id="3" sink_node_id="9" source_channel="future_tomo_obj" sink_channel="future_tomo_obj" enabled="true" source_channel_id="future_out" sink_channel_id="future_in" />
24
25
  <link id="8" source_node_id="9" sink_node_id="4" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
25
26
  <link id="9" source_node_id="9" sink_node_id="5" source_channel="data" sink_channel="data" enabled="true" source_channel_id="data" sink_channel_id="data" />
27
+ <link id="10" source_node_id="8" sink_node_id="10" source_channel="data_portal_processed_datasets" sink_channel="data_portal_processed_datasets" enabled="true" source_channel_id="data_portal_processed_datasets" sink_channel_id="data_portal_processed_datasets" />
26
28
  </links>
27
29
  <annotations>
28
30
  <arrow id="0" start="(267.0, 56.0)" end="(194.0, 105.0)" fill="#C1272D" />
@@ -36,8 +38,8 @@
36
38
  <text id="8" type="text/plain" rect="(648.75, 45.75, 150.0, 69.0)" font-family="Ubuntu" font-size="16">define one or several slice to be reconstructed</text>
37
39
  <text id="9" type="text/plain" rect="(1022.3333333333333, 124.33333333333331, 150.0, 88.0)" font-family="Ubuntu" font-size="16">display reconstructed slices and browse dataset</text>
38
40
  <arrow id="10" start="(782.5555555555552, 528.5277777777778)" end="(858.8333333333331, 466.111111111111)" fill="#C1272D" />
39
- <arrow id="11" start="(1220.75, 472.0)" end="(1183.75, 510.0)" fill="#C1272D" />
40
- <text id="12" type="text/plain" rect="(1244.75, 439.0, 150.0, 67.0)" font-family="Ubuntu" font-size="16">browse reconstructed volume</text>
41
+ <arrow id="11" start="(1253.75, 396.0)" end="(1216.75, 434.0)" fill="#C1272D" />
42
+ <text id="12" type="text/plain" rect="(1263.75, 361.0, 150.0, 69.0)" font-family="Ubuntu" font-size="16">browse reconstructed volume</text>
41
43
  <text id="13" type="text/plain" rect="(680.4166666666672, 542.5833333333333, 150.0, 50.0)" font-family="Ubuntu" font-size="16">reconstruct volume</text>
42
44
  <arrow id="14" start="(394.75, 594.75)" end="(438.5, 529.75)" fill="#C1272D" />
43
45
  <arrow id="15" start="(987.5000000000002, 316.9444444444446)" end="(888.7500000000002, 332.63888888888914)" fill="#C1272D" />
@@ -49,14 +51,15 @@
49
51
  <node_properties>
50
52
  <properties node_id="0" format="literal">{'_scanIDs': [], 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
51
53
  <properties node_id="1" format="literal">{'_ewoks_default_inputs': {'data': None, 'dark_ref_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
52
- <properties node_id="2" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'manual', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'USE_SINOGRAM': False, 'SINOGRAM_LINE': '', 'SINOGRAM_SUBSAMPLING': 10, 'AXIS_URL_1': '', 'AXIS_URL_2': '', 'LOOK_AT_STDMAX': False, 'NEAR_WX': 5, 'FINE_STEP_X': 0.1, 'SCALE_IMG2_TO_IMG1': False, 'NEAR_POSITION': 0.0, 'PADDING_MODE': 'edge', 'FLIP_LR': True, 'COMPOSITE_OPTS': {'theta': 10, 'n_subsampling_y': 10, 'oversampling': 4, 'take_log': True, 'near_pos': 0, 'near_width': 20}, 'SIDE': 'all', 'COR_OPTIONS': ''}, 'gui': {'mode_is_lock': False, 'value_is_lock': False, 'auto_update_estimated_cor': True}}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
54
+ <properties node_id="2" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'manual', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'SINOGRAM_LINE': '', 'SINOGRAM_SUBSAMPLING': 10, 'AXIS_URL_1': '', 'AXIS_URL_2': '', 'LOOK_AT_STDMAX': False, 'NEAR_WX': 5, 'FINE_STEP_X': 0.1, 'SCALE_IMG2_TO_IMG1': False, 'NEAR_POSITION': 0.0, 'PADDING_MODE': 'edge', 'FLIP_LR': True, 'COMPOSITE_OPTS': {'theta': 10, 'oversampling': 4, 'n_subsampling_y': 10, 'take_log': True, 'near_width': 20}, 'COR_OPTIONS': '', 'MOTOR_OFFSET': 0.0, 'X_ROTATION_AXIS_PIXEL_POSITION': None}, 'gui': {'mode_is_lock': False, 'value_is_lock': False, 'auto_update_estimated_cor': True, 'y_axis_inverted': False}}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
53
55
  <properties node_id="3" format="literal">{'_ewoks_default_inputs': {'data': None, 'nabu_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
54
56
  <properties node_id="4" format="literal">{'_viewer_config': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
55
57
  <properties node_id="5" format="literal">{'_ewoks_default_inputs': {'data': None, 'nabu_volume_params': None, 'nabu_params': None}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
56
58
  <properties node_id="6" format="literal">{'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
57
- <properties node_id="7" format="literal">{'_ewoks_default_inputs': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
58
- <properties node_id="8" format="literal">{'_ewoks_default_inputs': {}, '_ewoks_execinfo': {}, '_ewoks_varinfo': {}, 'controlAreaVisible': True, 'default_inputs': {}, 'savedWidgetGeometry': None, '__version__': 1}</properties>
59
- <properties node_id="9" format="literal">{'_ewoks_default_inputs': {}, '_ewoks_execinfo': {}, '_ewoks_varinfo': {}, 'controlAreaVisible': True, 'default_inputs': {}, 'savedWidgetGeometry': None, '__version__': 1}</properties>
59
+ <properties node_id="7" format="literal">{'_ewoks_default_inputs': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, 'slurm_mode_name': 'GENERIC', '__version__': 1}</properties>
60
+ <properties node_id="8" format="literal">{'_ewoks_default_inputs': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
61
+ <properties node_id="9" format="literal">{'_ewoks_default_inputs': {}, 'controlAreaVisible': True, 'savedWidgetGeometry': None, '__version__': 1}</properties>
62
+ <properties node_id="10" format="literal">{'_ewoks_default_inputs': {}, '_ewoks_execinfo': {}, '_ewoks_task_options': {}, '_ewoks_varinfo': {}, 'controlAreaVisible': True, 'default_inputs': {}, 'savedWidgetGeometry': None, '__version__': 1}</properties>
60
63
  </node_properties>
61
64
  <session_state>
62
65
  <window_groups />
@@ -165,7 +165,7 @@ class _DiscoverThread(qt.QThread):
165
165
 
166
166
  def setConfiguration(self, config: dict):
167
167
  self._root_dir = config.get("start_folder", None)
168
- self._research_type = ScanType.from_value(config["scan_type_searched"])
168
+ self._research_type = ScanType(config["scan_type_searched"])
169
169
  self._file_filter = config.get("file_filter", None)
170
170
  self._look_for_hdf5 = self._research_type in (
171
171
  ScanType.BLISS,
@@ -58,18 +58,29 @@ class NXTomomillMixIn:
58
58
  keyword: self.CONFIG_CLS().to_dict(), # pylint: disable=E1102
59
59
  }
60
60
 
61
- # hack: try to upgrade x_pixel_keys and y_pixels keys to list.
61
+ # hack: try to upgrade sample|detector_x|y_pixel_keys
62
62
  # otherwise has they have the same values and are tuples they have the same id and orange raises an
63
63
  # dump_literals raise a ValueError - check_relaxed - is a recursive structure
64
- try:
65
- default_inputs[keyword]["KEYS_SECTION"]["x_pixel_keys"] = list(
66
- default_inputs[keyword]["KEYS_SECTION"]["x_pixel_keys"]
67
- )
68
- default_inputs[keyword]["KEYS_SECTION"]["y_pixel_keys"] = list(
69
- default_inputs[keyword]["KEYS_SECTION"]["y_pixel_keys"]
70
- )
71
- except KeyError:
72
- pass
64
+ default_inputs_keys_section = default_inputs.get(keyword, {}).get(
65
+ "KEYS_SECTION", {}
66
+ )
67
+ for key in (
68
+ "sample_x_detector_keys",
69
+ "sample_y_detector_keys",
70
+ "detector_x_detector_keys",
71
+ "detector_y_detector_keys",
72
+ "sample_detector_distance",
73
+ "detector_x_pixel_size_keys",
74
+ "detector_y_pixel_size_keys",
75
+ "sample_x_pixel_size_keys",
76
+ "sample_y_pixel_size_keys",
77
+ ):
78
+ try:
79
+ default_inputs_keys_section[key] = list(
80
+ default_inputs_keys_section[key]
81
+ )
82
+ except KeyError:
83
+ pass
73
84
 
74
85
  self.update_default_inputs(
75
86
  **default_inputs,
tomwer/app/axis.py CHANGED
@@ -104,7 +104,7 @@ def main(argv):
104
104
  parser.add_argument(
105
105
  "--mode",
106
106
  default=None,
107
- help=f"Use a specific mode. Available modes are {AxisMode.values()}",
107
+ help=f"Use a specific mode. Available modes are {[item.value for item in AxisMode]}",
108
108
  )
109
109
  parser.add_argument(
110
110
  "--full-image",
@@ -179,8 +179,8 @@ def main(argv):
179
179
 
180
180
  scan = ScanFactory.create_scan_object(options.scan_path, entry=options.entry)
181
181
 
182
- dark_method = ReduceMethod.from_value(options.dark_method)
183
- flat_method = ReduceMethod.from_value(options.flat_method)
182
+ dark_method = ReduceMethod(options.dark_method)
183
+ flat_method = ReduceMethod(options.flat_method)
184
184
 
185
185
  if options.run:
186
186
  exit(
@@ -1,6 +1,7 @@
1
1
  # coding: utf-8
2
2
  from __future__ import annotations
3
3
 
4
+ from enum import Enum as _Enum
4
5
  import getpass
5
6
  import logging
6
7
  import socket
@@ -10,7 +11,6 @@ from multiprocessing import Process
10
11
 
11
12
  from jsonrpc import JSONRPCResponseManager, dispatcher
12
13
  from psutil import process_iter
13
- from silx.utils.enum import Enum as _Enum
14
14
  from werkzeug.serving import run_simple
15
15
  from werkzeug.wrappers import Request, Response
16
16
 
@@ -26,12 +26,6 @@ class TangoAcquisitionStatus(_Enum):
26
26
  ENDED = "ended"
27
27
 
28
28
 
29
- class _TangoState:
30
- MOVING = "moving"
31
- ON = "on"
32
- FAULT = "fault"
33
-
34
-
35
29
  class BlissAcquisition:
36
30
  """Define an acquisition made with bliss / tango"""
37
31
 
@@ -59,7 +53,7 @@ class BlissAcquisition:
59
53
  self.scan_numbers.append(scan_number)
60
54
 
61
55
  def set_status(self, status):
62
- self.status = TangoAcquisitionStatus.from_value(status)
56
+ self.status = TangoAcquisitionStatus(status)
63
57
 
64
58
  def end(self, end_time, succeed: bool, error: str | None):
65
59
  if succeed is True:
@@ -1,5 +1,5 @@
1
1
  import numpy
2
- from silx.utils.enum import Enum as _Enum
2
+ from enum import Enum as _Enum
3
3
 
4
4
 
5
5
  class Binning(_Enum):
@@ -18,7 +18,7 @@ class Binning(_Enum):
18
18
  raise TypeError("data should be a numpy array")
19
19
  if not data.ndim == 2:
20
20
  raise ValueError("data is expected to be 2d")
21
- binning = Binning.from_value(binning)
21
+ binning = Binning(binning)
22
22
  if binning is Binning.ONE_BY_ONE:
23
23
  return data
24
24
  elif binning is Binning.TWO_BY_TWO:
@@ -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
  PROPOSAL_GALLERY_DIR_NAME = "GALLERY"
@@ -49,9 +49,7 @@ def change_image_key_control(scan: NXtomoScan, config: dict) -> TomwerScanBase:
49
49
  modifications = {}
50
50
 
51
51
  image_keys_set = set(modifications.values())
52
- image_keys_set = set(
53
- [ImageKey.from_value(image_key) for image_key in image_keys_set]
54
- )
52
+ image_keys_set = set([ImageKey(image_key) for image_key in image_keys_set])
55
53
  for image_key_type in image_keys_set:
56
54
  frame_indexes_dict = dict(
57
55
  filter(lambda item: item[1] is image_key_type, modifications.items())
@@ -65,7 +63,7 @@ def change_image_key_control(scan: NXtomoScan, config: dict) -> TomwerScanBase:
65
63
  image_key_control_value=image_key_type.value,
66
64
  logger=_logger,
67
65
  )
68
- scan.clear_frames_caches()
66
+ scan.clear_frames_cache()
69
67
  return scan
70
68
 
71
69
 
@@ -181,8 +179,8 @@ class ImageKeyUpgraderTask(
181
179
  """
182
180
  retrieve frame indices to be updated
183
181
  """
184
- from_image_key = ImageKey.from_value(from_image_key)
185
- to_image_key = ImageKey.from_value(to_image_key)
182
+ from_image_key = ImageKey(from_image_key)
183
+ to_image_key = ImageKey(to_image_key)
186
184
 
187
185
  config = {}
188
186
  for i_frame, frame in enumerate(scan.frames):
@@ -33,9 +33,13 @@ class NXtomoEditorKeys:
33
33
  """namespace to store all keys used by the nxtomo editor"""
34
34
 
35
35
  ENERGY = "instrument.beam.energy"
36
- X_PIXEL_SIZE = "instrument.detector.x_pixel_size"
37
- Y_PIXEL_SIZE = "instrument.detector.y_pixel_size"
36
+ DETECTOR_X_PIXEL_SIZE = "instrument.detector.x_pixel_size"
37
+ DETECTOR_Y_PIXEL_SIZE = "instrument.detector.y_pixel_size"
38
38
  SAMPLE_DETECTOR_DISTANCE = "instrument.detector.distance"
39
+ SAMPLE_SOURCE_DISTANCE = "instrument.source.distance"
40
+ SAMPLE_X_PIXEL_SIZE = "sample.x_pixel_size"
41
+ SAMPLE_Y_PIXEL_SIZE = "sample.y_pixel_size"
42
+ PROPAGATION_DISTANCE = "sample.propagation_distance"
39
43
  FIELD_OF_VIEW = "instrument.detector.field_of_view"
40
44
  X_FLIPPED = "instrument.detector.x_flipped"
41
45
  Y_FLIPPED = "instrument.detector.y_flipped"
@@ -125,8 +129,8 @@ class NXtomoEditorTask(
125
129
  overwrite=True,
126
130
  )
127
131
  # clear caches to make sure all modifications will be considered
128
- scan.clear_caches()
129
- scan.clear_frames_caches()
132
+ scan.clear_cache()
133
+ scan.clear_frames_cache()
130
134
  self.outputs.data = scan
131
135
 
132
136
  @staticmethod
@@ -239,7 +243,7 @@ class NXtomoEditorTask(
239
243
  """
240
244
  nexus_paths = get_nexus_paths(nexus_version)
241
245
 
242
- return {
246
+ mapping = {
243
247
  # energy
244
248
  NXtomoEditorKeys.ENERGY: _EditorFieldInfo(
245
249
  nexus_path=nexus_paths.ENERGY_PATH,
@@ -248,25 +252,17 @@ class NXtomoEditorTask(
248
252
  name="energy",
249
253
  n_value=1,
250
254
  ),
251
- # x pixel size
252
- NXtomoEditorKeys.X_PIXEL_SIZE: _EditorFieldInfo(
253
- nexus_path=nexus_paths.X_PIXEL_SIZE_PATH,
255
+ # sample / detector distance
256
+ NXtomoEditorKeys.SAMPLE_DETECTOR_DISTANCE: _EditorFieldInfo(
257
+ nexus_path=nexus_paths.SAMPLE_DETECTOR_DISTANCE_PATH,
254
258
  expected_type=float,
255
259
  units="m",
256
- name="x pixel size",
260
+ name="sample detector distance",
257
261
  n_value=1,
258
262
  ),
259
- # y pixel size
260
- NXtomoEditorKeys.Y_PIXEL_SIZE: _EditorFieldInfo(
261
- nexus_path=nexus_paths.Y_PIXEL_SIZE_PATH,
262
- expected_type=float,
263
- units="m",
264
- name="y pixel size",
265
- n_value=1,
266
- ),
267
- # sample / detector distance
268
- NXtomoEditorKeys.SAMPLE_DETECTOR_DISTANCE: _EditorFieldInfo(
269
- nexus_path=nexus_paths.DISTANCE_PATH,
263
+ # sample / source distance
264
+ NXtomoEditorKeys.SAMPLE_SOURCE_DISTANCE: _EditorFieldInfo(
265
+ nexus_path=nexus_paths.SAMPLE_SOURCE_DISTANCE_PATH,
270
266
  expected_type=float,
271
267
  units="m",
272
268
  name="sample detector distance",
@@ -304,4 +300,46 @@ class NXtomoEditorTask(
304
300
  name="z translation",
305
301
  n_value=n_frames,
306
302
  ),
303
+ # detector x pixel size
304
+ NXtomoEditorKeys.DETECTOR_X_PIXEL_SIZE: _EditorFieldInfo(
305
+ nexus_path=nexus_paths.DETECTOR_X_PIXEL_SIZE_PATH,
306
+ expected_type=float,
307
+ units="m",
308
+ name="detector x pixel size",
309
+ n_value=1,
310
+ ),
311
+ # detector y pixel size
312
+ NXtomoEditorKeys.DETECTOR_Y_PIXEL_SIZE: _EditorFieldInfo(
313
+ nexus_path=nexus_paths.DETECTOR_Y_PIXEL_SIZE_PATH,
314
+ expected_type=float,
315
+ units="m",
316
+ name="detector y pixel size",
317
+ n_value=1,
318
+ ),
319
+ # sample x pixel size
320
+ NXtomoEditorKeys.SAMPLE_X_PIXEL_SIZE: _EditorFieldInfo(
321
+ nexus_path=nexus_paths.SAMPLE_X_PIXEL_SIZE_PATH,
322
+ expected_type=float,
323
+ units="m",
324
+ name="sample x pixel size",
325
+ n_value=1,
326
+ ),
327
+ # sample y pixel size
328
+ NXtomoEditorKeys.SAMPLE_Y_PIXEL_SIZE: _EditorFieldInfo(
329
+ nexus_path=nexus_paths.SAMPLE_Y_PIXEL_SIZE_PATH,
330
+ expected_type=float,
331
+ units="m",
332
+ name="sample y pixel size",
333
+ n_value=1,
334
+ ),
335
+ # propagation distance
336
+ NXtomoEditorKeys.PROPAGATION_DISTANCE: _EditorFieldInfo(
337
+ nexus_path=nexus_paths.PROPAGATION_DISTANCE,
338
+ expected_type=float,
339
+ units="m",
340
+ name="propagation distance",
341
+ n_value=1,
342
+ ),
307
343
  }
344
+
345
+ return mapping
@@ -1,10 +1,11 @@
1
1
  from __future__ import annotations
2
+
2
3
  import os
4
+ from enum import Enum
3
5
  import warnings
4
- from silx.utils.enum import Enum as _Enum
5
6
 
6
7
 
7
- class ProcessDataOutputDirMode(_Enum):
8
+ class ProcessDataOutputDirMode(Enum):
8
9
  IN_SCAN_FOLDER = "same folder as scan"
9
10
  PROCESSED_DATA_FOLDER = "PROCESSED_DATA folder"
10
11
  OTHER = "other"
@@ -25,10 +26,10 @@ class ProcessDataOutputDirMode(_Enum):
25
26
  stacklevel=2,
26
27
  )
27
28
  return cls.PROCESSED_DATA_FOLDER
28
- return super().from_value(value)
29
+ return ProcessDataOutputDirMode(value)
29
30
 
30
31
 
31
- class NabuOutputFileFormat(_Enum):
32
+ class NabuOutputFileFormat(Enum):
32
33
  TIFF = "tiff"
33
34
  HDF5 = "hdf5"
34
35
  JP2K = "jp2"
@@ -39,7 +40,7 @@ class NabuOutputFileFormat(_Enum):
39
40
  def from_value(cls, value):
40
41
  if isinstance(value, str):
41
42
  value = value.lstrip(".")
42
- return super().from_value(value)
43
+ return NabuOutputFileFormat(value)
43
44
 
44
45
 
45
46
  def get_file_format(file_str):
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
- from silx.utils.enum import Enum as _Enum
3
+ from enum import Enum as _Enum
4
4
 
5
5
 
6
6
  class CorAngleMode(_Enum):
@@ -18,4 +18,4 @@ class CorAngleMode(_Enum):
18
18
  elif value == 2:
19
19
  return CorAngleMode.manual_selection
20
20
  else:
21
- return super().from_value(value=value)
21
+ return CorAngleMode(value=value)
@@ -65,6 +65,7 @@ def adapt_tomwer_scan_to_nabu(scan: TomwerScanBase, do_flatfield: bool):
65
65
  update_dataset_info_flats_darks(
66
66
  dataset_infos,
67
67
  flatfield_mode=do_flatfield,
68
+ loading_mode="load_if_present",
68
69
  )
69
70
  except ValueError as exception:
70
71
  # nabu raise an error if no darks / flats set. But this can make sense at this stage if the NXtomo has no
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
 
3
- from silx.utils.enum import Enum as _Enum
3
+ from enum import Enum as _Enum
4
4
  from tomwer.core.process.reconstruction.axis.side import Side
5
5
 
6
6
  _logger = logging.getLogger(__name__)
@@ -120,7 +120,7 @@ class AxisMode(_Enum):
120
120
  elif value in ("read", "read from estimated cor"):
121
121
  value = AxisMode.read
122
122
 
123
- return super().from_value(value=value)
123
+ return AxisMode(value)
124
124
 
125
125
  def requires_radio_indices(self) -> bool:
126
126
  return self in (
@@ -5,7 +5,7 @@ from collections import namedtuple
5
5
 
6
6
  import numpy
7
7
  from silx.io.url import DataUrl
8
- from silx.utils.enum import Enum as _Enum
8
+ from enum import Enum as _Enum
9
9
  from tomoscan.esrf.scan.utils import get_data
10
10
 
11
11
  from tomwer.core.process.reconstruction.utils.cor import relative_pos_to_absolute
@@ -60,8 +60,8 @@ class AxisCalculationInput(_Enum):
60
60
  if type(value) is str and len(value.split("_")) == 2:
61
61
  proj_type, pag = value.split("_")
62
62
  value_pag = True if pag == _WITH_PAG else False
63
- value_proj = ProjectionType.from_value(proj_type)
64
- return cls.from_value(_calculation_conf(value_proj, value_pag))
63
+ value_proj = ProjectionType(proj_type)
64
+ return cls(_calculation_conf(value_proj, value_pag))
65
65
  elif isinstance(value, cls):
66
66
  return value
67
67
  else:
@@ -348,7 +348,7 @@ class AxisRP:
348
348
  @estimated_cor.setter
349
349
  def estimated_cor(self, value: Side | float | None):
350
350
  try:
351
- value = Side.from_value(value)
351
+ value = Side(value)
352
352
  except ValueError:
353
353
  pass
354
354
  if self.__estimated_cor != value:
@@ -1,6 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
- from silx.utils.enum import Enum as _Enum
3
+ from enum import Enum as _Enum
4
4
 
5
5
 
6
6
  class ProjectionType(_Enum):
@@ -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 Side(_Enum):
@@ -341,13 +341,13 @@ class DarkRefsTask(
341
341
  return REDUCER_TARGET.FLATS
342
342
  elif target == "dark":
343
343
  return REDUCER_TARGET.DARKS
344
- return REDUCER_TARGET.from_value(target)
344
+ return REDUCER_TARGET(target)
345
345
 
346
346
  def compute(
347
347
  self, scan, target: REDUCER_TARGET, method: ReduceMethod, overwrite: bool
348
348
  ):
349
349
  target = self._target_to_reducer_target(target)
350
- method = ReduceMethod.from_value(method)
350
+ method = ReduceMethod(method)
351
351
  if target is REDUCER_TARGET.DARKS:
352
352
  reduced_darks, metadata = scan.compute_reduced_darks(
353
353
  reduced_method=method,
@@ -115,7 +115,7 @@ class DarkRefsCopy(DarkRefsTask):
115
115
  is provided instead of the 'darks' or 'flats' one.
116
116
  :return: tuple as (data, metadata)
117
117
  """
118
- reduced_target = REDUCER_TARGET.from_value(reduced_target)
118
+ reduced_target = REDUCER_TARGET(reduced_target)
119
119
 
120
120
  with cwd_context(url.file_path()):
121
121
  try:
@@ -3,7 +3,6 @@ from __future__ import annotations
3
3
 
4
4
  import enum
5
5
 
6
- from silx.utils.enum import Enum as _Enum
7
6
  from tomoscan.framereducer.method import ReduceMethod
8
7
 
9
8
  from tomwer.core.process.reconstruction.darkref.settings import (
@@ -17,7 +16,7 @@ from tomwer.core.utils.deprecation import deprecated
17
16
  # TODO: those classes (when, method) should be linked / embedded in the DarkRef
18
17
  # method
19
18
  @enum.unique
20
- class When(_Enum):
19
+ class When(enum.Enum):
21
20
  never = (0,)
22
21
  before = (1,)
23
22
  after = (2,)
@@ -35,7 +34,7 @@ def _from_value_reduce_method_backward_compatibility(value) -> ReduceMethod:
35
34
  elif value in ("last", 11, (11,)):
36
35
  return ReduceMethod.FIRST
37
36
  else:
38
- return ReduceMethod.from_value(value)
37
+ return ReduceMethod(value)
39
38
 
40
39
 
41
40
  class DKRFRP(_ReconsParam):
@@ -129,6 +129,7 @@ class CastVolumeTask(
129
129
 
130
130
  # build output volume object
131
131
  overwrite = configuration.get("overwrite", False)
132
+ remove_input_volume = configuration.get("remove_input_volume", False)
132
133
  output_volume.overwrite = overwrite
133
134
  cratios = configuration.get("compression_ratios", None)
134
135
  if cratios is not None:
@@ -161,6 +162,7 @@ class CastVolumeTask(
161
162
  rescale_max_percentile=rescale_max_percentile,
162
163
  save=True,
163
164
  store=False,
165
+ remove_input_volume=remove_input_volume,
164
166
  )
165
167
  except Exception as e:
166
168
  mess = f"volume cast of {str(input_volume)} failed. Reason is {str(e)}"
@@ -203,7 +205,8 @@ class CastVolumeTask(
203
205
  command += f" --rescale_min_percentile={rescale_min_percentile}"
204
206
  if rescale_max_percentile is not None:
205
207
  command += f" --rescale_max_percentile={rescale_max_percentile}"
206
-
208
+ if remove_input_volume:
209
+ command += " --remove-input-volume"
207
210
  return command
208
211
 
209
212
  script_name = get_slurm_script_name(prefix="nabu_cast")
@@ -34,7 +34,9 @@ class NabuHelicalPrepareWeightsDouble(
34
34
  scan.master_file,
35
35
  extra_options={"h5_entry": scan.entry},
36
36
  )
37
- update_dataset_info_flats_darks(dataset_info, flatfield_mode=1)
37
+ update_dataset_info_flats_darks(
38
+ dataset_info, flatfield_mode=1, loading_mode="load_if_present"
39
+ )
38
40
 
39
41
  mappe = 0
40
42
  my_flats = load_images_from_dataurl_dict(dataset_info.flats)