From babcdc8786e2c48c4492bc1727f57319836a4f20 Mon Sep 17 00:00:00 2001 From: Ken Kehoe Date: Wed, 25 Sep 2024 12:11:05 -0600 Subject: [PATCH] Pulling min and max values from ignore_range keyword instead of expecting an order. --- act/qc/qctests.py | 2 +- tests/qc/test_qctests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/act/qc/qctests.py b/act/qc/qctests.py index 2f27df036f..4d57661489 100644 --- a/act/qc/qctests.py +++ b/act/qc/qctests.py @@ -1017,7 +1017,7 @@ def add_persistence_test( index = stddev <= test_limit if ignore_range is not None: - ignore_index = (data >= ignore_range[0]) & (data <= ignore_range[1]) + ignore_index = (data >= min(ignore_range)) & (data <= max(ignore_range)) index = index & ~ignore_index result = self._ds.qcfilter.add_test( diff --git a/tests/qc/test_qctests.py b/tests/qc/test_qctests.py index b6dd77cbca..5807f7e62b 100644 --- a/tests/qc/test_qctests.py +++ b/tests/qc/test_qctests.py @@ -379,7 +379,7 @@ def test_qctests_dos(): window=20, min_periods=20, test_limit=0.01, - ignore_range=[13.1, 14.8], + ignore_range=[14.8, 13.1], test_assessment='Suspect', )