updates
This commit is contained in:
@@ -811,10 +811,11 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
|
||||
if hs_bursts:
|
||||
s, e, _ = hs_bursts[0]
|
||||
burst_volts = volts[s:e]
|
||||
hs_amplitude_mv = round(
|
||||
(float(np.percentile(burst_volts, 95)) -
|
||||
float(np.percentile(burst_volts, 5))) / 2 * 1000, 1
|
||||
)
|
||||
if len(burst_volts) >= 2:
|
||||
hs_amplitude_mv = round(
|
||||
(float(np.percentile(burst_volts, 95)) -
|
||||
float(np.percentile(burst_volts, 5))) / 2 * 1000, 1
|
||||
)
|
||||
|
||||
# ── Warnings ─────────────────────────────────────────────────────────
|
||||
warnings = []
|
||||
@@ -842,27 +843,34 @@ def analyze_lp_file(path: Path) -> "LPMetrics":
|
||||
warnings.append("No HS bursts detected after LP transition")
|
||||
|
||||
# Flicker suspect: either the LP-low plateau is absent/short, OR the HS burst
|
||||
# amplitude is too low (indicating the HS burst never actually started).
|
||||
# amplitude is too low. Two confirmed failure modes on this hardware:
|
||||
#
|
||||
# The second condition catches the confirmed failure mode on this hardware:
|
||||
# LP-11 → LP-01/LP-00 preamble (normal ~342 ns) → bridge misses SoT
|
||||
# → driver returns to LP-11 without entering HS mode
|
||||
# → burst window is DC LP-11, hs_amplitude ≈ 15–30 mV (vs normal 105–122 mV).
|
||||
# In this case lp_low_duration_ns = ~342 ns (above threshold), so the LP-low
|
||||
# check alone produces a false negative.
|
||||
# A) Normal LP-low (~342–380 ns) → bridge misses SoT → returns to LP-11
|
||||
# Signature: lp11_to_hs fires at real LP-low end (~347 ns), hs_amplitude ≈ 15–30 mV.
|
||||
# Guard: lp11_to_hs >= LP_LOW_DUR_MIN_NS prevents DC-content false positives
|
||||
# where the ~3 ns noise spike fires the gate but HS IS present.
|
||||
#
|
||||
# B) Short LP-low (50–200 ns, vs nominal ~342–380 ns) → marginal SoT timing
|
||||
# → HS burst starts but is weak, hs_amplitude ≈ 40–60 mV (vs normal 100–122 mV).
|
||||
# Signature: lp_low anomalously short, lp11_to_hs fires at noise spike (~3 ns).
|
||||
# The lp11_to_hs guard cannot be used here (noise spike looks the same as mode A
|
||||
# false positives), so LP-low duration itself gates the amplitude check.
|
||||
# Confirmed example: capture 0120 (lp_low=108 ns, lp11_to_hs=1.7 ns, amp=49 mV).
|
||||
#
|
||||
# Only flag DAT lane (CLK is continuous HS — LP states not expected).
|
||||
# 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.
|
||||
_lp_low_short = (
|
||||
lp_low_duration_ns is not None
|
||||
and lp_low_duration_ns < 200.0 # below this, LP-low is anomalously brief
|
||||
)
|
||||
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
|
||||
and (
|
||||
# Mode A: LP-low normal, HS never started (rolling-std confirms it)
|
||||
(lp11_to_hs_ns is not None and lp11_to_hs_ns >= LP_LOW_DUR_MIN_NS)
|
||||
# Mode B: LP-low anomalously short + low amplitude = marginal HS launch
|
||||
or _lp_low_short
|
||||
)
|
||||
)
|
||||
flicker_suspect = (
|
||||
channel == "dat"
|
||||
|
||||
Reference in New Issue
Block a user