tomwer 1.2.0a3__py3-none-any.whl → 1.2.0a4__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.
- orangecontrib/tomwer/widgets/reconstruction/NabuHelicalPrepareWeightsDoubleOW.py +169 -169
- tomwer/app/imagekeyeditor.py +1 -0
- tomwer/app/imagekeyupgrader.py +2 -0
- tomwer/app/nxtomoeditor.py +2 -0
- tomwer/app/zstitching.py +1 -0
- tomwer/resources/gui/icons/esrf_1.svg +307 -0
- tomwer/resources/gui/icons/triangle.svg +80 -0
- tomwer/version.py +1 -1
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/METADATA +1 -1
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/RECORD +16 -21
- tomwer/third_party/__init__.py +0 -0
- tomwer/third_party/nabu/__init__.py +0 -0
- tomwer/third_party/nabu/preproc/__init__.py +0 -0
- tomwer/third_party/nabu/preproc/phase.py +0 -387
- tomwer/third_party/nabu/utils.py +0 -201
- tomwer/third_party/tango/__init__.py +0 -0
- tomwer/third_party/tango/device.py +0 -15
- /tomwer-1.2.0a3-py3.11-nspkg.pth → /tomwer-1.2.0a4-py3.11-nspkg.pth +0 -0
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/LICENSE +0 -0
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/WHEEL +0 -0
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/entry_points.txt +0 -0
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/namespace_packages.txt +0 -0
- {tomwer-1.2.0a3.dist-info → tomwer-1.2.0a4.dist-info}/top_level.txt +0 -0
@@ -1,169 +1,169 @@
|
|
1
|
-
import logging
|
2
|
-
|
3
|
-
from orangewidget import gui
|
4
|
-
from orangewidget.settings import Setting
|
5
|
-
from orangewidget.widget import Input, Output
|
6
|
-
from orangecontrib.tomwer.orange.managedprocess import TomwerWithStackStack
|
7
|
-
from silx.gui import qt
|
8
|
-
from typing import Optional
|
9
|
-
|
10
|
-
from tomwer.core.futureobject import FutureTomwerObject
|
11
|
-
from tomwer.core.scan.scanbase import TomwerScanBase
|
12
|
-
from tomwer.gui.reconstruction.nabu.helical import HelicalPrepareWeightsDouble
|
13
|
-
from tomwer.core.process.reconstruction.nabu.helical import (
|
14
|
-
|
15
|
-
)
|
16
|
-
from tomwer.core.scan.hdf5scan import HDF5TomoScan
|
17
|
-
|
18
|
-
_logger = logging.getLogger(__name__)
|
19
|
-
|
20
|
-
|
21
|
-
class NabuHelicalPrepareWeightsDoubleOW(
|
22
|
-
|
23
|
-
|
24
|
-
):
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
1
|
+
# import logging
|
2
|
+
|
3
|
+
# from orangewidget import gui
|
4
|
+
# from orangewidget.settings import Setting
|
5
|
+
# from orangewidget.widget import Input, Output
|
6
|
+
# from orangecontrib.tomwer.orange.managedprocess import TomwerWithStackStack
|
7
|
+
# from silx.gui import qt
|
8
|
+
# from typing import Optional
|
9
|
+
|
10
|
+
# from tomwer.core.futureobject import FutureTomwerObject
|
11
|
+
# from tomwer.core.scan.scanbase import TomwerScanBase
|
12
|
+
# from tomwer.gui.reconstruction.nabu.helical import HelicalPrepareWeightsDouble
|
13
|
+
# from tomwer.core.process.reconstruction.nabu.helical import (
|
14
|
+
# NabuHelicalPrepareWeightsDouble,
|
15
|
+
# )
|
16
|
+
# from tomwer.core.scan.hdf5scan import HDF5TomoScan
|
17
|
+
|
18
|
+
# _logger = logging.getLogger(__name__)
|
19
|
+
|
20
|
+
|
21
|
+
# class NabuHelicalPrepareWeightsDoubleOW(
|
22
|
+
# TomwerWithStackStack,
|
23
|
+
# ewokstaskclass=NabuHelicalPrepareWeightsDouble,
|
24
|
+
# ):
|
25
|
+
# """
|
26
|
+
# widget used to call the `nabu-helical-prepare-weights-double` application on a dedicated thread. It define weights map and double flat field.
|
27
|
+
|
28
|
+
# :param parent: the parent widget
|
29
|
+
# """
|
30
|
+
|
31
|
+
# # note of this widget should be the one registered on the documentation
|
32
|
+
# name = "helical prerate weights double"
|
33
|
+
# id = "orangecontrib.tomwer.widgets.reconstruction.NabuHelicalPrepareWeightsDoubleOW.NabuHelicalPrepareWeightsDoubleOW"
|
34
|
+
# description = "compute map of weights requested for nabu helical reconstruction"
|
35
|
+
# icon = "icons/nabu_prepare_weights_double.svg"
|
36
|
+
# priority = 199
|
37
|
+
# keywords = [
|
38
|
+
# "tomography",
|
39
|
+
# "nabu",
|
40
|
+
# "reconstruction",
|
41
|
+
# "nabu-helical",
|
42
|
+
# "helical",
|
43
|
+
# "weights",
|
44
|
+
# "prepare",
|
45
|
+
# ]
|
46
|
+
|
47
|
+
# want_main_area = True
|
48
|
+
# want_control_area = False
|
49
|
+
# resizing_enabled = True
|
50
|
+
|
51
|
+
# _ewoks_default_inputs = Setting(
|
52
|
+
# {
|
53
|
+
# "data": None,
|
54
|
+
# "transition_width": 50,
|
55
|
+
# "processes_file": "",
|
56
|
+
# }
|
57
|
+
# )
|
58
|
+
|
59
|
+
# sigScanReady = qt.Signal(TomwerScanBase)
|
60
|
+
# "Signal emitted when a scan is ended"
|
61
|
+
|
62
|
+
# TIMEOUT = 30
|
63
|
+
|
64
|
+
# class Inputs:
|
65
|
+
# data = Input(
|
66
|
+
# name="data",
|
67
|
+
# type=TomwerScanBase,
|
68
|
+
# doc="one scan to be process",
|
69
|
+
# default=True,
|
70
|
+
# multiple=False,
|
71
|
+
# )
|
72
|
+
|
73
|
+
# class Outputs:
|
74
|
+
# data = Output(name="data", type=TomwerScanBase, doc="one scan to be process")
|
75
|
+
# future_tomo_obj = Output(
|
76
|
+
# name="future_tomo_obj",
|
77
|
+
# type=FutureTomwerObject,
|
78
|
+
# doc="future object (process remotely)",
|
79
|
+
# )
|
80
|
+
|
81
|
+
# LOGGER = _logger
|
82
|
+
|
83
|
+
# def __init__(self, parent=None):
|
84
|
+
# super().__init__(parent)
|
85
|
+
# self.__scan = None
|
86
|
+
|
87
|
+
# # gui definition
|
88
|
+
# _layout = gui.vBox(self.mainArea, self.name).layout()
|
89
|
+
# self.widget = HelicalPrepareWeightsDouble(parent=self)
|
90
|
+
# _layout.addWidget(self.widget)
|
91
|
+
|
92
|
+
# ## connect signal / slot
|
93
|
+
# self.widget.sigConfigChanged.connect(self._updateSettings)
|
94
|
+
|
95
|
+
# self.task_output_changed_callbacks.add(self._notify_state)
|
96
|
+
|
97
|
+
# ## handle settings
|
98
|
+
# self._loadSettings()
|
99
|
+
# self.task_executor_queue.sigComputationStarted.connect(self._newTaskStarted)
|
100
|
+
|
101
|
+
# def _updateSettings(self):
|
102
|
+
# config = self.widget.getConfiguration()
|
103
|
+
# for key in ("transition_width", "processes_file"):
|
104
|
+
# self._ewoks_default_inputs[key] = config[key] # pylint: disable=E1137
|
105
|
+
|
106
|
+
# @property
|
107
|
+
# def request_input(self):
|
108
|
+
# return self.__request_input
|
109
|
+
|
110
|
+
# @request_input.setter
|
111
|
+
# def request_input(self, request):
|
112
|
+
# self.__request_input = request
|
113
|
+
|
114
|
+
# def get_task_inputs(self):
|
115
|
+
# assert self.__scan is not None
|
116
|
+
# return {
|
117
|
+
# "data": self.__scan,
|
118
|
+
# "transition_width": self.widget.getConfiguration()["transition_width"],
|
119
|
+
# "processes_file": self.widget.getConfiguration()["processes_file"],
|
120
|
+
# }
|
121
|
+
|
122
|
+
# def handleNewSignals(self) -> None:
|
123
|
+
# """Invoked by the workflow signal propagation manager after all
|
124
|
+
# signals handlers have been called.
|
125
|
+
# """
|
126
|
+
# # for now we want to avoid propagation any processing.
|
127
|
+
# # task will be executed only when the user validates the dialog
|
128
|
+
# data = super().get_task_inputs().get("data", None)
|
129
|
+
# if data is not None:
|
130
|
+
# if not isinstance(data, HDF5TomoScan):
|
131
|
+
# raise TypeError(
|
132
|
+
# f"data is expected to be an instance of HDF5TomoScan. {type(data)} are not handled"
|
133
|
+
# )
|
134
|
+
# self.add(data.path)
|
135
|
+
|
136
|
+
# def _loadSettings(self):
|
137
|
+
# self.widget.setConfiguration(self._ewoks_default_inputs)
|
138
|
+
|
139
|
+
# def _newTaskStarted(self):
|
140
|
+
# try:
|
141
|
+
# task_executor = self.sender()
|
142
|
+
# scan = task_executor.current_task.inputs.data
|
143
|
+
# self.notify_on_going(scan)
|
144
|
+
# except Exception:
|
145
|
+
# pass
|
146
|
+
|
147
|
+
# def _notify_state(self):
|
148
|
+
# try:
|
149
|
+
# task_executor = self.sender()
|
150
|
+
# task_suceeded = task_executor.succeeded
|
151
|
+
# scan = task_executor.current_task.outputs.data
|
152
|
+
# if task_suceeded:
|
153
|
+
# self.notify_succeed(scan=scan)
|
154
|
+
# else:
|
155
|
+
# self.notify_failed(scan=scan)
|
156
|
+
# except Exception as e:
|
157
|
+
# _logger.error(f"failed to handle task finished callback. Raiseon is {e}")
|
158
|
+
|
159
|
+
# @Inputs.data
|
160
|
+
# def process_data(self, scan: Optional[TomwerScanBase]):
|
161
|
+
# if scan is None:
|
162
|
+
# return
|
163
|
+
# else:
|
164
|
+
# self.__scan = scan
|
165
|
+
# self.notify_pending(scan=scan)
|
166
|
+
# self.execute_ewoks_task()
|
167
|
+
|
168
|
+
# def sizeHint(self) -> qt.QSize:
|
169
|
+
# return qt.QSize(650, 60)
|
tomwer/app/imagekeyeditor.py
CHANGED
@@ -85,6 +85,7 @@ def main(argv):
|
|
85
85
|
options.scan_path = options.scan_path.rstrip(os.path.sep)
|
86
86
|
|
87
87
|
widget = ImageKeyDialog(parent=None)
|
88
|
+
widget.setWindowFlags(qt.Qt.Window)
|
88
89
|
widget.setScan(scan)
|
89
90
|
widget.setWindowTitle("Image key editor")
|
90
91
|
widget.setWindowIcon(icons.getQIcon("tomwer"))
|
tomwer/app/imagekeyupgrader.py
CHANGED
@@ -94,6 +94,8 @@ def main(argv):
|
|
94
94
|
options.scan_path = options.scan_path.rstrip(os.path.sep)
|
95
95
|
|
96
96
|
widget = ImageKeyUpgraderDialog(parent=None)
|
97
|
+
widget.setWindowFlags(qt.Qt.Window)
|
98
|
+
|
97
99
|
widget.setScan(scan)
|
98
100
|
widget.setWindowTitle("Image key upgrader")
|
99
101
|
widget.setWindowIcon(icons.getQIcon("tomwer"))
|
tomwer/app/nxtomoeditor.py
CHANGED