tomwer 1.4.19__py3-none-any.whl → 1.5.0rc0__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 (84) 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/reducedarkflat.py +2 -2
  6. tomwer/core/process/edit/imagekeyeditor.py +4 -6
  7. tomwer/core/process/edit/nxtomoeditor.py +58 -20
  8. tomwer/core/process/output.py +6 -5
  9. tomwer/core/process/reconstruction/axis/anglemode.py +2 -2
  10. tomwer/core/process/reconstruction/axis/axis.py +1 -0
  11. tomwer/core/process/reconstruction/darkref/darkrefs.py +2 -2
  12. tomwer/core/process/reconstruction/darkref/darkrefscopy.py +1 -1
  13. tomwer/core/process/reconstruction/darkref/params.py +1 -1
  14. tomwer/core/process/reconstruction/nabu/castvolume.py +4 -1
  15. tomwer/core/process/reconstruction/nabu/helical.py +3 -1
  16. tomwer/core/process/reconstruction/nabu/nabuscores.py +1 -1
  17. tomwer/core/process/reconstruction/nabu/nabuslices.py +4 -4
  18. tomwer/core/process/reconstruction/nabu/plane.py +2 -2
  19. tomwer/core/process/reconstruction/nabu/test/test_castvolume.py +2 -0
  20. tomwer/core/process/reconstruction/nabu/utils.py +15 -14
  21. tomwer/core/process/reconstruction/normalization/params.py +1 -1
  22. tomwer/core/process/reconstruction/output.py +2 -2
  23. tomwer/core/process/reconstruction/tests/test_axis.py +1 -1
  24. tomwer/core/process/stitching/metadataholder.py +5 -5
  25. tomwer/core/process/stitching/nabustitcher.py +1 -4
  26. tomwer/core/scan/edfscan.py +3 -3
  27. tomwer/core/scan/nxtomoscan.py +3 -3
  28. tomwer/core/scan/scanbase.py +2 -2
  29. tomwer/core/tomwer_object.py +1 -1
  30. tomwer/core/utils/nxtomoutils.py +2 -2
  31. tomwer/core/utils/spec.py +6 -3
  32. tomwer/gui/control/datadiscovery.py +1 -1
  33. tomwer/gui/control/reducedarkflatselector.py +4 -4
  34. tomwer/gui/edit/imagekeyeditor.py +7 -9
  35. tomwer/gui/edit/nxtomoeditor.py +420 -112
  36. tomwer/gui/edit/tests/test_nx_editor.py +154 -82
  37. tomwer/gui/reconstruction/axis/CalculationWidget.py +1 -1
  38. tomwer/gui/reconstruction/axis/EstimatedCORWidget.py +12 -8
  39. tomwer/gui/reconstruction/darkref/darkrefwidget.py +2 -2
  40. tomwer/gui/reconstruction/nabu/castvolume.py +16 -1
  41. tomwer/gui/reconstruction/nabu/nabuconfig/base.py +1 -1
  42. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +1 -1
  43. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +2 -2
  44. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +2 -4
  45. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +71 -49
  46. tomwer/gui/reconstruction/nabu/nabuflow.py +3 -13
  47. tomwer/gui/reconstruction/nabu/slices.py +6 -6
  48. tomwer/gui/reconstruction/nabu/test/test_cast_volume.py +19 -0
  49. tomwer/gui/reconstruction/normalization/intensity.py +2 -2
  50. tomwer/gui/reconstruction/saaxis/dimensionwidget.py +71 -67
  51. tomwer/gui/reconstruction/scores/scoreplot.py +15 -7
  52. tomwer/gui/reconstruction/tests/test_saaxis.py +18 -16
  53. tomwer/gui/stitching/SingleAxisStitchingWidget.py +8 -8
  54. tomwer/gui/stitching/StitchingOptionsWidget.py +1 -1
  55. tomwer/gui/stitching/alignment.py +8 -8
  56. tomwer/gui/stitching/config/axisparams.py +2 -2
  57. tomwer/gui/stitching/config/output.py +1 -1
  58. tomwer/gui/stitching/config/stitchingstrategies.py +4 -6
  59. tomwer/gui/stitching/config/tomoobjdetails.py +21 -13
  60. tomwer/gui/stitching/normalization.py +6 -6
  61. tomwer/gui/stitching/tests/test_ZStitchingWindow.py +8 -1
  62. tomwer/gui/stitching/tests/test_preview.py +10 -7
  63. tomwer/gui/stitching/tests/utils.py +27 -18
  64. tomwer/gui/stitching/z_stitching/fineestimation.py +7 -9
  65. tomwer/gui/stitching/z_stitching/tests/test_raw_estimation.py +18 -7
  66. tomwer/gui/stitching/z_stitching/tests/test_stitching_window.py +7 -2
  67. tomwer/gui/utils/buttons.py +53 -35
  68. tomwer/gui/utils/flow.py +1 -1
  69. tomwer/gui/utils/unitsystem.py +44 -33
  70. tomwer/gui/visualization/diffviewer/diffviewer.py +4 -4
  71. tomwer/gui/visualization/diffviewer/shiftwidget.py +4 -6
  72. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +25 -13
  73. tomwer/model/dataset.py +0 -0
  74. tomwer/tasks/reconstruction/cleardarkflat.py +42 -0
  75. tomwer/tests/app/test_stitching.py +1 -1
  76. tomwer/tests/orangecontrib/tomwer/widgets/edit/tests/test_nxtomo_editor.py +32 -20
  77. tomwer/tests/orangecontrib/tomwer/widgets/reconstruction/tests/test_nabu_widget.py +1 -1
  78. tomwer/version.py +3 -3
  79. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.dist-info}/METADATA +8 -8
  80. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.dist-info}/RECORD +84 -82
  81. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.dist-info}/WHEEL +1 -1
  82. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.dist-info}/entry_points.txt +0 -0
  83. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.dist-info}/licenses/LICENSE +0 -0
  84. {tomwer-1.4.19.dist-info → tomwer-1.5.0rc0.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,
@@ -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(
@@ -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
@@ -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:
@@ -35,7 +35,7 @@ def _from_value_reduce_method_backward_compatibility(value) -> ReduceMethod:
35
35
  elif value in ("last", 11, (11,)):
36
36
  return ReduceMethod.FIRST
37
37
  else:
38
- return ReduceMethod.from_value(value)
38
+ return ReduceMethod(value)
39
39
 
40
40
 
41
41
  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)
@@ -390,7 +390,7 @@ class _Reconstructor(_NabuBaseReconstructor):
390
390
  _config["reconstruction"]["end_z"] = self.slice_index
391
391
  else:
392
392
  raise ValueError(
393
- f"self.axis has an invalid value: {self.axis} when expected to be in {NabuPlane.values()}"
393
+ f"self.axis has an invalid value: {self.axis} when expected to be in {[item.value for item in NabuPlane]}"
394
394
  )
395
395
  return _config, file_prefix
396
396
 
@@ -54,7 +54,7 @@ from nabu.pipeline.fullfield.nabu_config import (
54
54
  nabu_config as nabu_fullfield_default_config,
55
55
  )
56
56
  from processview.core.superviseprocess import SuperviseProcess
57
- from silx.utils.enum import Enum as _Enum
57
+ from enum import Enum as _Enum
58
58
 
59
59
  from tomwer.core.process.task import Task
60
60
  from tomwer.core.scan.edfscan import EDFTomoScan
@@ -612,7 +612,7 @@ class SingleSliceRunner(_NabuBaseReconstructor):
612
612
  config["reconstruction"]["end_z"] = self.slice_index
613
613
  else:
614
614
  raise ValueError(
615
- f"self.axis has an invalid value: {self.axis} when expected to be in {NabuPlane.values()}"
615
+ f"self.axis has an invalid value: {self.axis} when expected to be in {[item.value for item in NabuPlane]}"
616
616
  )
617
617
 
618
618
  if self.slice_index is not None:
@@ -842,7 +842,7 @@ class NabuSliceMode(_Enum):
842
842
  def getSlices(slices, scan, axis=NabuPlane.XY) -> tuple:
843
843
  res = []
844
844
  try:
845
- mode = NabuSliceMode.from_value(slices)
845
+ mode = NabuSliceMode(slices)
846
846
  except ValueError:
847
847
  try:
848
848
  res = utils.retrieve_lst_of_value_from_str(slices, type_=int)
@@ -850,7 +850,7 @@ class NabuSliceMode(_Enum):
850
850
  pass
851
851
  else:
852
852
  if mode == mode.MIDDLE:
853
- axis = NabuPlane.from_value(axis)
853
+ axis = NabuPlane(axis)
854
854
  if axis is NabuPlane.XY:
855
855
  n_slice = scan.dim_2 or 2048
856
856
  elif axis in (NabuPlane.YZ, NabuPlane.XZ):
@@ -1,6 +1,6 @@
1
1
  """Define nabu Axis"""
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 NabuPlane(_Enum):
@@ -16,4 +16,4 @@ class NabuPlane(_Enum):
16
16
  return NabuPlane.XZ
17
17
  elif value == 2:
18
18
  return NabuPlane.YZ
19
- return super().from_value(value=value)
19
+ return NabuPlane(value=value)
@@ -107,6 +107,7 @@ def test_cast_volume_32bitstiff_to_16bits_tiff(tmp_path):
107
107
  "output_dir": str(save_dir),
108
108
  "output_file_format": NabuOutputFileFormat.HDF5,
109
109
  "output_data_type": numpy.int16,
110
+ "remove_input_volume": True,
110
111
  },
111
112
  "output_volume": output_volume.get_identifier().to_str(),
112
113
  },
@@ -114,3 +115,4 @@ def test_cast_volume_32bitstiff_to_16bits_tiff(tmp_path):
114
115
  task.run()
115
116
  assert task.outputs.volume.load_data().shape == (20, 100, 100)
116
117
  assert task.outputs.volume.load_data().dtype == numpy.int16
118
+ assert not os.path.exists(volume.data_url.file_path())