Repository navigation
V1.3.0 graphical interface - #54
Merged
Merged
Conversation
…registries (refs #18) - thunder4d.gui: PySide6 main window built from the PANELS registry, Session shared between panels - registry.py (Qt-free): PANELS, PLOTS (offered when the results hold their keys), METRICS (live values) - thunder4d-gui [input.json] / python -m thunder4d.gui; without the extra it says how to install it - [gui] extra (PySide6-Essentials + matplotlib); PySide6 and pytest-qt in the dev group - GUI tests offscreen; Qt system libraries installed in the tests workflow
- inputfile: FIELDS (how each key is shown and edited; a test checks every key has one), input_problems (problems by key, used by check_input), describe_input (eigenmode, grid, P/Pcr, mirror fluence in milliseconds) - gui.fields: one editor per kind of field (EDITORS), CSV/text import and table dialog - gui.panels.builder: form generated from FIELDS, live checks and summary, open/save of the standard input file; only a valid input is published to the session
- gui.panels.design: laser (datasheet presets), target, limits and search space edited through DESIGN_FIELDS; screen + refine in the background with Fast 1+1D or analytic estimates, Stop; ranked designs with their report, design map around the selected one, save as JSON; "Use in simulation builder" exports it with design.to_input and switches tab - gui.worker.Task: background thread relaying prints, result, errors and cancellation - gui.plotting.FigureWidget: matplotlib figure with its toolbar - fields: float_list and multichoice editors; Session.show_panel to switch tabs
- simulation: history["peak_intensity"] (max of |E|^2 at the cell centre, W/m^2) with a test - gui.panels.run: runs the builder's input pass by pass in the background, progress and ETA, Stop after the current pass (results saved), live values and curves of registry.METRICS, spectrum input vs now, log; the saved results are published to the session - gui.metrics: built-in live metrics (energy, B, peak power, peak intensity, mode content, M2) - gui.results: Results (arrays of a saved run + its path), load_results - main window asks panels with can_close() before quitting (unsaved input, running computation)
- gui.panels.results: figures of registry.PLOTS that the run can draw (PlotSpec.requires), grouped, pass selector for per-pass figures, export of the figure (PNG/PDF/SVG) and of its data (NPZ/CSV), open any saved .npz; a failing figure is reported in the panel - gui.plots: transmission and B, peak power and intensity, caustic (centre and mirrors), beam quality, fluence on the mirrors, spectra versus pass, output and compressed pulse, fluence map, (x, lambda) and (theta, lambda) spectrograms, mode content per colour - gui.results: grid rebuilt from the saved run (same compressed pulse as the live grid) - simulation.save: mirror_scale, so the mirror records of the lens-frame solver can be converted to physical units from the file alone (test: the saved mirror spot is the eigenmode w_mirror)
- docs: page "Graphical interface" (install, launch, tutorial from a laser to a compressed pulse, files, extending the interface through its registries), API page thunder4d.gui, links from the index, how-to-run, extending and the README - docs/gui_screenshots.py regenerates the tutorial screenshots offscreen - results viewer: compressed pulse drawn on an 8x oversampled time axis (coarse grids)
- simulation.resume: checkpoints written before a history key existed resume (key filled with None); wall_s keeps counting from the checkpoint - gui.worker: per-thread stdout instead of redirect_stdout, so tasks running together keep their own log and the real stdout is restored - gui.plots: oversampled compressed pulse only on small grids (43 s -> 2 s on a benchmark-size grid) - builder: asks before an input from another panel replaces unsaved edits; that input counts as unsaved - run panel: an error in a pass still saves the passes done; the input label reads the current session - design panel: incomplete ranges, empty required fields and no gas are flagged before the search - benchmarks: peak intensity read from history["peak_intensity"] (old checkpoints: I_peak), no subclass - one _jsonable (inputfile) reused by the design helper and the benchmarks; input_duration_s and PEAK_POWER_FACTOR shared by make_grid and describe_input; unused backend.gpu_error removed
- cell.match(power) needs its wavelength (no silent 1030 nm default); nonlinear_mode(P, lam) - builder: no question when switching designs without manual edits - gui.worker: prints are dropped when there is no console (pythonw) - tests: compressed pulse on large grids, match wavelength, no-console task - README rewritten (acronym, install, example, validation table); shorter package description - documentation restructured: index, quickstart, user guide (simulation, lens frame, design helper, accuracy), GUI, development; old pages removed, API and benchmark pages kept; every guide snippet runs - roadmap: v1.3.0 done; version 1.3.0
This was
linked to
issues
Nov 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Graphical interface for v1.3.0:
pip install "thunder4d[gui]", thenthunder4d-gui(PySide6, optional, the core never imports Qt). Four tabs, from left to right: design helper, simulation builder, run, results. Everything is saved as the standard input file and.npzresults, so a GUI session can be rerun from a script.Changes to the core:
history["peak_intensity"](W/m², cell centre); the benchmarks use it instead of their own subclass.sim.save()writesmirror_scale: the mirror records of the lens frame are in frame units, the file alone could not convert them.resume()accepts checkpoints written before a history key existed.inputfile:FIELDS,input_problems()anddescribe_input()(quick checks in milliseconds).cell.match(power)now needslam=(it silently used 1030 nm);nonlinear_mode(P, lam)too. Every call in the repo already passed it.Docs and README rewritten shorter (quickstart, user guide, GUI, development); every snippet of the guide runs. Roadmap: v1.3.0 done, version 1.3.0. The tests workflow now installs the Qt libraries for the offscreen GUI tests: this PR is their first CI run.
Closes #18 #19 #20 #21 #22 #23