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.QObject

Bridge 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 dict with simulation and optional envelopes/metadata.

statusstr

Short user-facing status messages.

errorstr

Error messages suitable for display.

build_model()[source]

Construct a Model from current state.

Creates per-instance units (including bounds and fixed flags) based on the detailed design in state.design_instances and the per-instance parameters in state.params.

calibrate()[source]

Run the selected solver and emit a standardized payload.

The solver is chosen from state.solver_key and configured using state.solver_params.

calibrated

alias of object

error

alias of str

plot_ttd()[source]

Plot the travel time distribution and emit the figure.

run_tracer_tracer(start: float, stop: float, count: int, param_key: str) None[source]

Sweep mean travel time values and emit tracer-tracer results.

save_data(filename)[source]

Save simulation data to filename using current state.

simulate()[source]

Run a forward simulation and emit the result via simulated.

simulated

alias of object

status

alias of str

tracer_tracer_ready

alias of object

write_report(filename)[source]

Write a plain-text model report to filename using current state.