lumopt2.utils.panels#

Reusable panels for lumopt2.utils.graphical_visualizer.GraphicalVisualizer.

A panel is a small, self-contained widget that owns one matplotlib subplot and knows how to render its slice of the optimization figure. The GraphicalVisualizer lays panels out in a grid and dispatches the standard setup / update / on_optimization_end lifecycle calls to each one, so users can compose figures from any combination of built-in panels (FOM, gradient norm, geometry, monitor data) and custom Panel subclasses they write themselves.

Classes#

Panel([title])

Abstract base class for a single subplot in a GraphicalVisualizer.

PanelState(iteration, iterations, ...)

Immutable per-update snapshot handed to every panel's update call.

FomPanel([title, show_best, log_y, color, ...])

Live plot of the figure of merit vs.

GeometryPanel([title, parametrization, ...])

Live plot of the current geometry on top of the initial baseline.

GradientNormPanel([title, auto_log, color, ...])

Live plot of the gradient L2 norm vs.

MonitorPanel([title, monitor_name, ...])

Live plot of an FDTD monitor result (field component, S-parameter, ...).