Public Access
create base class MeasurementData for ADC_Result and Accumulation
This commit is contained in:
1 parent
5a18e48c2d
commit
bd060dc4d0
6 files changed
+184
-47
No files matched your search
@@ -33,6 +33,14 @@ class TestAccumulation(unittest.TestCase):
|
||||
self.assertEqual(len(accu.x), 0)
|
||||
self.assertEqual(len(accu.y), 0)
|
||||
|
||||
def test_shared_measurement_statistics_use_accumulation_means(self):
|
||||
accu = Accumulation()
|
||||
accu += self.create_adc_result()
|
||||
np.testing.assert_allclose(accu.get_ymean(), [20, 25])
|
||||
np.testing.assert_allclose(accu.get_ymin_channels(), [10, 15])
|
||||
np.testing.assert_allclose(accu.get_ymax_channels(), [30, 35])
|
||||
self.assertAlmostEqual(accu.get_phase(), np.degrees(np.arctan2(15, 10)), places=6)
|
||||
|
||||
def test_constructor_with_arguments(self):
|
||||
"""Test initializer with all arguments."""
|
||||
x = np.array([0.0, 1.0, 2.0])
|
||||
|
||||
Reference in new issue
Block a user