pyTEMlib 0.2020.11.1__py3-none-any.whl → 0.2024.9.0__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 (60) hide show
  1. pyTEMlib/__init__.py +11 -11
  2. pyTEMlib/animation.py +631 -0
  3. pyTEMlib/atom_tools.py +240 -245
  4. pyTEMlib/config_dir.py +57 -33
  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 -491
  11. pyTEMlib/{interactive_eels.py → eels_dialog_utilities.py} +1199 -1177
  12. pyTEMlib/eels_tools.py +2031 -1698
  13. pyTEMlib/file_tools.py +1276 -560
  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 -232
  19. pyTEMlib/image_tools.py +1399 -1028
  20. pyTEMlib/info_widget.py +933 -0
  21. pyTEMlib/interactive_image.py +1 -226
  22. pyTEMlib/kinematic_scattering.py +1196 -0
  23. pyTEMlib/low_loss_widget.py +176 -0
  24. pyTEMlib/microscope.py +61 -81
  25. pyTEMlib/peak_dialog.py +1047 -410
  26. pyTEMlib/peak_dlg.py +286 -242
  27. pyTEMlib/probe_tools.py +653 -207
  28. pyTEMlib/sidpy_tools.py +153 -136
  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.1.dist-info → pyTEMlib-0.2024.9.0.dist-info}/LICENSE +21 -21
  33. pyTEMlib-0.2024.9.0.dist-info/METADATA +92 -0
  34. pyTEMlib-0.2024.9.0.dist-info/RECORD +37 -0
  35. {pyTEMlib-0.2020.11.1.dist-info → pyTEMlib-0.2024.9.0.dist-info}/WHEEL +5 -5
  36. {pyTEMlib-0.2020.11.1.dist-info → pyTEMlib-0.2024.9.0.dist-info}/entry_points.txt +0 -1
  37. pyTEMlib/KinsCat.py +0 -2758
  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 -90
  47. pyTEMlib/dm3_reader.py +0 -613
  48. pyTEMlib/edges_db.py +0 -76
  49. pyTEMlib/eels_dlg.py +0 -224
  50. pyTEMlib/hdf_utils.py +0 -483
  51. pyTEMlib/image_tools1.py +0 -2194
  52. pyTEMlib/info_dialog.py +0 -237
  53. pyTEMlib/info_dlg.py +0 -202
  54. pyTEMlib/nion_reader.py +0 -297
  55. pyTEMlib/nsi_reader.py +0 -170
  56. pyTEMlib/structure_tools.py +0 -316
  57. pyTEMlib/test.py +0 -2072
  58. pyTEMlib-0.2020.11.1.dist-info/METADATA +0 -20
  59. pyTEMlib-0.2020.11.1.dist-info/RECORD +0 -45
  60. {pyTEMlib-0.2020.11.1.dist-info → pyTEMlib-0.2024.9.0.dist-info}/top_level.txt +0 -0
pyTEMlib/peak_dlg.py CHANGED
@@ -1,242 +1,286 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- PeakDialog user interface definitions
4
- """
5
- from PyQt5 import QtCore, QtGui, QtWidgets
6
-
7
-
8
- class UiDialog(object):
9
- def __init__(self, dialog):
10
- dialog.setObjectName('Fit Peaks')
11
- dialog.resize(371, 184)
12
-
13
- valid_float = QtGui.QDoubleValidator()
14
- valid_int = QtGui.QIntValidator()
15
- valid_int.setBottom(0)
16
-
17
- self.layout = QtWidgets.QGridLayout()
18
- self.layout.setVerticalSpacing(2)
19
-
20
- self.separator1 = QtWidgets.QLabel(dialog)
21
- self.separator1.setAutoFillBackground(True)
22
- palette = self.separator1.palette()
23
- palette.setColor(self.separator1.backgroundRole(), QtCore.Qt.blue)
24
- palette.setColor(self.separator1.foregroundRole(), QtCore.Qt.white)
25
- self.separator1.setAlignment(QtCore.Qt.AlignCenter)
26
- self.separator1.setMaximumHeight(50)
27
-
28
- self.separator1.setPalette(palette)
29
- row = 0
30
- ######################################################################
31
- self.separator1.setText("Fit Region")
32
- self.layout.addWidget(self.separator1, row, 0, 1, 4)
33
- ######################################################################
34
-
35
- row += 1
36
- name = 'fit_start'
37
- self.label1 = QtWidgets.QLabel('Fit Start:')
38
- self.edit1 = QtWidgets.QLineEdit('0')
39
- self.edit1.setValidator(valid_float)
40
- self.unit1 = QtWidgets.QLabel('eV')
41
- self.edit1.setObjectName(name+'_edit')
42
- self.unit1.setObjectName(name+'_units')
43
-
44
- self.layout.addWidget(self.label1, row, 0)
45
- self.layout.addWidget(self.edit1, row, 1)
46
- self.layout.addWidget(self.unit1, row, 2)
47
-
48
- row += 1
49
- name = 'fit_end'
50
- self.label2 = QtWidgets.QLabel('Fit End:')
51
- self.edit2 = QtWidgets.QLineEdit('0')
52
- self.edit2.setValidator(valid_float)
53
- self.unit2 = QtWidgets.QLabel('eV')
54
- self.edit2.setObjectName(name + '_edit')
55
- self.unit2.setObjectName(name + '_units')
56
-
57
- self.layout.addWidget(self.label2, row, 0)
58
- self.layout.addWidget(self.edit2, row, 1)
59
- self.layout.addWidget(self.unit2, row, 2)
60
-
61
- self.separator2 = QtWidgets.QLabel(dialog)
62
- self.separator2.setAutoFillBackground(True)
63
- self.separator2.setAlignment(QtCore.Qt.AlignCenter)
64
- self.separator2.setMaximumHeight(50)
65
- self.separator2.setPalette(palette)
66
-
67
- row += 1
68
- ######################################################################
69
- self.separator2.setText("Processing")
70
- self.layout.addWidget(self.separator2, row, 0, 1, 4)
71
- ######################################################################
72
- row += 1
73
- # self.progress = QtWidgets.QProgressBar()
74
- # self.progress.setGeometry(0, 0, 300, 25)
75
- # self.progress.setMaximum(100)
76
-
77
- self.smooth_label = QtWidgets.QLabel('Iterations:')
78
- self.iteration_list = ['0', '1', '2', '3', '4']
79
- self.smooth_list = QtWidgets.QComboBox()
80
- self.smooth_list.setEditable(False)
81
- self.smooth_list.addItems(self.iteration_list)
82
- self.smooth_list.setCurrentIndex(1)
83
-
84
- self.smooth_button = QtWidgets.QPushButton('Smooth', dialog)
85
- self.smooth_button.setCheckable(False)
86
-
87
- self.layout.addWidget(self.smooth_label, row, 0)
88
- self.layout.addWidget(self.smooth_list, row, 1)
89
- self.layout.addWidget(self.smooth_button, row, 2)
90
-
91
- row += 1
92
- self.find_label = QtWidgets.QLabel('Nr. of Peaks:')
93
- self.find_edit = QtWidgets.QLineEdit('1')
94
- self.find_edit.setValidator(valid_int)
95
- self.find_button = QtWidgets.QPushButton('Find Peaks', dialog)
96
- self.find_button.setCheckable(False)
97
-
98
- self.layout.addWidget(self.find_label, row, 0)
99
- self.layout.addWidget(self.find_edit, row, 1)
100
- self.layout.addWidget(self.find_button, row, 2)
101
-
102
- self.separator2 = QtWidgets.QLabel(dialog)
103
- self.separator2.setAutoFillBackground(True)
104
- self.separator2.setAlignment(QtCore.Qt.AlignCenter)
105
- self.separator2.setMaximumHeight(50)
106
- self.separator2.setPalette(palette)
107
-
108
- row += 1
109
- ######################################################################
110
- self.separator2.setText("Peaks")
111
- self.layout.addWidget(self.separator2, row, 0, 1, 4)
112
- ######################################################################
113
-
114
- row += 1
115
- name = 'peak'
116
- self.label3 = QtWidgets.QLabel('Peaks:')
117
- self.peak_list = ['Peak 1', 'Add Peak']
118
- self.list3 = QtWidgets.QComboBox()
119
- self.list3.setEditable(False)
120
- self.list3.addItems(self.peak_list)
121
- self.unit3 = QtWidgets.QLabel('')
122
-
123
- self.layout.addWidget(self.label3, row, 0)
124
- self.layout.addWidget(self.list3, row, 1)
125
- self.layout.addWidget(self.unit3, row, 2)
126
-
127
- self.list3.setObjectName(name + '_list')
128
- # self.check3.setObjectName(name + '_check')
129
-
130
- name = 'symmetry'
131
- self.edge_sym = ['Gauss', 'Lorentzian', 'Drude', 'ZL']
132
-
133
- self.label4 = QtWidgets.QLabel('Symmetry:')
134
- self.list4 = QtWidgets.QComboBox()
135
- self.list4.setEditable(False)
136
- self.list4.addItems(self.edge_sym)
137
-
138
- row += 1
139
- self.layout.addWidget(self.label4, row, 0)
140
- self.layout.addWidget(self.list4, row, 1)
141
-
142
- self.list4.setObjectName(name + '_list')
143
-
144
- name = 'position'
145
- self.label5 = QtWidgets.QLabel('Position:')
146
- self.edit5 = QtWidgets.QLineEdit('1')
147
- self.unit5 = QtWidgets.QLabel('eV')
148
- self.edit5.setObjectName(name + '_edit')
149
-
150
- row += 1
151
- self.layout.addWidget(self.label5, row, 0)
152
- self.layout.addWidget(self.edit5, row, 1)
153
- self.layout.addWidget(self.unit5, row, 2)
154
-
155
- row += 1
156
- name = 'amplitude'
157
- self.label6 = QtWidgets.QLabel('Amplitude:')
158
- self.edit6 = QtWidgets.QLineEdit('0')
159
- self.edit6.setValidator(valid_float)
160
- self.unit6 = QtWidgets.QLabel('counts')
161
- self.edit6.setObjectName(name + '_edit')
162
- self.unit6.setObjectName(name + '_units')
163
-
164
- self.layout.addWidget(self.label6, row, 0)
165
- self.layout.addWidget(self.edit6, row, 1)
166
- self.layout.addWidget(self.unit6, row, 2)
167
-
168
- name = 'width'
169
- self.label7 = QtWidgets.QLabel('Width (FWHM):')
170
- self.edit7 = QtWidgets.QLineEdit('0')
171
- self.edit7.setValidator(valid_float)
172
- self.unit7 = QtWidgets.QLabel('eV')
173
- self.edit7.setObjectName(name + '_edit')
174
- self.unit7.setObjectName(name + '_units')
175
-
176
- row += 1
177
- self.layout.addWidget(self.label7, row, 0)
178
- self.layout.addWidget(self.edit7, row, 1)
179
- self.layout.addWidget(self.unit7, row, 2)
180
-
181
- row += 1
182
- name = 'asymmetry'
183
- self.label8 = QtWidgets.QLabel('Asymmetry:')
184
- self.edit8 = QtWidgets.QLineEdit('0')
185
- self.edit8.setValidator(valid_float)
186
- self.unit8 = QtWidgets.QLabel('%')
187
- self.label8.setObjectName(name + '_name')
188
- self.edit8.setObjectName(name + '_edit')
189
- self.unit8.setObjectName(name + '_units')
190
-
191
- self.layout.addWidget(self.label8, row, 0)
192
- self.layout.addWidget(self.edit8, row, 1)
193
- self.layout.addWidget(self.unit8, row, 2)
194
-
195
- row += 1
196
- self.fit_button = QtWidgets.QPushButton('Fit Peaks', dialog)
197
- self.fit_button.setCheckable(False)
198
-
199
- self.layout.addWidget(self.fit_button, row, 2)
200
-
201
- row += 1
202
- self.separator3 = QtWidgets.QLabel(dialog)
203
- self.separator3.setAutoFillBackground(True)
204
- self.separator3.setAlignment(QtCore.Qt.AlignCenter)
205
- self.separator3.setMaximumHeight(50)
206
- self.separator3.setPalette(palette)
207
-
208
- ######################################################################
209
- self.separator3.setText("Analysis")
210
- self.layout.addWidget(self.separator3, row, 0, 1, 4)
211
- ######################################################################
212
-
213
- row += 1
214
- self.labelwl = QtWidgets.QLabel('White-Line Ratio:')
215
- self.wl_list = ['Ratio']
216
- self.listwl = QtWidgets.QComboBox()
217
- self.listwl.setEditable(False)
218
- self.listwl.addItems(self.wl_list)
219
- self.unitswl = QtWidgets.QLabel('')
220
-
221
- self.layout.addWidget(self.labelwl, row, 0)
222
- self.layout.addWidget(self.listwl, row, 1)
223
- self.layout.addWidget(self.unitswl, row, 2)
224
-
225
- row += 1
226
- self.labelwls = QtWidgets.QLabel('White-Line Sum:')
227
- self.wls_list = ['Sum']
228
- self.listwls = QtWidgets.QComboBox()
229
- self.listwls.setEditable(False)
230
- self.listwls.addItems(self.wls_list)
231
- self.unitswls = QtWidgets.QLabel('')
232
-
233
- self.layout.addWidget(self.labelwls, row, 0)
234
- self.layout.addWidget(self.listwls, row, 1)
235
- self.layout.addWidget(self.unitswls, row, 2)
236
-
237
- dialog.setLayout(self.layout)
238
- dialog.setWindowTitle('Peak Fit Input')
239
-
240
- # self.buttonBox.accepted.connect(Dialog.accept)
241
- # self.buttonBox.rejected.connect(Dialog.reject)
242
- 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)