mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8
This commit is contained in:
1 parent
1dca9b98df
commit
8aa0e25da2
1 file changed
+8
-3
@@ -1249,6 +1249,13 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
sep = " "
|
sep = " "
|
||||||
|
|
||||||
|
def is_float(string):
|
||||||
|
if string.replace(".", "").isnumeric():
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
with open(filename, 'r', newline='') as f:
|
with open(filename, 'r', newline='') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
x = []
|
x = []
|
||||||
@@ -1257,11 +1264,9 @@ class ResultsWindow(PamhyrWindow):
|
|||||||
if line[0] != "*" and line[0] != "#" and line[0] != "$":
|
if line[0] != "*" and line[0] != "#" and line[0] != "$":
|
||||||
row = line.split(sep)
|
row = line.split(sep)
|
||||||
if len(row) >= 2:
|
if len(row) >= 2:
|
||||||
try:
|
if is_float(row[0]) and is_float(row[1]):
|
||||||
x.append(float(row[0]))
|
x.append(float(row[0]))
|
||||||
y.append(float(row[1]))
|
y.append(float(row[1]))
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
data_type_lst = ['Q(t)', 'Z(t)', 'Z(x)']
|
data_type_lst = ['Q(t)', 'Z(t)', 'Z(x)']
|
||||||
data_type, ok = QInputDialog.getItem(
|
data_type, ok = QInputDialog.getItem(
|
||||||
|
|||||||
Reference in new issue
Block a user