[interpolatable] Some more improvements

Specially about reported tolerance. Report the original
tolerance.
This commit is contained in:
Behdad Esfahbod 2023-11-24 11:37:20 -07:00
parent f99774acf0
commit b6c795cfea

View File

@ -675,7 +675,10 @@ def test_gen(
else (pi * 0.5 if a < c else 0)
)
trans = Transform()
trans = trans.translate(meanX, meanY)
# Don't translate here. We are working on the complex-vector
# that includes more than just the points. It's horrible what
# we are doing anyway...
#trans = trans.translate(meanX, meanY)
trans = trans.rotate(theta)
trans = trans.scale(sqrt(lambda1), sqrt(lambda2))
transforms.append(trans)
@ -707,9 +710,10 @@ def test_gen(
enumerate(costs), key=lambda x: x[1]
)
first_cost = costs[0]
# Only accept a perfect match
if min_cost < first_cost * tolerance:
this_tolerance = min_cost / first_cost
pass
#this_tolerance = min_cost / first_cost
#proposed_point = new_contour1[min_cost_idx][1]
else:
okay = True