"""Original ESR functional diagram; run from _media to create matching CWD PNG. Tested with Python 3.14.4, Matplotlib 3.10.7 and NumPy 2.3.5. No device geometry or measured performance is represented. """ from pathlib import Path import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.patches import FancyArrowPatch, FancyBboxPatch, Polygon, Rectangle def main(): plt.rcParams.update({"font.family": "DejaVu Sans", "font.size": 11}) fig, ax = plt.subplots(figsize=(10, 5.9), dpi=120, facecolor="white") fig.subplots_adjust(left=0.025, right=0.975, bottom=0.045, top=0.90) ax.set(xlim=(0, 10), ylim=(0, 5.4)) ax.axis("off") blue, orange, green, ink = "#186d9b", "#c76c1c", "#197b61", "#243745" def arrow(start, end, color=ink, style="-", width=1.8): ax.add_patch(FancyArrowPatch(start, end, arrowstyle="-|>", mutation_scale=13, lw=width, color=color, linestyle=style)) def box(x, y, w, h, label, fill="#f2f6f8", color=ink): ax.add_patch(FancyBboxPatch((x, y), w, h, boxstyle="round,pad=0.04,rounding_size=0.08", lw=1.5, edgecolor=color, facecolor=fill)) ax.text(x + w / 2, y + h / 2, label, ha="center", va="center", color=ink) fig.suptitle("Electrical substitution: light replaces heater power", fontsize=16, color=ink, y=0.97) ax.add_patch(Rectangle((1.8, 2.65), 6.0, 2.45, facecolor="#fafbfc", edgecolor="#9daeb9", linestyle="--", lw=1.2)) ax.text(5.0, 4.92, "Vacuum enclosure / cold radiation shield", ha="center", color="#5a6b78", fontsize=10) # Original schematic cavity cross-section, open at left; not a source drawing. cavity = [(2.4, 4.5), (4.5, 4.5), (4.5, 2.95), (2.4, 2.95), (2.4, 3.15), (4.2, 3.15), (4.2, 4.30), (2.4, 4.30)] ax.add_patch(Polygon(cavity, facecolor="#b8cad4", edgecolor=ink, lw=1.5)) ax.text(3.35, 4.04, "Absorbing cavity", ha="center", color=ink) ax.text(3.35, 3.69, r"$T=T_{\mathrm{set}}$", ha="center", color=ink) ax.text(3.35, 3.24, r"Deposited light: $aP_{\mathrm{in}}$", ha="center", color=blue, fontsize=10) arrow((0.15, 3.46), (4.04, 3.46), blue, width=2.5) ax.text(0.08, 4.10, "Incident light", color=blue) ax.text(0.08, 3.82, r"$P_{\mathrm{in}}$ at entrance", color=blue, fontsize=10) ax.plot([1.23, 1.23], [3.15, 3.72], lw=4, color=ink) ax.text(1.18, 2.81, "Shutter", ha="center", color=ink, fontsize=10) arrow((2.76, 4.34), (1.94, 4.60), blue, style="--", width=1.3) ax.text(0.03, 4.63, "Unabsorbed light escapes", color=blue, fontsize=9) # Intentional link and its outward heat flow. ax.plot([4.5, 6.22], [3.54, 3.54], color=green, lw=7, solid_capstyle="butt") arrow((4.78, 4.04), (5.94, 4.04), green) ax.text(5.36, 4.28, r"$Q_{\mathrm{out}}$", ha="center", color=green) ax.text(5.35, 3.17, "Weak thermal link", ha="center", color=green, fontsize=10) box(6.27, 3.01, 1.21, 1.47, "Reference\nblock\n" + r"$T_b