tomwer 1.3.7__py3-none-any.whl → 1.3.9__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 (109) hide show
  1. tomwer/core/process/reconstruction/nabu/nabuslices.py +0 -48
  2. tomwer/core/process/reconstruction/nabu/utils.py +2 -0
  3. tomwer/gui/control/datawatcher/datawatcher.py +1 -24
  4. tomwer/version.py +1 -1
  5. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/METADATA +1 -1
  6. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/RECORD +12 -109
  7. orangecontrib/tomwer/test/TestAcquisition.py +0 -246
  8. orangecontrib/tomwer/widgets/cluster/test/test_future_supervisorow.py +0 -87
  9. orangecontrib/tomwer/widgets/cluster/test/test_slurm_clusterow.py +0 -67
  10. orangecontrib/tomwer/widgets/control/test/test_advancement.py +0 -51
  11. orangecontrib/tomwer/widgets/control/test/test_data_validator.py +0 -55
  12. orangecontrib/tomwer/widgets/control/test/test_datadiscovery.py +0 -131
  13. orangecontrib/tomwer/widgets/control/test/test_datalist.py +0 -70
  14. orangecontrib/tomwer/widgets/control/test/test_datalistener.py +0 -137
  15. orangecontrib/tomwer/widgets/control/test/test_dataselector.py +0 -95
  16. orangecontrib/tomwer/widgets/control/test/test_datawatcher.py +0 -436
  17. orangecontrib/tomwer/widgets/control/test/test_emailow.py +0 -29
  18. orangecontrib/tomwer/widgets/control/test/test_notifier.py +0 -51
  19. orangecontrib/tomwer/widgets/control/test/test_nxtomo_concatenate_ow.py +0 -64
  20. orangecontrib/tomwer/widgets/control/test/test_nxtomomill.py +0 -160
  21. orangecontrib/tomwer/widgets/control/test/test_reduce_dark_flat_selector.py +0 -40
  22. orangecontrib/tomwer/widgets/control/test/test_singletomoobj.py +0 -40
  23. orangecontrib/tomwer/widgets/control/test/test_timerow.py +0 -51
  24. orangecontrib/tomwer/widgets/control/test/test_tomoobj_serie.py +0 -96
  25. orangecontrib/tomwer/widgets/control/test/test_volume_selector.py +0 -69
  26. orangecontrib/tomwer/widgets/control/test/test_volumesymlink.py +0 -51
  27. orangecontrib/tomwer/widgets/debugtools/test/test_dataset_generator.py +0 -57
  28. orangecontrib/tomwer/widgets/debugtools/test/test_object_inspector.py +0 -62
  29. orangecontrib/tomwer/widgets/other/test/test_pythonscript.py +0 -31
  30. orangecontrib/tomwer/widgets/reconstruction/test/test_axis.py +0 -224
  31. orangecontrib/tomwer/widgets/reconstruction/test/test_cast_volumeow.py +0 -85
  32. orangecontrib/tomwer/widgets/reconstruction/test/test_dark_refs_widget.py +0 -136
  33. orangecontrib/tomwer/widgets/reconstruction/test/test_delta_beta_selector.py +0 -15
  34. orangecontrib/tomwer/widgets/reconstruction/test/test_i_norm.py +0 -226
  35. orangecontrib/tomwer/widgets/reconstruction/test/test_nabu_helical_prepare_weights_double.py +0 -20
  36. orangecontrib/tomwer/widgets/reconstruction/test/test_nabu_volume.py +0 -100
  37. orangecontrib/tomwer/widgets/reconstruction/test/test_nabu_widget.py +0 -107
  38. orangecontrib/tomwer/widgets/reconstruction/test/test_sa_delta_beta.py +0 -194
  39. orangecontrib/tomwer/widgets/reconstruction/test/test_saaxis.py +0 -220
  40. orangecontrib/tomwer/widgets/stitching/test/test_zstitching.py +0 -308
  41. orangecontrib/tomwer/widgets/test/test_conditions.py +0 -111
  42. orangecontrib/tomwer/widgets/test/test_darkref.py +0 -251
  43. orangecontrib/tomwer/widgets/test/test_foldertransfert.py +0 -131
  44. orangecontrib/tomwer/widgets/visualization/test/test_dataviewerow.py +0 -83
  45. orangecontrib/tomwer/widgets/visualization/test/test_diffviewerow.py +0 -65
  46. orangecontrib/tomwer/widgets/visualization/test/test_live_sliceow.py +0 -63
  47. orangecontrib/tomwer/widgets/visualization/test/test_nxtomo_metadata_viewer.py +0 -29
  48. orangecontrib/tomwer/widgets/visualization/test/test_radio_stackow.py +0 -56
  49. orangecontrib/tomwer/widgets/visualization/test/test_sample_movedow.py +0 -72
  50. orangecontrib/tomwer/widgets/visualization/test/test_sinogram_viewerow.py +0 -56
  51. orangecontrib/tomwer/widgets/visualization/test/test_slice_stackow.py +0 -57
  52. orangecontrib/tomwer/widgets/visualization/test/test_volume_viewerow.py +0 -57
  53. tomwer/core/log/test/test_processlog.py +0 -41
  54. tomwer/core/process/edit/test/test_darkflatpatch.py +0 -269
  55. tomwer/core/process/edit/test/test_imagekey_editor.py +0 -125
  56. tomwer/core/process/icat/test/test_create_screenshots.py +0 -98
  57. tomwer/core/process/icat/test/test_gallery.py +0 -170
  58. tomwer/core/process/reconstruction/nabu/test/test_castvolume.py +0 -143
  59. tomwer/core/process/reconstruction/nabu/test/test_nabu_utils.py +0 -203
  60. tomwer/core/process/reconstruction/nabu/test/test_nabunormalization.py +0 -222
  61. tomwer/core/process/script/test/test_script.py +0 -68
  62. tomwer/core/process/stitching/test/test_metadataholder.py +0 -17
  63. tomwer/core/process/visualization/test/test_data_viewer.py +0 -39
  64. tomwer/core/process/visualization/test/test_diff_viewer.py +0 -39
  65. tomwer/core/process/visualization/test/test_image_stack_viewer.py +0 -41
  66. tomwer/core/process/visualization/test/test_radio_stack.py +0 -39
  67. tomwer/core/process/visualization/test/test_sample_moved.py +0 -41
  68. tomwer/core/process/visualization/test/test_sinogram_viewer.py +0 -39
  69. tomwer/core/process/visualization/test/test_slice_stack.py +0 -39
  70. tomwer/core/process/visualization/test/test_volume_viewer.py +0 -39
  71. tomwer/core/utils/test/test_image.py +0 -30
  72. tomwer/core/utils/test/test_nxtomo.py +0 -66
  73. tomwer/core/utils/test/test_scan_utils.py +0 -46
  74. tomwer/core/utils/test/test_time.py +0 -6
  75. tomwer/core/volume/test/test_volumes.py +0 -21
  76. tomwer/gui/control/serie/test/test_creator.py +0 -451
  77. tomwer/gui/control/serie/test/test_nxtomo_concatenate.py +0 -21
  78. tomwer/gui/icat/test/test_create_screenshots_gui.py +0 -23
  79. tomwer/gui/icat/test/test_gallery_gui.py +0 -37
  80. tomwer/gui/reconstruction/nabu/test/test_check.py +0 -92
  81. tomwer/gui/reconstruction/nabu/test/test_ctf.py +0 -46
  82. tomwer/gui/reconstruction/nabu/test/test_helical.py +0 -21
  83. tomwer/gui/reconstruction/nabu/test/test_nabu_preprocessing.py +0 -81
  84. tomwer/gui/reconstruction/normalization/test/test_intensity.py +0 -119
  85. tomwer/gui/stitching/config/tests/test_axisparams.py +0 -25
  86. tomwer/gui/stitching/tests/test_axis_ordered_list.py +0 -21
  87. tomwer/gui/stitching/tests/test_normalization.py +0 -27
  88. tomwer/gui/stitching/tests/test_preview.py +0 -85
  89. tomwer/gui/stitching/tests/test_stitching_raw.py +0 -110
  90. tomwer/gui/stitching/tests/test_z_stitching.py +0 -67
  91. tomwer/gui/stitching/tests/utils.py +0 -79
  92. tomwer/gui/stitching/z_stitching/tests/test_fine_estimation.py +0 -35
  93. tomwer/gui/stitching/z_stitching/tests/test_raw_estimation.py +0 -215
  94. tomwer/gui/stitching/z_stitching/tests/test_stitching_window.py +0 -51
  95. tomwer/gui/utils/test/test_completer.py +0 -67
  96. tomwer/gui/utils/test/test_line_selector.py +0 -21
  97. tomwer/gui/utils/test/test_splashscreen.py +0 -8
  98. tomwer/gui/utils/test/test_vignettes.py +0 -68
  99. tomwer/io/utils/test/test_raw_and_processed_data.py +0 -10
  100. tomwer/io/utils/test/test_utils.py +0 -92
  101. tomwer/tests/test_ewoks/test_conversion.py +0 -104
  102. tomwer/tests/test_ewoks/test_single_node_execution.py +0 -112
  103. tomwer/tests/test_ewoks/test_workflows.py +0 -160
  104. /tomwer-1.3.7-py3.11-nspkg.pth → /tomwer-1.3.9-py3.11-nspkg.pth +0 -0
  105. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/LICENSE +0 -0
  106. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/WHEEL +0 -0
  107. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/entry_points.txt +0 -0
  108. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/namespace_packages.txt +0 -0
  109. {tomwer-1.3.7.dist-info → tomwer-1.3.9.dist-info}/top_level.txt +0 -0
@@ -1,70 +0,0 @@
1
- # coding: utf-8
2
- # /*##########################################################################
3
- #
4
- # Copyright (c) 2017-2021 European Synchrotron Radiation Facility
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- # ###########################################################################*/
25
-
26
- __authors__ = ["H. Payno"]
27
- __license__ = "MIT"
28
- __date__ = "17/06/2021"
29
-
30
-
31
- import gc
32
- import pickle
33
- import shutil
34
- import tempfile
35
-
36
- from orangecanvas.scheme.readwrite import literal_dumps
37
- from silx.gui import qt
38
- from silx.gui.utils.testutils import TestCaseQt
39
-
40
- from orangecontrib.tomwer.widgets.control.DataListOW import DataListOW
41
- from tomwer.core.utils.scanutils import MockNXtomo
42
-
43
-
44
- class TestDataListOw(TestCaseQt):
45
- def setUp(self):
46
- super().setUp()
47
- self.tempdir = tempfile.mkdtemp()
48
- dim = 10
49
- mock = MockNXtomo(
50
- scan_path=self.tempdir, n_proj=10, n_ini_proj=10, scan_range=180, dim=dim
51
- )
52
- self.scan = mock.scan
53
- self.widget = DataListOW()
54
-
55
- def tearDown(self):
56
- self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
57
- self.widget.close()
58
- self.widget = None
59
- shutil.rmtree(self.tempdir)
60
- gc.collect()
61
-
62
- def test(self):
63
- self.widget.add(self.scan)
64
- self.qapp.processEvents()
65
-
66
- # test serialization
67
- assert len(self.widget._scanIDs) == 1
68
- pickle.dumps(self.widget._scanIDs)
69
-
70
- literal_dumps(self.widget._scanIDs)
@@ -1,137 +0,0 @@
1
- # coding: utf-8
2
- # /*##########################################################################
3
- #
4
- # Copyright (c) 2017 European Synchrotron Radiation Facility
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- # ###########################################################################*/
25
-
26
- __authors__ = ["H. Payno"]
27
- __license__ = "MIT"
28
- __date__ = "28/04/2020"
29
-
30
-
31
- import gc
32
- import os
33
- import pickle
34
- import shutil
35
- import tempfile
36
- import time
37
- from glob import glob
38
-
39
- import pytest
40
- from orangecanvas.scheme.readwrite import literal_dumps
41
- from silx.gui import qt
42
- from silx.gui.utils.testutils import TestCaseQt
43
-
44
- from orangecontrib.tomwer.widgets.control.DataListenerOW import DataListenerOW
45
- from tomwer.core import settings
46
- from tomwer.core.process.control.datalistener.rpcserver import BlissAcquisition
47
- from tomwer.core.utils.scanutils import MockBlissAcquisition
48
- from tomwer.tests.utils import skip_gui_test
49
-
50
- try:
51
- from tomwer.synctools.rsyncmanager import RSyncManager # noqa F401
52
- except ImportError:
53
- has_rsync = False
54
- else:
55
- has_rsync = RSyncManager().has_rsync()
56
-
57
-
58
- @pytest.mark.skipif(skip_gui_test(), reason="skip gui test")
59
- class TestDataListenerSynchronization(TestCaseQt):
60
- """Insure synchronization is working with the orangecontrib widget"""
61
-
62
- def setUp(self):
63
- super().setUp()
64
- self._src_dir = tempfile.mkdtemp()
65
- self._dst_dir = tempfile.mkdtemp()
66
- # mock lbsram
67
- settings.mock_lsbram(True)
68
- settings._set_lbsram_path(self._src_dir)
69
- settings._set_dest_path(self._dst_dir)
70
-
71
- scan_path = os.path.join(self._src_dir, "scan0000")
72
- self.mock_scan = MockBlissAcquisition(
73
- n_sample=1,
74
- n_sequence=1,
75
- n_scan_per_sequence=3,
76
- n_darks=2,
77
- n_flats=2,
78
- output_dir=scan_path,
79
- )
80
-
81
- self.bliss_acquisition = BlissAcquisition(
82
- file_path=self.mock_scan.samples[0].sample_file,
83
- proposal_file=self.mock_scan.proposal_file,
84
- sample_file=self.mock_scan.samples[0].sample_file,
85
- entry_name="self.entry = '/1'",
86
- start_time=time.ctime(),
87
- )
88
-
89
- self.widget = DataListenerOW()
90
-
91
- def tearDown(self):
92
- self.mock_scan = None
93
- self.bliss_acquisition = None
94
- # self.widget.activate(False)
95
- self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
96
- self.widget.close()
97
- self.widget = None
98
- shutil.rmtree(self._src_dir)
99
- shutil.rmtree(self._dst_dir)
100
- gc.collect()
101
-
102
- @pytest.mark.skipif(not has_rsync, reason="rsync not installed")
103
- def testSynchronization(self):
104
- """Make sure the datalistener will launch a synchronization on the
105
- data dir when receive it"""
106
- self.assertEqual(len(os.listdir(self._dst_dir)), 0)
107
- self.widget.activate(True)
108
-
109
- self.widget.get_listening_thread()._rpc_sequence_started(
110
- saving_file=self.bliss_acquisition.sample_file,
111
- scan_title="toto",
112
- sequence_scan_number="1",
113
- proposal_file=self.bliss_acquisition.proposal_file,
114
- sample_file=self.bliss_acquisition.sample_file,
115
- )
116
- time.sleep(1.0)
117
- self.assertEqual(self.widget._get_n_scan_observe(), 1)
118
- self.assertEqual(len(os.listdir(self._dst_dir)), 1)
119
- self.widget.get_listening_thread()._rpc_sequence_ended(
120
- saving_file=self.bliss_acquisition.sample_file,
121
- sequence_scan_number="1",
122
- success=True,
123
- )
124
- nx_pattern = os.path.join(self.mock_scan.samples[0].sample_directory, "*.nx")
125
- self.assertEqual(len(glob(nx_pattern)), 0)
126
- for i in range(8):
127
- self.qapp.processEvents()
128
- time.sleep(1.0)
129
- # check .nx file has been created
130
- #
131
- self.assertEqual(len(glob(nx_pattern)), 1)
132
-
133
- def testSerialization(self):
134
- pickle.dumps(self.widget.get_configuration())
135
-
136
- def testLiteralDumps(self):
137
- literal_dumps(self.widget.get_configuration())
@@ -1,95 +0,0 @@
1
- # coding: utf-8
2
- # /*##########################################################################
3
- #
4
- # Copyright (c) 2017-2021 European Synchrotron Radiation Facility
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- # THE SOFTWARE.
23
- #
24
- # ###########################################################################*/
25
-
26
- __authors__ = ["H. Payno"]
27
- __license__ = "MIT"
28
- __date__ = "17/06/2021"
29
-
30
-
31
- import gc
32
- import os
33
- import pickle
34
- import shutil
35
- import tempfile
36
-
37
- from orangecanvas.scheme.readwrite import literal_dumps
38
- from silx.gui import qt
39
- from silx.gui.utils.testutils import TestCaseQt
40
-
41
- from orangecontrib.tomwer.widgets.control.DataSelectorOW import DataSelectorOW
42
- from tomwer.core.utils.scanutils import MockNXtomo
43
- from tomwer.synctools.axis import QAxisRP
44
-
45
-
46
- class TestDataSelectorOw(TestCaseQt):
47
- def setUp(self):
48
- super().setUp()
49
- self.tempdir = tempfile.mkdtemp()
50
- dim = 10
51
- mock = MockNXtomo(
52
- scan_path=os.path.join(self.tempdir, "scan1"),
53
- n_proj=10,
54
- n_ini_proj=10,
55
- scan_range=180,
56
- dim=dim,
57
- )
58
- self.scan1 = mock.scan
59
- mock = MockNXtomo(
60
- scan_path=os.path.join(self.tempdir, "scan2"),
61
- n_proj=10,
62
- n_ini_proj=10,
63
- scan_range=180,
64
- dim=dim,
65
- )
66
- self.scan2 = mock.scan
67
- self.widget = DataSelectorOW()
68
-
69
- def tearDown(self):
70
- self.widget.setAttribute(qt.Qt.WA_DeleteOnClose)
71
- self.widget.close()
72
- self.widget = None
73
- shutil.rmtree(self.tempdir)
74
- gc.collect()
75
-
76
- def test(self):
77
- for scan in (self.scan1, self.scan2):
78
- assert scan.axis_params is None
79
- scan.axis_params = QAxisRP()
80
- self.widget.add(scan)
81
- self.qapp.processEvents()
82
- scan_1_identifier = scan.get_identifier()
83
- assert scan_1_identifier.to_str() in self.widget.widget.dataList._myitems
84
- item = self.widget.widget.dataList._myitems[scan_1_identifier.to_str()]
85
- data_obj = item.data(qt.Qt.UserRole)
86
- assert id(scan) == id(data_obj)
87
- assert scan.axis_params is not None
88
- self.widget.selectAll()
89
- self.widget.send()
90
- self.qapp.processEvents()
91
-
92
- # test serialization
93
- assert len(self.widget._scanIDs) == 2
94
- pickle.dumps(self.widget._scanIDs)
95
- literal_dumps(self.widget._scanIDs)