orGUI 1.0.1__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.
- orGUI-1.0.1.dist-info/LICENSE +21 -0
- orGUI-1.0.1.dist-info/METADATA +147 -0
- orGUI-1.0.1.dist-info/RECORD +83 -0
- orGUI-1.0.1.dist-info/WHEEL +5 -0
- orGUI-1.0.1.dist-info/entry_points.txt +2 -0
- orGUI-1.0.1.dist-info/top_level.txt +1 -0
- orgui/__init__.py +36 -0
- orgui/app/ArrayTableDialog.py +433 -0
- orgui/app/QReflectionSelector.py +538 -0
- orgui/app/QScanSelector.py +692 -0
- orgui/app/QUBCalculator.py +1210 -0
- orgui/app/__init__.py +36 -0
- orgui/app/database.py +487 -0
- orgui/app/orGUI.py +2613 -0
- orgui/app/qutils.py +51 -0
- orgui/backend/__init__.py +32 -0
- orgui/backend/backends.py +157 -0
- orgui/backend/beamline/ID31DiffractLinTilt.py +77 -0
- orgui/backend/beamline/P212_tools.py +577 -0
- orgui/backend/beamline/__init__.py +36 -0
- orgui/backend/beamline/fio_reader.py +110 -0
- orgui/backend/beamline/id31_tools.py +651 -0
- orgui/backend/scans.py +95 -0
- orgui/backend/udefaults.py +163 -0
- orgui/backend/universalScanLoader.py +105 -0
- orgui/datautils/__init__.py +32 -0
- orgui/datautils/util.py +705 -0
- orgui/datautils/xrayutils/CTRcalc.py +3022 -0
- orgui/datautils/xrayutils/CTRopt.py +623 -0
- orgui/datautils/xrayutils/CTRplotutil.py +904 -0
- orgui/datautils/xrayutils/DetectorCalibration.py +685 -0
- orgui/datautils/xrayutils/HKLVlieg.py +1360 -0
- orgui/datautils/xrayutils/ReciprocalNavigation.py +401 -0
- orgui/datautils/xrayutils/_CTRcalc_accel.py +181 -0
- orgui/datautils/xrayutils/__init__.py +46 -0
- orgui/datautils/xrayutils/element_data.py +213 -0
- orgui/datautils/xrayutils/test/__init__.py +57 -0
- orgui/datautils/xrayutils/test/test_CTRcalc.py +152 -0
- orgui/datautils/xrayutils/test/test_DetectorCalibration.py +336 -0
- orgui/datautils/xrayutils/test/test_HKLcalc.py +88 -0
- orgui/datautils/xrayutils/unitcells/Fe3O4(100).bul +59 -0
- orgui/datautils/xrayutils/unitcells/Pt100.bul +7 -0
- orgui/datautils/xrayutils/unitcells/Pt100_small.bul +5 -0
- orgui/datautils/xrayutils/unitcells/Pt110.bul +5 -0
- orgui/datautils/xrayutils/unitcells/Pt111.bul +6 -0
- orgui/datautils/xrayutils/unitcells/Pt310.bul +13 -0
- orgui/datautils/xrayutils/unitcells/Pt3O4(100).bul +19 -0
- orgui/datautils/xrayutils/unitcells/PtO(001).bul +9 -0
- orgui/datautils/xrayutils/unitcells/PtO(010).bul +9 -0
- orgui/datautils/xrayutils/unitcells/PtO(100).bul +9 -0
- orgui/datautils/xrayutils/unitcells/__init__.py +67 -0
- orgui/datautils/xrayutils/unitcells/a-PtO2(0001).bul +6 -0
- orgui/main.py +101 -0
- orgui/resources/__init__.py +40 -0
- orgui/resources/icons/alpha.png +0 -0
- orgui/resources/icons/alpha.svg +67 -0
- orgui/resources/icons/diffractometer_v3.png +0 -0
- orgui/resources/icons/disable-image.png +0 -0
- orgui/resources/icons/disable-image.svg +68 -0
- orgui/resources/icons/document-nx-open.png +0 -0
- orgui/resources/icons/document-nx-open.svg +152 -0
- orgui/resources/icons/document-nx-save.png +0 -0
- orgui/resources/icons/document-nx-save.svg +73 -0
- orgui/resources/icons/logo.png +0 -0
- orgui/resources/icons/logo.svg +808 -0
- orgui/resources/icons/max_image.png +0 -0
- orgui/resources/icons/max_image.svg +77 -0
- orgui/resources/icons/max_image2.png +0 -0
- orgui/resources/icons/max_image2.svg +83 -0
- orgui/resources/icons/search-image.png +0 -0
- orgui/resources/icons/search-image.svg +94 -0
- orgui/resources/icons/search-reflection.png +0 -0
- orgui/resources/icons/search-reflection.svg +126 -0
- orgui/resources/icons/search.png +0 -0
- orgui/resources/icons/search.svg +91 -0
- orgui/resources/icons/select-image.png +0 -0
- orgui/resources/icons/select-image.svg +60 -0
- orgui/resources/icons/set-reflection.png +0 -0
- orgui/resources/icons/set-reflection.svg +91 -0
- orgui/resources/icons/sum_image.png +0 -0
- orgui/resources/icons/sum_image.svg +63 -0
- orgui/resources/icons/sum_image2.png +0 -0
- orgui/resources/icons/sum_image2.svg +75 -0
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# /*##########################################################################
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2020-2024 Timo Fuchs
|
|
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
|
+
__author__ = "Timo Fuchs"
|
|
26
|
+
__copyright__ = "Copyright 2020-2024 Timo Fuchs"
|
|
27
|
+
__license__ = "MIT License"
|
|
28
|
+
__version__ = "1.0.0"
|
|
29
|
+
__maintainer__ = "Timo Fuchs"
|
|
30
|
+
__email__ = "fuchs@physik.uni-kiel.de"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
import sys
|
|
34
|
+
import os
|
|
35
|
+
import shutil
|
|
36
|
+
from dateutil import parser as dateparser
|
|
37
|
+
from datetime import datetime
|
|
38
|
+
|
|
39
|
+
from silx.gui import qt
|
|
40
|
+
|
|
41
|
+
from silx.gui.hdf5.Hdf5TreeModel import Hdf5TreeModel
|
|
42
|
+
from silx.gui.dialog import ImageFileDialog
|
|
43
|
+
from silx.gui import icons
|
|
44
|
+
from silx.gui.plot.AlphaSlider import NamedImageAlphaSlider
|
|
45
|
+
#from silx.gui.widgets import HorizontalSliderWithBrowser
|
|
46
|
+
|
|
47
|
+
import silx.gui.hdf5
|
|
48
|
+
from silx.gui.data import DataViewerFrame
|
|
49
|
+
import h5py
|
|
50
|
+
import traceback
|
|
51
|
+
|
|
52
|
+
import warnings
|
|
53
|
+
from .. import resources
|
|
54
|
+
from ..backend import backends
|
|
55
|
+
from .QReflectionSelector import QReflectionAnglesDialog
|
|
56
|
+
|
|
57
|
+
class QScanSelector(qt.QMainWindow):
|
|
58
|
+
sigScanChanged = qt.pyqtSignal(object)
|
|
59
|
+
sigImagePathChanged = qt.pyqtSignal(object)
|
|
60
|
+
sigImageNoChanged = qt.pyqtSignal(object)
|
|
61
|
+
sigROIChanged = qt.pyqtSignal()
|
|
62
|
+
sigROIintegrate = qt.pyqtSignal()
|
|
63
|
+
sigSearchHKL = qt.pyqtSignal(list)
|
|
64
|
+
def __init__(self,parentmainwindow , parent=None):
|
|
65
|
+
qt.QMainWindow.__init__(self ,parent=None)
|
|
66
|
+
self.parentmainwindow = parentmainwindow
|
|
67
|
+
|
|
68
|
+
self.mainwidget = qt.QWidget()
|
|
69
|
+
self.mainLayout = qt.QVBoxLayout()
|
|
70
|
+
maintab = qt.QTabWidget()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
self.openFileAction = qt.QAction(icons.getQIcon('document-open'),"Open file",self)
|
|
74
|
+
self.openFileAction.triggered.connect(self._onOpenFile)
|
|
75
|
+
|
|
76
|
+
self.refreshFileAction = qt.QAction(icons.getQIcon('view-refresh'),"Refresh file",self)
|
|
77
|
+
self.refreshFileAction.triggered.connect(self._onRefreshFile)
|
|
78
|
+
|
|
79
|
+
self.closeFileAction = qt.QAction(icons.getQIcon('close'),"Close file",self)
|
|
80
|
+
self.closeFileAction.triggered.connect(self._onCloseFile)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
self.hdfTreeView = silx.gui.hdf5.Hdf5TreeView(self)
|
|
84
|
+
self.hdfTreeView.setSortingEnabled(True)
|
|
85
|
+
self.hdfTreeView.addContextMenuCallback(self.nexus_treeview_callback)
|
|
86
|
+
self.hdf5model = Hdf5TreeModel(self.hdfTreeView,ownFiles=True)
|
|
87
|
+
self.hdfTreeView.setModel(self.hdf5model)
|
|
88
|
+
self.hdfTreeView.setExpandsOnDoubleClick(False)
|
|
89
|
+
self.hdf5model.setFileMoveEnabled(True)
|
|
90
|
+
self.__treeModelSorted = silx.gui.hdf5.NexusSortFilterProxyModel(self.hdfTreeView)
|
|
91
|
+
self.__treeModelSorted.setSourceModel(self.hdf5model)
|
|
92
|
+
self.__treeModelSorted.sort(0, qt.Qt.AscendingOrder)
|
|
93
|
+
self.__treeModelSorted.setSortCaseSensitivity(qt.Qt.CaseInsensitive)
|
|
94
|
+
|
|
95
|
+
self.hdfTreeView.setModel(self.__treeModelSorted)
|
|
96
|
+
|
|
97
|
+
self.hdfTreeView.doubleClicked.connect(self._onNEXUSDoubleClicked)
|
|
98
|
+
|
|
99
|
+
self.dataviewer = DataViewerFrame.DataViewerFrame()
|
|
100
|
+
self.dataviewerDialog = qt.QDialog(self)
|
|
101
|
+
dvlayout = qt.QVBoxLayout()
|
|
102
|
+
dvlayout.addWidget(self.dataviewer)
|
|
103
|
+
self.dataviewerDialog.setLayout(dvlayout)
|
|
104
|
+
self.dataviewerDialog.setModal(False)
|
|
105
|
+
|
|
106
|
+
maintab.addTab(self.hdfTreeView,"NEXUS")
|
|
107
|
+
|
|
108
|
+
pathSelector = qt.QSplitter(self)
|
|
109
|
+
pathSelector.setOrientation(qt.Qt.Horizontal)
|
|
110
|
+
qt.QLabel("File path:",pathSelector)
|
|
111
|
+
|
|
112
|
+
self.pathedit = qt.QLineEdit(pathSelector)
|
|
113
|
+
|
|
114
|
+
openButton = qt.QPushButton(pathSelector)
|
|
115
|
+
openButton.setIcon(icons.getQIcon('document-open'))
|
|
116
|
+
openButton.setSizePolicy(qt.QSizePolicy(qt.QSizePolicy.Fixed, qt.QSizePolicy.Minimum))
|
|
117
|
+
openButton.setToolTip("Choose the NEXUS/SPEC/log file")
|
|
118
|
+
openButton.clicked.connect(self._onSelectFilePath)
|
|
119
|
+
|
|
120
|
+
scannoSelector = qt.QSplitter(self)
|
|
121
|
+
scannoSelector.setOrientation(qt.Qt.Horizontal)
|
|
122
|
+
qt.QLabel("Scan #:",scannoSelector)
|
|
123
|
+
|
|
124
|
+
self.scannoBox = qt.QSpinBox(scannoSelector)
|
|
125
|
+
self.scannoBox.setRange(1,2147483647)
|
|
126
|
+
self.scannoBox.setValue(1)
|
|
127
|
+
|
|
128
|
+
openScanButton = qt.QPushButton(scannoSelector)
|
|
129
|
+
openScanButton.setIcon(icons.getQIcon('selected'))
|
|
130
|
+
openScanButton.setSizePolicy(qt.QSizePolicy(qt.QSizePolicy.Fixed, qt.QSizePolicy.Minimum))
|
|
131
|
+
openScanButton.setToolTip("Open scan")
|
|
132
|
+
openScanButton.clicked.connect(self._onLoadScan)
|
|
133
|
+
|
|
134
|
+
btidsplit = qt.QSplitter(self)
|
|
135
|
+
qt.QLabel("Beamtime id:",btidsplit)
|
|
136
|
+
self.btid = qt.QComboBox(btidsplit)
|
|
137
|
+
[self.btid.addItem(bt) for bt in backends.beamtimes]
|
|
138
|
+
self.btid.setCurrentText("id31_default")
|
|
139
|
+
|
|
140
|
+
self.bt_autodetect_enable = qt.QCheckBox("auto detect", btidsplit)
|
|
141
|
+
self.bt_autodetect_enable.toggled.connect(lambda s : self.btid.setEnabled(not s))
|
|
142
|
+
self.bt_autodetect_enable.setChecked(True)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
self.slider = qt.QSlider()
|
|
146
|
+
self.slider.setOrientation(qt.Qt.Horizontal)
|
|
147
|
+
self.slider.setMinimum(0)
|
|
148
|
+
self.slider.setMaximum(0)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
self.mainLayout.addWidget(maintab)
|
|
152
|
+
self.mainLayout.addWidget(pathSelector)
|
|
153
|
+
self.mainLayout.addWidget(scannoSelector)
|
|
154
|
+
self.mainLayout.addWidget(btidsplit)
|
|
155
|
+
#self.mainLayout.addWidget(self.slider)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
self.mainwidget.setLayout(self.mainLayout)
|
|
160
|
+
self.setCentralWidget(self.mainwidget)
|
|
161
|
+
|
|
162
|
+
self.toolbar = qt.QToolBar("Image selector",self)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
#righticon = qt.QIcon(qt.QPixmap(icons.rotate_right))
|
|
166
|
+
#lefticon = qt.QIcon(qt.QPixmap(icons.rotate_left))
|
|
167
|
+
#increaseImageNo = qt.QAction(righticon,"next image")
|
|
168
|
+
#decreaseImageNo = qt.QAction(lefticon,"previous image")
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
imglabel = qt.QLabel("No:")
|
|
172
|
+
self.noSelector = qt.QSpinBox()
|
|
173
|
+
self.noSelector.setRange(0,0)
|
|
174
|
+
|
|
175
|
+
self.axislabel = qt.QLabel("axis:")
|
|
176
|
+
self.axisSelector = qt.QDoubleSpinBox()
|
|
177
|
+
self.axisSelector.setRange(-1000,1000)
|
|
178
|
+
self.axisSelector.setReadOnly(True)
|
|
179
|
+
self.axisSelector.setSuffix(" °")
|
|
180
|
+
|
|
181
|
+
self.showMaxAct = qt.QAction(resources.getQicon("max_image2"), "plot maximum of the scan")
|
|
182
|
+
self.showMaxAct.setCheckable(True)
|
|
183
|
+
|
|
184
|
+
self.showSumAct = qt.QAction(resources.getQicon("sum_image2"), "plot sum of the scan")
|
|
185
|
+
self.showSumAct.setCheckable(True)
|
|
186
|
+
|
|
187
|
+
self.excludeImageAct = qt.QAction(resources.getQicon("disable-image"), "exclude image from max/sum image")
|
|
188
|
+
self.excludeImageAct.setCheckable(True)
|
|
189
|
+
|
|
190
|
+
self.alphaslider = NamedImageAlphaSlider(self,self.parentmainwindow.centralPlot,self.parentmainwindow.currentAddImageLabel)
|
|
191
|
+
self.alphaslider.setOrientation(qt.Qt.Horizontal)
|
|
192
|
+
self.alphaslider.setEnabled(True)
|
|
193
|
+
|
|
194
|
+
self.alpha_menu = qt.QMenu()
|
|
195
|
+
|
|
196
|
+
self.alphasliderwidget = qt.QWidgetAction(self.alpha_menu)
|
|
197
|
+
self.alphasliderwidget.setDefaultWidget(self.alphaslider)
|
|
198
|
+
|
|
199
|
+
self.alpha_menu.addAction(self.alphasliderwidget)
|
|
200
|
+
|
|
201
|
+
#self.alpha_btn = qt.QToolButton(resources.getQicon("sum_image.png"),"slider")
|
|
202
|
+
self.alpha_btn = qt.QToolButton()
|
|
203
|
+
self.alpha_btn.setIcon(resources.getQicon("alpha"))
|
|
204
|
+
self.alpha_btn.setToolTip("Transparency of max / sum image")
|
|
205
|
+
self.alpha_btn.setPopupMode(qt.QToolButton.InstantPopup)
|
|
206
|
+
self.alpha_btn.setMenu(self.alpha_menu)
|
|
207
|
+
|
|
208
|
+
self.alpha_btn_act = qt.QWidgetAction(self)
|
|
209
|
+
self.alpha_btn_act.setDefaultWidget(self.alpha_btn)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
self.toolbar.addAction(self.showMaxAct)
|
|
213
|
+
self.toolbar.addAction(self.showSumAct)
|
|
214
|
+
self.toolbar.addAction(self.alpha_btn_act)
|
|
215
|
+
self.toolbar.addSeparator()
|
|
216
|
+
|
|
217
|
+
self.toolbar.addAction(self.excludeImageAct)
|
|
218
|
+
|
|
219
|
+
self.toolbar.addSeparator()
|
|
220
|
+
|
|
221
|
+
self.toolbar.addWidget(imglabel)
|
|
222
|
+
self.toolbar.addWidget(self.noSelector)
|
|
223
|
+
self.toolbar.addWidget(self.axislabel)
|
|
224
|
+
self.toolbar.addWidget(self.axisSelector)
|
|
225
|
+
|
|
226
|
+
self.toolbar.addWidget(self.slider)
|
|
227
|
+
decreaseImageNo = self.toolbar.addAction(icons.getQIcon("previous"),"previous image")
|
|
228
|
+
increaseImageNo = self.toolbar.addAction(icons.getQIcon("next"),"next image")
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
increaseImageNo.setShortcut(qt.QKeySequence( qt.Qt.Key_Plus))
|
|
232
|
+
decreaseImageNo.setShortcut(qt.QKeySequence( qt.Qt.Key_Minus))
|
|
233
|
+
|
|
234
|
+
increaseImageNo.triggered.connect(self._onIncreaseImageNo)
|
|
235
|
+
decreaseImageNo.triggered.connect(self._onDecreaseImageNo)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
self.slider.valueChanged.connect(self._onSliderChanged)
|
|
239
|
+
self.noSelector.valueChanged.connect(self.slider.setValue)
|
|
240
|
+
self.slider.valueChanged.connect(self.noSelector.setValue)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
#self.addToolBar(qt.Qt.BottomToolBarArea,self.toolbar)
|
|
244
|
+
self.axis = None
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
self.selectedScan = None
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## ROI
|
|
252
|
+
|
|
253
|
+
self.roiIntegrateTab = qt.QWidget()
|
|
254
|
+
self.roiIntegrateTabLayout = qt.QVBoxLayout()
|
|
255
|
+
|
|
256
|
+
roiGroup = qt.QGroupBox("ROI definition (in pixel)")
|
|
257
|
+
roiGroupLayout = qt.QGridLayout()
|
|
258
|
+
|
|
259
|
+
self.hsize = qt.QDoubleSpinBox()
|
|
260
|
+
self.vsize = qt.QDoubleSpinBox()
|
|
261
|
+
self.left = qt.QDoubleSpinBox()
|
|
262
|
+
self.right = qt.QDoubleSpinBox()
|
|
263
|
+
self.top = qt.QDoubleSpinBox()
|
|
264
|
+
self.bottom = qt.QDoubleSpinBox()
|
|
265
|
+
self.offsetx = qt.QDoubleSpinBox()
|
|
266
|
+
self.offsety = qt.QDoubleSpinBox()
|
|
267
|
+
|
|
268
|
+
self.hsize.setRange(1,20000)
|
|
269
|
+
self.hsize.setDecimals(1)
|
|
270
|
+
self.hsize.setSuffix(" px")
|
|
271
|
+
self.hsize.setValue(6.)
|
|
272
|
+
|
|
273
|
+
self.vsize.setRange(1,20000)
|
|
274
|
+
self.vsize.setDecimals(1)
|
|
275
|
+
self.vsize.setSuffix(" px")
|
|
276
|
+
self.vsize.setValue(6.)
|
|
277
|
+
|
|
278
|
+
self.left.setRange(0,20000)
|
|
279
|
+
self.left.setDecimals(1)
|
|
280
|
+
self.left.setSuffix(" px")
|
|
281
|
+
self.left.setValue(6.)
|
|
282
|
+
|
|
283
|
+
self.right.setRange(0,20000)
|
|
284
|
+
self.right.setDecimals(1)
|
|
285
|
+
self.right.setSuffix(" px")
|
|
286
|
+
self.right.setValue(6.)
|
|
287
|
+
|
|
288
|
+
self.top.setRange(0,20000)
|
|
289
|
+
self.top.setDecimals(1)
|
|
290
|
+
self.top.setSuffix(" px")
|
|
291
|
+
self.top.setValue(0.)
|
|
292
|
+
|
|
293
|
+
self.bottom.setRange(0,20000)
|
|
294
|
+
self.bottom.setDecimals(1)
|
|
295
|
+
self.bottom.setSuffix(" px")
|
|
296
|
+
self.bottom.setValue(0.)
|
|
297
|
+
|
|
298
|
+
self.offsetx.setRange(-20000,20000)
|
|
299
|
+
self.offsetx.setDecimals(1)
|
|
300
|
+
self.offsetx.setSuffix(" px")
|
|
301
|
+
self.offsetx.setValue(0.)
|
|
302
|
+
|
|
303
|
+
self.offsety.setRange(-20000,20000)
|
|
304
|
+
self.offsety.setDecimals(1)
|
|
305
|
+
self.offsety.setSuffix(" px")
|
|
306
|
+
self.offsety.setValue(0.)
|
|
307
|
+
|
|
308
|
+
roiGroupLayout.addWidget(qt.QLabel('center roi (h x v):'),0,0)
|
|
309
|
+
roiGroupLayout.addWidget(self.hsize,0,1)
|
|
310
|
+
roiGroupLayout.addWidget(self.vsize,0,2)
|
|
311
|
+
|
|
312
|
+
roiGroupLayout.addWidget(qt.QLabel('bg roi (left, right):'),1,0)
|
|
313
|
+
roiGroupLayout.addWidget(self.left,1,1)
|
|
314
|
+
roiGroupLayout.addWidget(self.right,1,2)
|
|
315
|
+
|
|
316
|
+
roiGroupLayout.addWidget(qt.QLabel('bg roi (top, bottom):'),2,0)
|
|
317
|
+
roiGroupLayout.addWidget(self.top,2,1)
|
|
318
|
+
roiGroupLayout.addWidget(self.bottom,2,2)
|
|
319
|
+
|
|
320
|
+
roiGroupLayout.addWidget(qt.QLabel('roi loc offset (x, y):'),3,0)
|
|
321
|
+
roiGroupLayout.addWidget(self.offsetx,3,1)
|
|
322
|
+
roiGroupLayout.addWidget(self.offsety,3,2)
|
|
323
|
+
|
|
324
|
+
self.hsize.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
325
|
+
self.vsize.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
326
|
+
self.left.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
327
|
+
self.right.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
328
|
+
self.top.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
329
|
+
self.bottom.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
330
|
+
self.offsetx.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
331
|
+
self.offsety.valueChanged.connect(lambda : self.sigROIChanged.emit())
|
|
332
|
+
|
|
333
|
+
roiGroup.setLayout(roiGroupLayout)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# hkl scan
|
|
339
|
+
|
|
340
|
+
self.H_0 = [qt.QDoubleSpinBox() for i in range(3)]
|
|
341
|
+
[h.setRange(-20000,20000) for h in self.H_0]
|
|
342
|
+
[h.setDecimals(4) for h in self.H_0]
|
|
343
|
+
self.H_0[0].setValue(1.)
|
|
344
|
+
self.H_0[1].setValue(0.)
|
|
345
|
+
self.H_0[2].setValue(0.)
|
|
346
|
+
[h.valueChanged.connect(lambda : self.sigROIChanged.emit()) for h in self.H_0]
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
self.H_1 = [qt.QDoubleSpinBox() for i in range(3)]
|
|
350
|
+
[h.setRange(-20000,20000) for h in self.H_1]
|
|
351
|
+
[h.setDecimals(4) for h in self.H_1]
|
|
352
|
+
self.H_1[0].setValue(0.)
|
|
353
|
+
self.H_1[1].setValue(0.)
|
|
354
|
+
self.H_1[2].setValue(1.)
|
|
355
|
+
[h.valueChanged.connect(lambda : self.sigROIChanged.emit()) for h in self.H_1]
|
|
356
|
+
|
|
357
|
+
directionGroup = qt.QGroupBox(u"Direction H₁ (hkl)")
|
|
358
|
+
directionGroupLayout = qt.QHBoxLayout()
|
|
359
|
+
[directionGroupLayout.addWidget(h) for h in self.H_1]
|
|
360
|
+
directionGroup.setLayout(directionGroupLayout)
|
|
361
|
+
|
|
362
|
+
locationGroup = qt.QGroupBox(u"Location vector H₀ (hkl)")
|
|
363
|
+
locationGroupLayout = qt.QHBoxLayout()
|
|
364
|
+
[locationGroupLayout.addWidget(h) for h in self.H_0]
|
|
365
|
+
locationGroup.setLayout(locationGroupLayout)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
hklscanwidget = qt.QWidget()
|
|
369
|
+
hklscanwidgetlayout = qt.QVBoxLayout()
|
|
370
|
+
|
|
371
|
+
hklscanwidgetlayout.addWidget(qt.QLabel(u"Integrate along:\nH(s) = H₁ 🞄 s + H₀"))
|
|
372
|
+
hklscanwidgetlayout.addWidget(directionGroup)
|
|
373
|
+
hklscanwidgetlayout.addWidget(locationGroup)
|
|
374
|
+
|
|
375
|
+
hklscanwidget.setLayout(hklscanwidgetlayout)
|
|
376
|
+
# static roi scan
|
|
377
|
+
|
|
378
|
+
self.xy_static = [qt.QDoubleSpinBox() for i in range(2)]
|
|
379
|
+
|
|
380
|
+
[h.setRange(-20000,20000) for h in self.xy_static]
|
|
381
|
+
[h.setDecimals(3) for h in self.xy_static]
|
|
382
|
+
self.xy_static[0].setValue(10.)
|
|
383
|
+
self.xy_static[1].setValue(10.)
|
|
384
|
+
[h.valueChanged.connect(lambda : self.sigROIChanged.emit()) for h in self.xy_static]
|
|
385
|
+
|
|
386
|
+
self.hkl_static = [qt.QDoubleSpinBox() for i in range(3)]
|
|
387
|
+
[h.setRange(-20000,20000) for h in self.hkl_static]
|
|
388
|
+
[h.setDecimals(3) for h in self.hkl_static]
|
|
389
|
+
[h.setValue(0.) for h in self.hkl_static]
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
setroi_btn = qt.QToolButton()
|
|
393
|
+
self.select_roi_action = qt.QAction(icons.getQIcon("crosshair"), "Select roi location by double clicking", self)
|
|
394
|
+
self.select_roi_action.setCheckable(True)
|
|
395
|
+
|
|
396
|
+
#setroi_btn.setIcon()
|
|
397
|
+
#setroi_btn.setToolTip("Select roi location by double clicking")
|
|
398
|
+
setroi_btn.setDefaultAction(self.select_roi_action)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
static_loc_Group = qt.QGroupBox(u"Static ROI location")
|
|
404
|
+
static_loc_GroupMainVLayout = qt.QVBoxLayout()
|
|
405
|
+
|
|
406
|
+
static_pix_xy_box = qt.QGroupBox(u"Pixel coordinates")
|
|
407
|
+
static_loc_GroupLayout = qt.QHBoxLayout()
|
|
408
|
+
static_loc_GroupLayout.addWidget(setroi_btn)
|
|
409
|
+
for spinbox, lbl in zip(self.xy_static, ["x:", "y:"]):
|
|
410
|
+
static_loc_GroupLayout.addWidget(qt.QLabel(lbl))
|
|
411
|
+
static_loc_GroupLayout.addWidget(spinbox)
|
|
412
|
+
static_pix_xy_box.setLayout(static_loc_GroupLayout)
|
|
413
|
+
|
|
414
|
+
static_hkl_box = qt.QGroupBox(u"hkl coordinates")
|
|
415
|
+
static_loc_HKLLayout = qt.QHBoxLayout()
|
|
416
|
+
for spinbox, lbl in zip(self.hkl_static, ["H:", "K:", "L:"]):
|
|
417
|
+
static_loc_HKLLayout.addWidget(qt.QLabel(lbl))
|
|
418
|
+
static_loc_HKLLayout.addWidget(spinbox)
|
|
419
|
+
calc_HKL_roi_btn = qt.QToolButton()
|
|
420
|
+
self.roi_fromHKL_action = qt.QAction(resources.getQicon("search"), "Set ROI position to calculated position of reflection", self)
|
|
421
|
+
self.roi_fromHKL_action.triggered.connect(self.search_hkl_static_loc)
|
|
422
|
+
calc_HKL_roi_btn.setDefaultAction(self.roi_fromHKL_action)
|
|
423
|
+
static_loc_HKLLayout.addWidget(calc_HKL_roi_btn)
|
|
424
|
+
static_hkl_box.setLayout(static_loc_HKLLayout)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
static_loc_GroupMainVLayout.addWidget(static_pix_xy_box)
|
|
428
|
+
static_loc_GroupMainVLayout.addWidget(static_hkl_box)
|
|
429
|
+
|
|
430
|
+
static_loc_Group.setLayout(static_loc_GroupMainVLayout)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
# roi scan tab
|
|
434
|
+
|
|
435
|
+
self.scanstab = qt.QTabWidget()
|
|
436
|
+
self.scanstab.addTab(hklscanwidget, "hklscan")
|
|
437
|
+
self.scanstab.addTab(static_loc_Group, "fixed roi loc")
|
|
438
|
+
self.scanstab.currentChanged.connect(lambda : self.sigROIChanged.emit())
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
# options group
|
|
442
|
+
|
|
443
|
+
optionsGroup = qt.QGroupBox("Integration options")
|
|
444
|
+
optionsGroupLayout = qt.QGridLayout()
|
|
445
|
+
self.useMaskBox = qt.QCheckBox("Use pixel mask")
|
|
446
|
+
self.useLorentzBox = qt.QCheckBox("Lorentz correction")
|
|
447
|
+
self.useLorentzBox.setEnabled(False)
|
|
448
|
+
self.useSolidAngleBox = qt.QCheckBox("Solid angle correction")
|
|
449
|
+
self.usePolarizationBox = qt.QCheckBox("Polarization correction")
|
|
450
|
+
|
|
451
|
+
optionsGroupLayout.addWidget(self.useMaskBox,0,0)
|
|
452
|
+
optionsGroupLayout.addWidget(self.useLorentzBox,1,0)
|
|
453
|
+
optionsGroupLayout.addWidget(self.useSolidAngleBox,0,1)
|
|
454
|
+
optionsGroupLayout.addWidget(self.usePolarizationBox,1,1)
|
|
455
|
+
|
|
456
|
+
optionsGroup.setLayout(optionsGroupLayout)
|
|
457
|
+
|
|
458
|
+
self.roiIntegrateTabLayout.addWidget(roiGroup)
|
|
459
|
+
self.roiIntegrateTabLayout.addWidget(self.scanstab)
|
|
460
|
+
self.roiIntegrateTabLayout.addWidget(optionsGroup)
|
|
461
|
+
|
|
462
|
+
self.integrateROIBtn = qt.QPushButton("ROI integrate scan")
|
|
463
|
+
self.integrateROIBtn.clicked.connect(lambda : self.sigROIintegrate.emit())
|
|
464
|
+
self.roiIntegrateTabLayout.addWidget(self.integrateROIBtn)
|
|
465
|
+
|
|
466
|
+
#self.showROICheckBox = qt.QCheckBox("Show ROI")
|
|
467
|
+
#self.roiIntegrateTabLayout.addWidget(self.showROICheckBox)
|
|
468
|
+
|
|
469
|
+
self.roiIntegrateTab.setLayout(self.roiIntegrateTabLayout)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
maintab.addTab(self.roiIntegrateTab,"ROI integration")
|
|
474
|
+
|
|
475
|
+
def set_xy_static_loc(self, x, y):
|
|
476
|
+
[h.blockSignals(True) for h in self.xy_static]
|
|
477
|
+
self.xy_static[0].setValue(x)
|
|
478
|
+
self.xy_static[1].setValue(y)
|
|
479
|
+
[h.blockSignals(False) for h in self.xy_static]
|
|
480
|
+
self.sigROIChanged.emit()
|
|
481
|
+
|
|
482
|
+
def search_hkl_static_loc(self):
|
|
483
|
+
hkl = [h.value() for h in self.hkl_static]
|
|
484
|
+
self.sigSearchHKL.emit(hkl)
|
|
485
|
+
|
|
486
|
+
def view_data_callback(self,obj):
|
|
487
|
+
self.dataviewer.setData(obj)
|
|
488
|
+
self.dataviewerDialog.open()
|
|
489
|
+
|
|
490
|
+
def _onLoadScan(self):
|
|
491
|
+
if self.bt_autodetect_enable.isChecked():
|
|
492
|
+
msgbox = qt.QMessageBox(qt.QMessageBox.Warning,'Cannot auto detect backend',
|
|
493
|
+
'Cannot auto detect beamtime id and corresponding backend in minimal mode.\nPlease first deselect the beamtime auto detection and then chose the correct beamtime or default backend.',
|
|
494
|
+
qt.QMessageBox.Ok, self)
|
|
495
|
+
clickedbutton = msgbox.exec()
|
|
496
|
+
return
|
|
497
|
+
ddict = dict()
|
|
498
|
+
ddict['event'] = "loadScan"
|
|
499
|
+
ddict['file'] = self.pathedit.text()
|
|
500
|
+
ddict['scanno'] = self.scannoBox.value()
|
|
501
|
+
self.sigScanChanged.emit(ddict)
|
|
502
|
+
|
|
503
|
+
def _onOpenFile(self):
|
|
504
|
+
fileTypeDict = {'NEXUS files (*.h5 *.hdf5)': '.h5', "SPEC files (*.spec *.spc)": '.spec', 'All files (*)': '' }
|
|
505
|
+
fileTypeFilter = ""
|
|
506
|
+
for f in fileTypeDict:
|
|
507
|
+
fileTypeFilter += f + ";;"
|
|
508
|
+
filename, filetype = qt.QFileDialog.getOpenFileName(self,"Open NEXUS file",
|
|
509
|
+
self.parentmainwindow.filedialogdir,
|
|
510
|
+
fileTypeFilter[:-2])
|
|
511
|
+
if filename == '':
|
|
512
|
+
return
|
|
513
|
+
self.parentmainwindow.filedialogdir = os.path.splitext(filename)[0]
|
|
514
|
+
try:
|
|
515
|
+
self.hdf5model.appendFile(filename)
|
|
516
|
+
except:
|
|
517
|
+
msgbox = qt.QMessageBox(qt.QMessageBox.Critical,'Cannot open file',
|
|
518
|
+
'Cannot open file %s.' % filename,
|
|
519
|
+
qt.QMessageBox.Ok, self)
|
|
520
|
+
msgbox.setDetailedText(traceback.format_exc())
|
|
521
|
+
clickedbutton = msgbox.exec()
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
def _onSelectFilePath(self):
|
|
525
|
+
fileTypeDict = {'NEXUS files (*.h5 *.hdf5)': '.h5', "SPEC files (*.spec *.spc)": '.spec', 'log files (*.log)' : '.log','All files (*)': '' }
|
|
526
|
+
fileTypeFilter = ""
|
|
527
|
+
for f in fileTypeDict:
|
|
528
|
+
fileTypeFilter += f + ";;"
|
|
529
|
+
filename, filetype = qt.QFileDialog.getOpenFileName(self,"Open NEXUS file",
|
|
530
|
+
self.parentmainwindow.filedialogdir,
|
|
531
|
+
fileTypeFilter[:-2])
|
|
532
|
+
if filename == '':
|
|
533
|
+
return
|
|
534
|
+
self.parentmainwindow.filedialogdir = os.path.splitext(filename)[0]
|
|
535
|
+
self.pathedit.setText(filename)
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
def _onCloseFile(self):
|
|
539
|
+
objects = list(self.hdfTreeView.selectedH5Nodes())
|
|
540
|
+
if len(objects) > 0:
|
|
541
|
+
obj = objects[0]
|
|
542
|
+
self.hdf5model.removeH5pyObject(obj.file)
|
|
543
|
+
|
|
544
|
+
def nexus_treeview_callback(self,event):
|
|
545
|
+
objects = list(event.source().selectedH5Nodes())
|
|
546
|
+
if len(objects) > 0:
|
|
547
|
+
obj = objects[0] # for single selection
|
|
548
|
+
menu = event.menu()
|
|
549
|
+
action = qt.QAction("Refresh", menu)
|
|
550
|
+
action.triggered.connect(lambda: self.hdf5model.synchronizeH5pyObject(obj))
|
|
551
|
+
menu.addAction(action)
|
|
552
|
+
#if obj.ntype is h5py.Dataset:
|
|
553
|
+
action = qt.QAction("display data", menu)
|
|
554
|
+
action.triggered.connect(lambda: self.view_data_callback(obj))
|
|
555
|
+
menu.addAction(action)
|
|
556
|
+
if obj.ntype is h5py.File:
|
|
557
|
+
action = qt.QAction("remove", menu)
|
|
558
|
+
action.triggered.connect(lambda: self._onCloseFile())
|
|
559
|
+
menu.addAction(action)
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
def _onRefreshFile(self):
|
|
563
|
+
objects = list(self.hdfTreeView.selectedH5Nodes())
|
|
564
|
+
if len(objects) > 0:
|
|
565
|
+
obj = objects[0]
|
|
566
|
+
self.hdf5model.synchronizeH5pyObject(obj)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
#if 'NX_class' in obj.ntype.attrs:
|
|
570
|
+
# if obj.ntype.attrs['NX_class'] == 'NX_':
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
def getScanToolbar(self):
|
|
575
|
+
return self.toolbar
|
|
576
|
+
|
|
577
|
+
def showToolBar(self):
|
|
578
|
+
self.addToolBar(qt.Qt.BottomToolBarArea,self.toolbar)
|
|
579
|
+
|
|
580
|
+
def _onSliderChanged(self,scanno):
|
|
581
|
+
#self.noSelector.setValue(self.slider.value())
|
|
582
|
+
self.axisSelector.setValue(self.axis[self.slider.value()])
|
|
583
|
+
self.sigImageNoChanged.emit(self.slider.value())
|
|
584
|
+
|
|
585
|
+
def _onNoSelectorChanged(self):
|
|
586
|
+
self.slider.setValue(self.noSelector.value())
|
|
587
|
+
self.sigImageNoChanged.emit(self.noSelector.value())
|
|
588
|
+
|
|
589
|
+
def _onDecreaseImageNo(self):
|
|
590
|
+
self.slider.setValue(self.slider.value() -1)
|
|
591
|
+
|
|
592
|
+
def _onIncreaseImageNo(self):
|
|
593
|
+
self.slider.setValue(self.slider.value() +1)
|
|
594
|
+
|
|
595
|
+
def setRange(self,minimum,maximum):
|
|
596
|
+
self.slider.setRange(minimum,maximum)
|
|
597
|
+
self.noSelector.setRange(minimum,maximum)
|
|
598
|
+
|
|
599
|
+
def setAxis(self,axis,label='th'):
|
|
600
|
+
self.axislabel.setText(label)
|
|
601
|
+
self.axis = axis
|
|
602
|
+
self.setRange(0,axis.size-1)
|
|
603
|
+
"""
|
|
604
|
+
def _onSourceSelected(self,ddict):
|
|
605
|
+
event = ddict['event']
|
|
606
|
+
if (event == 'SourceSelected' or event == 'NewSourceSelected' or event == 'SourceReloaded'):
|
|
607
|
+
dataname = ddict['sourcelist'][0]
|
|
608
|
+
|
|
609
|
+
datatype = QDataSource.getSourceType(dataname)
|
|
610
|
+
datapath,_ = os.path.split(dataname)
|
|
611
|
+
if datatype == NexusDataSource.SOURCE_TYPE:
|
|
612
|
+
#shutil.copy(dataname,datapath + '/temp.h5')
|
|
613
|
+
#ds = QDataSource.QDataSource(datapath + '/temp.h5',datatype)
|
|
614
|
+
if event == 'SourceReloaded':
|
|
615
|
+
pass
|
|
616
|
+
else:
|
|
617
|
+
self.hdf5model.appendFile(dataname)
|
|
618
|
+
elif datatype == SpecFileDataSource.SOURCE_TYPE:
|
|
619
|
+
try:
|
|
620
|
+
ds = QDataSource.QDataSource(dataname,datatype)
|
|
621
|
+
#self.specfileWidget.setDataSource(ds)
|
|
622
|
+
except Exception:
|
|
623
|
+
warnings.warn("didn't find good datasource in %s , try to read as P212 CrudeScan" % dataname)
|
|
624
|
+
self.sigScanChanged.emit([{'SourceName' : dataname}])
|
|
625
|
+
self.selectedScan = None
|
|
626
|
+
return
|
|
627
|
+
else:
|
|
628
|
+
warnings.warn("not implemented data source: %s" % dataname)
|
|
629
|
+
self.selectedScan = None
|
|
630
|
+
self.sigScanChanged.emit([])
|
|
631
|
+
|
|
632
|
+
"""
|
|
633
|
+
|
|
634
|
+
def _onNEXUSDoubleClicked(self,index): # ToDo add try except with popup message!
|
|
635
|
+
nodes = list(self.hdfTreeView.selectedH5Nodes())
|
|
636
|
+
if len(nodes) > 0:
|
|
637
|
+
obj = nodes[0]
|
|
638
|
+
if 'NX_class' in obj.attrs:
|
|
639
|
+
try:
|
|
640
|
+
nxcls = obj.attrs['NX_class'].decode("utf-8")
|
|
641
|
+
except AttributeError:
|
|
642
|
+
nxcls = obj.attrs['NX_class']
|
|
643
|
+
|
|
644
|
+
if nxcls == 'NXentry':
|
|
645
|
+
if self.bt_autodetect_enable.isChecked():
|
|
646
|
+
try:
|
|
647
|
+
dt = dateparser.parse(obj.h5py_target['start_time'][()])
|
|
648
|
+
except Exception as e:
|
|
649
|
+
msgbox = qt.QMessageBox(qt.QMessageBox.Critical,'Cannot open scan',
|
|
650
|
+
'Cannot parse start time of the scan.', qt.QMessageBox.Ok, self)
|
|
651
|
+
msgbox.setDetailedText(traceback.format_exc())
|
|
652
|
+
clickedbutton = msgbox.exec()
|
|
653
|
+
return
|
|
654
|
+
|
|
655
|
+
try:
|
|
656
|
+
btid = backends.getBeamtimeId(dt)
|
|
657
|
+
self.btid.setCurrentText(btid)
|
|
658
|
+
except Exception as e:
|
|
659
|
+
msgbox = qt.QMessageBox(qt.QMessageBox.Critical,'Cannot open scan',
|
|
660
|
+
'Cannot find matching beamtime id to the date %s:\n%s' % (dt,str(e)), qt.QMessageBox.Ok, self)
|
|
661
|
+
msgbox.setDetailedText(traceback.format_exc())
|
|
662
|
+
clickedbutton = msgbox.exec()
|
|
663
|
+
return
|
|
664
|
+
else:
|
|
665
|
+
btid = self.btid.currentText()
|
|
666
|
+
try:
|
|
667
|
+
ddict = backends.scannoConverter[btid](obj)
|
|
668
|
+
except Exception as e:
|
|
669
|
+
msgbox = qt.QMessageBox(qt.QMessageBox.Critical,'Cannot open scan',
|
|
670
|
+
'Cannot parse scan number: %s' % str(e), qt.QMessageBox.Ok, self)
|
|
671
|
+
msgbox.setDetailedText(traceback.format_exc())
|
|
672
|
+
clickedbutton = msgbox.exec()
|
|
673
|
+
return
|
|
674
|
+
ddict['event'] = "itemDoubleClicked"
|
|
675
|
+
ddict['file'] = obj.local_filename
|
|
676
|
+
ddict['node'] = obj
|
|
677
|
+
ddict['beamtime'] = btid
|
|
678
|
+
self.pathedit.setText(obj.local_filename)
|
|
679
|
+
self.scannoBox.setValue(ddict['scanno'])
|
|
680
|
+
self.sigScanChanged.emit(ddict)
|
|
681
|
+
"""
|
|
682
|
+
def _onSelectImageFolder(self):
|
|
683
|
+
|
|
684
|
+
folder = PyMcaFileDialogs.getExistingDirectory(self,"select directory containing the images for the current scan")
|
|
685
|
+
if(len(folder)):
|
|
686
|
+
self.pathedit.setText(folder)
|
|
687
|
+
self._onAcceptImagePath()
|
|
688
|
+
"""
|
|
689
|
+
|
|
690
|
+
def _onAcceptImagePath(self):
|
|
691
|
+
#print(self.pathedit.text())
|
|
692
|
+
self.sigImagePathChanged.emit(self.pathedit.text())
|