From aa95358067c075ee109832f3a6315e03f871f01f Mon Sep 17 00:00:00 2001 From: Abram Claycomb <aclaycomb@usgs.gov> Date: Wed, 7 Nov 2018 09:40:17 -0700 Subject: [PATCH] fix further test errors --- geomagio/algorithm/FilterAlgorithm.py | 7 ++----- test/algorithm_test/FilterAlgorithm_test.py | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/geomagio/algorithm/FilterAlgorithm.py b/geomagio/algorithm/FilterAlgorithm.py index 552f7be58..fc9a6adc3 100644 --- a/geomagio/algorithm/FilterAlgorithm.py +++ b/geomagio/algorithm/FilterAlgorithm.py @@ -138,11 +138,8 @@ class FilterAlgorithm(Algorithm): # sums of the total 'weights' of the filter corresponding to # valid samples as_weight_sums = np.dot(window, (~as_masked.mask).T) - # sums of total number of invalid entries for each application - # of the filter - as_invalid_sums = np.sum(as_masked.mask) - # mark the output locations as 'bad' that don't have the minimum - # number of samples + # mark the output locations as 'bad' that have missing input weights + # that sum to greater than as_invalid_masked = np.ma.masked_greater(as_weight_sums, allowed_bad) # apply filter, using masked version of dot (in 3.5 and above, there diff --git a/test/algorithm_test/FilterAlgorithm_test.py b/test/algorithm_test/FilterAlgorithm_test.py index 4b06d8d33..8a127fe1c 100644 --- a/test/algorithm_test/FilterAlgorithm_test.py +++ b/test/algorithm_test/FilterAlgorithm_test.py @@ -18,11 +18,11 @@ def test_process(): factory = i2.IAGA2002Factory() min = factory.parse_string(min_iaga2002_string) sec = factory.parse_string(sec_iaga2002_string) - a = filt() # process hezf (raw) channels with loaded transform - filt_bou = a.process(sec, inchannels=('SVH','SVE','SVZ','SSF'), + a = filt(inchannels=('SVH','SVE','SVZ','SSF'), outchannels=('MVH','MVE','MVZ','MSF')) + filt_bou = a.process(sec) # unpack channels from loaded adjusted data file u = min.select(channel='MVH')[0] -- GitLab