aboutsummaryrefslogtreecommitdiff
path: root/test/sca/test_match.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sca/test_match.py')
-rw-r--r--test/sca/test_match.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/sca/test_match.py b/test/sca/test_match.py
index 1781d9d..cd0b780 100644
--- a/test/sca/test_match.py
+++ b/test/sca/test_match.py
@@ -9,22 +9,20 @@ from .utils import Plottable
class MatchingTests(Plottable):
def test_simple_match(self):
- pattern = Trace(np.array([1, 15, 12, -10, 0, 13, 17, -1, 0], dtype=np.dtype("i1")), None,
- None, None)
+ pattern = Trace(np.array([1, 15, 12, -10, 0, 13, 17, -1, 0], dtype=np.dtype("i1")), None)
base = Trace(np.array(
[0, 1, 3, 1, 2, -2, -3, 1, 15, 12, -10, 0, 13, 17, -1, 0, 3, 1],
- dtype=np.dtype("i1")), None, None, None)
+ dtype=np.dtype("i1")), None)
filtered = match_part(base, 7, 9)
self.assertListEqual(filtered, [7])
self.plot(base=base, pattern=pad(pattern, (filtered[0], 0)))
def test_multiple_match(self):
- pattern = Trace(np.array([1, 15, 12, -10, 0, 13, 17, -1, 0], dtype=np.dtype("i1")), None,
- None, None)
+ pattern = Trace(np.array([1, 15, 12, -10, 0, 13, 17, -1, 0], dtype=np.dtype("i1")), None)
base = Trace(np.array(
[0, 1, 3, 1, 2, -2, -3, 1, 18, 10, -5, 0, 13, 17, -1, 0, 3, 1, 2, 5, 13, 8, -8, 1,
11, 15, 0, 1, 5, 2, 4],
- dtype=np.dtype("i1")), None, None, None)
+ dtype=np.dtype("i1")), None)
filtered = match_pattern(base, pattern, 0.9)
self.assertListEqual(filtered, [7, 19])
self.plot(base=base, pattern1=pad(pattern, (filtered[0], 0)), pattern2=pad(pattern, (filtered[1], 0)))