diff --git a/micro_manager/adaptivity/adaptivity.py b/micro_manager/adaptivity/adaptivity.py index a734316..b124050 100644 --- a/micro_manager/adaptivity/adaptivity.py +++ b/micro_manager/adaptivity/adaptivity.py @@ -288,7 +288,7 @@ def _l1rel(self, data: np.ndarray) -> np.ndarray: """ pointwise_diff = data[np.newaxis, :] - data[:, np.newaxis] # divide by data to get relative difference - # divide i,j by max(data[i],data[j]) to get relative difference + # divide i,j by max(abs(data[i]),abs(data[j])) to get relative difference relative = np.nan_to_num( ( pointwise_diff @@ -316,7 +316,7 @@ def _l2rel(self, data: np.ndarray) -> np.ndarray: """ pointwise_diff = data[np.newaxis, :] - data[:, np.newaxis] # divide by data to get relative difference - # divide i,j by max(data[i],data[j]) to get relative difference + # divide i,j by max(abs(data[i]),abs(data[j])) to get relative difference relative = np.nan_to_num( ( pointwise_diff