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

Commit 47be376

Browse files
author
LAKESIDE\LindaT18
committed
ui updates, added lifetime_plot export data
1 parent 7cedc9e commit 47be376

5 files changed

Lines changed: 531 additions & 468 deletions

File tree

PythonGUI_apps/FLIM_analysis/FLIM_plot.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def save_intensities_array(self):
204204
pass
205205

206206
def pkl_to_h5(self):
207+
#Convert scan .pkl file into h5
207208
try:
208209
folder = os.path.dirname(self.pkl_to_convert[0])
209210
filename_ext = os.path.basename(self.pkl_to_convert[0])
@@ -212,17 +213,17 @@ def pkl_to_h5(self):
212213

213214
h5_filename = folder + "/" + filename + ".h5"
214215
h5_file = h5py.File(h5_filename, "w")
215-
self.traverse_dict(pkl_file, h5_file)
216+
self.traverse_dict_into_h5(pkl_file, h5_file)
216217
except Exception as err:
217218
print(format(err))
218219

219-
def traverse_dict(self, dictionary, h5_output):
220+
def traverse_dict_into_h5(self, dictionary, h5_output):
221+
#Create an h5 file using .pkl with scan data and params
220222
for key in dictionary:
221223
if type(dictionary[key]) == dict:
222-
#print_string += key + "-->"
223-
group = h5_output.create_group(key)#print(print_string)
224+
group = h5_output.create_group(key)
224225
previous_dict = dictionary[key]
225-
self.traverse_dict(dictionary[key], group)
226+
self.traverse_dict_into_h5(dictionary[key], group)
226227
else:
227228
if key == "Histogram data" or key == "Time data":
228229
h5_output.create_dataset(key, data=dictionary[key])

PythonGUI_apps/Lifetime_analysis/Lifetime_analysis_gui_layout.ui

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@
10751075
</property>
10761076
</widget>
10771077
</item>
1078-
<item row="2" column="0">
1078+
<item row="3" column="0">
10791079
<widget class="QPushButton" name="export_plot_pushButton">
10801080
<property name="font">
10811081
<font>
@@ -1090,6 +1090,13 @@ Ready Figure!</string>
10901090
</property>
10911091
</widget>
10921092
</item>
1093+
<item row="2" column="0">
1094+
<widget class="QPushButton" name="export_data_pushButton">
1095+
<property name="text">
1096+
<string>Export data</string>
1097+
</property>
1098+
</widget>
1099+
</item>
10931100
</layout>
10941101
</widget>
10951102
</item>
@@ -1314,7 +1321,7 @@ Ready Figure!</string>
13141321
<customwidget>
13151322
<class>PlotWidget</class>
13161323
<extends>QGraphicsView</extends>
1317-
<header location="global">pyqtgraph</header>
1324+
<header>pyqtgraph</header>
13181325
</customwidget>
13191326
</customwidgets>
13201327
<resources/>

0 commit comments

Comments
 (0)