tomwer 1.5.0rc0__py3-none-any.whl → 1.5.0rc3__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.
- tomwer/app/axis.py +1 -1
- tomwer/core/process/control/datalistener/rpcserver.py +2 -8
- tomwer/core/process/drac/binning.py +2 -2
- tomwer/core/process/drac/output.py +1 -1
- tomwer/core/process/reconstruction/axis/mode.py +2 -2
- tomwer/core/process/reconstruction/axis/params.py +4 -4
- tomwer/core/process/reconstruction/axis/projectiontype.py +1 -1
- tomwer/core/process/reconstruction/axis/side.py +1 -1
- tomwer/core/process/reconstruction/darkref/params.py +1 -2
- tomwer/core/process/reconstruction/nabu/nabucommon.py +2 -2
- tomwer/core/process/reconstruction/nabu/target.py +1 -1
- tomwer/core/process/reconstruction/nabu/test/test_nabu_utils.py +9 -0
- tomwer/core/process/reconstruction/nabu/utils.py +3 -0
- tomwer/core/process/reconstruction/normalization/normalization.py +1 -1
- tomwer/core/process/reconstruction/normalization/params.py +3 -3
- tomwer/core/process/reconstruction/saaxis/params.py +3 -3
- tomwer/core/process/reconstruction/saaxis/saaxis.py +1 -1
- tomwer/core/process/reconstruction/scores/params.py +2 -2
- tomwer/core/process/reconstruction/scores/scores.py +3 -3
- tomwer/core/process/tests/test_normalization.py +2 -1
- tomwer/core/scan/scanbase.py +1 -1
- tomwer/core/scan/scantype.py +1 -1
- tomwer/core/settings.py +1 -1
- tomwer/gui/cluster/slurm.py +3 -3
- tomwer/gui/configuration/level.py +1 -1
- tomwer/gui/control/actions.py +1 -1
- tomwer/gui/control/datalist.py +1 -1
- tomwer/gui/control/series/seriescreator.py +5 -5
- tomwer/gui/control/tomoobjdisplaymode.py +1 -1
- tomwer/gui/dataportal/gallery.py +6 -6
- tomwer/gui/edit/tests/test_nx_editor.py +1 -1
- tomwer/gui/reconstruction/axis/EstimatedCorComboBox.py +2 -2
- tomwer/gui/reconstruction/axis/InputWidget.py +3 -3
- tomwer/gui/reconstruction/nabu/nabuconfig/base.py +1 -3
- tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +6 -6
- tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +3 -3
- tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +7 -3
- tomwer/gui/reconstruction/nabu/slices.py +5 -5
- tomwer/gui/reconstruction/nabu/volume.py +1 -1
- tomwer/gui/reconstruction/normalization/intensity.py +6 -10
- tomwer/gui/reconstruction/saaxis/corrangeselector.py +2 -2
- tomwer/gui/reconstruction/sacommon.py +1 -1
- tomwer/gui/reconstruction/scores/scoreplot.py +3 -3
- tomwer/gui/stitching/config/positionoveraxis.py +1 -1
- tomwer/gui/utils/flow.py +1 -1
- tomwer/gui/utils/loadingmode.py +1 -1
- tomwer/gui/utils/vignettes.py +1 -1
- tomwer/gui/visualization/dataviewer.py +7 -7
- tomwer/gui/visualization/reconstructionparameters.py +35 -23
- tomwer/gui/visualization/scanoverview.py +28 -11
- tomwer/gui/visualization/test/test_reconstruction_parameters.py +2 -2
- tomwer/synctools/utils/scanstages.py +3 -3
- tomwer/version.py +1 -1
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/METADATA +1 -1
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/RECORD +59 -59
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/WHEEL +0 -0
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/entry_points.txt +0 -0
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/licenses/LICENSE +0 -0
- {tomwer-1.5.0rc0.dist-info → tomwer-1.5.0rc3.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,7 @@ from nabu.pipeline.fullfield.nabu_config import (
|
|
10
10
|
)
|
11
11
|
from silx.gui import icons as silx_icons
|
12
12
|
from silx.gui import qt
|
13
|
-
from
|
13
|
+
from enum import Enum as _Enum
|
14
14
|
from nxtomo.nxobject.nxdetector import FOV
|
15
15
|
|
16
16
|
from tomwer.core.utils.dictutils import concatenate_dict
|
@@ -113,8 +113,8 @@ class _NabuProcess(qt.QWidget):
|
|
113
113
|
qt.QWidget.__init__(self, parent=parent)
|
114
114
|
self.setLayout(qt.QGridLayout())
|
115
115
|
self._stageCB = qt.QComboBox(parent=self)
|
116
|
-
for stage in _NabuStages
|
117
|
-
self._stageCB.addItem(stage)
|
116
|
+
for stage in _NabuStages:
|
117
|
+
self._stageCB.addItem(stage.value)
|
118
118
|
|
119
119
|
self.layout().addWidget(qt.QLabel("stage:", self), 0, 0, 1, 1)
|
120
120
|
self.layout().addWidget(self._stageCB, 0, 1, 1, 1)
|
@@ -377,7 +377,7 @@ class NabuWindow(qt.QMainWindow):
|
|
377
377
|
return self._filterAction.isChecked()
|
378
378
|
|
379
379
|
def setConfigurationLevel(self, level):
|
380
|
-
level = ConfigurationLevel
|
380
|
+
level = ConfigurationLevel(level)
|
381
381
|
if level == ConfigurationLevel.REQUIRED:
|
382
382
|
self._minimalisticAction.setChecked(True)
|
383
383
|
elif level == ConfigurationLevel.ADVANCED:
|
@@ -601,7 +601,7 @@ class NabuWidget(qt.QWidget):
|
|
601
601
|
self._configurationScrollArea.updateGeometry()
|
602
602
|
|
603
603
|
def setConfigurationLevel(self, level):
|
604
|
-
level = ConfigurationLevel
|
604
|
+
level = ConfigurationLevel(level)
|
605
605
|
self._configuration_level = level
|
606
606
|
self.updateConfigurationFilter()
|
607
607
|
|
@@ -330,7 +330,7 @@ class NabuVolumeWidget(_NabuStageConfigBase, qt.QWidget):
|
|
330
330
|
self.setHistogramRequested(requested=bool(config["output_histogram"]))
|
331
331
|
|
332
332
|
def setConfigurationLevel(self, level):
|
333
|
-
level = ConfigurationLevel
|
333
|
+
level = ConfigurationLevel(level)
|
334
334
|
_NabuStageConfigBase.setConfigurationLevel(self, level)
|
335
335
|
|
336
336
|
def getConfigurationLevel(self):
|
@@ -502,12 +502,12 @@ class _NormIntensityOptions(qt.QWidget):
|
|
502
502
|
|
503
503
|
def getCurrentSource(self):
|
504
504
|
if self.getCurrentMethod() in (Method.DIVISION, Method.SUBTRACTION):
|
505
|
-
return _ValueSource
|
505
|
+
return _ValueSource(self._sourceCB.currentText())
|
506
506
|
else:
|
507
507
|
return _ValueSource.NONE
|
508
508
|
|
509
509
|
def setCurrentSource(self, source):
|
510
|
-
source = _ValueSource
|
510
|
+
source = _ValueSource(source)
|
511
511
|
idx = self._sourceCB.findText(source.value)
|
512
512
|
self._sourceCB.setCurrentIndex(idx)
|
513
513
|
|
@@ -601,8 +601,8 @@ class _NormIntensityCalcOpts(qt.QWidget):
|
|
601
601
|
self.setLayout(qt.QFormLayout())
|
602
602
|
# calculation function
|
603
603
|
self._calculationModeCB = qt.QComboBox(self)
|
604
|
-
for fct in _normParams._ValueCalculationFct
|
605
|
-
self._calculationModeCB.addItem(fct)
|
604
|
+
for fct in _normParams._ValueCalculationFct:
|
605
|
+
self._calculationModeCB.addItem(fct.value)
|
606
606
|
self._calculationModeLabel = qt.QLabel("calculation fct", self)
|
607
607
|
self.layout().addRow(self._calculationModeLabel, self._calculationModeCB)
|
608
608
|
|
@@ -616,14 +616,10 @@ class _NormIntensityCalcOpts(qt.QWidget):
|
|
616
616
|
self._calculationModeCB.setVisible(visible)
|
617
617
|
|
618
618
|
def getCalculationFct(self):
|
619
|
-
return _normParams._ValueCalculationFct.
|
620
|
-
self._calculationModeCB.currentText()
|
621
|
-
)
|
619
|
+
return _normParams._ValueCalculationFct(self._calculationModeCB.currentText())
|
622
620
|
|
623
621
|
def setCalculationFct(self, fct):
|
624
|
-
idx = self._calculationModeCB.findText(
|
625
|
-
_normParams._ValueCalculationFct.from_value(fct)
|
626
|
-
)
|
622
|
+
idx = self._calculationModeCB.findText(_normParams._ValueCalculationFct(fct))
|
627
623
|
self._calculationModeCB.setCurrentIndex(idx)
|
628
624
|
|
629
625
|
|
@@ -13,7 +13,7 @@ from silx.gui import icons as silxicons
|
|
13
13
|
from silx.gui import qt
|
14
14
|
from silx.gui.dialog.ImageFileDialog import ImageFileDialog
|
15
15
|
from silx.gui.plot import items
|
16
|
-
from
|
16
|
+
from enum import Enum as _Enum
|
17
17
|
from tomoscan.esrf.scan.utils import get_data
|
18
18
|
|
19
19
|
from tomwer.core.process.reconstruction.utils.cor import (
|
@@ -308,7 +308,7 @@ class _ReconstructionModeGB(qt.QGroupBox):
|
|
308
308
|
raise ValueError("No reconstruction mode selected")
|
309
309
|
|
310
310
|
def setReconstructionMode(self, mode: ReconstructionMode | str) -> None:
|
311
|
-
mode = ReconstructionMode
|
311
|
+
mode = ReconstructionMode(mode)
|
312
312
|
if mode is ReconstructionMode.TILT_CORRECTION:
|
313
313
|
self._tiltCorrectionRB.setChecked(True)
|
314
314
|
elif mode is ReconstructionMode.VERTICAL:
|
@@ -107,7 +107,7 @@ class NabuWidgetWithToolbar(qt.QMainWindow):
|
|
107
107
|
self._nabuSettings.setConfiguration(config)
|
108
108
|
|
109
109
|
def setConfigurationLevel(self, level):
|
110
|
-
level = ConfigurationLevel
|
110
|
+
level = ConfigurationLevel(level)
|
111
111
|
if level == ConfigurationLevel.REQUIRED:
|
112
112
|
self._minimalisticAction.setChecked(True)
|
113
113
|
elif level == ConfigurationLevel.ADVANCED:
|
@@ -248,10 +248,10 @@ class VariableSelection(qt.QWidget):
|
|
248
248
|
self._img_width = width
|
249
249
|
|
250
250
|
def getScoreMethod(self):
|
251
|
-
return ScoreMethod
|
251
|
+
return ScoreMethod(self._scoreMethodCB.currentText())
|
252
252
|
|
253
253
|
def setScoreMethod(self, method):
|
254
|
-
method_value = ScoreMethod
|
254
|
+
method_value = ScoreMethod(method).value
|
255
255
|
index = self._scoreMethodCB.findText(method_value)
|
256
256
|
self._scoreMethodCB.setCurrentIndex(index)
|
257
257
|
|
@@ -671,7 +671,7 @@ class ScorePlot(qt.QWidget):
|
|
671
671
|
:param scores: cor value (float) as key and
|
672
672
|
tuple(url: DataUrl, score: float) as value
|
673
673
|
"""
|
674
|
-
score_method = ScoreMethod
|
674
|
+
score_method = ScoreMethod(score_method)
|
675
675
|
if not update_only_scores:
|
676
676
|
self.clear()
|
677
677
|
self._scores = scores
|
tomwer/gui/utils/flow.py
CHANGED
tomwer/gui/utils/loadingmode.py
CHANGED
tomwer/gui/utils/vignettes.py
CHANGED
@@ -302,7 +302,7 @@ class VignettesWidget(qt.QWidget):
|
|
302
302
|
f"score is expected to be a dict with values as (v1: numpy.ndarray, v2: ComputedScore). v2 type Found: {type(score_cls)}"
|
303
303
|
)
|
304
304
|
scores_values.append(score_cls.get(score_method))
|
305
|
-
self.__score_method = ScoreMethod
|
305
|
+
self.__score_method = ScoreMethod(score_method)
|
306
306
|
highest_score_indices = numpy.nanargmax(scores_values)
|
307
307
|
self._vignettesGroup = qt.QButtonGroup(self)
|
308
308
|
self._vignettesGroup.setExclusive(True)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import weakref
|
2
2
|
|
3
3
|
from silx.gui import qt
|
4
|
-
from
|
4
|
+
from enum import Enum as _Enum
|
5
5
|
|
6
6
|
from tomwer.core.scan.scanbase import TomwerScanBase
|
7
7
|
from tomwer.core.volume.volumebase import TomwerVolumeBase
|
@@ -318,26 +318,26 @@ class DisplayControl(qt.QWidget):
|
|
318
318
|
|
319
319
|
:return: selected mode: display slices or radios
|
320
320
|
"""
|
321
|
-
return _DisplayMode
|
321
|
+
return _DisplayMode(self._displayMode.currentText())
|
322
322
|
|
323
323
|
def setDisplayMode(self, mode):
|
324
|
-
mode = _DisplayMode
|
324
|
+
mode = _DisplayMode(mode)
|
325
325
|
idx = self._displayMode.findText(mode.value)
|
326
326
|
self._displayMode.setCurrentIndex(idx)
|
327
327
|
|
328
328
|
def getRadioOption(self) -> _RadioMode:
|
329
|
-
return _RadioMode
|
329
|
+
return _RadioMode(self._radioMode.currentText())
|
330
330
|
|
331
331
|
def setRadioOption(self, opt):
|
332
|
-
opt = _RadioMode
|
332
|
+
opt = _RadioMode(opt)
|
333
333
|
idx = self._radioMode.findText(opt.value)
|
334
334
|
self._radioMode.setCurrentIndex(idx)
|
335
335
|
|
336
336
|
def getSliceOption(self) -> _SliceMode:
|
337
|
-
return _SliceMode
|
337
|
+
return _SliceMode(self._sliceMode.currentText())
|
338
338
|
|
339
339
|
def setSliceOption(self, opt):
|
340
|
-
opt = _SliceMode
|
340
|
+
opt = _SliceMode(opt)
|
341
341
|
idx = self._sliceMode.findText(opt.value)
|
342
342
|
self._sliceMode.setCurrentIndex(idx)
|
343
343
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import numpy
|
3
4
|
import logging
|
4
5
|
from silx.gui import qt
|
5
6
|
from tomwer.core.utils.char import BETA_CHAR, DELTA_CHAR
|
@@ -28,14 +29,16 @@ class ReconstructionParameters(qt.QWidget):
|
|
28
29
|
self._deltaBetaQLE = qt.QLineEdit("", self)
|
29
30
|
self._deltaBetaQLE.setReadOnly(True)
|
30
31
|
self.layout().addRow(self._deltaBetaLabel, self._deltaBetaQLE)
|
31
|
-
# distance
|
32
|
-
self.
|
33
|
-
self.
|
34
|
-
self.layout().addRow(
|
32
|
+
# sample_detector distance
|
33
|
+
self._sampleDetectorDistanceQLE = qt.QLineEdit("", self)
|
34
|
+
self._sampleDetectorDistanceQLE.setReadOnly(True)
|
35
|
+
self.layout().addRow(
|
36
|
+
"sample-detector distance (cm)", self._sampleDetectorDistanceQLE
|
37
|
+
)
|
35
38
|
# pixel size
|
36
|
-
self.
|
37
|
-
self.
|
38
|
-
self.layout().addRow("
|
39
|
+
self._voxelSizeQLE = qt.QLineEdit("", self)
|
40
|
+
self._voxelSizeQLE.setReadOnly(True)
|
41
|
+
self.layout().addRow("voxel size (cm)", self._voxelSizeQLE)
|
39
42
|
# cor
|
40
43
|
self._corQLE = qt.QLineEdit("", self)
|
41
44
|
self._corQLE.setReadOnly(True)
|
@@ -89,7 +92,7 @@ class ReconstructionParameters(qt.QWidget):
|
|
89
92
|
self._setPhaseMethod,
|
90
93
|
self._setDeltaBeta,
|
91
94
|
self._setDistance,
|
92
|
-
self.
|
95
|
+
self._setVoxelSize,
|
93
96
|
self._setCor,
|
94
97
|
self._setPaddingType,
|
95
98
|
self._setHalfTomo,
|
@@ -136,29 +139,38 @@ class ReconstructionParameters(qt.QWidget):
|
|
136
139
|
distance_cm = f"{distance_cm:.2}"
|
137
140
|
else:
|
138
141
|
distance_cm = ""
|
139
|
-
self.
|
142
|
+
self._sampleDetectorDistanceQLE.setText(distance_cm)
|
140
143
|
|
141
|
-
def
|
144
|
+
def _setVoxelSize(self, metadata: dict):
|
142
145
|
# voxel size can be stored as pixel size (old version) or voxel size (new version)
|
143
146
|
recons_params = metadata.get("processing_options", {}).get("reconstruction", {})
|
144
|
-
voxel_size_cm = recons_params.get("voxel_size_cm", None)
|
147
|
+
voxel_size_cm = recons_params.get("voxel_size_cm", [None] * 3)
|
148
|
+
# back compatibility when voxel was a scalar ( ~ nabu 2023 ?)
|
149
|
+
if numpy.isscalar(voxel_size_cm):
|
150
|
+
voxel_size_cm = [voxel_size_cm] * 3
|
145
151
|
|
146
152
|
# now voxel size is expected to be a tuple of three elements
|
147
153
|
if voxel_size_cm is not None:
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
+
|
155
|
+
def clean_voxel_value(value):
|
156
|
+
if isinstance(value, str):
|
157
|
+
for char_to_ignore in (" ", "(", ")", "[", "]"):
|
158
|
+
value = value.replace(char_to_ignore, "")
|
159
|
+
return value
|
160
|
+
|
161
|
+
voxel_size_cm = [clean_voxel_value(value) for value in voxel_size_cm]
|
162
|
+
|
154
163
|
else:
|
155
164
|
# backward compatibility with old volume
|
156
|
-
voxel_size_cm = recons_params.get("pixel_size_cm", None)
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
165
|
+
voxel_size_cm = recons_params.get("pixel_size_cm", [None] * 3)
|
166
|
+
|
167
|
+
voxel_size_cm = filter(None, voxel_size_cm)
|
168
|
+
|
169
|
+
def cast_voxel_value(value: float | None):
|
170
|
+
return f"{float(value):.8}"
|
171
|
+
|
172
|
+
voxel_size_cm = [cast_voxel_value(value) for value in voxel_size_cm]
|
173
|
+
self._voxelSizeQLE.setText("x".join(voxel_size_cm))
|
162
174
|
|
163
175
|
def _setCor(self, metadata: dict):
|
164
176
|
cor = (
|
@@ -47,10 +47,10 @@ class ScanOverviewWidget(qt.QWidget):
|
|
47
47
|
self._estimatedCOR = qt.QTreeWidgetItem(self._frames)
|
48
48
|
self._estimatedCOR.setText(0, "estimated cor")
|
49
49
|
|
50
|
-
self.
|
51
|
-
self.
|
52
|
-
self.
|
53
|
-
self.
|
50
|
+
self._detector_x_pixel_size = qt.QTreeWidgetItem(self._instrument)
|
51
|
+
self._detector_x_pixel_size.setText(0, "x pixel size")
|
52
|
+
self._detector_y_pixel_size = qt.QTreeWidgetItem(self._instrument)
|
53
|
+
self._detector_y_pixel_size.setText(0, "y pixel size")
|
54
54
|
|
55
55
|
# 2: define sample
|
56
56
|
self._sample = qt.QTreeWidgetItem(self._tree)
|
@@ -58,6 +58,11 @@ class ScanOverviewWidget(qt.QWidget):
|
|
58
58
|
self._sample_name = qt.QTreeWidgetItem(self._sample)
|
59
59
|
self._sample_name.setText(0, "name")
|
60
60
|
|
61
|
+
self._sample_x_pixel_size = qt.QTreeWidgetItem(self._sample)
|
62
|
+
self._sample_x_pixel_size.setText(0, "x pixel size")
|
63
|
+
self._sample_y_pixel_size = qt.QTreeWidgetItem(self._sample)
|
64
|
+
self._sample_y_pixel_size.setText(0, "y pixel size")
|
65
|
+
|
61
66
|
# 3: other hight level items
|
62
67
|
self._startTime = qt.QTreeWidgetItem(self._tree)
|
63
68
|
self._startTime.setText(0, "start_time")
|
@@ -96,6 +101,7 @@ class ScanOverviewWidget(qt.QWidget):
|
|
96
101
|
"times": self._updateTimes,
|
97
102
|
"names": self._updateNames,
|
98
103
|
"scan-range": self._updateScanRange,
|
104
|
+
"sample": self._updateSample,
|
99
105
|
}
|
100
106
|
for part_name, fct in parts.items():
|
101
107
|
try:
|
@@ -107,7 +113,7 @@ class ScanOverviewWidget(qt.QWidget):
|
|
107
113
|
def _updateInstrument(self, scan: TomwerScanBase):
|
108
114
|
self._updateFrames(scan=scan)
|
109
115
|
self._updateEnergy(scan=scan)
|
110
|
-
self.
|
116
|
+
self._updateDetectorPixelSize(scan=scan)
|
111
117
|
|
112
118
|
def _setColoredTxt(
|
113
119
|
self, item, text, column=1, hightlight_red=False, hightlight_orange=False
|
@@ -125,7 +131,18 @@ class ScanOverviewWidget(qt.QWidget):
|
|
125
131
|
item.setBackground(0, qt.QBrush(bkg_color))
|
126
132
|
|
127
133
|
def _updateSample(self, scan: TomwerScanBase):
|
128
|
-
|
134
|
+
x_pixel_size = scan.sample_x_pixel_size
|
135
|
+
y_pixel_size = scan.sample_y_pixel_size
|
136
|
+
self._setColoredTxt(
|
137
|
+
item=self._sample_x_pixel_size,
|
138
|
+
text=f"{x_pixel_size} (m)",
|
139
|
+
hightlight_red=x_pixel_size in (None, 0.0, 1.0),
|
140
|
+
)
|
141
|
+
self._setColoredTxt(
|
142
|
+
item=self._sample_y_pixel_size,
|
143
|
+
text=f"{y_pixel_size} (m)",
|
144
|
+
hightlight_red=y_pixel_size in (None, 0.0, 1.0),
|
145
|
+
)
|
129
146
|
|
130
147
|
def _updateTimes(self, scan: TomwerScanBase):
|
131
148
|
self._startTime.setText(1, str(scan.start_time))
|
@@ -213,20 +230,20 @@ class ScanOverviewWidget(qt.QWidget):
|
|
213
230
|
text=str(scan_range),
|
214
231
|
)
|
215
232
|
|
216
|
-
def
|
233
|
+
def _updateDetectorPixelSize(self, scan: TomwerScanBase):
|
217
234
|
assert isinstance(scan, TomwerScanBase)
|
218
235
|
if isinstance(scan, EDFTomoScan):
|
219
236
|
x_pixel_size = y_pixel_size = scan.pixel_size
|
220
237
|
else:
|
221
|
-
x_pixel_size = scan.
|
222
|
-
y_pixel_size = scan.
|
238
|
+
x_pixel_size = scan.detector_x_pixel_size
|
239
|
+
y_pixel_size = scan.detector_y_pixel_size
|
223
240
|
self._setColoredTxt(
|
224
|
-
item=self.
|
241
|
+
item=self._detector_x_pixel_size,
|
225
242
|
text=f"{x_pixel_size} (m)",
|
226
243
|
hightlight_red=x_pixel_size in (None, 0.0, 1.0),
|
227
244
|
)
|
228
245
|
self._setColoredTxt(
|
229
|
-
item=self.
|
246
|
+
item=self._detector_y_pixel_size,
|
230
247
|
text=f"{y_pixel_size} (m)",
|
231
248
|
hightlight_red=y_pixel_size in (None, 0.0, 1.0),
|
232
249
|
)
|
@@ -46,8 +46,8 @@ def test_ReconstructionParameters(qtapp, phase_method): # noqa F401
|
|
46
46
|
assert window._methodQLE.text() == "FBP"
|
47
47
|
assert window._paganinQLE.text() == phase_method
|
48
48
|
assert window._deltaBetaQLE.text() == "110.0"
|
49
|
-
assert window.
|
50
|
-
assert window.
|
49
|
+
assert window._sampleDetectorDistanceQLE.text() == "0.4"
|
50
|
+
assert window._voxelSizeQLE.text() == "0.2x0.2x0.2"
|
51
51
|
assert window._corQLE.text() == "104.00"
|
52
52
|
assert window._halfTomoCB.isChecked()
|
53
53
|
assert window._fbpFilterQLE.text() == "Hilbert"
|
@@ -10,7 +10,7 @@ import os
|
|
10
10
|
import shutil
|
11
11
|
|
12
12
|
from silx.io.url import DataUrl
|
13
|
-
from
|
13
|
+
from enum import Enum as _Enum
|
14
14
|
|
15
15
|
from tomwer.core.scan.edfscan import EDFTomoScan
|
16
16
|
from tomwer.core.scan.nxtomoscan import NXtomoScan
|
@@ -59,7 +59,7 @@ class ScanStages:
|
|
59
59
|
:param stage:
|
60
60
|
:param dest_dir:
|
61
61
|
"""
|
62
|
-
stage = ScanStages.AcquisitionStage
|
62
|
+
stage = ScanStages.AcquisitionStage(stage)
|
63
63
|
if not dest_dir.endswith(os.path.basename(self.scan.path)):
|
64
64
|
dest_dir = os.path.join(dest_dir, os.path.basename(self.scan.path))
|
65
65
|
for t_stage in ScanStages.AcquisitionStage:
|
@@ -75,7 +75,7 @@ class ScanStages:
|
|
75
75
|
"""
|
76
76
|
if not dest_dir.endswith(os.path.basename(self.scan.path)):
|
77
77
|
dest_dir = os.path.join(dest_dir, os.path.basename(self.scan.path))
|
78
|
-
stage = ScanStages.AcquisitionStage
|
78
|
+
stage = ScanStages.AcquisitionStage(stage)
|
79
79
|
if stage is ScanStages.AcquisitionStage.ACQUI_NOT_STARTED:
|
80
80
|
return
|
81
81
|
elif stage is ScanStages.AcquisitionStage.ACQUI_STARTED:
|
tomwer/version.py
CHANGED