From 05a5ab2cd71e9c68a7002e1e8a89b887afc4240f Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Tue, 22 Feb 2011 17:12:40 -0500 Subject: support manual outlier filtering --- binary_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'binary_data.py') diff --git a/binary_data.py b/binary_data.py index 152afb7..39d6e05 100644 --- a/binary_data.py +++ b/binary_data.py @@ -5,7 +5,7 @@ from stats import iqr_remove_outliers, iqr_cutoff def get_data(fname, scale, extent, cutoff=None, maxval=1000.0, - stdev=False): + stdev=False, manual=None): data = load_binary_file(fname) if cutoff and len(data) > cutoff: @@ -31,6 +31,9 @@ def get_data(fname, scale, extent, cutoff=None, maxval=1000.0, min_idx, max_idx = numpy.searchsorted(data, [lower, upper]) + if manual: + max_idx -= manual + return [data, max_idx, min_idx, upper, lower] -- cgit v1.2.2