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

Commit 2142711

Browse files
handle skiprows for all txt files
1 parent d18a42e commit 2142711

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

PythonGUI_apps/Lifetime_analysis/Lifetime_plot_fit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def __init__(self):
7171
def open_file(self):
7272
filename = QtWidgets.QFileDialog.getOpenFileName(self)
7373
try:
74+
self.file = np.loadtxt(filename[0], skiprows=0)
75+
except ValueError:
7476
self.file = np.loadtxt(filename[0], skiprows=10)
7577
except:
7678
self.file = read_picoharp_phd(filename[0])
@@ -208,4 +210,4 @@ def run():
208210
return win
209211

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

0 commit comments

Comments
 (0)