gratinglab 0.3.12__tar.gz → 0.3.13__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.13}/PKG-INFO +12 -5
- {gratinglab-0.3.12 → gratinglab-0.3.13}/README.md +11 -4
- {gratinglab-0.3.12 → gratinglab-0.3.13}/pyproject.toml +1 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/__init__.py +1 -1
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/app.py +23 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/launcher.py +16 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/geometry_panel.py +22 -0
- gratinglab-0.3.13/src/gratinglab/gui/qt/geometry_window.py +193 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/main_window.py +11 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13/src/gratinglab.egg-info}/PKG-INFO +12 -5
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab.egg-info/SOURCES.txt +2 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab.egg-info/entry_points.txt +1 -0
- gratinglab-0.3.13/tests/test_gui_geometry_window.py +151 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_help_menu.py +4 -2
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_launcher.py +9 -7
- {gratinglab-0.3.12 → gratinglab-0.3.13}/LICENSE +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/MANIFEST.in +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/conventions.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/theory/cmethod.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/theory/integral.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/theory/metrology.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/theory/rcwa.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/docs/theory/scalar.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/setup.cfg +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/setup.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/checks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/compare.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/convergence.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/geometry.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/camera3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/cmethod_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/comparison.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/diagram.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/diagram3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/docs.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/efficiency_plot.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/failures.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/icon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/integral_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/orders.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/provenance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/compare_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/help_menu.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/integral_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/launcher.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/recent.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/setup_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/sizing.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/theming.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/qt/worker.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/rcwa_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/richtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/scalar_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/gui/theme.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/illumination.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/io/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/io/boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/io/efficiency_table.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/io/ggp.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/io/txl.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/data/SOURCES.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/fresnel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/optical.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/refractiveindex.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/materials/typical.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/measured.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/analyzer.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/boundary/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/boundary/average.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/boundary/swaths.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/cli.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/config.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/analysis.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/image_flatten.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/orientation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/processing.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/region_mask.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/scars.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/core/tip.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/data/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/data/aggregation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/icon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/app.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/gui/state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/file_io.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/ibw.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/metrics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/sem.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/io/spm.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/settings.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/stats/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/stats/analysis.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/stats/icc.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/visualization/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/visualization/profiles.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/visualization/statistics.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/flattening.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/overview.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/metrology/workflows.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/problem.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/_base.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/_polyline.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/_shapes.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/_trapezoid.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/profiles/_types.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/resolution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/result.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/_conditioning.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/_execution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/_scalar_groove.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/base.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/cmethod/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/cmethod/_series.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_finite.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_greens.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_kernels.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/rcwa/_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab/solvers/scalar.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab.egg-info/dependency_links.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab.egg-info/requires.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/src/gratinglab.egg-info/top_level.txt +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_changelog.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_checks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_cmethod.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_compare.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_conditioning.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_convergence.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_cross_method.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_efficiency_table.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_four_way.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_fresnel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_geometry.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_ggp.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_camera3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_cmethod_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_cmethod_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_compare_tab.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_diagram.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_diagram3d.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_docs.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_integral_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_mathtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_orders.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_polish.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_provenance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_provenance_panel.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_qt.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_rcwa_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_richtext.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_scalar_options.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_state.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_gui_theme.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_illumination.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_core.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_corpus.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_finite.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_graded.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_greens.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_kernels.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_measured_polygon.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_operators.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_integral_solver.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_io_boundary.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_littrow.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_materials.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_measured.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_perturbation.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_profiles.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_rayleigh_anomaly.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_rcwa.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_rcwa_benchmarks.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_refractiveindex.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_resolution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_result.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_scalar.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_solver_conformance.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_solver_execution.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_solver_progress.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_trapezoidal_solvers.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/tests/test_txl.py +0 -0
- {gratinglab-0.3.12 → gratinglab-0.3.13}/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.13
|
|
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,28 @@ 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
|
-
that switches to
|
|
315
|
+
`gratinglab-app` opens a chooser for the three windows. Each window has a **Go** menu
|
|
316
|
+
that switches to another window or back to the chooser (`Ctrl+Shift+M`), and
|
|
316
317
|
switching reuses a window that is already open. The chooser has the same
|
|
317
318
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
318
319
|
whole application, and the theory pages can be reached without opening a window
|
|
319
320
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
320
321
|
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
|
|
322
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
322
323
|
`gratinglab-metrology-gui` open one window directly.
|
|
323
324
|
|
|
325
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
326
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
327
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
328
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
329
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
330
|
+
|
|
324
331
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
325
332
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
326
333
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -262,21 +262,28 @@ 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
|
-
that switches to
|
|
271
|
+
`gratinglab-app` opens a chooser for the three windows. Each window has a **Go** menu
|
|
272
|
+
that switches to another window or back to the chooser (`Ctrl+Shift+M`), and
|
|
272
273
|
switching reuses a window that is already open. The chooser has the same
|
|
273
274
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
274
275
|
whole application, and the theory pages can be reached without opening a window
|
|
275
276
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
276
277
|
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
|
|
278
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
278
279
|
`gratinglab-metrology-gui` open one window directly.
|
|
279
280
|
|
|
281
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
282
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
283
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
284
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
285
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
286
|
+
|
|
280
287
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
281
288
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
282
289
|
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.13"
|
|
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)
|
|
@@ -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.13
|
|
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,28 @@ 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
|
-
that switches to
|
|
315
|
+
`gratinglab-app` opens a chooser for the three windows. Each window has a **Go** menu
|
|
316
|
+
that switches to another window or back to the chooser (`Ctrl+Shift+M`), and
|
|
316
317
|
switching reuses a window that is already open. The chooser has the same
|
|
317
318
|
**View → Theme** and **Help** menus as the windows, so the theme, which applies to the
|
|
318
319
|
whole application, and the theory pages can be reached without opening a window
|
|
319
320
|
first. While the chooser is on screen it imports both windows on a background thread,
|
|
320
321
|
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
|
|
322
|
+
imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
|
|
322
323
|
`gratinglab-metrology-gui` open one window directly.
|
|
323
324
|
|
|
325
|
+
The geometry window (**Explore a geometry**) is the efficiency window's geometry form
|
|
326
|
+
and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
|
|
327
|
+
ladder, redrawn as the form changes, with no solver. **Send to efficiency window**
|
|
328
|
+
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
329
|
+
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
330
|
+
|
|
324
331
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
325
332
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
326
333
|
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
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"""The geometry window: a grating drawn from its own form, with no solver.
|
|
2
|
+
|
|
3
|
+
What it promises, and what each test holds it to: it draws without solving,
|
|
4
|
+
it keeps its last drawing through a half-typed field, and "Send to
|
|
5
|
+
efficiency window" copies the whole form into the one efficiency window
|
|
6
|
+
without solving there either. The form copy is checked field by field,
|
|
7
|
+
because a field `write_form` forgot would arrive as the efficiency window's
|
|
8
|
+
old value and look correct.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import dataclasses
|
|
12
|
+
|
|
13
|
+
import pytest
|
|
14
|
+
|
|
15
|
+
pytest.importorskip(
|
|
16
|
+
"PySide6", reason='Qt not installed; pip install -e ".[dev,gui]"'
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
from gratinglab.gui.launcher import mode # noqa: E402
|
|
20
|
+
from gratinglab.gui.qt import launcher as qt_launcher # noqa: E402
|
|
21
|
+
from gratinglab.gui.state import FormState # noqa: E402
|
|
22
|
+
|
|
23
|
+
#: Every field away from its default, so a field left unwritten shows.
|
|
24
|
+
#: The coating stays empty: the repository ships no optical constants.
|
|
25
|
+
CHANGED = FormState(
|
|
26
|
+
period="400",
|
|
27
|
+
profile_kind="Sinusoidal",
|
|
28
|
+
blaze_angle="12",
|
|
29
|
+
antiblaze_angle="60",
|
|
30
|
+
depth_fraction="0.2",
|
|
31
|
+
duty_cycle="0.4",
|
|
32
|
+
profile_path="",
|
|
33
|
+
mount="Classical",
|
|
34
|
+
alpha="10",
|
|
35
|
+
gamma="2.5",
|
|
36
|
+
wavelength_start="2",
|
|
37
|
+
wavelength_stop="6",
|
|
38
|
+
wavelength_count="40",
|
|
39
|
+
coating="",
|
|
40
|
+
roughness="0.5",
|
|
41
|
+
layers="",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@pytest.fixture(autouse=True)
|
|
46
|
+
def _no_leaked_windows():
|
|
47
|
+
"""Empty the launcher's registry around each test; see test_gui_launcher."""
|
|
48
|
+
import shiboken6
|
|
49
|
+
|
|
50
|
+
qt_launcher._OPEN_WINDOWS.clear()
|
|
51
|
+
yield
|
|
52
|
+
for window in list(qt_launcher._OPEN_WINDOWS):
|
|
53
|
+
if shiboken6.isValid(window):
|
|
54
|
+
window.close()
|
|
55
|
+
qt_launcher._OPEN_WINDOWS.clear()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@pytest.fixture
|
|
59
|
+
def window(qtbot):
|
|
60
|
+
window = qt_launcher.open_window(mode("geometry"))
|
|
61
|
+
qtbot.addWidget(window)
|
|
62
|
+
return window
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _period(window):
|
|
66
|
+
return window.geometry_tab._parsed.problem.period
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@pytest.mark.gui
|
|
70
|
+
class TestTheWindow:
|
|
71
|
+
def test_it_is_the_geometry_mode_and_draws_at_once(self, window):
|
|
72
|
+
from gratinglab.gui.qt.geometry_window import GeometryWindow
|
|
73
|
+
|
|
74
|
+
assert isinstance(window, GeometryWindow)
|
|
75
|
+
assert window._gratinglab_mode == "geometry"
|
|
76
|
+
assert window.geometry_tab._parsed is not None, "nothing drawn on opening"
|
|
77
|
+
|
|
78
|
+
def test_it_has_no_solver(self, window):
|
|
79
|
+
assert not hasattr(window, "solve")
|
|
80
|
+
assert not hasattr(window, "tabs")
|
|
81
|
+
|
|
82
|
+
def test_enter_redraws(self, window):
|
|
83
|
+
before = _period(window)
|
|
84
|
+
field = window.geometry._fields["period"]
|
|
85
|
+
field.setText("400")
|
|
86
|
+
field.returnPressed.emit()
|
|
87
|
+
assert _period(window) != before
|
|
88
|
+
assert _period(window) == pytest.approx(before * 400 / 315.15)
|
|
89
|
+
|
|
90
|
+
def test_a_half_typed_field_keeps_the_drawing(self, window):
|
|
91
|
+
before = window.geometry_tab._parsed
|
|
92
|
+
window.geometry._fields["period"].setText("-")
|
|
93
|
+
window.refresh()
|
|
94
|
+
assert window.geometry_tab._parsed is before
|
|
95
|
+
|
|
96
|
+
def test_the_go_menu_reaches_the_efficiency_window(self, window):
|
|
97
|
+
titles = [a.text() for a in window._gratinglab_switch_actions]
|
|
98
|
+
assert "Compute efficiency" in titles
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@pytest.mark.gui
|
|
102
|
+
class TestTheFormRoundTrip:
|
|
103
|
+
def test_write_form_sets_every_field(self, window):
|
|
104
|
+
window.geometry.write_form(CHANGED)
|
|
105
|
+
assert window.geometry.read_form() == CHANGED
|
|
106
|
+
|
|
107
|
+
def test_every_field_differs_from_its_default_but_coating_and_paths(self):
|
|
108
|
+
"""Otherwise the round trip above could pass by writing nothing."""
|
|
109
|
+
default = FormState()
|
|
110
|
+
same = {f.name for f in dataclasses.fields(FormState)
|
|
111
|
+
if getattr(default, f.name) == getattr(CHANGED, f.name)}
|
|
112
|
+
assert same <= {"coating", "profile_path", "layers"}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@pytest.mark.gui
|
|
116
|
+
class TestSending:
|
|
117
|
+
def test_it_copies_the_form_and_solves_nothing(self, qtbot, window):
|
|
118
|
+
efficiency = qt_launcher.open_window(mode("efficiency"))
|
|
119
|
+
qtbot.addWidget(efficiency)
|
|
120
|
+
with qtbot.waitSignal(efficiency.solved, timeout=60_000):
|
|
121
|
+
pass # the solve its constructor starts
|
|
122
|
+
|
|
123
|
+
window.geometry.write_form(CHANGED)
|
|
124
|
+
solves = []
|
|
125
|
+
efficiency.solved.connect(lambda: solves.append(True))
|
|
126
|
+
sent = window.send_to_efficiency()
|
|
127
|
+
|
|
128
|
+
assert sent is efficiency, "the open efficiency window is reused"
|
|
129
|
+
assert efficiency.geometry.read_form() == CHANGED
|
|
130
|
+
qtbot.wait(300)
|
|
131
|
+
assert not solves, "sending must not start a solve"
|
|
132
|
+
assert len(qt_launcher._OPEN_WINDOWS) == 2
|
|
133
|
+
|
|
134
|
+
def test_it_opens_the_efficiency_window_when_none_is_open(self, qtbot, window):
|
|
135
|
+
window.geometry.write_form(CHANGED)
|
|
136
|
+
sent = window.send_to_efficiency()
|
|
137
|
+
qtbot.addWidget(sent)
|
|
138
|
+
assert sent._gratinglab_mode == "efficiency"
|
|
139
|
+
assert sent.geometry.read_form() == CHANGED
|
|
140
|
+
|
|
141
|
+
def test_a_form_that_does_not_parse_is_not_sent(self, window, monkeypatch):
|
|
142
|
+
from PySide6.QtWidgets import QMessageBox
|
|
143
|
+
|
|
144
|
+
warned = []
|
|
145
|
+
monkeypatch.setattr(QMessageBox, "warning",
|
|
146
|
+
lambda *args, **kwargs: warned.append(args))
|
|
147
|
+
window.geometry._fields["period"].setText("-")
|
|
148
|
+
|
|
149
|
+
assert window.send_to_efficiency() is None
|
|
150
|
+
assert warned, "the refusal must say why"
|
|
151
|
+
assert qt_launcher.window_for(mode("efficiency")) is None
|
|
@@ -82,9 +82,11 @@ class TestEveryWindowOffersIt:
|
|
|
82
82
|
from gratinglab.gui.launcher import MODES
|
|
83
83
|
|
|
84
84
|
sections = window._gratinglab_help_sections
|
|
85
|
-
|
|
85
|
+
# A window with no pages of its own, like the geometry window,
|
|
86
|
+
# adds no section.
|
|
87
|
+
assert list(sections) == [m.key for m in MODES if m.help]
|
|
86
88
|
submenus = [a.menu() for a in window._help_menu.actions() if a.menu()]
|
|
87
|
-
assert [m.title() for m in submenus] == [menu_label(m.title) for m in MODES]
|
|
89
|
+
assert [m.title() for m in submenus] == [menu_label(m.title) for m in MODES if m.help]
|
|
88
90
|
|
|
89
91
|
def test_the_metrology_wiki_is_in_help_too(self, window):
|
|
90
92
|
"""It was only in the AFM window's Wiki tab, so the efficiency window
|
|
@@ -26,8 +26,9 @@ class TestTheModeTable:
|
|
|
26
26
|
|
|
27
27
|
def test_both_halves_are_offered(self):
|
|
28
28
|
keys = [m.key for m in MODES]
|
|
29
|
-
assert keys == ['metrology', 'efficiency'], (
|
|
30
|
-
"the metrology window comes first, being the half in regular use"
|
|
29
|
+
assert keys == ['metrology', 'geometry', 'efficiency'], (
|
|
30
|
+
"the metrology window comes first, being the half in regular use; "
|
|
31
|
+
"the geometry window sits between it and the solvers")
|
|
31
32
|
|
|
32
33
|
def test_every_mode_is_fully_described(self):
|
|
33
34
|
for chosen in MODES:
|
|
@@ -226,10 +227,10 @@ class TestTheChooser:
|
|
|
226
227
|
window = qt_launcher.LauncherWindow()
|
|
227
228
|
qtbot.addWidget(window)
|
|
228
229
|
shown = ' '.join(label.text() for label in window.findChildren(QLabel))
|
|
229
|
-
assert ("Measure a grating's grooves from an AFM scan
|
|
230
|
-
"diffraction efficiency.") in shown
|
|
230
|
+
assert ("Measure a grating's grooves from an AFM scan, look at its "
|
|
231
|
+
"geometry, or compute its diffraction efficiency.") in shown
|
|
231
232
|
|
|
232
|
-
def
|
|
233
|
+
def test_another_window_joins_the_wording(self, qtbot, monkeypatch):
|
|
233
234
|
"""No sentence on the chooser may assume there are two windows."""
|
|
234
235
|
from PySide6.QtWidgets import QLabel
|
|
235
236
|
|
|
@@ -242,8 +243,9 @@ class TestTheChooser:
|
|
|
242
243
|
window = qt_launcher.LauncherWindow()
|
|
243
244
|
qtbot.addWidget(window)
|
|
244
245
|
shown = ' '.join(label.text() for label in window.findChildren(QLabel))
|
|
245
|
-
assert ("Measure a grating's grooves from an AFM scan,
|
|
246
|
-
"diffraction efficiency, or plan how to
|
|
246
|
+
assert ("Measure a grating's grooves from an AFM scan, look at its "
|
|
247
|
+
"geometry, compute its diffraction efficiency, or plan how to "
|
|
248
|
+
"rule it.") in shown
|
|
247
249
|
assert 'another window' in shown and 'the other window' not in shown
|
|
248
250
|
assert '<code>gratinglab-fab</code>' in shown
|
|
249
251
|
|
|
File without changes
|