scenarios
Theophile Terraz 2025-10-28 17:21:10 +01:00
parent 1dca9b98df
commit 8aa0e25da2
1 changed files with 8 additions and 3 deletions

View File

@ -1249,6 +1249,13 @@ class ResultsWindow(PamhyrWindow):
return
sep = " "
def is_float(string):
if string.replace(".", "").isnumeric():
return True
else:
return False
with open(filename, 'r', newline='') as f:
lines = f.readlines()
x = []
@ -1257,11 +1264,9 @@ class ResultsWindow(PamhyrWindow):
if line[0] != "*" and line[0] != "#" and line[0] != "$":
row = line.split(sep)
if len(row) >= 2:
try:
if is_float(row[0]) and is_float(row[1]):
x.append(float(row[0]))
y.append(float(row[1]))
except:
pass
data_type_lst = ['Q(t)', 'Z(t)', 'Z(x)']
data_type, ok = QInputDialog.getItem(