This commit is contained in:
david rice
2026-04-16 12:08:00 +01:00
parent 6dd4bb8aeb
commit 2659d7a664
5 changed files with 153 additions and 9 deletions

View File

@@ -678,11 +678,12 @@ class LPMetrics:
if self.flicker_suspect:
if (self.hs_amplitude_mv is not None
and self.hs_amplitude_mv < HS_BURST_AMPLITUDE_MIN_MV
and (self.lp_low_duration_ns is None
or self.lp_low_duration_ns >= FLICKER_LP_LOW_MAX_NS)):
and self.lp11_to_hs_ns is not None
and self.lp11_to_hs_ns >= LP_LOW_DUR_MIN_NS):
lines.append(
f" *** FLICKER SUSPECT: HS burst absent "
f"(amplitude {self.hs_amplitude_mv:.0f} mV < {HS_BURST_AMPLITUDE_MIN_MV:.0f} mV) ***"
f"(amplitude {self.hs_amplitude_mv:.0f} mV < {HS_BURST_AMPLITUDE_MIN_MV:.0f} mV, "
f"lp11_to_hs={self.lp11_to_hs_ns:.0f} ns) ***"
)
else:
lines.append(
@@ -851,12 +852,17 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
# check alone produces a false negative.
#
# Only flag DAT lane (CLK is continuous HS — LP states not expected).
# NOTE: lp11_to_hs_ns is NOT used here — on this hardware a consistent noise spike
# at LP-11 exit causes the rolling-std gate to fire at ~3 ns for every capture,
# making it indistinguishable from a genuine flicker (2.8 ns confirmed flicker).
# Guard: require lp11_to_hs_ns >= LP_LOW_DUR_MIN_NS to rule out the consistent
# ~3 ns noise spike at LP-11 exit. On good captures the rolling-std gate fires
# at ~3 ns (hardware artifact); on confirmed flicker it fires at ~347 ns (real
# LP-low completes, then HS never starts → bridge returns to LP-11).
# Without this guard, DC-like HS data (uniform display content) produces low
# amplitude on otherwise good captures and causes false positives.
hs_burst_absent = (
hs_amplitude_mv is not None
and hs_amplitude_mv < HS_BURST_AMPLITUDE_MIN_MV
and lp11_to_hs_ns is not None
and lp11_to_hs_ns >= LP_LOW_DUR_MIN_NS
)
flicker_suspect = (
channel == "dat"