pyTEMlib 0.2020.11.0__py3-none-any.whl → 0.2024.8.4__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.

Files changed (59) hide show
  1. pyTEMlib/__init__.py +11 -11
  2. pyTEMlib/animation.py +631 -0
  3. pyTEMlib/atom_tools.py +240 -222
  4. pyTEMlib/config_dir.py +57 -29
  5. pyTEMlib/core_loss_widget.py +658 -0
  6. pyTEMlib/crystal_tools.py +1255 -0
  7. pyTEMlib/diffraction_plot.py +756 -0
  8. pyTEMlib/dynamic_scattering.py +293 -0
  9. pyTEMlib/eds_tools.py +609 -0
  10. pyTEMlib/eels_dialog.py +749 -486
  11. pyTEMlib/{interactive_eels.py → eels_dialog_utilities.py} +1199 -1524
  12. pyTEMlib/eels_tools.py +2031 -1731
  13. pyTEMlib/file_tools.py +1276 -491
  14. pyTEMlib/file_tools_qt.py +193 -0
  15. pyTEMlib/graph_tools.py +1166 -450
  16. pyTEMlib/graph_viz.py +449 -0
  17. pyTEMlib/image_dialog.py +158 -0
  18. pyTEMlib/image_dlg.py +146 -0
  19. pyTEMlib/image_tools.py +1399 -956
  20. pyTEMlib/info_widget.py +933 -0
  21. pyTEMlib/interactive_image.py +1 -0
  22. pyTEMlib/kinematic_scattering.py +1196 -0
  23. pyTEMlib/low_loss_widget.py +176 -0
  24. pyTEMlib/microscope.py +61 -78
  25. pyTEMlib/peak_dialog.py +1047 -350
  26. pyTEMlib/peak_dlg.py +286 -248
  27. pyTEMlib/probe_tools.py +653 -202
  28. pyTEMlib/sidpy_tools.py +153 -129
  29. pyTEMlib/simulation_tools.py +104 -87
  30. pyTEMlib/version.py +6 -3
  31. pyTEMlib/xrpa_x_sections.py +20972 -0
  32. {pyTEMlib-0.2020.11.0.dist-info → pyTEMlib-0.2024.8.4.dist-info}/LICENSE +21 -21
  33. pyTEMlib-0.2024.8.4.dist-info/METADATA +93 -0
  34. pyTEMlib-0.2024.8.4.dist-info/RECORD +37 -0
  35. {pyTEMlib-0.2020.11.0.dist-info → pyTEMlib-0.2024.8.4.dist-info}/WHEEL +6 -5
  36. {pyTEMlib-0.2020.11.0.dist-info → pyTEMlib-0.2024.8.4.dist-info}/entry_points.txt +0 -1
  37. pyTEMlib/KinsCat.py +0 -2685
  38. pyTEMlib/__version__.py +0 -2
  39. pyTEMlib/data/TEMlibrc +0 -68
  40. pyTEMlib/data/edges_db.csv +0 -189
  41. pyTEMlib/data/edges_db.pkl +0 -0
  42. pyTEMlib/data/fparam.txt +0 -103
  43. pyTEMlib/data/microscopes.csv +0 -7
  44. pyTEMlib/data/microscopes.xml +0 -167
  45. pyTEMlib/data/path.txt +0 -1
  46. pyTEMlib/defaults_parser.py +0 -86
  47. pyTEMlib/dm3_reader.py +0 -609
  48. pyTEMlib/edges_db.py +0 -76
  49. pyTEMlib/eels_dlg.py +0 -240
  50. pyTEMlib/hdf_utils.py +0 -481
  51. pyTEMlib/image_tools1.py +0 -2194
  52. pyTEMlib/info_dialog.py +0 -227
  53. pyTEMlib/info_dlg.py +0 -205
  54. pyTEMlib/nion_reader.py +0 -293
  55. pyTEMlib/nsi_reader.py +0 -165
  56. pyTEMlib/structure_tools.py +0 -316
  57. pyTEMlib-0.2020.11.0.dist-info/METADATA +0 -20
  58. pyTEMlib-0.2020.11.0.dist-info/RECORD +0 -42
  59. {pyTEMlib-0.2020.11.0.dist-info → pyTEMlib-0.2024.8.4.dist-info}/top_level.txt +0 -0
pyTEMlib/peak_dlg.py CHANGED
@@ -1,248 +1,286 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- # Form implementation generated from reading ui file 'untitled.ui'
4
- #
5
- # Created by: PyQt5 UI code generator 5.12.3
6
- #
7
- # WARNING! All changes made in this file will be lost!
8
-
9
- from PyQt5 import QtCore, QtGui, QtWidgets
10
-
11
-
12
- class UiDialog(object):
13
- def __init__(self, dialog):
14
- dialog.setObjectName('Fit Peaks')
15
- dialog.resize(371, 184)
16
-
17
- valid_float = QtGui.QDoubleValidator()
18
- valid_int = QtGui.QIntValidator()
19
- valid_int.setBottom(0)
20
-
21
- self.layout = QtWidgets.QGridLayout()
22
- self.layout.setVerticalSpacing(2)
23
-
24
- self.separator1 = QtWidgets.QLabel(dialog)
25
- self.separator1.setAutoFillBackground(True)
26
- palette = self.separator1.palette()
27
- palette.setColor(self.separator1.backgroundRole(), QtCore.Qt.blue)
28
- palette.setColor(self.separator1.foregroundRole(), QtCore.Qt.white)
29
- self.separator1.setAlignment(QtCore.Qt.AlignCenter)
30
- self.separator1.setMaximumHeight(50)
31
-
32
- self.separator1.setPalette(palette)
33
- row = 0
34
- ######################################################################
35
- self.separator1.setText("Fit Region")
36
- self.layout.addWidget(self.separator1, row, 0, 1, 4)
37
- ######################################################################
38
-
39
- row += 1
40
- name = 'fit_start'
41
- self.label1 = QtWidgets.QLabel('Fit Start:')
42
- self.edit1 = QtWidgets.QLineEdit('0')
43
- self.edit1.setValidator(valid_float)
44
- self.unit1 = QtWidgets.QLabel('eV')
45
- self.edit1.setObjectName(name+'_edit')
46
- self.unit1.setObjectName(name+'_units')
47
-
48
- self.layout.addWidget(self.label1, row, 0)
49
- self.layout.addWidget(self.edit1, row, 1)
50
- self.layout.addWidget(self.unit1, row, 2)
51
-
52
- row += 1
53
- name = 'fit_end'
54
- self.label2 = QtWidgets.QLabel('Fit End:')
55
- self.edit2 = QtWidgets.QLineEdit('0')
56
- self.edit2.setValidator(valid_float)
57
- self.unit2 = QtWidgets.QLabel('eV')
58
- self.edit2.setObjectName(name + '_edit')
59
- self.unit2.setObjectName(name + '_units')
60
-
61
- self.layout.addWidget(self.label2, row, 0)
62
- self.layout.addWidget(self.edit2, row, 1)
63
- self.layout.addWidget(self.unit2, row, 2)
64
-
65
- self.separator2 = QtWidgets.QLabel(dialog)
66
- self.separator2.setAutoFillBackground(True)
67
- self.separator2.setAlignment(QtCore.Qt.AlignCenter)
68
- self.separator2.setMaximumHeight(50)
69
- self.separator2.setPalette(palette)
70
-
71
- row += 1
72
- ######################################################################
73
- self.separator2.setText("Processing")
74
- self.layout.addWidget(self.separator2, row, 0, 1, 4)
75
- ######################################################################
76
- row += 1
77
- # self.progress = QtWidgets.QProgressBar()
78
- # self.progress.setGeometry(0, 0, 300, 25)
79
- # self.progress.setMaximum(100)
80
-
81
- self.smooth_label = QtWidgets.QLabel('Iterations:')
82
- self.iteration_list = ['0', '1', '2', '3', '4']
83
- self.smooth_list = QtWidgets.QComboBox()
84
- self.smooth_list.setEditable(False)
85
- self.smooth_list.addItems(self.iteration_list)
86
- self.smooth_list.setCurrentIndex(1)
87
-
88
- self.smooth_button = QtWidgets.QPushButton('Smooth', dialog)
89
- self.smooth_button.setCheckable(False)
90
-
91
- self.layout.addWidget(self.smooth_label, row, 0)
92
- self.layout.addWidget(self.smooth_list, row, 1)
93
- self.layout.addWidget(self.smooth_button, row, 2)
94
-
95
- row += 1
96
- self.find_label = QtWidgets.QLabel('Nr. of Peaks:')
97
- self.find_edit = QtWidgets.QLineEdit('1')
98
- self.find_edit.setValidator(valid_int)
99
- self.find_button = QtWidgets.QPushButton('Find Peaks', dialog)
100
- self.find_button.setCheckable(False)
101
-
102
- self.layout.addWidget(self.find_label, row, 0)
103
- self.layout.addWidget(self.find_edit, row, 1)
104
- self.layout.addWidget(self.find_button, row, 2)
105
-
106
- self.separator2 = QtWidgets.QLabel(dialog)
107
- self.separator2.setAutoFillBackground(True)
108
- self.separator2.setAlignment(QtCore.Qt.AlignCenter)
109
- self.separator2.setMaximumHeight(50)
110
- self.separator2.setPalette(palette)
111
-
112
- row += 1
113
- ######################################################################
114
- self.separator2.setText("Peaks")
115
- self.layout.addWidget(self.separator2, row, 0, 1, 4)
116
- ######################################################################
117
-
118
- row += 1
119
- name = 'peak'
120
- self.label3 = QtWidgets.QLabel('Peaks:')
121
- self.peak_list = ['Peak 1', 'Add Peak']
122
- self.list3 = QtWidgets.QComboBox()
123
- self.list3.setEditable(False)
124
- self.list3.addItems(self.peak_list)
125
- self.unit3 = QtWidgets.QLabel('')
126
-
127
- self.layout.addWidget(self.label3, row, 0)
128
- self.layout.addWidget(self.list3, row, 1)
129
- self.layout.addWidget(self.unit3, row, 2)
130
-
131
- self.list3.setObjectName(name + '_list')
132
- # self.check3.setObjectName(name + '_check')
133
-
134
- name = 'symmetry'
135
- self.edge_sym = ['Gauss', 'Lorentzian', 'Drude', 'ZL']
136
-
137
- self.label4 = QtWidgets.QLabel('Symmetry:')
138
- self.list4 = QtWidgets.QComboBox()
139
- self.list4.setEditable(False)
140
- self.list4.addItems(self.edge_sym)
141
-
142
- row += 1
143
- self.layout.addWidget(self.label4, row, 0)
144
- self.layout.addWidget(self.list4, row, 1)
145
-
146
- self.list4.setObjectName(name + '_list')
147
-
148
- name = 'position'
149
- self.label5 = QtWidgets.QLabel('Position:')
150
- self.edit5 = QtWidgets.QLineEdit('1')
151
- self.unit5 = QtWidgets.QLabel('eV')
152
- self.edit5.setObjectName(name + '_edit')
153
-
154
- row += 1
155
- self.layout.addWidget(self.label5, row, 0)
156
- self.layout.addWidget(self.edit5, row, 1)
157
- self.layout.addWidget(self.unit5, row, 2)
158
-
159
- row += 1
160
- name = 'amplitude'
161
- self.label6 = QtWidgets.QLabel('Amplitude:')
162
- self.edit6 = QtWidgets.QLineEdit('0')
163
- self.edit6.setValidator(valid_float)
164
- self.unit6 = QtWidgets.QLabel('counts')
165
- self.edit6.setObjectName(name + '_edit')
166
- self.unit6.setObjectName(name + '_units')
167
-
168
- self.layout.addWidget(self.label6, row, 0)
169
- self.layout.addWidget(self.edit6, row, 1)
170
- self.layout.addWidget(self.unit6, row, 2)
171
-
172
- name = 'width'
173
- self.label7 = QtWidgets.QLabel('Width (FWHM):')
174
- self.edit7 = QtWidgets.QLineEdit('0')
175
- self.edit7.setValidator(valid_float)
176
- self.unit7 = QtWidgets.QLabel('eV')
177
- self.edit7.setObjectName(name + '_edit')
178
- self.unit7.setObjectName(name + '_units')
179
-
180
- row += 1
181
- self.layout.addWidget(self.label7, row, 0)
182
- self.layout.addWidget(self.edit7, row, 1)
183
- self.layout.addWidget(self.unit7, row, 2)
184
-
185
- row += 1
186
- name = 'asymmetry'
187
- self.label8 = QtWidgets.QLabel('Asymmetry:')
188
- self.edit8 = QtWidgets.QLineEdit('0')
189
- self.edit8.setValidator(valid_float)
190
- self.unit8 = QtWidgets.QLabel('%')
191
- self.label8.setObjectName(name + '_name')
192
- self.edit8.setObjectName(name + '_edit')
193
- self.unit8.setObjectName(name + '_units')
194
-
195
- self.layout.addWidget(self.label8, row, 0)
196
- self.layout.addWidget(self.edit8, row, 1)
197
- self.layout.addWidget(self.unit8, row, 2)
198
-
199
- row += 1
200
- self.fit_button = QtWidgets.QPushButton('Fit Peaks', dialog)
201
- self.fit_button.setCheckable(False)
202
-
203
- self.layout.addWidget(self.fit_button, row, 2)
204
-
205
- row += 1
206
- self.separator3 = QtWidgets.QLabel(dialog)
207
- self.separator3.setAutoFillBackground(True)
208
- self.separator3.setAlignment(QtCore.Qt.AlignCenter)
209
- self.separator3.setMaximumHeight(50)
210
- self.separator3.setPalette(palette)
211
-
212
- ######################################################################
213
- self.separator3.setText("Analysis")
214
- self.layout.addWidget(self.separator3, row, 0, 1, 4)
215
- ######################################################################
216
-
217
- row += 1
218
- name = 'white_line'
219
- self.labelwl = QtWidgets.QLabel('White-Line Ratio:')
220
- self.wl_list = ['Ratio']
221
- self.listwl = QtWidgets.QComboBox()
222
- self.listwl.setEditable(False)
223
- self.listwl.addItems(self.wl_list)
224
- self.unitswl = QtWidgets.QLabel('')
225
-
226
- self.layout.addWidget(self.labelwl, row, 0)
227
- self.layout.addWidget(self.listwl, row, 1)
228
- self.layout.addWidget(self.unitswl, row, 2)
229
-
230
- row += 1
231
- name = 'white_line'
232
- self.labelwls = QtWidgets.QLabel('White-Line Sum:')
233
- self.wls_list = ['Sum']
234
- self.listwls = QtWidgets.QComboBox()
235
- self.listwls.setEditable(False)
236
- self.listwls.addItems(self.wls_list)
237
- self.unitswls = QtWidgets.QLabel('')
238
-
239
- self.layout.addWidget(self.labelwls, row, 0)
240
- self.layout.addWidget(self.listwls, row, 1)
241
- self.layout.addWidget(self.unitswls, row, 2)
242
-
243
- dialog.setLayout(self.layout)
244
- dialog.setWindowTitle('Peak Fit Input')
245
-
246
- # self.buttonBox.accepted.connect(Dialog.accept)
247
- # self.buttonBox.rejected.connect(Dialog.reject)
248
- QtCore.QMetaObject.connectSlotsByName(dialog)
1
+ """GUI definitions for peak_fit_dialog"""
2
+
3
+ # -*- coding: utf-8 -*-
4
+
5
+ # Form implementation generated from reading ui file 'untitled.ui'
6
+ #
7
+ # Created by: PyQt5 UI code generator 5.12.3
8
+ #
9
+ # WARNING! All changes made in this file will be lost!
10
+
11
+ Qt_available = True
12
+ try:
13
+ from PyQt5 import QtCore, QtGui, QtWidgets
14
+
15
+ except:
16
+ Qt_available = False
17
+ # print('Qt dialogs are not available')
18
+
19
+
20
+ if Qt_available:
21
+ class UiDialog(object):
22
+ """GUI definitions for peak_fit_dialog"""
23
+
24
+ def __init__(self, dialog, mode=None):
25
+ dialog.setObjectName('Fit Peaks')
26
+ dialog.resize(371, 184)
27
+
28
+ valid_float = QtGui.QDoubleValidator()
29
+ valid_int = QtGui.QIntValidator()
30
+ valid_int.setBottom(0)
31
+
32
+ self.layout = QtWidgets.QGridLayout()
33
+ self.layout.setVerticalSpacing(2)
34
+
35
+ self.separator1 = QtWidgets.QLabel(dialog)
36
+ self.separator1.setAutoFillBackground(True)
37
+ palette = self.separator1.palette()
38
+ palette.setColor(self.separator1.backgroundRole(), QtCore.Qt.blue)
39
+ palette.setColor(self.separator1.foregroundRole(), QtCore.Qt.white)
40
+ self.separator1.setAlignment(QtCore.Qt.AlignCenter)
41
+ self.separator1.setMaximumHeight(50)
42
+
43
+ self.separator1.setPalette(palette)
44
+ row = 0
45
+ ######################################################################
46
+ self.separator1.setText("Fit Region")
47
+ self.layout.addWidget(self.separator1, row, 0, 1, 4)
48
+ ######################################################################
49
+
50
+ row += 1
51
+ name = 'fit_start'
52
+ self.label1 = QtWidgets.QLabel('Fit Start:')
53
+ self.edit1 = QtWidgets.QLineEdit('0')
54
+ self.edit1.setValidator(valid_float)
55
+ self.unit1 = QtWidgets.QLabel('eV')
56
+ self.edit1.setObjectName(name+'_edit')
57
+ self.unit1.setObjectName(name+'_units')
58
+
59
+ self.layout.addWidget(self.label1, row, 0)
60
+ self.layout.addWidget(self.edit1, row, 1)
61
+ self.layout.addWidget(self.unit1, row, 2)
62
+
63
+ row += 1
64
+ name = 'fit_end'
65
+ self.label2 = QtWidgets.QLabel('Fit End:')
66
+ self.edit2 = QtWidgets.QLineEdit('0')
67
+ self.edit2.setValidator(valid_float)
68
+ self.unit2 = QtWidgets.QLabel('eV')
69
+ self.edit2.setObjectName(name + '_edit')
70
+ self.unit2.setObjectName(name + '_units')
71
+
72
+ self.layout.addWidget(self.label2, row, 0)
73
+ self.layout.addWidget(self.edit2, row, 1)
74
+ self.layout.addWidget(self.unit2, row, 2)
75
+
76
+ self.separator2 = QtWidgets.QLabel(dialog)
77
+ self.separator2.setAutoFillBackground(True)
78
+ self.separator2.setAlignment(QtCore.Qt.AlignCenter)
79
+ self.separator2.setMaximumHeight(50)
80
+ self.separator2.setPalette(palette)
81
+
82
+ row += 1
83
+ ######################################################################
84
+ self.separator2.setText("Processing")
85
+ self.layout.addWidget(self.separator2, row, 0, 1, 4)
86
+ ######################################################################
87
+ row += 1
88
+ # self.progress = QtWidgets.QProgressBar()
89
+ # self.progress.setGeometry(0, 0, 300, 25)
90
+ # self.progress.setMaximum(100)
91
+
92
+ self.smooth_label = QtWidgets.QLabel('Iterations:')
93
+ self.iteration_list = ['0', '1', '2', '3', '4']
94
+ self.smooth_list = QtWidgets.QComboBox()
95
+ self.smooth_list.setEditable(False)
96
+ self.smooth_list.addItems(self.iteration_list)
97
+ self.smooth_list.setCurrentIndex(1)
98
+
99
+ self.smooth_button = QtWidgets.QPushButton('Smooth', dialog)
100
+ self.smooth_button.setCheckable(False)
101
+
102
+ self.layout.addWidget(self.smooth_label, row, 0)
103
+ self.layout.addWidget(self.smooth_list, row, 1)
104
+ self.layout.addWidget(self.smooth_button, row, 2)
105
+
106
+ row += 1
107
+ self.find_label = QtWidgets.QLabel('Nr. of Peaks:')
108
+ self.find_edit = QtWidgets.QLineEdit('1')
109
+ self.find_edit.setValidator(valid_int)
110
+ self.find_button = QtWidgets.QPushButton('Find Peaks', dialog)
111
+ self.find_button.setCheckable(False)
112
+
113
+ self.layout.addWidget(self.find_label, row, 0)
114
+ self.layout.addWidget(self.find_edit, row, 1)
115
+ self.layout.addWidget(self.find_button, row, 2)
116
+
117
+ self.separator2 = QtWidgets.QLabel(dialog)
118
+ self.separator2.setAutoFillBackground(True)
119
+ self.separator2.setAlignment(QtCore.Qt.AlignCenter)
120
+ self.separator2.setMaximumHeight(50)
121
+ self.separator2.setPalette(palette)
122
+
123
+ row += 1
124
+ ######################################################################
125
+ self.separator2.setText("Peaks")
126
+ self.layout.addWidget(self.separator2, row, 0, 1, 4)
127
+ ######################################################################
128
+
129
+ row += 1
130
+ name = 'peak'
131
+ self.label3 = QtWidgets.QLabel('Peaks:')
132
+ self.peak_list = ['Peak 1', 'Add Peak']
133
+ self.list3 = QtWidgets.QComboBox()
134
+ self.list3.setEditable(False)
135
+ self.list3.addItems(self.peak_list)
136
+ self.unit3 = QtWidgets.QLabel('')
137
+
138
+ self.layout.addWidget(self.label3, row, 0)
139
+ self.layout.addWidget(self.list3, row, 1)
140
+ self.layout.addWidget(self.unit3, row, 2)
141
+
142
+ self.list3.setObjectName(name + '_list')
143
+ # self.check3.setObjectName(name + '_check')
144
+
145
+ name = 'symmetry'
146
+ self.edge_sym = ['Gauss', 'Lorentzian', 'Drude', 'ZL']
147
+
148
+ self.label4 = QtWidgets.QLabel('Symmetry:')
149
+ self.list4 = QtWidgets.QComboBox()
150
+ self.list4.setEditable(False)
151
+ self.list4.addItems(self.edge_sym)
152
+
153
+ row += 1
154
+ self.layout.addWidget(self.label4, row, 0)
155
+ self.layout.addWidget(self.list4, row, 1)
156
+
157
+ self.list4.setObjectName(name + '_list')
158
+
159
+ name = 'position'
160
+ self.label5 = QtWidgets.QLabel('Position:')
161
+ self.edit5 = QtWidgets.QLineEdit('1')
162
+ self.unit5 = QtWidgets.QLabel('eV')
163
+ self.edit5.setObjectName(name + '_edit')
164
+
165
+ row += 1
166
+ self.layout.addWidget(self.label5, row, 0)
167
+ self.layout.addWidget(self.edit5, row, 1)
168
+ self.layout.addWidget(self.unit5, row, 2)
169
+
170
+ row += 1
171
+ name = 'amplitude'
172
+ self.label6 = QtWidgets.QLabel('Amplitude:')
173
+ self.edit6 = QtWidgets.QLineEdit('0')
174
+ self.edit6.setValidator(valid_float)
175
+ self.unit6 = QtWidgets.QLabel('counts')
176
+ self.edit6.setObjectName(name + '_edit')
177
+ self.unit6.setObjectName(name + '_units')
178
+
179
+ self.layout.addWidget(self.label6, row, 0)
180
+ self.layout.addWidget(self.edit6, row, 1)
181
+ self.layout.addWidget(self.unit6, row, 2)
182
+
183
+ name = 'width'
184
+ self.label7 = QtWidgets.QLabel('Width (FWHM):')
185
+ self.edit7 = QtWidgets.QLineEdit('0')
186
+ self.edit7.setValidator(valid_float)
187
+ self.unit7 = QtWidgets.QLabel('eV')
188
+ self.edit7.setObjectName(name + '_edit')
189
+ self.unit7.setObjectName(name + '_units')
190
+
191
+ row += 1
192
+ self.layout.addWidget(self.label7, row, 0)
193
+ self.layout.addWidget(self.edit7, row, 1)
194
+ self.layout.addWidget(self.unit7, row, 2)
195
+
196
+ row += 1
197
+ name = 'asymmetry'
198
+ self.label8 = QtWidgets.QLabel('Asymmetry:')
199
+ self.edit8 = QtWidgets.QLineEdit('0')
200
+ self.edit8.setValidator(valid_float)
201
+ self.unit8 = QtWidgets.QLabel('%')
202
+ self.label8.setObjectName(name + '_name')
203
+ self.edit8.setObjectName(name + '_edit')
204
+ self.unit8.setObjectName(name + '_units')
205
+
206
+ self.layout.addWidget(self.label8, row, 0)
207
+ self.layout.addWidget(self.edit8, row, 1)
208
+ self.layout.addWidget(self.unit8, row, 2)
209
+
210
+ row += 1
211
+ self.fit_button = QtWidgets.QPushButton('Fit Peaks', dialog)
212
+ self.fit_button.setCheckable(False)
213
+
214
+ self.layout.addWidget(self.fit_button, row, 2)
215
+
216
+ row += 1
217
+ self.separator3 = QtWidgets.QLabel(dialog)
218
+ self.separator3.setAutoFillBackground(True)
219
+ self.separator3.setAlignment(QtCore.Qt.AlignCenter)
220
+ self.separator3.setMaximumHeight(50)
221
+ self.separator3.setPalette(palette)
222
+
223
+ ######################################################################
224
+ self.separator3.setText("Analysis")
225
+ self.layout.addWidget(self.separator3, row, 0, 1, 4)
226
+ ######################################################################
227
+ if mode == 'low_loss':
228
+ row += 1
229
+ self.zl_button = QtWidgets.QPushButton('Zero_Loss', dialog)
230
+ self.zl_button.setCheckable(False)
231
+ self.drude_button = QtWidgets.QPushButton('Plasmon', dialog)
232
+ self.drude_button.setCheckable(False)
233
+
234
+
235
+ self.layout.addWidget(self.zl_button, row, 0)
236
+ self.layout.addWidget(self.drude_button, row, 1)
237
+
238
+ self.model_list = ['None', 'Zero Loss', 'Plasmon', 'Both']
239
+ self.list_model = QtWidgets.QComboBox()
240
+ self.list_model.setEditable(False)
241
+ self.list_model.addItems(self.model_list)
242
+
243
+
244
+ self.layout.addWidget(self.list_model, row, 2)
245
+
246
+ else:
247
+ row += 1
248
+ self.labelwl = QtWidgets.QLabel('White-Line Ratio:')
249
+ self.wl_list = ['Ratio']
250
+ self.listwl = QtWidgets.QComboBox()
251
+ self.listwl.setEditable(False)
252
+ self.listwl.addItems(self.wl_list)
253
+ self.unitswl = QtWidgets.QLabel('')
254
+
255
+ self.layout.addWidget(self.labelwl, row, 0)
256
+ self.layout.addWidget(self.listwl, row, 1)
257
+ self.layout.addWidget(self.unitswl, row, 2)
258
+
259
+ row += 1
260
+ self.labelwls = QtWidgets.QLabel('White-Line Sum:')
261
+ self.wls_list = ['Sum']
262
+ self.listwls = QtWidgets.QComboBox()
263
+ self.listwls.setEditable(False)
264
+ self.listwls.addItems(self.wls_list)
265
+ self.unitswls = QtWidgets.QLabel('')
266
+
267
+ self.layout.addWidget(self.labelwls, row, 0)
268
+ self.layout.addWidget(self.listwls, row, 1)
269
+ self.layout.addWidget(self.unitswls, row, 2)
270
+
271
+ row += 1
272
+ self.progress = QtWidgets.QProgressBar()
273
+ self.progress.setGeometry(0, 0, 300, 25)
274
+ self.progress.setMaximum(100)
275
+ self.do_all_button = QtWidgets.QPushButton('Do All', dialog)
276
+
277
+ self.layout.addWidget(self.do_all_button, row, 0)
278
+ self.layout.addWidget(self.progress, row, 1)
279
+
280
+
281
+ dialog.setLayout(self.layout)
282
+ dialog.setWindowTitle('Peak Fit Input')
283
+
284
+ # self.buttonBox.accepted.connect(Dialog.accept)
285
+ # self.buttonBox.rejected.connect(Dialog.reject)
286
+ QtCore.QMetaObject.connectSlotsByName(dialog)