gratinglab 0.3.11__tar.gz → 0.3.12__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.11/src/gratinglab.egg-info → gratinglab-0.3.12}/PKG-INFO +8 -7
- {gratinglab-0.3.11 → gratinglab-0.3.12}/README.md +5 -4
- {gratinglab-0.3.11 → gratinglab-0.3.12}/pyproject.toml +2 -2
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/__init__.py +1 -1
- gratinglab-0.3.12/src/gratinglab/gui/camera3d.py +209 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/diagram3d.py +12 -7
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/cmethod_tab.py +12 -13
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/compare_tab.py +12 -13
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/geometry_tab.py +5 -1
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/integral_tab.py +12 -13
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/main_window.py +3 -29
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/profile_plot_panel.py +5 -1
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/rcwa_tab.py +12 -13
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/scalar_tab.py +19 -21
- gratinglab-0.3.12/src/gratinglab/gui/qt/scene3d_panel.py +537 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12/src/gratinglab.egg-info}/PKG-INFO +8 -7
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab.egg-info/SOURCES.txt +2 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab.egg-info/requires.txt +2 -2
- gratinglab-0.3.12/tests/test_gui_camera3d.py +147 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_qt.py +128 -84
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_theme.py +40 -0
- gratinglab-0.3.11/src/gratinglab/gui/qt/scene3d_panel.py +0 -406
- {gratinglab-0.3.11 → gratinglab-0.3.12}/LICENSE +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/MANIFEST.in +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/conventions.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/theory/cmethod.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/theory/integral.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/theory/metrology.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/theory/rcwa.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/docs/theory/scalar.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/setup.cfg +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/setup.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/checks.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/compare.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/convergence.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/geometry.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/app.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/cmethod_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/comparison.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/diagram.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/docs.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/efficiency_plot.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/failures.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/icon.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/integral_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/launcher.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/orders.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/provenance.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/geometry_panel.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/help_menu.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/launcher.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/recent.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/setup_tab.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/sizing.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/theming.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/qt/worker.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/rcwa_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/richtext.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/scalar_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/state.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/gui/theme.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/illumination.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/io/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/io/boundary.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/io/efficiency_table.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/io/ggp.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/io/txl.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/data/SOURCES.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/fresnel.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/optical.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/refractiveindex.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/materials/typical.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/measured.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/analyzer.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/boundary/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/boundary/average.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/boundary/swaths.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/cli.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/config.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/analysis.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/image_flatten.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/orientation.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/processing.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/region_mask.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/scars.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/core/tip.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/data/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/data/aggregation.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/icon.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/app.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/gui/state.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/file_io.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/ibw.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/metrics.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/sem.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/io/spm.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/settings.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/stats/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/stats/analysis.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/stats/icc.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/visualization/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/visualization/profiles.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/visualization/statistics.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/flattening.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/overview.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/metrology/workflows.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/problem.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/_base.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/_polyline.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/_shapes.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/_trapezoid.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/profiles/_types.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/resolution.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/result.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/_conditioning.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/_execution.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/_scalar_groove.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/base.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/cmethod/_core.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/cmethod/_series.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_boundary.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_core.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_finite.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_greens.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_kernels.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/rcwa/_core.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab/solvers/scalar.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab.egg-info/dependency_links.txt +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab.egg-info/entry_points.txt +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/src/gratinglab.egg-info/top_level.txt +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_changelog.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_checks.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_cmethod.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_compare.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_conditioning.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_convergence.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_cross_method.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_efficiency_table.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_four_way.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_fresnel.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_geometry.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_ggp.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_cmethod_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_cmethod_tab.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_compare_tab.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_diagram.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_diagram3d.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_docs.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_help_menu.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_integral_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_launcher.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_mathtext.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_orders.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_polish.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_provenance.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_provenance_panel.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_rcwa_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_richtext.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_scalar_options.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_gui_state.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_illumination.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_core.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_corpus.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_finite.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_graded.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_greens.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_kernels.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_measured_polygon.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_operators.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_integral_solver.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_io_boundary.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_littrow.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_materials.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_measured.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_perturbation.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_profiles.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_rayleigh_anomaly.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_rcwa.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_rcwa_benchmarks.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_refractiveindex.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_resolution.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_result.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_scalar.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_solver_conformance.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_solver_execution.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_solver_progress.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_trapezoidal_solvers.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/tests/test_txl.py +0 -0
- {gratinglab-0.3.11 → gratinglab-0.3.12}/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.12
|
|
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
|
|
@@ -21,7 +21,7 @@ License-File: LICENSE
|
|
|
21
21
|
Requires-Dist: numpy>=1.26
|
|
22
22
|
Requires-Dist: scipy>=1.11
|
|
23
23
|
Requires-Dist: pydantic>=2.6
|
|
24
|
-
Requires-Dist: endstation>=0.
|
|
24
|
+
Requires-Dist: endstation>=0.7.1
|
|
25
25
|
Requires-Dist: threadpoolctl>=3.1
|
|
26
26
|
Provides-Extra: dev
|
|
27
27
|
Requires-Dist: pytest>=9.2; extra == "dev"
|
|
@@ -33,7 +33,7 @@ Provides-Extra: gui
|
|
|
33
33
|
Requires-Dist: matplotlib>=3.8; extra == "gui"
|
|
34
34
|
Requires-Dist: PySide6-Essentials!=6.12.0,>=6.7; python_version < "3.12" and extra == "gui"
|
|
35
35
|
Requires-Dist: PySide6-Essentials>=6.7; python_version >= "3.12" and extra == "gui"
|
|
36
|
-
Requires-Dist: endstation[qt]>=0.
|
|
36
|
+
Requires-Dist: endstation[qt]>=0.7.1; extra == "gui"
|
|
37
37
|
Provides-Extra: metrology
|
|
38
38
|
Requires-Dist: matplotlib>=3.9; extra == "metrology"
|
|
39
39
|
Provides-Extra: refractiveindex
|
|
@@ -331,10 +331,11 @@ hides it), and the window has one tab for each task:
|
|
|
331
331
|
- **Grating Geometry:** a rotatable 3D view of the diffraction cone, in which every wave
|
|
332
332
|
vector is drawn as an exact unit vector. In the reference off-plane geometry the
|
|
333
333
|
orders separate in azimuth rather than in polar angle (93.8° of azimuthal spread at
|
|
334
|
-
0.0° of polar spread), so the view looking down the cone axis,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
0.0° of polar spread), so the view looking down the cone axis, zoomed to the cone rim,
|
|
335
|
+
makes them distinguishable at true scale. The grazing angle γ is not exaggerated: the
|
|
336
|
+
view is orthographic and every zoom, pan and roll is uniform, so every angle in it
|
|
337
|
+
stays true, and the magnification is stated beside it. Drag to orbit, Shift+drag to
|
|
338
|
+
pan, Alt+drag to roll, and the wheel zooms about the cursor. Alongside it are the cross-section in the dispersion plane, a
|
|
338
339
|
`sin β` diagram that includes the evanescent orders, and the groove profile. The view
|
|
339
340
|
updates as values are typed.
|
|
340
341
|
- **Scalar (Kirchhoff):** the scalar solution, the efficiency of each order with
|
|
@@ -287,10 +287,11 @@ hides it), and the window has one tab for each task:
|
|
|
287
287
|
- **Grating Geometry:** a rotatable 3D view of the diffraction cone, in which every wave
|
|
288
288
|
vector is drawn as an exact unit vector. In the reference off-plane geometry the
|
|
289
289
|
orders separate in azimuth rather than in polar angle (93.8° of azimuthal spread at
|
|
290
|
-
0.0° of polar spread), so the view looking down the cone axis,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
0.0° of polar spread), so the view looking down the cone axis, zoomed to the cone rim,
|
|
291
|
+
makes them distinguishable at true scale. The grazing angle γ is not exaggerated: the
|
|
292
|
+
view is orthographic and every zoom, pan and roll is uniform, so every angle in it
|
|
293
|
+
stays true, and the magnification is stated beside it. Drag to orbit, Shift+drag to
|
|
294
|
+
pan, Alt+drag to roll, and the wheel zooms about the cursor. Alongside it are the cross-section in the dispersion plane, a
|
|
294
295
|
`sin β` diagram that includes the evanescent orders, and the groove profile. The view
|
|
295
296
|
updates as values are typed.
|
|
296
297
|
- **Scalar (Kirchhoff):** the scalar solution, the efficiency of each order with
|
|
@@ -54,7 +54,7 @@ dependencies = [
|
|
|
54
54
|
# `dependencies = []` and has a test that fails if that stops being true,
|
|
55
55
|
# so this line adds no transitive weight -- the Qt and matplotlib parts sit
|
|
56
56
|
# behind its own extras, which our `gui` extra asks for by name.
|
|
57
|
-
"endstation>=0.
|
|
57
|
+
"endstation>=0.7.1",
|
|
58
58
|
# The rigorous solvers cap BLAS threads for the length of a solve
|
|
59
59
|
# (solvers/_execution.py): OpenBLAS's thread-per-core default made RCWA
|
|
60
60
|
# up to 135x slower on a busy machine, measured in benchmarks/
|
|
@@ -101,7 +101,7 @@ gui = [
|
|
|
101
101
|
"matplotlib>=3.8",
|
|
102
102
|
"PySide6-Essentials>=6.7,!=6.12.0; python_version < '3.12'",
|
|
103
103
|
"PySide6-Essentials>=6.7; python_version >= '3.12'",
|
|
104
|
-
"endstation[qt]>=0.
|
|
104
|
+
"endstation[qt]>=0.7.1",
|
|
105
105
|
]
|
|
106
106
|
# Groove metrology: reading AFM scans and averaging them into a boundary
|
|
107
107
|
# profile. An extra for the same reason the GUI is one -- `pip install
|
|
@@ -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.12"
|
|
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
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
r"""The camera for the painted 3D view, without a GUI toolkit.
|
|
2
|
+
|
|
3
|
+
:mod:`gratinglab.gui.diagram3d` decides what is in the scene; this module
|
|
4
|
+
decides only where it lands on the screen; :mod:`gratinglab.gui.qt.scene3d_panel`
|
|
5
|
+
paints it. Nothing here reads physics: the one geometric input is the cone's
|
|
6
|
+
half-angle, which places the rim the view can zoom to.
|
|
7
|
+
|
|
8
|
+
The projection is **orthographic**, and every change of framing is a uniform
|
|
9
|
+
scale plus a translation (a similarity transform), so every angle in the
|
|
10
|
+
picture is the true angle in the plane of the screen at any zoom. That is
|
|
11
|
+
the property the matplotlib view protected by refusing to zoom at all; with
|
|
12
|
+
its own camera the view can zoom and keep it.
|
|
13
|
+
|
|
14
|
+
Frames and names
|
|
15
|
+
================
|
|
16
|
+
|
|
17
|
+
The world is the physical :math:`(\hat{d}, \hat{n}, -\hat{g})` frame of
|
|
18
|
+
``conventions.md`` §3: x across the grooves, y the grating normal, z along the
|
|
19
|
+
cone axis. No permutation is needed, because this camera keeps y up by
|
|
20
|
+
choosing its own basis, unlike `Axes3D`, which always draws its z upward.
|
|
21
|
+
|
|
22
|
+
- ``yaw``, ``pitch``: the orbit, in degrees. The eye sits at
|
|
23
|
+
:math:`(\sin y \cos p,\ \sin p,\ \cos y \cos p)` and looks at the origin.
|
|
24
|
+
- ``roll``: the viewer's twist about the line of sight, in degrees. It moves
|
|
25
|
+
nothing physical and is what lets the fan of orders lie level on screen.
|
|
26
|
+
- ``zoom``, ``pan``: the user's free transform on top of the fitted frame.
|
|
27
|
+
- ``rim``: 0 frames the whole scene, 1 frames the cone rim, and the scale
|
|
28
|
+
between them goes as ``magnification ** rim`` so the slider feels even.
|
|
29
|
+
|
|
30
|
+
Called by the panel on every paint; the tests drive it directly.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
from __future__ import annotations
|
|
34
|
+
|
|
35
|
+
from dataclasses import dataclass, replace
|
|
36
|
+
|
|
37
|
+
import numpy as np
|
|
38
|
+
from numpy.typing import NDArray
|
|
39
|
+
|
|
40
|
+
__all__ = [
|
|
41
|
+
"PITCH_LIMIT",
|
|
42
|
+
"MIN_ZOOM",
|
|
43
|
+
"MAX_ZOOM",
|
|
44
|
+
"RIM_FILL",
|
|
45
|
+
"Camera",
|
|
46
|
+
"Frame",
|
|
47
|
+
"basis",
|
|
48
|
+
"orbit_for",
|
|
49
|
+
"fit",
|
|
50
|
+
"project",
|
|
51
|
+
"zoom_about",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
#: The orbit stops short of the poles, where "up" stops being defined. 89.5°
|
|
55
|
+
#: is close enough that the face-on preset reads as face-on.
|
|
56
|
+
PITCH_LIMIT = 89.5
|
|
57
|
+
#: The user's zoom, as a multiple of the fitted frame.
|
|
58
|
+
MIN_ZOOM, MAX_ZOOM = 0.3, 60.0
|
|
59
|
+
#: The rim circle's diameter as a fraction of the frame's short side, at full
|
|
60
|
+
#: rim focus. The app uses the same 0.62, so the two products frame alike.
|
|
61
|
+
RIM_FILL = 0.62
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass(frozen=True, slots=True)
|
|
65
|
+
class Camera:
|
|
66
|
+
"""Where the viewer is. Immutable: every gesture returns a new one."""
|
|
67
|
+
|
|
68
|
+
yaw: float = 26.6
|
|
69
|
+
pitch: float = 20.4
|
|
70
|
+
roll: float = 0.0
|
|
71
|
+
zoom: float = 1.0
|
|
72
|
+
pan: tuple[float, float] = (0.0, 0.0)
|
|
73
|
+
rim: float = 0.0
|
|
74
|
+
|
|
75
|
+
def orbited(self, dyaw: float, dpitch: float) -> "Camera":
|
|
76
|
+
pitch = float(np.clip(self.pitch + dpitch, -PITCH_LIMIT, PITCH_LIMIT))
|
|
77
|
+
return replace(self, yaw=(self.yaw + dyaw) % 360.0, pitch=pitch)
|
|
78
|
+
|
|
79
|
+
def rolled(self, droll: float) -> "Camera":
|
|
80
|
+
return replace(self, roll=(self.roll + droll) % 360.0)
|
|
81
|
+
|
|
82
|
+
def panned(self, dx: float, dy: float) -> "Camera":
|
|
83
|
+
return replace(self, pan=(self.pan[0] + dx, self.pan[1] + dy))
|
|
84
|
+
|
|
85
|
+
def recentred(self) -> "Camera":
|
|
86
|
+
"""Clear the free transform. The orbit and the rim slider stay, as in
|
|
87
|
+
the app: Recentre undoes a wander, not a choice of view."""
|
|
88
|
+
return replace(self, roll=0.0, zoom=1.0, pan=(0.0, 0.0))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@dataclass(frozen=True, slots=True)
|
|
92
|
+
class Frame:
|
|
93
|
+
"""One frame's mapping from world to screen pixels."""
|
|
94
|
+
|
|
95
|
+
right: NDArray[np.float64]
|
|
96
|
+
up: NDArray[np.float64]
|
|
97
|
+
fwd: NDArray[np.float64]
|
|
98
|
+
#: Screen point that world (offset) lands on, in pixels.
|
|
99
|
+
centre: tuple[float, float]
|
|
100
|
+
#: World-plane offset applied before scaling: the fit and the rim focus.
|
|
101
|
+
offset: tuple[float, float]
|
|
102
|
+
#: Pixels per world unit.
|
|
103
|
+
scale: float
|
|
104
|
+
#: Pixels per world unit for the fitted frame alone.
|
|
105
|
+
fit_scale: float
|
|
106
|
+
#: Whether zooming to the rim magnifies enough to be worth offering.
|
|
107
|
+
rim_usable: bool
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def magnification(self) -> float:
|
|
111
|
+
"""How much closer than the fitted frame this is."""
|
|
112
|
+
return self.scale / self.fit_scale
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def basis(yaw: float, pitch: float, roll: float = 0.0):
|
|
116
|
+
"""``(right, up, fwd)`` for an orbit, as unit world vectors."""
|
|
117
|
+
y, p = np.radians(yaw), np.radians(np.clip(pitch, -PITCH_LIMIT, PITCH_LIMIT))
|
|
118
|
+
eye = np.array([np.sin(y) * np.cos(p), np.sin(p), np.cos(y) * np.cos(p)])
|
|
119
|
+
fwd = -eye
|
|
120
|
+
right = np.cross(fwd, [0.0, 1.0, 0.0])
|
|
121
|
+
right /= np.linalg.norm(right)
|
|
122
|
+
up = np.cross(right, fwd)
|
|
123
|
+
if roll:
|
|
124
|
+
c, s = np.cos(np.radians(roll)), np.sin(np.radians(roll))
|
|
125
|
+
right, up = right * c + up * s, up * c - right * s
|
|
126
|
+
return right, up, fwd
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def orbit_for(direction) -> tuple[float, float]:
|
|
130
|
+
"""``(yaw, pitch)`` that looks along a world ``direction``.
|
|
131
|
+
|
|
132
|
+
The inverse of :func:`basis`'s ``fwd``, so a preset that names a physical
|
|
133
|
+
direction is the direction the camera ends up looking along."""
|
|
134
|
+
eye = -np.asarray(direction, dtype=float)
|
|
135
|
+
eye /= np.linalg.norm(eye)
|
|
136
|
+
pitch = float(np.degrees(np.arcsin(np.clip(eye[1], -1.0, 1.0))))
|
|
137
|
+
yaw = float(np.degrees(np.arctan2(eye[0], eye[2])))
|
|
138
|
+
return yaw % 360.0, float(np.clip(pitch, -PITCH_LIMIT, PITCH_LIMIT))
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def fit(
|
|
142
|
+
camera: Camera,
|
|
143
|
+
points,
|
|
144
|
+
gamma: float,
|
|
145
|
+
rect: tuple[float, float, float, float],
|
|
146
|
+
*,
|
|
147
|
+
pad: float = 30.0,
|
|
148
|
+
rim_offered: bool = True,
|
|
149
|
+
) -> Frame:
|
|
150
|
+
"""Fit ``points`` into the pixel ``rect`` ``(x0, y0, x1, y1)``.
|
|
151
|
+
|
|
152
|
+
Fitted to the scene's own projected extent rather than to a fixed box:
|
|
153
|
+
the bundle is a long diagonal, not a ball, so a box leaves most of the
|
|
154
|
+
frame empty, which is what made the matplotlib view look small. ``pad``
|
|
155
|
+
is reserved in pixels for labels, which do not scale with the scene.
|
|
156
|
+
"""
|
|
157
|
+
right, up, fwd = basis(camera.yaw, camera.pitch, camera.roll)
|
|
158
|
+
pts = np.atleast_2d(np.asarray(points, dtype=float))
|
|
159
|
+
sx, sy = pts @ right, pts @ up
|
|
160
|
+
half_x = max(1e-9, (sx.max() - sx.min()) / 2.0)
|
|
161
|
+
half_y = max(1e-9, (sy.max() - sy.min()) / 2.0)
|
|
162
|
+
x0, y0, x1, y1 = rect
|
|
163
|
+
vis_w, vis_h = max(x1 - x0, 80.0), max(y1 - y0, 80.0)
|
|
164
|
+
fit_scale = min((vis_w - 2 * pad) / (2 * half_x), (vis_h - 2 * pad) / (2 * half_y))
|
|
165
|
+
fit_scale = max(fit_scale, 1e-6)
|
|
166
|
+
fit_off = (-(sx.max() + sx.min()) / 2.0, -(sy.max() + sy.min()) / 2.0)
|
|
167
|
+
|
|
168
|
+
# The rim: a circle of radius sin(gamma) about (0, 0, cos(gamma)).
|
|
169
|
+
sg = float(np.sin(gamma))
|
|
170
|
+
rim_scale = RIM_FILL * min(vis_w, vis_h) / (2 * sg) if sg > 0 else np.inf
|
|
171
|
+
mag = rim_scale / fit_scale
|
|
172
|
+
usable = bool(rim_offered and np.isfinite(mag) and mag > 1.0)
|
|
173
|
+
t = float(np.clip(camera.rim, 0.0, 1.0)) if usable else 0.0
|
|
174
|
+
ease = 1.0 - (1.0 - t) ** 2 # the centre settles ahead of the zoom
|
|
175
|
+
rc = np.array([0.0, 0.0, float(np.cos(gamma))])
|
|
176
|
+
rim_off = (-float(rc @ right), -float(rc @ up))
|
|
177
|
+
offset = (
|
|
178
|
+
fit_off[0] + (rim_off[0] - fit_off[0]) * ease,
|
|
179
|
+
fit_off[1] + (rim_off[1] - fit_off[1]) * ease,
|
|
180
|
+
)
|
|
181
|
+
scale = fit_scale * (mag if usable else 1.0) ** t * camera.zoom
|
|
182
|
+
centre = ((x0 + x1) / 2.0 + camera.pan[0], (y0 + y1) / 2.0 + camera.pan[1])
|
|
183
|
+
return Frame(right, up, fwd, centre, offset, scale, fit_scale, usable)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def project(frame: Frame, points) -> tuple[NDArray[np.float64], NDArray[np.float64]]:
|
|
187
|
+
"""World points ``(n, 3)`` to screen ``(n, 2)`` pixels and depth ``(n,)``.
|
|
188
|
+
|
|
189
|
+
Depth grows away from the viewer, so painting in decreasing depth puts
|
|
190
|
+
near things over far ones."""
|
|
191
|
+
pts = np.atleast_2d(np.asarray(points, dtype=float))
|
|
192
|
+
sx = (pts @ frame.right + frame.offset[0]) * frame.scale + frame.centre[0]
|
|
193
|
+
sy = frame.centre[1] - (pts @ frame.up + frame.offset[1]) * frame.scale
|
|
194
|
+
return np.column_stack([sx, sy]), pts @ frame.fwd
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def zoom_about(camera: Camera, frame: Frame, factor: float, at: tuple[float, float]) -> Camera:
|
|
198
|
+
"""Zoom by ``factor`` keeping the scene point under ``at`` where it is.
|
|
199
|
+
|
|
200
|
+
Clamp first, then pan by the factor actually applied: using the requested
|
|
201
|
+
one makes the scene slide out from under the cursor at the limits."""
|
|
202
|
+
zoom = float(np.clip(camera.zoom * factor, MIN_ZOOM, MAX_ZOOM))
|
|
203
|
+
k = zoom / camera.zoom
|
|
204
|
+
# screen = c0 + pan + v*scale, held fixed for the v under `at`.
|
|
205
|
+
c0 = (frame.centre[0] - camera.pan[0], frame.centre[1] - camera.pan[1])
|
|
206
|
+
pan = tuple(
|
|
207
|
+
a - c - (a - c - p) * k for a, c, p in zip(at, c0, camera.pan)
|
|
208
|
+
)
|
|
209
|
+
return replace(camera, zoom=zoom, pan=pan)
|
|
@@ -165,7 +165,9 @@ RIM_PRESET = "Down the cone axis"
|
|
|
165
165
|
#: Mesh resolutions. Both surfaces are *ruled* -- the grating patch is the
|
|
166
166
|
#: cross-section extruded along ẑ, and every generator of a cone is straight --
|
|
167
167
|
#: so the second dimension is 2 and that is exact, not a sampling choice.
|
|
168
|
-
|
|
168
|
+
#: The patch is sampled per PERIOD, so a vertex at an integer t lands on a
|
|
169
|
+
#: sample whatever the number of periods drawn.
|
|
170
|
+
_PATCH_PER_PERIOD = {"fine": 120, "coarse": 30}
|
|
169
171
|
_CONE_NPHI = {"fine": 289, "coarse": 73}
|
|
170
172
|
|
|
171
173
|
|
|
@@ -213,7 +215,7 @@ class Ray3D:
|
|
|
213
215
|
|
|
214
216
|
@dataclass(frozen=True, slots=True)
|
|
215
217
|
class Surface3D:
|
|
216
|
-
"""A ruled surface, as ``(n, 2)``
|
|
218
|
+
"""A ruled surface, as ``(n, 2)`` arrays: column 0 one rule's end, column 1 the other's."""
|
|
217
219
|
|
|
218
220
|
x: NDArray[np.float64]
|
|
219
221
|
y: NDArray[np.float64]
|
|
@@ -464,7 +466,10 @@ def captions3d(
|
|
|
464
466
|
|
|
465
467
|
def _grating_patch(problem: "Problem", scale_nm: float, periods: int, lod: str):
|
|
466
468
|
"""The cross-section extruded along ẑ; it is ruled, so two rows are exact."""
|
|
467
|
-
|
|
469
|
+
# Centred on the strike point, so the bundle leaves from the middle of
|
|
470
|
+
# the patch rather than its edge.
|
|
471
|
+
left = periods // 2
|
|
472
|
+
t = np.linspace(-left, periods - left, _PATCH_PER_PERIOD[lod] * periods + 1)
|
|
468
473
|
strike = np.asarray(strike_point(problem))
|
|
469
474
|
px = (x_nm(t, problem.period) - strike[0]) / scale_nm
|
|
470
475
|
py = (np.asarray(problem.height_nm(t)) - strike[1]) / scale_nm
|
|
@@ -515,7 +520,7 @@ def build_scene(
|
|
|
515
520
|
illumination: "Illumination",
|
|
516
521
|
wavelength: float,
|
|
517
522
|
*,
|
|
518
|
-
periods: int =
|
|
523
|
+
periods: int = 20,
|
|
519
524
|
pad_orders: int = 2,
|
|
520
525
|
) -> Scene:
|
|
521
526
|
"""Build every primitive of one 3D drawing."""
|
|
@@ -564,9 +569,9 @@ def build_scene(
|
|
|
564
569
|
Ray3D(
|
|
565
570
|
origin, tuple(k), 1.0,
|
|
566
571
|
"zero" if mark.order == 0 else "order",
|
|
567
|
-
#
|
|
568
|
-
#
|
|
569
|
-
# the ladder beside
|
|
572
|
+
# Only m=0 carries a name here. The painted view names the
|
|
573
|
+
# others from `order` and moves each label clear of the rest;
|
|
574
|
+
# the ladder beside it names them all too.
|
|
570
575
|
label=f"m={mark.order:+d}" if mark.order == 0 else None,
|
|
571
576
|
order=mark.order,
|
|
572
577
|
)
|
|
@@ -22,6 +22,8 @@ from pathlib import Path
|
|
|
22
22
|
from typing import Sequence
|
|
23
23
|
|
|
24
24
|
from endstation.files import atomic_open
|
|
25
|
+
from endstation.qt.canvas import restyle_toolbar
|
|
26
|
+
from endstation.qt.progress_bar import DelayedProgressBar
|
|
25
27
|
from PySide6.QtCore import Qt, Signal
|
|
26
28
|
from PySide6.QtWidgets import (
|
|
27
29
|
QAbstractItemView,
|
|
@@ -35,7 +37,6 @@ from PySide6.QtWidgets import (
|
|
|
35
37
|
QListWidget,
|
|
36
38
|
QListWidgetItem,
|
|
37
39
|
QMessageBox,
|
|
38
|
-
QProgressBar,
|
|
39
40
|
QPushButton,
|
|
40
41
|
QScrollArea,
|
|
41
42
|
QSplitter,
|
|
@@ -203,9 +204,9 @@ class CMethodTab(QWidget):
|
|
|
203
204
|
)
|
|
204
205
|
self._converge_button.clicked.connect(self.convergence_requested)
|
|
205
206
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
self._progress
|
|
207
|
+
# Hidden until a solve has run long enough to need it, indeterminate
|
|
208
|
+
# until the solver's first report: see endstation.qt.progress_bar.
|
|
209
|
+
self._progress = DelayedProgressBar()
|
|
209
210
|
|
|
210
211
|
row = QHBoxLayout()
|
|
211
212
|
row.addWidget(self._solve_button)
|
|
@@ -232,7 +233,8 @@ class CMethodTab(QWidget):
|
|
|
232
233
|
panel = QWidget()
|
|
233
234
|
layout = QVBoxLayout(panel)
|
|
234
235
|
layout.setContentsMargins(0, 0, 0, 0)
|
|
235
|
-
|
|
236
|
+
self._toolbar = NavigationToolbar2QT(self._canvas, panel)
|
|
237
|
+
layout.addWidget(self._toolbar)
|
|
236
238
|
layout.addWidget(self._canvas)
|
|
237
239
|
return panel
|
|
238
240
|
|
|
@@ -270,18 +272,13 @@ class CMethodTab(QWidget):
|
|
|
270
272
|
# sweep untouched, so it stays live, like scalar's model selectors.
|
|
271
273
|
self._fields["truncation"].setEnabled(not running)
|
|
272
274
|
if not running:
|
|
273
|
-
self._progress.
|
|
274
|
-
|
|
275
|
-
def show_progress(self) -> None:
|
|
276
|
-
self._progress.show()
|
|
275
|
+
self._progress.end()
|
|
277
276
|
|
|
278
277
|
def show_progress_value(self, done: int, total: int) -> None:
|
|
279
|
-
|
|
280
|
-
self._progress.setRange(0, total)
|
|
281
|
-
self._progress.setValue(done)
|
|
278
|
+
self._progress.report(done, total)
|
|
282
279
|
|
|
283
280
|
def show_solving(self, wavelength_count: int) -> None:
|
|
284
|
-
self._progress.
|
|
281
|
+
self._progress.begin()
|
|
285
282
|
self._paint(provenance.solving_lines(self.name, wavelength_count))
|
|
286
283
|
|
|
287
284
|
def show_result(self, scan, energy, lambda_over_period: float) -> None:
|
|
@@ -416,6 +413,8 @@ class CMethodTab(QWidget):
|
|
|
416
413
|
)
|
|
417
414
|
|
|
418
415
|
def _on_theme(self, theme) -> None:
|
|
416
|
+
# matplotlib colours a toolbar's icons only when it builds them.
|
|
417
|
+
restyle_toolbar(self._toolbar, theme)
|
|
419
418
|
style_figure(self._figure, theme)
|
|
420
419
|
if self._scan is not None:
|
|
421
420
|
self._draw_efficiency(self._scan)
|
|
@@ -23,6 +23,8 @@ What is drawn, and what the panel says, is decided in
|
|
|
23
23
|
|
|
24
24
|
from __future__ import annotations
|
|
25
25
|
|
|
26
|
+
from endstation.qt.canvas import restyle_toolbar
|
|
27
|
+
from endstation.qt.progress_bar import DelayedProgressBar
|
|
26
28
|
from PySide6.QtCore import Qt, Signal
|
|
27
29
|
from PySide6.QtWidgets import (
|
|
28
30
|
QAbstractItemView,
|
|
@@ -34,7 +36,6 @@ from PySide6.QtWidgets import (
|
|
|
34
36
|
QLabel,
|
|
35
37
|
QListWidget,
|
|
36
38
|
QListWidgetItem,
|
|
37
|
-
QProgressBar,
|
|
38
39
|
QPushButton,
|
|
39
40
|
QScrollArea,
|
|
40
41
|
QSplitter,
|
|
@@ -205,9 +206,9 @@ class CompareTab(QWidget):
|
|
|
205
206
|
self._cancel_button.clicked.connect(self.cancel_requested)
|
|
206
207
|
self._cancel_button.setEnabled(False)
|
|
207
208
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
self._progress
|
|
209
|
+
# Hidden until a solve has run long enough to need it, indeterminate
|
|
210
|
+
# until the solver's first report: see endstation.qt.progress_bar.
|
|
211
|
+
self._progress = DelayedProgressBar()
|
|
211
212
|
|
|
212
213
|
row = QHBoxLayout()
|
|
213
214
|
row.addWidget(self._compare_button)
|
|
@@ -232,7 +233,8 @@ class CompareTab(QWidget):
|
|
|
232
233
|
panel = QWidget()
|
|
233
234
|
layout = QVBoxLayout(panel)
|
|
234
235
|
layout.setContentsMargins(0, 0, 0, 0)
|
|
235
|
-
|
|
236
|
+
self._toolbar = NavigationToolbar2QT(self._canvas, panel)
|
|
237
|
+
layout.addWidget(self._toolbar)
|
|
236
238
|
layout.addWidget(self._canvas)
|
|
237
239
|
return panel
|
|
238
240
|
|
|
@@ -281,20 +283,15 @@ class CompareTab(QWidget):
|
|
|
281
283
|
for box in self._checks.values():
|
|
282
284
|
box.setEnabled(not running)
|
|
283
285
|
if not running:
|
|
284
|
-
self._progress.
|
|
285
|
-
|
|
286
|
-
def show_progress(self) -> None:
|
|
287
|
-
self._progress.show()
|
|
286
|
+
self._progress.end()
|
|
288
287
|
|
|
289
288
|
def show_progress_value(self, done: int, total: int) -> None:
|
|
290
|
-
|
|
291
|
-
self._progress.setRange(0, total)
|
|
292
|
-
self._progress.setValue(done)
|
|
289
|
+
self._progress.report(done, total)
|
|
293
290
|
|
|
294
291
|
def show_solving(self, names, wavelength_count: int) -> None:
|
|
295
292
|
from ..docs import short_title
|
|
296
293
|
|
|
297
|
-
self._progress.
|
|
294
|
+
self._progress.begin()
|
|
298
295
|
self._paint((provenance.Line(
|
|
299
296
|
f"comparing: {', '.join(short_title(n) for n in names)}, "
|
|
300
297
|
f"{wavelength_count} wavelengths each…\n", "dim",
|
|
@@ -419,6 +416,8 @@ class CompareTab(QWidget):
|
|
|
419
416
|
)
|
|
420
417
|
|
|
421
418
|
def _on_theme(self, theme) -> None:
|
|
419
|
+
# matplotlib colours a toolbar's icons only when it builds them.
|
|
420
|
+
restyle_toolbar(self._toolbar, theme)
|
|
422
421
|
style_figure(self._figure, theme)
|
|
423
422
|
self._redraw()
|
|
424
423
|
if self._lines:
|
|
@@ -18,6 +18,7 @@ geometry is known as soon as the form parses.
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
20
|
import numpy as np
|
|
21
|
+
from endstation.qt.canvas import restyle_toolbar
|
|
21
22
|
from PySide6.QtCore import Qt
|
|
22
23
|
from PySide6.QtGui import QPalette
|
|
23
24
|
from PySide6.QtWidgets import (
|
|
@@ -156,7 +157,8 @@ class GeometryTab(QWidget):
|
|
|
156
157
|
panel.setMinimumHeight(200)
|
|
157
158
|
layout = QVBoxLayout(panel)
|
|
158
159
|
layout.setContentsMargins(0, 0, 0, 0)
|
|
159
|
-
|
|
160
|
+
self._toolbar = NavigationToolbar2QT(self._canvas, panel)
|
|
161
|
+
layout.addWidget(self._toolbar)
|
|
160
162
|
layout.addWidget(self._canvas)
|
|
161
163
|
return panel
|
|
162
164
|
|
|
@@ -339,6 +341,8 @@ class GeometryTab(QWidget):
|
|
|
339
341
|
)
|
|
340
342
|
|
|
341
343
|
def _on_theme(self, theme) -> None:
|
|
344
|
+
# matplotlib colours a toolbar's icons only when it builds them.
|
|
345
|
+
restyle_toolbar(self._toolbar, theme)
|
|
342
346
|
style_figure(self._figure, theme)
|
|
343
347
|
if self._caption_lines:
|
|
344
348
|
self._set_captions(self._caption_lines)
|
|
@@ -22,6 +22,8 @@ from pathlib import Path
|
|
|
22
22
|
from typing import Sequence
|
|
23
23
|
|
|
24
24
|
from endstation.files import atomic_open
|
|
25
|
+
from endstation.qt.canvas import restyle_toolbar
|
|
26
|
+
from endstation.qt.progress_bar import DelayedProgressBar
|
|
25
27
|
from PySide6.QtCore import Qt, Signal
|
|
26
28
|
from PySide6.QtWidgets import (
|
|
27
29
|
QAbstractItemView,
|
|
@@ -35,7 +37,6 @@ from PySide6.QtWidgets import (
|
|
|
35
37
|
QListWidget,
|
|
36
38
|
QListWidgetItem,
|
|
37
39
|
QMessageBox,
|
|
38
|
-
QProgressBar,
|
|
39
40
|
QPushButton,
|
|
40
41
|
QScrollArea,
|
|
41
42
|
QSplitter,
|
|
@@ -238,9 +239,9 @@ class IntegralTab(QWidget):
|
|
|
238
239
|
)
|
|
239
240
|
self._converge_button.clicked.connect(self.convergence_requested)
|
|
240
241
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
self._progress
|
|
242
|
+
# Hidden until a solve has run long enough to need it, indeterminate
|
|
243
|
+
# until the solver's first report: see endstation.qt.progress_bar.
|
|
244
|
+
self._progress = DelayedProgressBar()
|
|
244
245
|
|
|
245
246
|
row = QHBoxLayout()
|
|
246
247
|
row.addWidget(self._solve_button)
|
|
@@ -267,7 +268,8 @@ class IntegralTab(QWidget):
|
|
|
267
268
|
panel = QWidget()
|
|
268
269
|
layout = QVBoxLayout(panel)
|
|
269
270
|
layout.setContentsMargins(0, 0, 0, 0)
|
|
270
|
-
|
|
271
|
+
self._toolbar = NavigationToolbar2QT(self._canvas, panel)
|
|
272
|
+
layout.addWidget(self._toolbar)
|
|
271
273
|
layout.addWidget(self._canvas)
|
|
272
274
|
return panel
|
|
273
275
|
|
|
@@ -306,18 +308,13 @@ class IntegralTab(QWidget):
|
|
|
306
308
|
# sweep untouched, so it stays live, like scalar's model selectors.
|
|
307
309
|
self._fields["boundary_points"].setEnabled(not running)
|
|
308
310
|
if not running:
|
|
309
|
-
self._progress.
|
|
310
|
-
|
|
311
|
-
def show_progress(self) -> None:
|
|
312
|
-
self._progress.show()
|
|
311
|
+
self._progress.end()
|
|
313
312
|
|
|
314
313
|
def show_progress_value(self, done: int, total: int) -> None:
|
|
315
|
-
|
|
316
|
-
self._progress.setRange(0, total)
|
|
317
|
-
self._progress.setValue(done)
|
|
314
|
+
self._progress.report(done, total)
|
|
318
315
|
|
|
319
316
|
def show_solving(self, wavelength_count: int) -> None:
|
|
320
|
-
self._progress.
|
|
317
|
+
self._progress.begin()
|
|
321
318
|
self._paint(provenance.solving_lines(self.name, wavelength_count))
|
|
322
319
|
|
|
323
320
|
def show_result(self, scan, energy, lambda_over_period: float) -> None:
|
|
@@ -452,6 +449,8 @@ class IntegralTab(QWidget):
|
|
|
452
449
|
)
|
|
453
450
|
|
|
454
451
|
def _on_theme(self, theme) -> None:
|
|
452
|
+
# matplotlib colours a toolbar's icons only when it builds them.
|
|
453
|
+
restyle_toolbar(self._toolbar, theme)
|
|
455
454
|
style_figure(self._figure, theme)
|
|
456
455
|
if self._scan is not None:
|
|
457
456
|
self._draw_efficiency(self._scan)
|
|
@@ -59,11 +59,6 @@ __all__ = ["MainWindow"]
|
|
|
59
59
|
#: and LAPACK expects the stack the main thread has. See `__init__`.
|
|
60
60
|
_WORKER_STACK_BYTES = 8 * 1024 * 1024
|
|
61
61
|
|
|
62
|
-
#: A solve faster than this never shows a progress bar. The scalar solver takes
|
|
63
|
-
#: about 70 ms, and flashing a bar on and off within one frame reads as a
|
|
64
|
-
#: glitch rather than as feedback.
|
|
65
|
-
_PROGRESS_DELAY_MS = 150
|
|
66
|
-
|
|
67
62
|
#: How long typing must pause before the geometry redraws. Long enough that a
|
|
68
63
|
#: burst of keystrokes costs one redraw rather than six, short enough that the
|
|
69
64
|
#: picture feels attached to the field you are editing.
|
|
@@ -80,8 +75,7 @@ _REDRAW_DEBOUNCE_MS = 120
|
|
|
80
75
|
#: why): a `name` class attribute matching its registry key; `solve_requested`
|
|
81
76
|
#: and `cancel_requested` signals; `build_options(problem, illumination,
|
|
82
77
|
#: wavelengths) -> dict` (raising `FormErrors`); `set_running(bool)`;
|
|
83
|
-
#: `
|
|
84
|
-
#: `show_solving(wavelength_count)`; `show_result(scan, energy,
|
|
78
|
+
#: `show_progress_value(done, total)`; `show_solving(wavelength_count)`; `show_result(scan, energy,
|
|
85
79
|
#: lambda_over_period)`; `show_cancelled()`; `show_error(message)`;
|
|
86
80
|
#: `show_field_errors(errors)`. Optionally a `convergence_requested` signal and
|
|
87
81
|
#: `show_convergence(scan, energy, lambda_over_period, report)` -- optional
|
|
@@ -430,16 +424,9 @@ class MainWindow(QMainWindow):
|
|
|
430
424
|
self._active_name = name
|
|
431
425
|
self._parsed = geometry
|
|
432
426
|
self._set_running(True)
|
|
427
|
+
# The tab's bar appears only if the solve is still running after its
|
|
428
|
+
# delay, and only on this tab; `_set_running(False)` ends every tab's.
|
|
433
429
|
tab.show_solving(len(geometry.wavelengths))
|
|
434
|
-
# `tab` as the context object, not a bare singleShot: Qt then cancels
|
|
435
|
-
# the timer if the tab is destroyed first. Without it, closing the
|
|
436
|
-
# window inside the 150 ms delay leaves the timer holding a deleted
|
|
437
|
-
# QProgressBar, and an exception escaping a slot under PySide6 can
|
|
438
|
-
# abort the process rather than surfacing. Found by macOS CI, where the
|
|
439
|
-
# timing landed the stale timer inside the *next* test's setup.
|
|
440
|
-
QTimer.singleShot(
|
|
441
|
-
_PROGRESS_DELAY_MS, tab, lambda: self._show_progress_if_still_running(tab)
|
|
442
|
-
)
|
|
443
430
|
if sweep:
|
|
444
431
|
self._start(worker.converge, name, geometry, options,
|
|
445
432
|
on_done=partial(self._on_converged, name))
|
|
@@ -494,9 +481,6 @@ class MainWindow(QMainWindow):
|
|
|
494
481
|
self._parsed = geometry
|
|
495
482
|
self._set_running(True)
|
|
496
483
|
tab.show_solving(tuple(options), len(geometry.wavelengths))
|
|
497
|
-
QTimer.singleShot(
|
|
498
|
-
_PROGRESS_DELAY_MS, tab, lambda: self._show_progress_if_still_running(tab)
|
|
499
|
-
)
|
|
500
484
|
self._start(worker.compare, geometry, names, options, refused,
|
|
501
485
|
on_done=self._on_compared)
|
|
502
486
|
|
|
@@ -599,16 +583,6 @@ class MainWindow(QMainWindow):
|
|
|
599
583
|
tab.set_running(running)
|
|
600
584
|
self.compare_tab.set_running(running)
|
|
601
585
|
|
|
602
|
-
def _show_progress_if_still_running(self, tab) -> None:
|
|
603
|
-
"""Show progress, but only on the tab that started the solve.
|
|
604
|
-
|
|
605
|
-
Showing it on an idle tab would imply that the tab is computing
|
|
606
|
-
something when it is not, which is the same kind of false statement
|
|
607
|
-
that a provenance warning must never make.
|
|
608
|
-
"""
|
|
609
|
-
if self._running:
|
|
610
|
-
tab.show_progress()
|
|
611
|
-
|
|
612
586
|
def show_about(self) -> None:
|
|
613
587
|
"""The About box. The menu calls `help_menu.show_about` directly; this
|
|
614
588
|
stays as the window's own way in, which is what a test drives."""
|