Skip to content

Commit

Permalink
Ensure negative deviations do not count toward the average deviation.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cattermole committed Jun 22, 2020
1 parent 4477c84 commit 951e9a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/mmSolver/_api/markerutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def calculate_average_deviation(dev_list):
Calculate a single float number (in pixels) representing the
average deviation of this Marker.
"""
dev_list = [d for d in dev_list if d > 0.0]
if len(dev_list) == 0:
return -1.0
dev = sum(dev_list) / len(dev_list)
Expand Down

0 comments on commit 951e9a5

Please sign in to comment.