summaryrefslogtreecommitdiff
path: root/bindings/test_galearn_pdm.py
diff options
context:
space:
mode:
authorJon Nordby <jononor@gmail.com>2025-08-12 22:26:23 +0200
committerJon Nordby <jononor@gmail.com>2025-08-12 22:26:23 +0200
commit8d99873204a6f5867931a4989c6ee4c3d0d358fd (patch)
treeb8d6c3ddabe7ae56e6a95447d2889a5e47a5bd81 /bindings/test_galearn_pdm.py
parentb43f4afeb172c3ce0a5eb9577135b5c8cf8aa2b1 (diff)
pdm: Correct test for 3 stage CIC (no DC reject)
Diffstat (limited to 'bindings/test_galearn_pdm.py')
-rw-r--r--bindings/test_galearn_pdm.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bindings/test_galearn_pdm.py b/bindings/test_galearn_pdm.py
index b55fc53..99c5d68 100644
--- a/bindings/test_galearn_pdm.py
+++ b/bindings/test_galearn_pdm.py
@@ -76,8 +76,10 @@ def test_sine_simple(frequency):
out = numpy.zeros(shape=len(pdm_input)//DECIMATION, dtype=numpy.int16)
# Process using filter
+ #scale = (2**12)
+ scale = 1024
n_samples = galearn_pdm.process(pdm_input, out, 0, 0)
- out = out / (2**12)
+ out = out / scale
# Compensate for delay through filter
delay = find_forward_shift(pcm_input, out)
@@ -122,6 +124,7 @@ def test_sine_simple(frequency):
assert abs(average) < 0.06
+@pytest.mark.skip('DC rejection not implemented yet')
def test_dc():
function = sys._getframe().f_code.co_name # looks up function name
test_name = f'{function}'
@@ -138,7 +141,8 @@ def test_dc():
# Process using filter
n_samples = galearn_pdm.process(pdm_input, out, 255, 0)
- out = out / (2**12)
+ scale = 1024
+ out = out / scale
# Compensate for delay through filter
delay = find_forward_shift(pcm_input, out)