fix(decode): the mic dB offset is 81.938216, fitted on every count Blastware printed

The 81.9384 offset came from a window fitted on histogram intervals,
[81.9383, 81.9385], which was too high.  Every count Blastware printed
in DL2 -- 1,704 in waveform sample tables, 520 in histogram intervals,
494 histogram peaks -- leaves [81.9382058, 81.9382266]: count 129
(124.2) bounds it from below, 463 (135.2; 81.9384 prints 135.3) and 677
(138.5) from above.  One offset serves all three printing paths; no
count prints two ways once range-1 mics and psi-formatted tables are
set aside.  Fixes the mic samples and peaks that sat one digit off at a
rounding edge.  The old window's comment is kept, retracted in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-09 14:04:55 -05:00
1 parent e25784d9db
commit e21d23a3f2
2 files changed
+21 -3

No files matched your search

+13
View File
@@ -512,6 +512,19 @@ def test_mic_count_to_db_v70_peak():
assert abs(mic_count_to_db(-813) - (-140.14)) < 0.1
@pytest.mark.parametrize("count,printed", [
# Blastware's dB offset is pinned to [81.9382058, 81.9382266] by every DL2
# count it printed -- 1,704 in sample tables, 520 in histogram intervals,
# 494 histogram peaks (2026-11-09). These three counts bound it:
(129, "124.2"), # from below: the physical 81.93820 prints 124.1
(463, "135.2"), # from above in intervals and peaks: 81.9384 prints 135.3
(677, "138.5"), # from above in the sample tables
])
def test_mic_db_prints_as_blastware_at_its_rounding_edges(count, printed):
from minimateplus.decode_check import matches_printed
assert matches_printed(mic_count_to_db(count), printed), mic_count_to_db(count)
# ── End-to-end: decode_a5_frames (production entry point) ───────────────────