tomwer 1.4.0__py3-none-any.whl → 1.4.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.
- orangecontrib/tomwer/tutorials/test_cor.ows +3 -3
- orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +14 -6
- orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +2 -4
- tomwer/app/axis.py +3 -0
- tomwer/app/multipag.py +3 -11
- tomwer/core/process/reconstruction/axis/axis.py +736 -27
- tomwer/core/process/reconstruction/axis/mode.py +24 -86
- tomwer/core/process/reconstruction/axis/params.py +138 -127
- tomwer/core/process/reconstruction/nabu/nabuscores.py +22 -19
- tomwer/core/process/reconstruction/nabu/nabuslices.py +1 -5
- tomwer/core/process/reconstruction/saaxis/saaxis.py +4 -4
- tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +4 -4
- tomwer/core/process/reconstruction/tests/test_axis.py +1 -1
- tomwer/core/process/reconstruction/tests/test_utils.py +4 -4
- tomwer/core/process/reconstruction/utils/cor.py +4 -8
- tomwer/core/process/tests/test_axis.py +231 -0
- tomwer/core/process/tests/test_nabu.py +3 -1
- tomwer/core/scan/nxtomoscan.py +0 -2
- tomwer/core/scan/scanbase.py +4 -4
- tomwer/core/scan/tests/test_process_registration.py +18 -0
- tomwer/gui/reconstruction/axis/AxisMainWindow.py +9 -20
- tomwer/gui/reconstruction/axis/AxisOptionsWidget.py +79 -239
- tomwer/gui/reconstruction/axis/AxisSettingsWidget.py +17 -38
- tomwer/gui/reconstruction/axis/AxisWidget.py +8 -16
- tomwer/gui/reconstruction/axis/CalculationWidget.py +200 -44
- tomwer/gui/reconstruction/axis/ControlWidget.py +2 -10
- tomwer/gui/reconstruction/axis/InputWidget.py +155 -11
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +10 -19
- tomwer/gui/reconstruction/scores/scoreplot.py +2 -5
- tomwer/gui/reconstruction/tests/test_nabu.py +0 -8
- tomwer/gui/stitching/config/axisparams.py +0 -2
- tomwer/gui/stitching/z_stitching/fineestimation.py +1 -1
- tomwer/gui/tests/test_axis_gui.py +15 -31
- tomwer/synctools/stacks/reconstruction/axis.py +23 -5
- tomwer/synctools/stacks/reconstruction/dkrefcopy.py +1 -1
- tomwer/synctools/stacks/reconstruction/nabu.py +2 -2
- tomwer/synctools/stacks/reconstruction/normalization.py +1 -1
- tomwer/synctools/stacks/reconstruction/saaxis.py +1 -1
- tomwer/synctools/stacks/reconstruction/sadeltabeta.py +1 -1
- tomwer/tests/orangecontrib/tomwer/widgets/reconstruction/tests/test_axis.py +16 -0
- tomwer/tests/test_ewoks/test_single_node_execution.py +1 -1
- tomwer/tests/test_ewoks/test_workflows.py +1 -1
- tomwer/version.py +1 -1
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/METADATA +3 -3
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/RECORD +49 -52
- tomwer/core/process/reconstruction/axis/side.py +0 -8
- tomwer/gui/fonts.py +0 -5
- tomwer/gui/reconstruction/axis/EstimatedCORWidget.py +0 -394
- tomwer/gui/reconstruction/axis/EstimatedCorComboBox.py +0 -118
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/LICENSE +0 -0
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/WHEEL +0 -0
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/entry_points.txt +0 -0
- {tomwer-1.4.0.dist-info → tomwer-1.4.0rc0.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
2
2
|
<scheme version="2.0" title="" description="">
|
3
3
|
<nodes>
|
4
|
-
<node id="0" name="center of rotation finder" qualified_name="orangecontrib.tomwer.widgets.reconstruction.AxisOW.AxisOW" project_name="tomwer" version="" title="center of rotation finder" position="(
|
4
|
+
<node id="0" name="center of rotation finder" qualified_name="orangecontrib.tomwer.widgets.reconstruction.AxisOW.AxisOW" project_name="tomwer" version="" title="center of rotation finder" position="(395.0, 173.0)" />
|
5
5
|
<node id="1" name="scan selector" qualified_name="orangecontrib.tomwer.widgets.control.DataSelectorOW.DataSelectorOW" project_name="tomwer" version="" title="scan selector" position="(150.0, 115.0)" />
|
6
6
|
</nodes>
|
7
7
|
<links>
|
@@ -10,8 +10,8 @@
|
|
10
10
|
<annotations />
|
11
11
|
<thumbnail />
|
12
12
|
<node_properties>
|
13
|
-
<properties node_id="0" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'sino-coarse-to-fine', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'SINOGRAM_LINE': 'middle', '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':
|
14
|
-
<properties node_id="1" format="literal">{'_scanIDs': ['hdf5:scan:/home/payno/Datasets/tomography/
|
13
|
+
<properties node_id="0" format="literal">{'_ewoks_default_inputs': {'data': None, 'axis_params': {'MODE': 'sino-coarse-to-fine', 'POSITION_VALUE': None, 'CALC_INPUT_TYPE': 'transmission_nopag', 'ANGLE_MODE': '0-180', 'SINOGRAM_LINE': 'middle', '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': 5, 'oversampling': 4, 'n_subsampling_y': 40, 'take_log': True, 'near_width': 40}, 'COR_OPTIONS': '', 'MOTOR_OFFSET': 9230.77, 'X_ROTATION_AXIS_PIXEL_POSITION': None}, 'gui': {'mode_is_lock': False, 'value_is_lock': False, 'auto_update_estimated_cor': True}}, 'controlAreaVisible': True, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x03\x00\x00\x00\x00\x01s\x00\x00\x00\xe0\x00\x00\x06\x84\x00\x00\x03\xa1\x00\x00\x01s\x00\x00\x01\x05\x00\x00\x06\x84\x00\x00\x03\xa1\x00\x00\x00\x00\x00\x00\x00\x00\x07\x80\x00\x00\x01s\x00\x00\x01\x05\x00\x00\x06\x84\x00\x00\x03\xa1', '__version__': 1}</properties>
|
14
|
+
<properties node_id="1" format="literal">{'_scanIDs': ['hdf5:scan:/home/payno/Datasets/tomography/z_series/STYLO/PROCESSED_DATA/SYS01S101_SYS01S101_3scans_0000.nx?path=/entry0000', 'hdf5:scan:/home/payno/Datasets/tomography/z_series/STYLO/PROCESSED_DATA/SYS01S101_SYS01S101_3scans_0001.nx?path=/entry0001'], 'controlAreaVisible': True, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x03\x00\x00\x00\x00\n\xa0\x00\x00\x01Z\x00\x00\x0b\xcb\x00\x00\x03\x06\x00\x00\n\xa0\x00\x00\x01Z\x00\x00\x0b\xcb\x00\x00\x03\x06\x00\x00\x00\x01\x00\x00\x00\x00\x07\x80\x00\x00\n\xa0\x00\x00\x01Z\x00\x00\x0b\xcb\x00\x00\x03\x06', '__version__': 1}</properties>
|
15
15
|
</node_properties>
|
16
16
|
<session_state>
|
17
17
|
<window_groups />
|
@@ -141,6 +141,16 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
|
|
141
141
|
|
142
142
|
self._layout.addWidget(self._widget)
|
143
143
|
|
144
|
+
# expose API
|
145
|
+
self.setMode = self._widget.setMode
|
146
|
+
self.getMode = self._widget.getMode
|
147
|
+
self.getEstimatedCor = self._widget.getEstimatedCor
|
148
|
+
self.setEstimatedCor = self._widget.setEstimatedCor
|
149
|
+
self.getAxisParams = self._widget.getAxisParams
|
150
|
+
self.setValueLock = self._widget.setValueLock
|
151
|
+
self._setModeLockFrmSettings = self._widget._setModeLockFrmSettings
|
152
|
+
self._setValueLockFrmSettings = self._widget._setValueLockFrmSettings
|
153
|
+
|
144
154
|
# load settings
|
145
155
|
try:
|
146
156
|
if "mode_is_lock" in gui_settings:
|
@@ -160,7 +170,6 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
|
|
160
170
|
"auto_update_estimated_cor", True
|
161
171
|
)
|
162
172
|
self._widget.setAutoUpdateEstimatedCor(auto_update_estimated_cor)
|
163
|
-
self._widget.setYAxisInverted(gui_settings.get("y_axis_inverted", False))
|
164
173
|
|
165
174
|
except Exception as e:
|
166
175
|
logger.warning(f"Fail to load settings. Error is {str(e)}")
|
@@ -175,14 +184,11 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
|
|
175
184
|
self._processingStack.sigComputationEnded.connect(self._scanProcessed)
|
176
185
|
|
177
186
|
self._axis_params.sigChanged.connect(self._updateSettingsVals)
|
178
|
-
self._widget._axisWidget._settingsWidget._mainWidget._calculationWidget.sigUpdateXRotAxisPixelPosOnNewScan.connect(
|
179
|
-
self._updateSettingsVals
|
180
|
-
)
|
181
187
|
self._widget.sigAxisEditionLocked.connect(self._updateSettingsVals)
|
182
188
|
self._widget.sigModeChanged.connect(self._updateSettingsVals)
|
183
189
|
self._widget.sigLockModeChanged.connect(self._updateSettingsVals)
|
184
190
|
|
185
|
-
self._widget._axisWidget._settingsWidget._mainWidget._calculationWidget.
|
191
|
+
self._widget._axisWidget._settingsWidget._mainWidget._calculationWidget._nearValueCB.toggled.connect(
|
186
192
|
self._updateSettingsVals
|
187
193
|
)
|
188
194
|
|
@@ -347,7 +353,6 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
|
|
347
353
|
"mode_is_lock": self.isModeLocked(),
|
348
354
|
"value_is_lock": self.isValueLock(),
|
349
355
|
"auto_update_estimated_cor": self._widget.getAutoUpdateEstimatedCor(),
|
350
|
-
"y_axis_inverted": self._widget.isYAxisInverted(),
|
351
356
|
},
|
352
357
|
}
|
353
358
|
|
@@ -453,6 +458,9 @@ class AxisOW(SuperviseOW, WidgetLongProcessing):
|
|
453
458
|
"serialize_output_data": False,
|
454
459
|
}
|
455
460
|
)
|
461
|
+
for patch in self._patches:
|
462
|
+
mode, function = patch
|
463
|
+
processing_class._CALCULATIONS_METHODS[mode] = function
|
456
464
|
processing_class.run()
|
457
465
|
self._updatePosition(scan=self.__scan)
|
458
466
|
if self.isModeLocked() or self.isValueLock():
|
@@ -312,10 +312,8 @@ class NabuVolumeOW(WidgetLongProcessing, SuperviseOW):
|
|
312
312
|
)
|
313
313
|
drac_processed_datasets.append(icatReconstructedDataset)
|
314
314
|
|
315
|
-
|
316
|
-
|
317
|
-
drac_processed_datasets
|
318
|
-
)
|
315
|
+
if len(drac_processed_datasets) > 0:
|
316
|
+
self.Outputs.data_portal_processed_datasets.send(drac_processed_datasets)
|
319
317
|
|
320
318
|
if future_tomo_obj is not None:
|
321
319
|
self.Outputs.future_out.send(future_tomo_obj)
|
tomwer/app/axis.py
CHANGED
@@ -169,6 +169,9 @@ def main(argv):
|
|
169
169
|
_logger.setLevel(logging.DEBUG)
|
170
170
|
|
171
171
|
axis_params = QAxisRP()
|
172
|
+
axis_params.use_sinogram = options.use_sinogram
|
173
|
+
if scan.dim_2 is not None:
|
174
|
+
axis_params.sinogram_line = scan.dim_2 // 2
|
172
175
|
|
173
176
|
window = _AxisProcessGUI(scan=scan, axis_params=axis_params)
|
174
177
|
window.setWindowTitle("axis")
|
tomwer/app/multipag.py
CHANGED
@@ -23,10 +23,6 @@ from tomwer.core.process.reconstruction.darkref.darkrefs import (
|
|
23
23
|
from tomwer.core.process.reconstruction.sadeltabeta.sadeltabeta import (
|
24
24
|
SADeltaBetaTask,
|
25
25
|
)
|
26
|
-
from tomwer.core.process.reconstruction.utils.cor import (
|
27
|
-
relative_pos_to_absolute,
|
28
|
-
absolute_pos_to_relative,
|
29
|
-
)
|
30
26
|
from tomwer.core.process.task import Task
|
31
27
|
from tomwer.core.scan.scanfactory import ScanFactory
|
32
28
|
from tomwer.core.utils.resource import increase_max_number_file
|
@@ -140,17 +136,13 @@ class SADeltaBetaWindow(_SADeltaBetaWindow):
|
|
140
136
|
|
141
137
|
def _relativeValueEdited(self):
|
142
138
|
old = self._absoluteCORValueQLE.blockSignals(True)
|
143
|
-
value =
|
144
|
-
relative_pos=self._relativeCORValueQLE.value(), det_width=self._imageWidth
|
145
|
-
)
|
139
|
+
value = self._relativeCORValueQLE.value() + (self._imageWidth - 1) / 2.0
|
146
140
|
self._absoluteCORValueQLE.setValue(value)
|
147
141
|
self._absoluteCORValueQLE.blockSignals(old)
|
148
142
|
|
149
|
-
def
|
143
|
+
def _absolueValueEdited(self):
|
150
144
|
old = self._relativeCORValueQLE.blockSignals(True)
|
151
|
-
value =
|
152
|
-
absolute_pos=self._absoluteCORValueQLE.value(), det_width=self._imageWidth
|
153
|
-
)
|
145
|
+
value = self._absoluteCORValueQLE.value() - (self._imageWidth - 1) / 2.0
|
154
146
|
self._relativeCORValueQLE.setValue(value)
|
155
147
|
self._relativeCORValueQLE.blockSignals(old)
|
156
148
|
|