aboutsummaryrefslogtreecommitdiff
path: root/test/sca/test_sampling.py
diff options
context:
space:
mode:
authorJ08nY2020-03-04 00:04:53 +0100
committerJ08nY2020-03-04 00:04:53 +0100
commita97f49ebe3c8e28d2a9ba76711555a3378b62341 (patch)
treed6064aec39573ad9e83607dbed5873d7872aed21 /test/sca/test_sampling.py
parentdeca0e3d89ff4483dd6b6b4ad99b3400145bee5b (diff)
downloadpyecsca-a97f49ebe3c8e28d2a9ba76711555a3378b62341.tar.gz
pyecsca-a97f49ebe3c8e28d2a9ba76711555a3378b62341.tar.zst
pyecsca-a97f49ebe3c8e28d2a9ba76711555a3378b62341.zip
Diffstat (limited to 'test/sca/test_sampling.py')
-rw-r--r--test/sca/test_sampling.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sca/test_sampling.py b/test/sca/test_sampling.py
index 75a227d..40eaa7d 100644
--- a/test/sca/test_sampling.py
+++ b/test/sca/test_sampling.py
@@ -8,7 +8,7 @@ from .utils import plot
class SamplingTests(TestCase):
def setUp(self):
- self._trace = Trace(None, None, np.array([20, 40, 50, 50, 10], dtype=np.dtype("i1")))
+ self._trace = Trace(np.array([20, 40, 50, 50, 10], dtype=np.dtype("i1")), None, None)
def test_downsample_average(self):
result = downsample_average(self._trace, 2)
@@ -27,9 +27,9 @@ class SamplingTests(TestCase):
self.assertEqual(result.samples[1], 50)
def test_downsample_decimate(self):
- trace = Trace(None, None, np.array([20, 30, 55, 18, 15, 10, 35, 24, 21, 15, 10, 8, -10, -5,
- -8, -12, -15, -18, -34, -21, -17, -10, -5, -12, -6, -2,
- 4, 8, 21, 28], dtype=np.dtype("i1")))
+ trace = Trace(np.array([20, 30, 55, 18, 15, 10, 35, 24, 21, 15, 10, 8, -10, -5,
+ -8, -12, -15, -18, -34, -21, -17, -10, -5, -12, -6, -2,
+ 4, 8, 21, 28], dtype=np.dtype("i1")), None, None)
result = downsample_decimate(trace, 2)
self.assertIsNotNone(result)
self.assertIsInstance(result, Trace)