diff --git a/README.SmurfProcessor.md b/README.SmurfProcessor.md index 66b6dd6e3..7e9964f74 100644 --- a/README.SmurfProcessor.md +++ b/README.SmurfProcessor.md @@ -89,6 +89,13 @@ y(n) = gain / a(0) * [ b(0) * x(n) + b(1) * x(n -1) + ... + b(order) * x(n - ord This module can be disabled; the incoming frame will just pass through to the next block. +The default coefficients were generated using this python code: + +``` +import scipy.signal as signal +b, a = signal.butter(4, 2*63 / 4000.) +``` + ### Downsampler Perform a downsampling of the data in the incoming frame, by letting pass only 1 data point each `Factor` number of point. diff --git a/python/pysmurf/core/devices/_SmurfProcessor.py b/python/pysmurf/core/devices/_SmurfProcessor.py index ea5ac65d9..5126bbc3c 100644 --- a/python/pysmurf/core/devices/_SmurfProcessor.py +++ b/python/pysmurf/core/devices/_SmurfProcessor.py @@ -157,11 +157,11 @@ def __init__(self, name, device, **kwargs): name='A', description='Filter a coefficients', mode='RW', - value= [ 1.0, - -3.9999966334205683, - 5.9999899002673720, - -3.9999899002730395, - 0.9999966334262355 ] + [0] * 11, + value= [ 1.0, + -3.74145562, + 5.25726624, + -3.28776591, + 0.77203984 ] + [0] * 11, localSet=lambda value: self.device.setA(value), localGet=self.device.getA)) @@ -173,11 +173,11 @@ def __init__(self, name, device, **kwargs): name='B', description='Filter b coefficients', mode='RW', - value= [ 1.7218423734035440e-25, - 6.8873694936141760e-25, - 1.0331054240421264e-24, - 6.8873694936141760e-25, - 1.7218423734035440e-25 ] + [0] * 11, + value= [ 5.28396689e-06, + 2.11358676e-05, + 3.17038014e-05, + 2.11358676e-05, + 5.28396689e-06 ] + [0] * 11, localSet=lambda value: self.device.setB(value), localGet=self.device.getB))