diff --git a/dap/algos/thresh.py b/dap/algos/thresh.py index 66ac3b1..b1f6375 100644 --- a/dap/algos/thresh.py +++ b/dap/algos/thresh.py @@ -27,7 +27,7 @@ def calc_apply_threshold(results, data, value=None, copy=False): def threshold(data, vmin, vmax, replacement): """ - threshold data in place by replacing values < vmin and values > vmax with replacement + threshold data in place by replacing values < vmin and values >= vmax with replacement """ if vmin is not None and vmax is not None: # if vmin > vmax, data will be overwritten entirely -- better to ensure vmin < vmax by switching them if needed @@ -35,7 +35,7 @@ def threshold(data, vmin, vmax, replacement): if vmin is not None: data[data < vmin] = replacement if vmax is not None: - data[data > vmax] = replacement + data[data >= vmax] = replacement