solprop-gui 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- solprop_gui/__init__.py +24 -0
- solprop_gui/__main__.py +11 -0
- solprop_gui/app.py +67 -0
- solprop_gui/classes/__init__.py +9 -0
- solprop_gui/classes/catalog.py +854 -0
- solprop_gui/classes/problem.py +868 -0
- solprop_gui/classes/workflow.py +139 -0
- solprop_gui/help/__init__.py +7 -0
- solprop_gui/help/figures/antiresonant.svg +70 -0
- solprop_gui/help/figures/capillary-averaged.svg +63 -0
- solprop_gui/help/figures/capillary-modal.svg +65 -0
- solprop_gui/help/figures/cartesian.svg +164 -0
- solprop_gui/help/figures/gnlse.svg +64 -0
- solprop_gui/help/figures/grin.svg +63 -0
- solprop_gui/help/figures/line.svg +84 -0
- solprop_gui/help/figures/radial.svg +68 -0
- solprop_gui/help/figures/rectangular.svg +63 -0
- solprop_gui/help/figures/slab.svg +68 -0
- solprop_gui/help/figures/step-index.svg +63 -0
- solprop_gui/help/figures.py +106 -0
- solprop_gui/help/guide/analysis.md +96 -0
- solprop_gui/help/guide/classes.md +94 -0
- solprop_gui/help/guide/design.md +59 -0
- solprop_gui/help/guide/first-run.md +101 -0
- solprop_gui/help/guide/images/capillary-along.png +0 -0
- solprop_gui/help/guide/images/capillary-overview.png +0 -0
- solprop_gui/help/guide/images/capillary-plane.png +0 -0
- solprop_gui/help/guide/images/capillary-run.png +0 -0
- solprop_gui/help/guide/images/capillary-sheet.png +0 -0
- solprop_gui/help/guide/images/capillary-target.png +0 -0
- solprop_gui/help/guide/images/design.png +0 -0
- solprop_gui/help/guide/images/filament-overview.png +0 -0
- solprop_gui/help/guide/images/filament-sheet.png +0 -0
- solprop_gui/help/guide/images/home.png +0 -0
- solprop_gui/help/guide/images/plot-menu.png +0 -0
- solprop_gui/help/guide/images/scan.png +0 -0
- solprop_gui/help/guide/index.md +104 -0
- solprop_gui/help/guide/scans.md +55 -0
- solprop_gui/help/guide.py +48 -0
- solprop_gui/help/manual.py +199 -0
- solprop_gui/model/__init__.py +12 -0
- solprop_gui/model/compressor.py +407 -0
- solprop_gui/model/display.py +501 -0
- solprop_gui/model/plot_options.py +343 -0
- solprop_gui/model/quantities.py +179 -0
- solprop_gui/model/recipe.py +473 -0
- solprop_gui/model/scans.py +288 -0
- solprop_gui/model/snippets.py +118 -0
- solprop_gui/model/stats_layout.py +115 -0
- solprop_gui/model/values.py +195 -0
- solprop_gui/model/workspace.py +151 -0
- solprop_gui/py.typed +0 -0
- solprop_gui/registry/__init__.py +12 -0
- solprop_gui/registry/explore.py +481 -0
- solprop_gui/registry/pages.py +273 -0
- solprop_gui/registry/routes.py +450 -0
- solprop_gui/registry/units.py +135 -0
- solprop_gui/service/__init__.py +12 -0
- solprop_gui/service/beam.py +226 -0
- solprop_gui/service/beams.py +257 -0
- solprop_gui/service/client.py +398 -0
- solprop_gui/service/design.py +362 -0
- solprop_gui/service/figures.py +106 -0
- solprop_gui/service/handlers.py +709 -0
- solprop_gui/service/kernel.py +187 -0
- solprop_gui/service/messages.py +210 -0
- solprop_gui/service/outbox.py +139 -0
- solprop_gui/service/postprocess.py +513 -0
- solprop_gui/service/reduce.py +368 -0
- solprop_gui/service/remote.py +513 -0
- solprop_gui/service/results.py +951 -0
- solprop_gui/service/run.py +648 -0
- solprop_gui/service/scan_reductions.py +261 -0
- solprop_gui/service/server.py +501 -0
- solprop_gui/service/sheet.py +1023 -0
- solprop_gui/service/states.py +146 -0
- solprop_gui/service/waveguide.py +320 -0
- solprop_gui/service/worker.py +97 -0
- solprop_gui/ui/__init__.py +11 -0
- solprop_gui/ui/analyse.py +808 -0
- solprop_gui/ui/analysis.py +338 -0
- solprop_gui/ui/analysis_pages.py +2954 -0
- solprop_gui/ui/assets/chevron.svg +6 -0
- solprop_gui/ui/assets/fonts/IBMPlexSans-Medium.ttf +0 -0
- solprop_gui/ui/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
- solprop_gui/ui/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
- solprop_gui/ui/assets/fonts/LICENSE.txt +93 -0
- solprop_gui/ui/assets/icon/solprop-1024.png +0 -0
- solprop_gui/ui/assets/icon/solprop-128.png +0 -0
- solprop_gui/ui/assets/icon/solprop-16.png +0 -0
- solprop_gui/ui/assets/icon/solprop-24.png +0 -0
- solprop_gui/ui/assets/icon/solprop-256.png +0 -0
- solprop_gui/ui/assets/icon/solprop-32.png +0 -0
- solprop_gui/ui/assets/icon/solprop-48.png +0 -0
- solprop_gui/ui/assets/icon/solprop-512.png +0 -0
- solprop_gui/ui/assets/icon/solprop-64.png +0 -0
- solprop_gui/ui/assets/icon/solprop-compact.svg +19 -0
- solprop_gui/ui/assets/icon/solprop.svg +20 -0
- solprop_gui/ui/betas.py +245 -0
- solprop_gui/ui/bridge.py +258 -0
- solprop_gui/ui/design_stage.py +956 -0
- solprop_gui/ui/document.py +693 -0
- solprop_gui/ui/fields.py +812 -0
- solprop_gui/ui/help_window.py +214 -0
- solprop_gui/ui/home.py +291 -0
- solprop_gui/ui/icons.py +191 -0
- solprop_gui/ui/identity.py +230 -0
- solprop_gui/ui/launch.py +261 -0
- solprop_gui/ui/objects.py +530 -0
- solprop_gui/ui/pages.py +436 -0
- solprop_gui/ui/pin.py +286 -0
- solprop_gui/ui/plot_options.py +439 -0
- solprop_gui/ui/postprocess.py +532 -0
- solprop_gui/ui/quantity.py +532 -0
- solprop_gui/ui/results.py +482 -0
- solprop_gui/ui/run_options.py +179 -0
- solprop_gui/ui/run_panel.py +767 -0
- solprop_gui/ui/scan_editor.py +421 -0
- solprop_gui/ui/scan_stage.py +724 -0
- solprop_gui/ui/sheet.py +1371 -0
- solprop_gui/ui/theme.py +247 -0
- solprop_gui/ui/tile_art.py +146 -0
- solprop_gui/ui/workflow_window.py +1332 -0
- solprop_gui/views/__init__.py +11 -0
- solprop_gui/views/compare.py +114 -0
- solprop_gui/views/compression.py +146 -0
- solprop_gui/views/controls.py +211 -0
- solprop_gui/views/cross_section.py +124 -0
- solprop_gui/views/live.py +704 -0
- solprop_gui/views/page_plots.py +1073 -0
- solprop_gui/views/plane.py +650 -0
- solprop_gui/views/plotting.py +381 -0
- solprop_gui/views/scan_browser.py +149 -0
- solprop_gui/views/sparkline.py +131 -0
- solprop_gui/views/splitter.py +141 -0
- solprop_gui/views/statistics.py +501 -0
- solprop_gui-0.2.0.dist-info/METADATA +92 -0
- solprop_gui-0.2.0.dist-info/RECORD +143 -0
- solprop_gui-0.2.0.dist-info/WHEEL +4 -0
- solprop_gui-0.2.0.dist-info/entry_points.txt +2 -0
- solprop_gui-0.2.0.dist-info/licenses/LICENSE +674 -0
- solprop_gui-0.2.0.dist-info/licenses/LICENSE-CC-BY-4.0.txt +156 -0
- solprop_gui-0.2.0.dist-info/licenses/src/solprop_gui/ui/assets/fonts/LICENSE.txt +93 -0
solprop_gui/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 John C. Travers and contributors
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
|
|
5
|
+
"""A desktop front end for solprop.
|
|
6
|
+
|
|
7
|
+
The window sets up, runs and reads solprop simulations without Python, while every
|
|
8
|
+
setup can leave it as a recipe file or a script and every results file solprop writes
|
|
9
|
+
can be opened in it. solprop does the physics and the window none: every number shown
|
|
10
|
+
comes from a public solprop call, made in a separate process. The design is
|
|
11
|
+
``docs/dev/gui/design.md`` in the solprop repository.
|
|
12
|
+
|
|
13
|
+
The package's layers are ``model``, ``registry`` and ``service``, which import no
|
|
14
|
+
Qt, and ``ui``, ``views`` and ``help``, which build the window.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
18
|
+
|
|
19
|
+
__all__ = ["__version__"]
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
__version__: str = version("solprop-gui")
|
|
23
|
+
except PackageNotFoundError: # pragma: no cover - a tree never installed
|
|
24
|
+
__version__ = "0.0.0"
|
solprop_gui/__main__.py
ADDED
solprop_gui/app.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 John C. Travers and contributors
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
|
|
5
|
+
"""The ``solprop-gui`` command."""
|
|
6
|
+
|
|
7
|
+
import argparse
|
|
8
|
+
import sys
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
from solprop_gui import __version__
|
|
12
|
+
|
|
13
|
+
__all__ = ["main"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
17
|
+
"""Open the window and run until it closes.
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
argv : sequence of str or None, optional
|
|
22
|
+
The command-line arguments after the program name; ``None`` reads
|
|
23
|
+
``sys.argv``.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
int
|
|
28
|
+
The exit status: 0 when the window closed normally.
|
|
29
|
+
"""
|
|
30
|
+
parser = argparse.ArgumentParser(
|
|
31
|
+
prog="solprop-gui", description="A desktop front end for solprop."
|
|
32
|
+
)
|
|
33
|
+
parser.add_argument("--version", action="version", version=__version__)
|
|
34
|
+
# Accepted, and no longer needed: the workflow window is the only one.
|
|
35
|
+
parser.add_argument("--workflow", action="store_true", help=argparse.SUPPRESS)
|
|
36
|
+
options = parser.parse_args(argv)
|
|
37
|
+
|
|
38
|
+
# Qt is imported here, after the arguments: `--version` and `--help` answer without
|
|
39
|
+
# loading it.
|
|
40
|
+
from pyqtgraph.util.garbage_collector import ( # noqa: PLC0415 - see above
|
|
41
|
+
GarbageCollector,
|
|
42
|
+
)
|
|
43
|
+
from PySide6.QtWidgets import QApplication # noqa: PLC0415 - see above
|
|
44
|
+
|
|
45
|
+
from solprop_gui.ui.identity import ( # noqa: PLC0415 - see above
|
|
46
|
+
apply_identity,
|
|
47
|
+
set_windows_app_id,
|
|
48
|
+
)
|
|
49
|
+
from solprop_gui.ui.workflow_window import ( # noqa: PLC0415 - see above
|
|
50
|
+
WorkflowWindow,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# Before the first window, so that Windows shows this application's taskbar button.
|
|
54
|
+
set_windows_app_id()
|
|
55
|
+
application = QApplication.instance() or QApplication(sys.argv[:1])
|
|
56
|
+
apply_identity(application) # pyright: ignore[reportArgumentType]
|
|
57
|
+
del options
|
|
58
|
+
# Garbage is collected on a timer, between events, never by Python in the middle of
|
|
59
|
+
# one: a plot dropped while its scene still had an event queued was otherwise freed
|
|
60
|
+
# inside that event's handler, deleting the scene under Qt's feet.
|
|
61
|
+
collector = GarbageCollector(interval=1.0)
|
|
62
|
+
window = WorkflowWindow()
|
|
63
|
+
window.show()
|
|
64
|
+
try:
|
|
65
|
+
return application.exec()
|
|
66
|
+
finally:
|
|
67
|
+
collector.timer.stop()
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 John C. Travers and contributors
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
4
|
+
|
|
5
|
+
"""The problem classes: what each asks for, what it shows, and how a run moves on.
|
|
6
|
+
|
|
7
|
+
A class is a definition held as data (design 6.1), so a view never asks which class it
|
|
8
|
+
is drawing, and a new class is a new definition. Nothing here imports Qt.
|
|
9
|
+
"""
|