feat: SG Filter on/off 토글 추가 (Settings 패널)

- PiezoEchoAnalyzer.useSgFilter: true/false로 SG 필터 on/off
- OFF 시 raw ADC 그대로 low-echo detection에 사용
- Settings 패널에 Switch 토글 추가 (기본 ON)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 17:34:21 +09:00
parent 36da75b1f0
commit 7dea5b2eca
2 changed files with 23 additions and 2 deletions
@@ -213,9 +213,10 @@ class PiezoEchoAnalyzer private constructor() {
// ── Denoising Pipeline ──
/** SG 디노이징 (6ch 알고리즘: TVD 제거, SG만 사용) */
var useSgFilter: Boolean = true
fun denoise(signal: DoubleArray): DoubleArray {
return sgSmooth(signal)
return if (useSgFilter) sgSmooth(signal) else signal.copyOf()
}
/** 1D Total Variation Denoising — Chambolle (2004) dual projected gradient */