PyTracerLab.gui.controller module¶
Qt controller that builds the model and runs simulations/solvers.
- class PyTracerLab.gui.controller.Controller(*args: Any, **kwargs: Any)[source]¶
Bases:
PyQt5.QtCore.QObjectBridge between GUI state and the computational model.
Orchestrates model construction from GUI state, runs simulations and calibrations, and emits signals with results or errors.
Signals¶
- simulatedobject
Emitted after a forward simulation; carries a NumPy array.
- calibratedobject
Emitted after calibration; carries a payload
dictwith simulation and optional envelopes/metadata.- statusstr
Short user-facing status messages.
- errorstr
Error messages suitable for display.
- build_model()[source]¶
Construct a
Modelfrom current state.Creates per-instance units (including bounds and fixed flags) based on the detailed design in
state.design_instancesand the per-instance parameters instate.params.
- calibrate()[source]¶
Run the selected solver and emit a standardized payload.
The solver is chosen from
state.solver_keyand configured usingstate.solver_params.