regimes figure: sensor/workspace/motor shading restored (rule-derived, matches original hand-shaded bands)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,20 @@ for ax, (title, ptfile, key) in zip(axes, PANELS):
|
||||
band = REG.get(key, {}).get("workspace_band")
|
||||
if band:
|
||||
ax.axvspan(band[0], band[1], color="#2f855a", alpha=0.10)
|
||||
ax.text(sum(band) / 2, 0.51, "workspace", color="#2f855a",
|
||||
fontsize=7, ha="center")
|
||||
# sensor regime: contiguous pre-band region where the sensor
|
||||
# readout dominates (rule reproduces the hand-shaded E2B bands)
|
||||
sens = [i for i, (s, m) in enumerate(zip(sensor, motor))
|
||||
if s > m and s >= 0.05 and i < band[0]]
|
||||
if sens:
|
||||
ax.axvspan(min(sens), max(sens) + 1, color="#2b6cb0", alpha=0.08)
|
||||
ax.text((min(sens) + max(sens) + 1) / 2, 0.51, "sensor",
|
||||
color="#2b6cb0", fontsize=7, ha="center")
|
||||
if band[1] + 1 < L - 1:
|
||||
ax.axvspan(band[1] + 1, L - 1, color="#c53030", alpha=0.08)
|
||||
ax.text((band[1] + L) / 2, 0.51, "motor", color="#c53030",
|
||||
fontsize=7, ha="center")
|
||||
kv = REG.get(key, {}).get("kv_share_start")
|
||||
if isinstance(kv, int):
|
||||
ax.axvline(kv, color="#c53030", lw=0.9, ls=":")
|
||||
|
||||
Reference in New Issue
Block a user