gratinglab 0.3.12__tar.gz → 0.3.14__tar.gz
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.
- {gratinglab-0.3.12/src/gratinglab.egg-info → gratinglab-0.3.14}/PKG-INFO +15 -6
- {gratinglab-0.3.12 → gratinglab-0.3.14}/README.md +14 -5
- {gratinglab-0.3.12 → gratinglab-0.3.14}/pyproject.toml +1 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/__init__.py +1 -1
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/app.py +23 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/launcher.py +16 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/geometry_panel.py +22 -0
- gratinglab-0.3.14/src/gratinglab/gui/qt/geometry_window.py +193 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/launcher.py +38 -20
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/main_window.py +11 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14/src/gratinglab.egg-info}/PKG-INFO +15 -6
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab.egg-info/SOURCES.txt +2 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab.egg-info/entry_points.txt +1 -0
- gratinglab-0.3.14/tests/test_gui_geometry_window.py +151 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_help_menu.py +4 -2
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_launcher.py +68 -42
- {gratinglab-0.3.12 → gratinglab-0.3.14}/LICENSE +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/MANIFEST.in +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/conventions.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/theory/cmethod.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/theory/integral.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/theory/metrology.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/theory/rcwa.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/docs/theory/scalar.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/setup.cfg +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/setup.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/checks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/compare.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/convergence.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/geometry.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/camera3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/cmethod_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/comparison.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/diagram.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/diagram3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/docs.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/efficiency_plot.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/failures.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/icon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/integral_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/orders.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/provenance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/compare_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/help_menu.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/integral_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/recent.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/setup_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/sizing.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/theming.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/qt/worker.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/rcwa_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/richtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/scalar_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/gui/theme.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/illumination.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/io/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/io/boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/io/efficiency_table.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/io/ggp.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/io/txl.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/data/SOURCES.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/fresnel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/optical.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/refractiveindex.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/materials/typical.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/measured.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/analyzer.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/boundary/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/boundary/average.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/boundary/swaths.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/cli.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/config.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/analysis.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/image_flatten.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/orientation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/processing.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/region_mask.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/scars.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/core/tip.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/data/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/data/aggregation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/icon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/app.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/gui/state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/file_io.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/ibw.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/metrics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/sem.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/io/spm.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/settings.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/stats/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/stats/analysis.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/stats/icc.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/visualization/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/visualization/profiles.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/visualization/statistics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/flattening.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/overview.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/metrology/workflows.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/problem.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/_base.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/_polyline.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/_shapes.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/_trapezoid.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/profiles/_types.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/resolution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/result.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/_conditioning.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/_execution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/_scalar_groove.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/base.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/cmethod/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/cmethod/_series.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_finite.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_greens.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_kernels.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/rcwa/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab/solvers/scalar.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab.egg-info/dependency_links.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab.egg-info/requires.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/src/gratinglab.egg-info/top_level.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_changelog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_checks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_cmethod.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_compare.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_conditioning.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_convergence.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_cross_method.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_efficiency_table.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_four_way.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_fresnel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_geometry.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_ggp.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_camera3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_cmethod_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_cmethod_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_compare_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_diagram.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_diagram3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_docs.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_integral_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_mathtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_orders.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_polish.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_provenance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_provenance_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_qt.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_rcwa_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_richtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_scalar_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_gui_theme.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_illumination.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_corpus.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_finite.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_graded.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_greens.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_kernels.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_measured_polygon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_operators.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_integral_solver.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_io_boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_littrow.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_materials.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_measured.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_perturbation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_profiles.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_rayleigh_anomaly.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_rcwa.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_rcwa_benchmarks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_refractiveindex.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_resolution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_result.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_scalar.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_solver_conformance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_solver_execution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_solver_progress.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_trapezoidal_solvers.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_txl.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.14}/tests/test_typical.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gratinglab
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Summary: Open platform for diffraction grating groove metrology and efficiency analysis
|
|
5
5
|
Author: Jake McCoy, Aditi Gangadharan
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -306,21 +306,30 @@ pipeline recovers the period and blaze angle used to generate it.
|
|
|
306
306
|
|
|
307
307
|
```bash
|
|
308
308
|
.venv/bin/python -m pip install -e ".[gui,metrology]"
|
|
309
|
-
gratinglab-app # the chooser: one place to start,
|
|
309
|
+
gratinglab-app # the chooser: one place to start, every window
|
|
310
310
|
gratinglab-gui # straight to geometry, solvers, comparison
|
|
311
|
+
gratinglab-geometry # straight to the geometry, with no solver
|
|
311
312
|
gratinglab-metrology-gui # straight to AFM import, blaze angles, boundary profiles
|
|
312
313
|
```
|
|
313
314
|
|
|
314
|
-
`gratinglab-app` opens a chooser for the
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
`gratinglab-app` opens a chooser for the three windows, which stays open as the main
|
|
316
|
+
menu while you work, as Gwiddion's toolbox does; closing it closes every window. Each
|
|
317
|
+
window has a **Go** menu that switches to another window or back to the chooser
|
|
318
|
+
(`Ctrl+Shift+M`). There is one window of each kind, so opening one that is already
|
|
319
|
+
open brings it forward. The chooser has the same
|
|
317
320
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
318
321
|
whole application, and the theory pages can be reached without opening a window
|
|
319
322
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
320
323
|
so the first window opens in about a fifth of a second; the matplotlib and scipy
|
|
321
|
-
imports otherwise take several seconds. `gratinglab-gui` and
|
|
324
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
322
325
|
`gratinglab-metrology-gui` open one window directly.
|
|
323
326
|
|
|
327
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
328
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
329
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
330
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
331
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
332
|
+
|
|
324
333
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
325
334
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
326
335
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -262,21 +262,30 @@ pipeline recovers the period and blaze angle used to generate it.
|
|
|
262
262
|
|
|
263
263
|
```bash
|
|
264
264
|
.venv/bin/python -m pip install -e ".[gui,metrology]"
|
|
265
|
-
gratinglab-app # the chooser: one place to start,
|
|
265
|
+
gratinglab-app # the chooser: one place to start, every window
|
|
266
266
|
gratinglab-gui # straight to geometry, solvers, comparison
|
|
267
|
+
gratinglab-geometry # straight to the geometry, with no solver
|
|
267
268
|
gratinglab-metrology-gui # straight to AFM import, blaze angles, boundary profiles
|
|
268
269
|
```
|
|
269
270
|
|
|
270
|
-
`gratinglab-app` opens a chooser for the
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
`gratinglab-app` opens a chooser for the three windows, which stays open as the main
|
|
272
|
+
menu while you work, as Gwiddion's toolbox does; closing it closes every window. Each
|
|
273
|
+
window has a **Go** menu that switches to another window or back to the chooser
|
|
274
|
+
(`Ctrl+Shift+M`). There is one window of each kind, so opening one that is already
|
|
275
|
+
open brings it forward. The chooser has the same
|
|
273
276
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
274
277
|
whole application, and the theory pages can be reached without opening a window
|
|
275
278
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
276
279
|
so the first window opens in about a fifth of a second; the matplotlib and scipy
|
|
277
|
-
imports otherwise take several seconds. `gratinglab-gui` and
|
|
280
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
278
281
|
`gratinglab-metrology-gui` open one window directly.
|
|
279
282
|
|
|
283
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
284
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
285
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
286
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
287
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
288
|
+
|
|
280
289
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
281
290
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
282
291
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -129,6 +129,7 @@ mut = ["mutmut>=3.2,<3.3"]
|
|
|
129
129
|
# unchanged, for a shortcut or a habit.
|
|
130
130
|
gratinglab-app = "gratinglab.gui.launcher:main"
|
|
131
131
|
gratinglab-gui = "gratinglab.gui.app:main"
|
|
132
|
+
gratinglab-geometry = "gratinglab.gui.app:geometry_main"
|
|
132
133
|
gratinglab-metrology-gui = "gratinglab.metrology.gui:main"
|
|
133
134
|
# The metrology CLI, carried over unchanged. It still takes no arguments and
|
|
134
135
|
# dispatches on `config.ANALYSIS_MODE`; reconciling that with the rest of the
|
|
@@ -22,7 +22,7 @@ from .measured import MeasuredEfficiency, MeasurementProvenance
|
|
|
22
22
|
from .resolution import ResolvingPower, resolving_power
|
|
23
23
|
from .result import EfficiencyScan, OrderEfficiency, Provenance
|
|
24
24
|
|
|
25
|
-
__version__ = "0.3.
|
|
25
|
+
__version__ = "0.3.14"
|
|
26
26
|
|
|
27
27
|
#: The day this version was released, ISO 8601. It sits beside the version
|
|
28
28
|
#: rather than being read from CHANGELOG.md at run time because the changelog
|
|
@@ -72,5 +72,28 @@ def main() -> int:
|
|
|
72
72
|
return app.exec()
|
|
73
73
|
|
|
74
74
|
|
|
75
|
+
def geometry_main() -> int:
|
|
76
|
+
"""Console-script entry point for ``gratinglab-geometry``.
|
|
77
|
+
|
|
78
|
+
The geometry window alone. Its "Send to efficiency window" opens the
|
|
79
|
+
efficiency window in the same process when it is used.
|
|
80
|
+
"""
|
|
81
|
+
QApplication = _require_qt()
|
|
82
|
+
from .qt.geometry_window import GeometryWindow
|
|
83
|
+
from .qt.launcher import open_window
|
|
84
|
+
from .launcher import mode
|
|
85
|
+
|
|
86
|
+
app = QApplication(sys.argv)
|
|
87
|
+
from .qt.theming import install
|
|
88
|
+
|
|
89
|
+
install(app)
|
|
90
|
+
# Through the launcher, so the window gets its Go menu and is the one
|
|
91
|
+
# the efficiency window's Go menu finds, as from the chooser.
|
|
92
|
+
window = open_window(mode("geometry"))
|
|
93
|
+
assert isinstance(window, GeometryWindow)
|
|
94
|
+
_bring_to_front(window)
|
|
95
|
+
return app.exec()
|
|
96
|
+
|
|
97
|
+
|
|
75
98
|
if __name__ == "__main__": # pragma: no cover
|
|
76
99
|
sys.exit(main())
|
|
@@ -70,6 +70,8 @@ class Mode:
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
#: The metrology window comes first because it is the half in regular use.
|
|
73
|
+
#: The geometry window sits between it and the efficiency window, in the
|
|
74
|
+
#: order the work goes.
|
|
73
75
|
#: Adding a third window is one entry here and nothing else: the chooser's
|
|
74
76
|
#: card and sentence, the Go menu and the Help submenu are all built from it.
|
|
75
77
|
MODES = (
|
|
@@ -84,6 +86,20 @@ MODES = (
|
|
|
84
86
|
summary="measure a grating's grooves from an AFM scan",
|
|
85
87
|
help="gratinglab.gui.docs:wiki_help_groups",
|
|
86
88
|
),
|
|
89
|
+
# Between the two: a groove measured in the first is looked at here, and
|
|
90
|
+
# a geometry settled here is sent on to the third. No help of its own,
|
|
91
|
+
# since its tab is the efficiency window's and so are the pages.
|
|
92
|
+
Mode(
|
|
93
|
+
key="geometry",
|
|
94
|
+
title="Explore a geometry",
|
|
95
|
+
blurb="Turn a grating and its beams over in 3D, with the "
|
|
96
|
+
"cross-section and every order's sin β, without solving "
|
|
97
|
+
"anything. Send the geometry to the efficiency window when "
|
|
98
|
+
"it is settled.",
|
|
99
|
+
window="gratinglab.gui.qt.geometry_window:GeometryWindow",
|
|
100
|
+
script="gratinglab-geometry",
|
|
101
|
+
summary="look at its geometry",
|
|
102
|
+
),
|
|
87
103
|
Mode(
|
|
88
104
|
key="efficiency",
|
|
89
105
|
title="Compute efficiency",
|
|
@@ -292,6 +292,28 @@ class GeometryPanel(QWidget):
|
|
|
292
292
|
def read_form(self) -> FormState:
|
|
293
293
|
return FormState(**{k: _value(w) for k, w in self._fields.items()})
|
|
294
294
|
|
|
295
|
+
def write_form(self, form: FormState) -> None:
|
|
296
|
+
"""Set every field from ``form``, as `read_form` would read it back.
|
|
297
|
+
|
|
298
|
+
The geometry window's "Send to efficiency window" calls this. It
|
|
299
|
+
emits `changed`, so the window redraws its geometry, and not
|
|
300
|
+
`solve_requested`: a geometry arriving from elsewhere is solved when
|
|
301
|
+
the user asks. A coating that is not installed here falls back to
|
|
302
|
+
"(none)", the same as `refresh_coatings` does.
|
|
303
|
+
"""
|
|
304
|
+
for key, value in dataclasses.asdict(form).items():
|
|
305
|
+
widget = self._fields[key]
|
|
306
|
+
if isinstance(widget, QComboBox):
|
|
307
|
+
index = widget.findData(value)
|
|
308
|
+
if index < 0:
|
|
309
|
+
index = widget.findText(value)
|
|
310
|
+
widget.setCurrentIndex(max(index, 0))
|
|
311
|
+
else:
|
|
312
|
+
widget.setText(value)
|
|
313
|
+
path = form.profile_path
|
|
314
|
+
self._path_label.setText(Path(path).name if path else "")
|
|
315
|
+
self.changed.emit()
|
|
316
|
+
|
|
295
317
|
def load_profile(self) -> None:
|
|
296
318
|
path, _ = QFileDialog.getOpenFileName(
|
|
297
319
|
self, "Load boundary profile", recent.start_in("profiles"),
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"""The geometry window: a grating to look at, with no solver attached.
|
|
2
|
+
|
|
3
|
+
The chooser's "Explore a geometry" card opens it. It holds the same geometry
|
|
4
|
+
form and the same Grating Geometry tab the efficiency window does, and
|
|
5
|
+
nothing else: no solver tab, no worker thread, no solve. So it is a
|
|
6
|
+
reference to turn a grating over in, and a place to settle a geometry before
|
|
7
|
+
spending a solve on it.
|
|
8
|
+
|
|
9
|
+
It owns its form. Editing here changes nothing in the efficiency window
|
|
10
|
+
until "Send to efficiency window" copies the form across, which is the one
|
|
11
|
+
link between the two and goes one way. The efficiency window keeps its own
|
|
12
|
+
Grating Geometry tab, drawn from its own form.
|
|
13
|
+
|
|
14
|
+
Reads and writes: the form, the tab, and the window layout in the settings
|
|
15
|
+
store under ``"geometry"``. Called by: :mod:`gratinglab.gui.qt.launcher`,
|
|
16
|
+
through the ``geometry`` entry in :data:`gratinglab.gui.launcher.MODES`.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from PySide6.QtCore import Qt, QTimer
|
|
22
|
+
from PySide6.QtGui import QKeySequence
|
|
23
|
+
from PySide6.QtWidgets import (
|
|
24
|
+
QApplication,
|
|
25
|
+
QDockWidget,
|
|
26
|
+
QMainWindow,
|
|
27
|
+
QMessageBox,
|
|
28
|
+
QPushButton,
|
|
29
|
+
QScrollArea,
|
|
30
|
+
QVBoxLayout,
|
|
31
|
+
QWidget,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
from ..state import build, validate
|
|
35
|
+
from . import recent, theming
|
|
36
|
+
from .geometry_panel import GeometryPanel
|
|
37
|
+
from .geometry_tab import GeometryTab
|
|
38
|
+
from .sizing import fit_width_to_contents
|
|
39
|
+
|
|
40
|
+
__all__ = ["GeometryWindow"]
|
|
41
|
+
|
|
42
|
+
#: The efficiency window's debounce, for the same reason: one redraw per
|
|
43
|
+
#: pause in typing, not one per keystroke.
|
|
44
|
+
_REDRAW_DEBOUNCE_MS = 120
|
|
45
|
+
|
|
46
|
+
#: The key the window layout is saved under, and this window's mode key.
|
|
47
|
+
_LAYOUT_KEY = "geometry"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class GeometryWindow(QMainWindow):
|
|
51
|
+
"""A geometry form and the drawings of it, with a way to the solvers."""
|
|
52
|
+
|
|
53
|
+
def __init__(self, parent: QWidget | None = None) -> None:
|
|
54
|
+
super().__init__(parent)
|
|
55
|
+
self.setWindowTitle("gratinglab: geometry")
|
|
56
|
+
self.resize(1180, 820)
|
|
57
|
+
# Before any widget exists, so every figure is born in the theme.
|
|
58
|
+
self._themes = theming.install(QApplication.instance())
|
|
59
|
+
|
|
60
|
+
self._redraw_timer = QTimer(self)
|
|
61
|
+
self._redraw_timer.setSingleShot(True)
|
|
62
|
+
self._redraw_timer.setInterval(_REDRAW_DEBOUNCE_MS)
|
|
63
|
+
self._redraw_timer.timeout.connect(self.refresh)
|
|
64
|
+
|
|
65
|
+
self._build_dock()
|
|
66
|
+
self.geometry_tab = GeometryTab()
|
|
67
|
+
self.setCentralWidget(self.geometry_tab)
|
|
68
|
+
self._build_menu()
|
|
69
|
+
recent.restore_layout(self, _LAYOUT_KEY)
|
|
70
|
+
self.refresh()
|
|
71
|
+
|
|
72
|
+
# -- construction ----------------------------------------------------
|
|
73
|
+
|
|
74
|
+
def _build_dock(self) -> None:
|
|
75
|
+
"""The form, with the send button under it, in a closable dock.
|
|
76
|
+
|
|
77
|
+
The efficiency window's dock, for its reasons: Ctrl+G hands the
|
|
78
|
+
whole width to the drawings. Enter in a field redraws at once, where
|
|
79
|
+
in the efficiency window it would solve, since a redraw is all there
|
|
80
|
+
is to do here.
|
|
81
|
+
"""
|
|
82
|
+
self.geometry = GeometryPanel()
|
|
83
|
+
self.geometry.solve_requested.connect(self.refresh)
|
|
84
|
+
self.geometry.changed.connect(self._redraw_timer.start)
|
|
85
|
+
|
|
86
|
+
self.send_button = QPushButton("Send to efficiency window")
|
|
87
|
+
self.send_button.setToolTip(
|
|
88
|
+
"Copy this geometry into the efficiency window's form, opening "
|
|
89
|
+
"the window if it is not open. Nothing is solved until you ask."
|
|
90
|
+
)
|
|
91
|
+
self.send_button.clicked.connect(self.send_to_efficiency)
|
|
92
|
+
|
|
93
|
+
column = QWidget()
|
|
94
|
+
layout = QVBoxLayout(column)
|
|
95
|
+
layout.setContentsMargins(0, 0, 0, 0)
|
|
96
|
+
layout.addWidget(self.geometry)
|
|
97
|
+
layout.addWidget(self.send_button)
|
|
98
|
+
|
|
99
|
+
scroller = QScrollArea()
|
|
100
|
+
scroller.setWidget(column)
|
|
101
|
+
scroller.setWidgetResizable(True)
|
|
102
|
+
scroller.setMinimumWidth(max(280, fit_width_to_contents(scroller)))
|
|
103
|
+
|
|
104
|
+
dock = self.geometry_dock = QDockWidget("Grating geometry", self)
|
|
105
|
+
dock.setObjectName("geometry_dock")
|
|
106
|
+
dock.setWidget(scroller)
|
|
107
|
+
dock.setFeatures(
|
|
108
|
+
QDockWidget.DockWidgetFeature.DockWidgetClosable
|
|
109
|
+
| QDockWidget.DockWidgetFeature.DockWidgetMovable
|
|
110
|
+
| QDockWidget.DockWidgetFeature.DockWidgetFloatable
|
|
111
|
+
)
|
|
112
|
+
dock.setAllowedAreas(
|
|
113
|
+
Qt.DockWidgetArea.LeftDockWidgetArea | Qt.DockWidgetArea.RightDockWidgetArea
|
|
114
|
+
)
|
|
115
|
+
self.addDockWidget(Qt.DockWidgetArea.LeftDockWidgetArea, dock)
|
|
116
|
+
self.resizeDocks([dock], [300], Qt.Orientation.Horizontal)
|
|
117
|
+
|
|
118
|
+
def _build_menu(self) -> None:
|
|
119
|
+
"""File, View and Help, each menu held on the window.
|
|
120
|
+
|
|
121
|
+
Held for the reason `main_window.MainWindow._build_menu` gives: under
|
|
122
|
+
PySide6 a QMenu reached back through the menu bar is not reliably
|
|
123
|
+
usable.
|
|
124
|
+
"""
|
|
125
|
+
from .help_menu import install_help_menu
|
|
126
|
+
|
|
127
|
+
self._menu_bar = self.menuBar()
|
|
128
|
+
|
|
129
|
+
self._file_menu = self._menu_bar.addMenu("&File")
|
|
130
|
+
load = self._file_menu.addAction("&Open boundary profile…")
|
|
131
|
+
load.setShortcut(QKeySequence.StandardKey.Open)
|
|
132
|
+
load.triggered.connect(self.geometry.load_profile)
|
|
133
|
+
send = self._file_menu.addAction("&Send to efficiency window")
|
|
134
|
+
send.setShortcut(QKeySequence("Ctrl+E"))
|
|
135
|
+
send.triggered.connect(self.send_to_efficiency)
|
|
136
|
+
self._file_actions = {"open": load, "send": send}
|
|
137
|
+
|
|
138
|
+
self._view_menu = self._menu_bar.addMenu("&View")
|
|
139
|
+
toggle = self.geometry_dock.toggleViewAction()
|
|
140
|
+
toggle.setText("&Geometry inputs")
|
|
141
|
+
toggle.setShortcut(QKeySequence("Ctrl+G"))
|
|
142
|
+
self._view_menu.addAction(toggle)
|
|
143
|
+
self._view_menu.addSeparator()
|
|
144
|
+
self._theme_menu = theming.ThemeMenu(self)
|
|
145
|
+
self._view_menu.addMenu(self._theme_menu)
|
|
146
|
+
|
|
147
|
+
self._help_menu = install_help_menu(self, self._menu_bar)
|
|
148
|
+
|
|
149
|
+
# -- actions ---------------------------------------------------------
|
|
150
|
+
|
|
151
|
+
def set_theme(self, choice: str) -> None:
|
|
152
|
+
"""Switch theme by key, or ``"system"``; the menu calls this."""
|
|
153
|
+
self._themes.set_choice(choice)
|
|
154
|
+
|
|
155
|
+
def refresh(self) -> None:
|
|
156
|
+
"""Redraw from the form, or keep the last drawing while it does not parse."""
|
|
157
|
+
form = self.geometry.read_form()
|
|
158
|
+
errors = validate(form)
|
|
159
|
+
if errors:
|
|
160
|
+
self.geometry_tab.show_pending(errors)
|
|
161
|
+
return
|
|
162
|
+
self.geometry_tab.show_geometry(build(form))
|
|
163
|
+
|
|
164
|
+
def send_to_efficiency(self):
|
|
165
|
+
"""Copy this geometry into the efficiency window, and return that window.
|
|
166
|
+
|
|
167
|
+
A form that does not parse is not sent: it would replace a working
|
|
168
|
+
geometry over there with one no solver can take. The window is the
|
|
169
|
+
one the Go menu opens, so sending never leaves two of them open.
|
|
170
|
+
"""
|
|
171
|
+
form = self.geometry.read_form()
|
|
172
|
+
errors = validate(form)
|
|
173
|
+
if errors:
|
|
174
|
+
QMessageBox.warning(
|
|
175
|
+
self,
|
|
176
|
+
"Geometry not sent",
|
|
177
|
+
"Fix the geometry before sending it:\n\n"
|
|
178
|
+
+ "\n".join(f"{e.field}: {e.message}" for e in errors),
|
|
179
|
+
)
|
|
180
|
+
return None
|
|
181
|
+
|
|
182
|
+
from ..launcher import mode
|
|
183
|
+
from .launcher import open_window
|
|
184
|
+
|
|
185
|
+
window = open_window(mode("efficiency"))
|
|
186
|
+
window.open_geometry(form)
|
|
187
|
+
return window
|
|
188
|
+
|
|
189
|
+
def closeEvent(self, event) -> None: # noqa: N802 - Qt's spelling
|
|
190
|
+
"""Save the layout, and stop a redraw from firing into a closed window."""
|
|
191
|
+
recent.save_layout(self, _LAYOUT_KEY)
|
|
192
|
+
self._redraw_timer.stop()
|
|
193
|
+
super().closeEvent(event)
|
|
@@ -6,10 +6,11 @@ window it opens (see :data:`_OPEN_WINDOWS`), and importing both windows off
|
|
|
6
6
|
the GUI thread while the chooser is on screen (see :func:`prewarm`, which
|
|
7
7
|
exists because the first open used to freeze the application).
|
|
8
8
|
|
|
9
|
-
It also carries the View and Help menus the
|
|
10
|
-
same code. The chooser is
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
It also carries the View and Help menus the windows carry, built by the
|
|
10
|
+
same code. The chooser is the main menu: it stays open while the windows it
|
|
11
|
+
opened are up, as Gwiddion's toolbox does, and closing it closes them all.
|
|
12
|
+
There is one window per mode, so a second click on a card raises the window
|
|
13
|
+
already open rather than opening another.
|
|
13
14
|
"""
|
|
14
15
|
|
|
15
16
|
from __future__ import annotations
|
|
@@ -57,14 +58,14 @@ SWITCH_MENU_TITLE = "&Go"
|
|
|
57
58
|
#:
|
|
58
59
|
#: A top-level Qt window with no Python reference is garbage collected and
|
|
59
60
|
#: vanishes a moment after it appears, which reads as "the button did nothing".
|
|
60
|
-
#: The list
|
|
61
|
-
#:
|
|
61
|
+
#: The list is not on the chooser, because a window opened from a Go menu,
|
|
62
|
+
#: in a session started by a direct script, has no chooser to hold it.
|
|
62
63
|
_OPEN_WINDOWS: list[QWidget] = []
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
#: The chooser, kept so that "Main Menu" shows the same one rather than a
|
|
66
67
|
#: second copy. Closing a window does not destroy it while a reference is
|
|
67
|
-
#: held, so this one can be shown again after it closed
|
|
68
|
+
#: held, so this one can be shown again after it was closed.
|
|
68
69
|
_CHOOSER: list = []
|
|
69
70
|
|
|
70
71
|
#: The background import started by :func:`prewarm`, at most one per process.
|
|
@@ -234,14 +235,14 @@ def _either(items):
|
|
|
234
235
|
|
|
235
236
|
|
|
236
237
|
class LauncherWindow(QWidget):
|
|
237
|
-
"""
|
|
238
|
+
"""A button and a sentence per window, so none of them can be missed.
|
|
238
239
|
|
|
239
|
-
It carries the same View and Help menus the
|
|
240
|
-
is
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
It carries the same View and Help menus the windows do, since the theme
|
|
241
|
+
is a setting for the whole application and not for whichever window
|
|
242
|
+
happens to be open.
|
|
243
|
+
|
|
244
|
+
It is the main menu, and stays open while windows are: see `choose` and
|
|
245
|
+
`closeEvent`.
|
|
245
246
|
|
|
246
247
|
A plain ``QWidget`` has no ``menuBar()``, so the bar is built here and put
|
|
247
248
|
at the top of the layout. `install_help_menu` takes one for exactly this
|
|
@@ -339,11 +340,28 @@ class LauncherWindow(QWidget):
|
|
|
339
340
|
return frame
|
|
340
341
|
|
|
341
342
|
def choose(self, chosen):
|
|
342
|
-
"""Open a mode's window,
|
|
343
|
+
"""Open a mode's window, or raise it if it is open, and stay open.
|
|
343
344
|
|
|
344
|
-
|
|
345
|
-
|
|
345
|
+
The main menu stays up so it is where any window is reopened from,
|
|
346
|
+
as Gwiddion's toolbox is. A window covering it is brought back with
|
|
347
|
+
Go > Main Menu.
|
|
346
348
|
"""
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
return open_window(chosen)
|
|
350
|
+
|
|
351
|
+
def closeEvent(self, event): # noqa: N802 - Qt's spelling
|
|
352
|
+
"""Closing the main menu closes every window it opened.
|
|
353
|
+
|
|
354
|
+
Each window gets its own close, so it saves its layout and stops a
|
|
355
|
+
job in flight as it would if closed by hand. A window that refuses
|
|
356
|
+
keeps the main menu open too, so the menu is never gone while a
|
|
357
|
+
window is still up. Nothing calls quit: once the last window is
|
|
358
|
+
closed, Qt's quit-on-last-window ends the application, which also
|
|
359
|
+
leaves a test's other widgets alone.
|
|
360
|
+
"""
|
|
361
|
+
for window in list(_OPEN_WINDOWS):
|
|
362
|
+
if not shiboken6.isValid(window) or not window.isVisible():
|
|
363
|
+
continue
|
|
364
|
+
if not window.close():
|
|
365
|
+
event.ignore()
|
|
366
|
+
return
|
|
367
|
+
super().closeEvent(event)
|
|
@@ -349,6 +349,17 @@ class MainWindow(QMainWindow):
|
|
|
349
349
|
if not self.geometry_dock.isVisible():
|
|
350
350
|
self.geometry_dock.show()
|
|
351
351
|
|
|
352
|
+
def open_geometry(self, form) -> None:
|
|
353
|
+
"""Take a whole geometry form, as the geometry window sends it.
|
|
354
|
+
|
|
355
|
+
The form is copied in and drawn, and nothing is solved: which solver
|
|
356
|
+
to spend time on is the user's choice, and the integral one takes
|
|
357
|
+
minutes.
|
|
358
|
+
"""
|
|
359
|
+
self.geometry.write_form(form)
|
|
360
|
+
if not self.geometry_dock.isVisible():
|
|
361
|
+
self.geometry_dock.show()
|
|
362
|
+
|
|
352
363
|
def _geometry_edited(self) -> None:
|
|
353
364
|
"""Schedule a redraw after a field was edited, without solving.
|
|
354
365
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gratinglab
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Summary: Open platform for diffraction grating groove metrology and efficiency analysis
|
|
5
5
|
Author: Jake McCoy, Aditi Gangadharan
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -306,21 +306,30 @@ pipeline recovers the period and blaze angle used to generate it.
|
|
|
306
306
|
|
|
307
307
|
```bash
|
|
308
308
|
.venv/bin/python -m pip install -e ".[gui,metrology]"
|
|
309
|
-
gratinglab-app # the chooser: one place to start,
|
|
309
|
+
gratinglab-app # the chooser: one place to start, every window
|
|
310
310
|
gratinglab-gui # straight to geometry, solvers, comparison
|
|
311
|
+
gratinglab-geometry # straight to the geometry, with no solver
|
|
311
312
|
gratinglab-metrology-gui # straight to AFM import, blaze angles, boundary profiles
|
|
312
313
|
```
|
|
313
314
|
|
|
314
|
-
`gratinglab-app` opens a chooser for the
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
`gratinglab-app` opens a chooser for the three windows, which stays open as the main
|
|
316
|
+
menu while you work, as Gwiddion's toolbox does; closing it closes every window. Each
|
|
317
|
+
window has a **Go** menu that switches to another window or back to the chooser
|
|
318
|
+
(`Ctrl+Shift+M`). There is one window of each kind, so opening one that is already
|
|
319
|
+
open brings it forward. The chooser has the same
|
|
317
320
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
318
321
|
whole application, and the theory pages can be reached without opening a window
|
|
319
322
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
320
323
|
so the first window opens in about a fifth of a second; the matplotlib and scipy
|
|
321
|
-
imports otherwise take several seconds. `gratinglab-gui` and
|
|
324
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
322
325
|
`gratinglab-metrology-gui` open one window directly.
|
|
323
326
|
|
|
327
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
328
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
329
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
330
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
331
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
332
|
+
|
|
324
333
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
325
334
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
326
335
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -50,6 +50,7 @@ src/gratinglab/gui/qt/cmethod_tab.py
|
|
|
50
50
|
src/gratinglab/gui/qt/compare_tab.py
|
|
51
51
|
src/gratinglab/gui/qt/geometry_panel.py
|
|
52
52
|
src/gratinglab/gui/qt/geometry_tab.py
|
|
53
|
+
src/gratinglab/gui/qt/geometry_window.py
|
|
53
54
|
src/gratinglab/gui/qt/help_menu.py
|
|
54
55
|
src/gratinglab/gui/qt/integral_tab.py
|
|
55
56
|
src/gratinglab/gui/qt/launcher.py
|
|
@@ -181,6 +182,7 @@ tests/test_gui_compare_tab.py
|
|
|
181
182
|
tests/test_gui_diagram.py
|
|
182
183
|
tests/test_gui_diagram3d.py
|
|
183
184
|
tests/test_gui_docs.py
|
|
185
|
+
tests/test_gui_geometry_window.py
|
|
184
186
|
tests/test_gui_help_menu.py
|
|
185
187
|
tests/test_gui_integral_options.py
|
|
186
188
|
tests/test_gui_launcher.py
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
2
|
gratinglab-app = gratinglab.gui.launcher:main
|
|
3
|
+
gratinglab-geometry = gratinglab.gui.app:geometry_main
|
|
3
4
|
gratinglab-gui = gratinglab.gui.app:main
|
|
4
5
|
gratinglab-metrology = gratinglab.metrology.cli:main
|
|
5
6
|
gratinglab-metrology-gui = gratinglab.metrology.gui:main
|