Skip to content

Commit eb8831a

Browse files
committed
Signal detrending: add validation test
1 parent 8bb6513 commit eb8831a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cdl/tests/features/signals/processing_unit_test.py

+11
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,17 @@ def test_signal_integral() -> None:
256256
check_array_result("Integral", dst.y, exp, atol=0.05)
257257

258258

259+
@pytest.mark.validation
260+
def test_signal_detrending() -> None:
261+
"""Validation test for the signal detrending processing."""
262+
src = get_test_signal("paracetamol.txt")
263+
for method in cdl.param.DetrendingParam.methods:
264+
p = cdl.param.DetrendingParam.create(method=method)
265+
dst = cps.compute_detrending(src, p)
266+
exp = sps.detrend(src.data, type=p.method)
267+
check_array_result(f"Detrending [method={p.method}]", dst.data, exp)
268+
269+
259270
@pytest.mark.validation
260271
def test_signal_offset_correction() -> None:
261272
"""Validation test for the signal offset correction processing."""

0 commit comments

Comments
 (0)