Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit ab8d2ab

Browse files
new save settings and gui rearragement
1 parent 2142711 commit ab8d2ab

2 files changed

Lines changed: 113 additions & 61 deletions

File tree

PythonGUI_apps/Lifetime_analysis/Lifetime_analysis_gui_layout.ui

Lines changed: 110 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>1050</width>
9+
<width>1201</width>
1010
<height>785</height>
1111
</rect>
1212
</property>
@@ -19,7 +19,7 @@
1919
<rect>
2020
<x>290</x>
2121
<y>40</y>
22-
<width>741</width>
22+
<width>891</width>
2323
<height>501</height>
2424
</rect>
2525
</property>
@@ -29,7 +29,7 @@
2929
<rect>
3030
<x>10</x>
3131
<y>30</y>
32-
<width>231</width>
32+
<width>241</width>
3333
<height>101</height>
3434
</rect>
3535
</property>
@@ -44,15 +44,15 @@
4444
<widget class="QLabel" name="label_3">
4545
<property name="geometry">
4646
<rect>
47-
<x>150</x>
47+
<x>140</x>
4848
<y>30</y>
49-
<width>71</width>
49+
<width>81</width>
5050
<height>16</height>
5151
</rect>
5252
</property>
5353
<property name="font">
5454
<font>
55-
<pointsize>10</pointsize>
55+
<pointsize>12</pointsize>
5656
</font>
5757
</property>
5858
<property name="text">
@@ -64,13 +64,13 @@
6464
<rect>
6565
<x>10</x>
6666
<y>30</y>
67-
<width>91</width>
67+
<width>111</width>
6868
<height>21</height>
6969
</rect>
7070
</property>
7171
<property name="font">
7272
<font>
73-
<pointsize>10</pointsize>
73+
<pointsize>12</pointsize>
7474
</font>
7575
</property>
7676
<property name="text">
@@ -80,9 +80,9 @@
8080
<widget class="QComboBox" name="Channel_comboBox">
8181
<property name="geometry">
8282
<rect>
83-
<x>150</x>
83+
<x>140</x>
8484
<y>60</y>
85-
<width>69</width>
85+
<width>81</width>
8686
<height>22</height>
8787
</rect>
8888
</property>
@@ -92,7 +92,7 @@
9292
<rect>
9393
<x>10</x>
9494
<y>60</y>
95-
<width>91</width>
95+
<width>101</width>
9696
<height>22</height>
9797
</rect>
9898
</property>
@@ -106,8 +106,8 @@
106106
<rect>
107107
<x>10</x>
108108
<y>150</y>
109-
<width>231</width>
110-
<height>91</height>
109+
<width>241</width>
110+
<height>131</height>
111111
</rect>
112112
</property>
113113
<property name="font">
@@ -123,7 +123,7 @@
123123
<rect>
124124
<x>10</x>
125125
<y>30</y>
126-
<width>91</width>
126+
<width>111</width>
127127
<height>41</height>
128128
</rect>
129129
</property>
@@ -141,7 +141,7 @@
141141
<widget class="QPushButton" name="log_pushButton">
142142
<property name="geometry">
143143
<rect>
144-
<x>120</x>
144+
<x>140</x>
145145
<y>30</y>
146146
<width>91</width>
147147
<height>41</height>
@@ -156,14 +156,33 @@
156156
<string>Y axis Log</string>
157157
</property>
158158
</widget>
159+
<widget class="QPushButton" name="clear_pushButton">
160+
<property name="geometry">
161+
<rect>
162+
<x>10</x>
163+
<y>80</y>
164+
<width>221</width>
165+
<height>41</height>
166+
</rect>
167+
</property>
168+
<property name="font">
169+
<font>
170+
<pointsize>15</pointsize>
171+
<strikeout>false</strikeout>
172+
</font>
173+
</property>
174+
<property name="text">
175+
<string>Clear Plot</string>
176+
</property>
177+
</widget>
159178
</widget>
160179
<widget class="QGroupBox" name="groupBox_3">
161180
<property name="geometry">
162181
<rect>
163182
<x>10</x>
164-
<y>260</y>
165-
<width>231</width>
166-
<height>181</height>
183+
<y>290</y>
184+
<width>241</width>
185+
<height>201</height>
167186
</rect>
168187
</property>
169188
<property name="font">
@@ -178,8 +197,8 @@
178197
<property name="geometry">
179198
<rect>
180199
<x>10</x>
181-
<y>70</y>
182-
<width>211</width>
200+
<y>60</y>
201+
<width>221</width>
183202
<height>31</height>
184203
</rect>
185204
</property>
@@ -188,14 +207,14 @@
188207
<property name="geometry">
189208
<rect>
190209
<x>10</x>
191-
<y>40</y>
192-
<width>101</width>
210+
<y>30</y>
211+
<width>111</width>
193212
<height>20</height>
194213
</rect>
195214
</property>
196215
<property name="font">
197216
<font>
198-
<pointsize>10</pointsize>
217+
<pointsize>12</pointsize>
199218
</font>
200219
</property>
201220
<property name="text">
@@ -205,10 +224,10 @@
205224
<widget class="QPushButton" name="fit_pushButton">
206225
<property name="geometry">
207226
<rect>
208-
<x>30</x>
209-
<y>120</y>
210-
<width>171</width>
211-
<height>51</height>
227+
<x>10</x>
228+
<y>150</y>
229+
<width>221</width>
230+
<height>41</height>
212231
</rect>
213232
</property>
214233
<property name="font">
@@ -220,33 +239,27 @@
220239
<string>Get Lifetime!</string>
221240
</property>
222241
</widget>
223-
</widget>
224-
<widget class="QPushButton" name="clear_pushButton">
225-
<property name="geometry">
226-
<rect>
227-
<x>910</x>
228-
<y>560</y>
229-
<width>121</width>
230-
<height>51</height>
231-
</rect>
232-
</property>
233-
<property name="font">
234-
<font>
235-
<pointsize>15</pointsize>
236-
<strikeout>false</strikeout>
237-
</font>
238-
</property>
239-
<property name="text">
240-
<string>Clear Plot</string>
241-
</property>
242+
<widget class="QPushButton" name="config_fit_pushButton">
243+
<property name="geometry">
244+
<rect>
245+
<x>10</x>
246+
<y>100</y>
247+
<width>221</width>
248+
<height>41</height>
249+
</rect>
250+
</property>
251+
<property name="text">
252+
<string>Configure Fit Settings</string>
253+
</property>
254+
</widget>
242255
</widget>
243256
<widget class="QTextBrowser" name="Result_textBrowser">
244257
<property name="geometry">
245258
<rect>
246259
<x>10</x>
247-
<y>470</y>
260+
<y>510</y>
248261
<width>256</width>
249-
<height>261</height>
262+
<height>221</height>
250263
</rect>
251264
</property>
252265
<property name="font">
@@ -255,34 +268,73 @@
255268
</font>
256269
</property>
257270
</widget>
258-
<widget class="QPushButton" name="export_plot_pushButton">
271+
<widget class="QGroupBox" name="groupBox_4">
259272
<property name="geometry">
260273
<rect>
261274
<x>290</x>
262-
<y>560</y>
263-
<width>211</width>
264-
<height>71</height>
275+
<y>550</y>
276+
<width>241</width>
277+
<height>151</height>
265278
</rect>
266279
</property>
267280
<property name="font">
268281
<font>
269282
<pointsize>15</pointsize>
270-
<weight>50</weight>
271-
<bold>false</bold>
272283
</font>
273284
</property>
274-
<property name="text">
275-
<string>Export Publication
276-
Ready Figure!</string>
285+
<property name="title">
286+
<string>Export Plot Settings</string>
277287
</property>
288+
<widget class="QCheckBox" name="save_w_fit_checkBox">
289+
<property name="geometry">
290+
<rect>
291+
<x>10</x>
292+
<y>30</y>
293+
<width>121</width>
294+
<height>17</height>
295+
</rect>
296+
</property>
297+
<property name="font">
298+
<font>
299+
<pointsize>12</pointsize>
300+
</font>
301+
</property>
302+
<property name="text">
303+
<string>Save with Fit</string>
304+
</property>
305+
<property name="checked">
306+
<bool>true</bool>
307+
</property>
308+
</widget>
309+
<widget class="QPushButton" name="export_plot_pushButton">
310+
<property name="geometry">
311+
<rect>
312+
<x>10</x>
313+
<y>60</y>
314+
<width>211</width>
315+
<height>71</height>
316+
</rect>
317+
</property>
318+
<property name="font">
319+
<font>
320+
<pointsize>15</pointsize>
321+
<weight>50</weight>
322+
<bold>false</bold>
323+
</font>
324+
</property>
325+
<property name="text">
326+
<string>Export Publication
327+
Ready Figure!</string>
328+
</property>
329+
</widget>
278330
</widget>
279331
</widget>
280332
<widget class="QMenuBar" name="menubar">
281333
<property name="geometry">
282334
<rect>
283335
<x>0</x>
284336
<y>0</y>
285-
<width>1050</width>
337+
<width>1201</width>
286338
<height>21</height>
287339
</rect>
288340
</property>

PythonGUI_apps/Lifetime_analysis/Lifetime_plot_fit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ def pub_ready_plot_export(self):
181181

182182
plt.figure(figsize=(8,6))
183183
plt.tick_params(direction='out', length=8, width=3.5)
184-
try:
184+
if self.ui.save_w_fit_checkBox.isChecked():
185185
plt.plot(self.out[:,0],self.out[:,1]/np.max(self.out[:,1]))
186186
plt.plot(self.out[:,0],self.out[:,2]/np.max(self.out[:,1]),'k')
187-
except:
187+
else:
188188
plt.plot(self.acquire_settings()[0],self.acquire_settings()[1]/np.max(self.acquire_settings()[1]))
189189
plt.yscale('log')
190190
plt.xlabel("Time (ns)", fontsize=20, fontweight='bold')
@@ -210,4 +210,4 @@ def run():
210210
return win
211211

212212
#Uncomment below if you want to run this as standalone
213-
run()
213+
#run()

0 commit comments

Comments
 (0)