pyTEMlib 0.2023.8.0__py2.py3-none-any.whl → 0.2024.2.0__py2.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.

Potentially problematic release.


This version of pyTEMlib might be problematic. Click here for more details.

pyTEMlib/info_dlg.py DELETED
@@ -1,239 +0,0 @@
1
- """
2
- Gui for info_dialog
3
-
4
- Author: Gerd Duscher
5
-
6
- """
7
- # -*- coding: utf-8 -*-
8
-
9
- # Form implementation generated from reading ui file 'untitled.ui'
10
- #
11
- # Created by: PyQt5 UI code generator 5.12.3
12
- #
13
- # WARNING! All changes made in this file will be lost!
14
-
15
- from pyTEMlib.microscope import microscope
16
-
17
- Qt_available = True
18
- try:
19
- from PyQt5 import QtCore, QtGui, QtWidgets
20
-
21
- except:
22
- Qt_available = False
23
- # print('Qt dialogs are not available')
24
-
25
-
26
- if Qt_available:
27
- class UiDialog(object):
28
- def __init__(self, dialog):
29
- dialog.setObjectName('Spectrum Info')
30
- dialog.resize(371, 184)
31
-
32
- valid_float = QtGui.QDoubleValidator()
33
- valid_int = QtGui.QIntValidator()
34
-
35
- self.TEM = []
36
- self.TEM = microscope.get_available_microscope_names()
37
-
38
- self.layout = QtWidgets.QGridLayout()
39
- self.layout.setVerticalSpacing(2)
40
-
41
- self.separator1 = QtWidgets.QLabel(dialog)
42
- self.separator1.setAutoFillBackground(True)
43
- palette = self.separator1.palette()
44
- palette.setColor(self.separator1.backgroundRole(), QtCore.Qt.blue)
45
- palette.setColor(self.separator1.foregroundRole(), QtCore.Qt.white)
46
- self.separator1.setAlignment(QtCore.Qt.AlignCenter)
47
- self.separator1.setMaximumHeight(50)
48
-
49
- self.separator1.setPalette(palette)
50
- ######################################################################
51
- self.separator1.setText("Energy Scale")
52
-
53
- row = 0
54
- self.layout.addWidget(self.separator1, row, 0, 1, 4)
55
- ######################################################################
56
-
57
- row += 1
58
- self.offsetLabel = QtWidgets.QLabel("Offset")
59
- self.offsetEdit = QtWidgets.QLineEdit(" 1.00")
60
- self.offsetEdit.setValidator(valid_float)
61
- self.offsetUnit = QtWidgets.QLabel("eV")
62
-
63
- self.layout.addWidget(self.offsetLabel, row, 0)
64
- self.layout.addWidget(self.offsetEdit, row, 1)
65
- self.layout.addWidget(self.offsetUnit, row, 2)
66
-
67
- row += 1
68
- self.dispersionLabel = QtWidgets.QLabel("Dispersion")
69
- self.dispersionEdit = QtWidgets.QLineEdit(" 1.00")
70
- self.dispersionEdit.setValidator(valid_float)
71
- self.dispersionUnit = QtWidgets.QLabel("eV/channel")
72
-
73
- self.layout.addWidget(self.dispersionLabel, row, 0)
74
- self.layout.addWidget(self.dispersionEdit, row, 1)
75
- self.layout.addWidget(self.dispersionUnit, row, 2)
76
-
77
- row += 1
78
- self.energy_button = QtWidgets.QPushButton('Set Energy Scale', dialog)
79
- self.energy_button.setCheckable(True)
80
-
81
- self.layout.addWidget(self.energy_button, row, 1)
82
-
83
- row += 1
84
- self.timeLabel = QtWidgets.QLabel("Exp. Time")
85
- self.timeEdit = QtWidgets.QLineEdit(" 100.0")
86
- self.timeEdit.setValidator(valid_float)
87
- self.timeUnit = QtWidgets.QLabel("s")
88
-
89
- self.layout.addWidget(self.timeLabel, row, 0)
90
- self.layout.addWidget(self.timeEdit, row, 1)
91
- self.layout.addWidget(self.timeUnit, row, 2)
92
-
93
- self.separator2 = QtWidgets.QLabel(dialog)
94
- self.separator2.setAutoFillBackground(True)
95
- self.separator2.setAlignment(QtCore.Qt.AlignCenter)
96
- self.separator2.setMaximumHeight(50)
97
- self.separator2.setPalette(palette)
98
-
99
- row += 1
100
- ######################################################################
101
- self.separator2.setText("Microscope")
102
- self.layout.addWidget(self.separator2, row, 0, 1, 4)
103
- ######################################################################
104
-
105
- row += 1
106
- self.TEMList = QtWidgets.QComboBox()
107
- self.TEMList.setEditable(False)
108
- self.TEMList.addItems(self.TEM)
109
-
110
- self.layout.addWidget(self.TEMList, row, 1)
111
-
112
- row += 1
113
- self.convLabel = QtWidgets.QLabel("Conv. Angle")
114
- self.convEdit = QtWidgets.QLineEdit(" 100.0")
115
- self.convEdit.setValidator(valid_float)
116
- self.convUnit = QtWidgets.QLabel("mrad")
117
- self.layout.addWidget(self.convLabel, row, 0)
118
- self.layout.addWidget(self.convEdit, row, 1)
119
- self.layout.addWidget(self.convUnit, row, 2)
120
-
121
- row += 1
122
- self.collLabel = QtWidgets.QLabel("Coll. Angle")
123
- self.collEdit = QtWidgets.QLineEdit(" 10.0")
124
- self.collEdit.setValidator(valid_float)
125
- self.collUnit = QtWidgets.QLabel("mrad")
126
- self.layout.addWidget(self.collLabel, row, 0)
127
- self.layout.addWidget(self.collEdit, row, 1)
128
- self.layout.addWidget(self.collUnit, row, 2)
129
-
130
- row += 1
131
- self.E0Label = QtWidgets.QLabel("Acc. Voltage")
132
- self.E0Edit = QtWidgets.QLineEdit(" 100.0")
133
- self.E0Edit.setValidator(valid_float)
134
- self.E0Unit = QtWidgets.QLabel("kV")
135
- self.layout.addWidget(self.E0Label, row, 0)
136
- self.layout.addWidget(self.E0Edit, row, 1)
137
- self.layout.addWidget(self.E0Unit, row, 2)
138
-
139
- self.separator3 = QtWidgets.QLabel(dialog)
140
- self.separator3.setAutoFillBackground(True)
141
- self.separator3.setAlignment(QtCore.Qt.AlignCenter)
142
- self.separator3.setMaximumHeight(50)
143
- self.separator3.setPalette(palette)
144
-
145
- row += 1
146
- ######################################################################
147
- self.separator3.setText("Quantification")
148
- self.layout.addWidget(self.separator3, row, 0, 1, 4)
149
- ######################################################################
150
-
151
- row += 1
152
- self.binningLabel = QtWidgets.QLabel("Binning")
153
- self.binningEdit = QtWidgets.QLineEdit(" 1")
154
- self.binningEdit.setValidator(valid_int)
155
- self.layout.addWidget(self.binningLabel, row, 0)
156
- self.layout.addWidget(self.binningEdit, row, 1)
157
-
158
-
159
-
160
- row += 1
161
- self.check_probability = QtWidgets.QCheckBox("Probab.")
162
- self.check_probability.setObjectName('probability')
163
-
164
- self.probabilityLabel = QtWidgets.QLabel("Flux")
165
- self.get_flux_button = QtWidgets.QPushButton('', )
166
- self.flux_choice = ['None', 'Open File']
167
- self.select_flux = QtWidgets.QComboBox()
168
- self.select_flux.setEditable(False)
169
- self.select_flux.addItems(self.flux_choice)
170
- self.layout.addWidget(self.probabilityLabel, row, 0)
171
- self.layout.addWidget(self.select_flux, row, 1)
172
- self.layout.addWidget(self.check_probability, row, 2)
173
- self.select_flux.setObjectName('select_flux_list')
174
-
175
- row += 1
176
- self.conversionLabel = QtWidgets.QLabel("Conversion")
177
- self.conversionEdit = QtWidgets.QLineEdit(" 25.0")
178
- self.conversionEdit.setValidator(valid_float)
179
- self.conversionUnit = QtWidgets.QLabel("e<sup>-</sup>/counts")
180
- self.layout.addWidget(self.conversionLabel, row, 0)
181
- self.layout.addWidget(self.conversionEdit, row, 1)
182
- self.layout.addWidget(self.conversionUnit, row, 2)
183
- row += 1
184
- self.fluxLabel = QtWidgets.QLabel("Flux")
185
- self.fluxEdit = QtWidgets.QLineEdit(" 100.0")
186
- self.fluxEdit.setValidator(valid_float)
187
- self.fluxUnit = QtWidgets.QLabel("e<sup>-</sup>/s")
188
- self.layout.addWidget(self.fluxLabel, row, 0)
189
- self.layout.addWidget(self.fluxEdit, row, 1)
190
- self.layout.addWidget(self.fluxUnit, row, 2)
191
- row += 1
192
- self.VOALabel = QtWidgets.QLabel("Measurement")
193
- self.VOAEdit = QtWidgets.QLineEdit(" 10.0")
194
- self.VOAEdit.setValidator(valid_float)
195
- self.VOAUnit = QtWidgets.QLabel("pA")
196
- self.layout.addWidget(self.VOALabel, row, 0)
197
- self.layout.addWidget(self.VOAEdit, row, 1)
198
- self.layout.addWidget(self.VOAUnit, row, 2)
199
-
200
- self.separator4 = QtWidgets.QLabel(dialog)
201
- self.separator4.setAutoFillBackground(True)
202
- self.separator4.setAlignment(QtCore.Qt.AlignCenter)
203
- self.separator4.setMaximumHeight(50)
204
- self.separator4.setPalette(palette)
205
- ######################################################################
206
- self.separator4.setText("Spectrum Image")
207
-
208
- row += 1
209
- self.layout.addWidget(self.separator4, row, 0, 1, 4)
210
- ######################################################################
211
-
212
- self.binXLabel = QtWidgets.QLabel('Bin X:')
213
- self.binXEdit = QtWidgets.QLineEdit('1')
214
- self.binXEdit.setValidator(valid_int)
215
- self.binXUnit = QtWidgets.QLabel('pixel')
216
-
217
- row += 1
218
- self.layout.addWidget(self.binXLabel, row, 0)
219
- self.layout.addWidget(self.binXEdit, row, 1)
220
- self.layout.addWidget(self.binXUnit, row, 2)
221
-
222
- self.binYLabel = QtWidgets.QLabel('Bin Y:')
223
- self.binYEdit = QtWidgets.QLineEdit('1')
224
- self.binYEdit.setValidator(valid_int)
225
- self.binYUnit = QtWidgets.QLabel('pixel')
226
-
227
- row += 1
228
- self.layout.addWidget(self.binYLabel, row, 0)
229
- self.layout.addWidget(self.binYEdit, row, 1)
230
- self.layout.addWidget(self.binYUnit, row, 2)
231
-
232
- self.statusBar = QtWidgets.QStatusBar()
233
- self.layout.addWidget(self.statusBar, row+1, 0, 1, 4)
234
-
235
- dialog.setLayout(self.layout)
236
-
237
- dialog.setWindowTitle("Spectrum Info")
238
-
239
- QtCore.QMetaObject.connectSlotsByName(dialog)
@@ -1,35 +0,0 @@
1
- """ Interactive routines for EELS analysis
2
-
3
- this file provides additional dialogs for EELS quantification
4
-
5
- Author: Gerd Duscher
6
- """
7
-
8
- Qt_available = True
9
-
10
- try:
11
- from PyQt5 import QtCore, QtGui, QtWidgets
12
-
13
- except:
14
- Qt_available = False
15
- print('Qt dialogs are not available')
16
-
17
- from pyTEMlib import eels_dialog
18
- from pyTEMlib import info_dialog
19
- from pyTEMlib import peak_dialog
20
-
21
- if Qt_available:
22
- from pyTEMlib.eels_dialog_utilities import *
23
-
24
- CompositionDialog = eels_dialog.EELSDialog
25
- CurveVisualizer = eels_dialog.CurveVisualizer
26
- InfoDialog = info_dialog.InfoDialog
27
- PeakFitDialog = peak_dialog.PeakFitDialog
28
- else:
29
- CompositionDialog = eels_dialog.CompositionWidget
30
- InfoDialog = info_dialog.InfoWidget
31
- PeakFitDialog = peak_dialog.PeakFitWidget
32
-
33
- InfoWidget = info_dialog.InfoWidget
34
- CompositionWidget = eels_dialog.CompositionWidget
35
- PeakFitWidget = peak_dialog.PeakFitWidget