Filter calculation tools #703
GitHub Actions / Unit Test Results
failed
Apr 5, 2024 in 0s
1 fail, 3 skipped, 420 pass in 49s
Annotations
Check warning on line 0 in tests.test_digital_filters
github-actions / Unit Test Results
test_single_calc_filter_taps_static[static_calc_correction1] (tests.test_digital_filters) failed
pytest-junit-report/report.xml
Raw output
static_calc_correction = [None, [20000], 1, [[1.000025, -0.999975], [0.9999990463225004]]]
@pytest.mark.parametrize("static_calc_correction", [
[[(-0.25, 200)], None, 1, [[1.3322259136212624, -1.325581395348837], [0.9933554817275746]]],
[None, [20_000], 1, [[1.000025, -0.999975], [0.9999990463225004]]],
])
def test_single_calc_filter_taps_static(static_calc_correction):
low_pass = static_calc_correction[0]
high_pass = static_calc_correction[1]
ts = static_calc_correction[2]
static_values = static_calc_correction[3]
feedforward, feedback = calc_filter_taps(fir=None, exponential=low_pass, highpass=high_pass, bounce=None, delay=None, Ts=ts)
print(f"\nfeedback: {feedback}")
print(f"feedforward: {feedforward}")
assert np.all(feedforward == static_values[0])
> assert feedback[0] == static_values[1][0]
E assert 0.9999990463256836 == 0.9999990463225004
tests/test_digital_filters.py:102: AssertionError
Loading