fix: restore pchip LUT in framed_model (revert 12094f8 regression)

12094f8 replaced the empirical Pchip LUT with the parametric
linear form (CAP_A_LEVEL=-24/B=28/gamma=1). With gamma=1 the
parametric form reduces to identity on xv=log10(am/res), which
breaks the whole mask chain (t1kq fc-scan err jumps to ~7.9 dB).

Re-instating lut_pchip restores the honest baseline:
t1kq mean|err| 0.226 dB (was 7.9). Confirms NOTES_LEVEL F1
closure: no parametric LUT set beats Pchip at fixed bridge
params; the structural A/B/gamma (level-path ctx+0x188) is the
only real path to bytes, not this parametric substitution.
This commit is contained in:
2026-08-21 00:32:39 +03:00
parent 12094f8119
commit e5e9700333
+1 -1
View File
@@ -139,7 +139,7 @@ void FramedDetector::processFrame(const std::complex<double>* spectrum, float* m
double res_k = std::max(static_cast<double>(res_[b][k]), 1e-12); double res_k = std::max(static_cast<double>(res_[b][k]), 1e-12);
double lvl = static_cast<double>(am_[k]) / res_k; double lvl = static_cast<double>(am_[k]) / res_k;
double xv = std::log10(std::max(lvl, 1e-9)); double xv = std::log10(std::max(lvl, 1e-9));
double C = G_FIT * lut_parametric(xv, CAP_A_LEVEL, CAP_B_LEVEL, CAP_GAMMA) + W_FIT * std::pow(warp_c(fk), A_FIT); double C = G_FIT * lut_pchip(xv) + W_FIT * std::pow(warp_c(fk), A_FIT);
double g = std::max(1.0 - C, 1e-9) * std::pow(res_k, rp); double g = std::max(1.0 - C, 1e-9) * std::pow(res_k, rp);
mask[k] = std::min(static_cast<float>(g), mask[k]); mask[k] = std::min(static_cast<float>(g), mask[k]);
fk += fstep; fk += fstep;