main
John Lauer
Preserve board29, component assets and scaffold-fit correction candidate with reviewed footage
c54169e
"""Scientific diagnostic figure from saved Fields reports, never a gate override."""
import json
from pathlib import Path
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
root=Path(__file__).resolve().parents[1]
base=json.loads((root/'checkpoints/unclipped-hotspots-v1/fields-v27-annular-0p1/fields.json').read_text());new=json.loads((root/'checkpoints/unclipped-hotspots-v1/fields-v77-current-0p1/fields.json').read_text())
keys=['GND','LOAD_POS','SHUNT_P'];a={n['net']:n['peakJ'] for n in base['nets']};b={n['net']:n['peakJ'] for n in new['nets']}
plt.rcParams.update({'font.size':15,'text.color':'#e6edf3','axes.labelcolor':'#e6edf3','xtick.color':'#c1ccd8','ytick.color':'#c1ccd8'})
fig,ax=plt.subplots(figsize=(16,9),facecolor='#101820');ax.set_facecolor('#101820')
x=list(range(3));ax.bar([i-.19 for i in x],[a[k] for k in keys],.36,color='#d58b50',label='Candidate v27');ax.bar([i+.19 for i in x],[b[k] for k in keys],.36,color='#56a6cf',label='Candidate v77')
for i,k in enumerate(keys):
for off,value in [(-.19,a[k]),(.19,b[k])]:ax.text(i+off,value+1,f'{value:.1f}',ha='center',fontsize=18)
ax.axhline(60,color='#fa7180',linewidth=2,linestyle='--',label='Unchanged screen: 60 A/mm²');ax.set_xticks(x,keys);ax.set_ylim(0,110);ax.set_ylabel('Unclipped modeled maximum (A/mm²)');ax.grid(axis='y',alpha=.15);ax.set_axisbelow(True)
for spine in ax.spines.values():spine.set_color('#465360')
legend=ax.legend(loc='upper right',frameon=False,fontsize=13)
for t in legend.get_texts():t.set_color('#e6edf3')
fig.suptitle('Current screen passes; cooling review continues',fontsize=25,y=.94)
fig.text(.1,.065,'0.1 mm mesh · nominal 35 µm copper · 3 A main-path screen · all three main nets below 60\nLive board unchanged. Q1 land-pattern variant and cooling acceptance remain open.',fontsize=13,color='#bec9d3')
fig.subplots_adjust(top=.84,bottom=.19,left=.1,right=.95)
fig.savefig(root/'design/step12-hotspot-progress.png',dpi=120,facecolor=fig.get_facecolor())