feat(report): draw the USBM RI8507 compliance chart on the event report

Replace the "[compliance chart coming soon]" placeholder in
_draw_mic_and_usbm with a real inset axes calling
sfm.compliance.draw_compliance_chart on rd.channels / rd.sample_rate_sps
(the full-rate in/s waveform samples). Title updated "USBM RI8507 And OSMRE"
→ "USBM RI8507" — we draw only the RI8507 lines (Drywall 0.75 + plaster 0.50);
the OSMRE overlay is dropped by choice.

Waveform events only (the histogram layout has no USBM chart). Falls back to a
"(no waveform data)" note when samples are unavailable. Closes the 1.0
compliance-chart blocker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDXjZCr4RqT2U3QvMDhgzf
This commit is contained in:
2026-09-14 20:18:29 +00:00
co-authored by Claude Opus 4.8
parent dad35e47fe
commit db818f716c
+10 -9
View File
@@ -578,15 +578,16 @@ def _draw_mic_and_usbm(ax, rd: ReportData) -> None:
_kv(ax, 0.0, y, label, value, label_w=0.18)
y -= 0.15
# USBM chart placeholder — upper-right. Real piecewise compliance
# curves are a separate work item; for now this just shows the title
# + a "see report" message so the layout is correct.
ax.text(0.72, 0.97, "USBM RI8507 And OSMRE",
fontsize=9, weight="bold", color="#333", ha="center", va="top",
transform=ax.transAxes)
ax.text(0.72, 0.50, "[compliance chart\ncoming soon]",
fontsize=8, color="#bbb", ha="center", va="center",
transform=ax.transAxes, style="italic")
# USBM RI8507 compliance chart — inset axes in the right half of this band.
ax.text(0.74, 1.00, "USBM RI8507", fontsize=9, weight="bold", color="#333",
ha="center", va="top", transform=ax.transAxes)
if rd.channels and rd.sample_rate_sps:
from sfm.compliance import draw_compliance_chart
inset = ax.inset_axes([0.52, 0.02, 0.46, 0.82])
draw_compliance_chart(inset, rd.channels, rd.sample_rate_sps)
else:
ax.text(0.74, 0.48, "(no waveform data)", fontsize=8, color="#bbb",
ha="center", va="center", transform=ax.transAxes, style="italic")
def _mic_rows(rd: ReportData) -> list[tuple[str, Optional[str]]]: