Skip to content

Commit

Permalink
Update default filter coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusvasquez333 committed Nov 13, 2019
1 parent 43c97f5 commit 60238a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.SmurfProcessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions python/pysmurf/core/devices/_SmurfProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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))

Expand Down

0 comments on commit 60238a5

Please sign in to comment.