Commit 2295294e authored by mihaivanea's avatar mihaivanea
Browse files

Debugging the benchmark script. Something goes wrong, as the coodonates are not properly prased

parent 0cac7d4b
......@@ -242,13 +242,14 @@ def fddb_belongs_to_set(eliptic_label, coords_set, log_file):
return 0
def wf_covers_face(label, coords_set, log_file):
label_formated = label.split(' ')
a1 = float(label_formated[0])
b1 = float(label_formated[1])
a2 = float(label_formated[2])
b2 = float(label_formated[3])
for i in range(len(coords_set)):
try:
try:
label_formated = label.split(' ')
a1 = float(label_formated[0])
b1 = float(label_formated[1])
a2 = float(label_formated[2])
b2 = float(label_formated[3])
for i in range(len(coords_set)):
#try:
coords_set_formated = coords_set[i].split(' ')
x1 = float(coords_set_formated[0])
y1 = float(coords_set_formated[1])
......@@ -256,9 +257,18 @@ def wf_covers_face(label, coords_set, log_file):
y2 = float(coords_set_formated[3]) + y1
if aabb_overlap(a1, b1, a2, b2, x1, y1, x2, y2):
return 1
except ValueError:
log_file.write("INVALID CARTESIAN COORDONATES FOR OUTPUT: " \
+ str(coords_set[i]) + " FROM:" + str(eliptic_label) + '\n')
except ValueError:
print("HERE")
print(label_formated[0])
print(label_formated[1])
print(label_formated[2])
print(label_formated[3])
print("HERE")
log_file.write("INVALID CARTESIAN COORDONATES FOR OUTPUT: " \
+ str(coords_set[i]) + " FROM:" + str(eliptic_label) + '\n')
#except ValueError:
# log_file.write("INVALID CARTESIAN COORDONATES FOR OUTPUT: " \
# + str(coords_set[i]) + " FROM:" + str(eliptic_label) + '\n')
return 0
def wf_belongs_to_set(label, coords_set, log_file):
......@@ -278,7 +288,7 @@ def wf_belongs_to_set(label, coords_set, log_file):
return 1
except ValueError:
log_file.write("INVALID CARTESIAN COORDONATES FOR OUTPUT: " \
+ str(coords_set[i]) + " FROM:" + str(eliptic_label) + '\n')
+ str(coords_set[i]) + " FROM:" + str(label) + '\n')
return 0
def wider_face_performance(label, output, time_stamp):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment