Skip to content
Snippets Groups Projects
Commit 778f5918 authored by (no author)'s avatar (no author)
Browse files

fixing bug in how negative values would be compared with epsilon percent

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@140 8a9318a1-56ba-4d59-b755-99d26321be01
parent d88f1501
No related branches found
No related tags found
No related merge requests found
...@@ -261,11 +261,9 @@ class DiffInfoObject (object) : ...@@ -261,11 +261,9 @@ class DiffInfoObject (object) :
# the valid data which is too different between the two sets according to the given epsilon # the valid data which is too different between the two sets according to the given epsilon
outside_epsilon_mask = np.zeros(shape, dtype=np.bool) outside_epsilon_mask = np.zeros(shape, dtype=np.bool)
if (epsilonValue is not None) : if (epsilonValue is not None) :
outside_epsilon_mask = outside_epsilon_mask | \ outside_epsilon_mask |= (abs(raw_diff) > epsilonValue) & valid_in_both
(abs(raw_diff) > epsilonValue) & valid_in_both
if (epsilonPercent is not None) : if (epsilonPercent is not None) :
outside_epsilon_mask = outside_epsilon_mask | \ outside_epsilon_mask |= (abs(raw_diff) > abs(aDataObject.data * (float(epsilonPercent) / 100.0))) & valid_in_both
((abs(raw_diff) > (aDataObject.data * (float(epsilonPercent) / 100.0))) & valid_in_both)
# trouble points = mismatched nans, mismatched missing-values, differences that are too large # trouble points = mismatched nans, mismatched missing-values, differences that are too large
trouble_pt_mask = ( (aDataObject.masks.non_finite_mask ^ bDataObject.masks.non_finite_mask) | trouble_pt_mask = ( (aDataObject.masks.non_finite_mask ^ bDataObject.masks.non_finite_mask) |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment