gratinglab 0.3.17__tar.gz → 0.4.1__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.17/src/gratinglab.egg-info → gratinglab-0.4.1}/PKG-INFO +34 -3
- {gratinglab-0.3.17 → gratinglab-0.4.1}/README.md +33 -2
- gratinglab-0.4.1/docs/theory/mirror.md +169 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/__init__.py +2 -2
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/docs.py +3 -0
- gratinglab-0.4.1/src/gratinglab/gui/materials_view.py +141 -0
- gratinglab-0.4.1/src/gratinglab/gui/mirror_view.py +237 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/geometry_panel.py +82 -22
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/launcher.py +64 -2
- gratinglab-0.4.1/src/gratinglab/gui/qt/library_bar.py +162 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/main_window.py +23 -2
- gratinglab-0.4.1/src/gratinglab/gui/qt/materials_tab.py +262 -0
- gratinglab-0.4.1/src/gratinglab/gui/qt/mirror_tab.py +315 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/setup_tab.py +29 -146
- gratinglab-0.4.1/src/gratinglab/gui/qt/stack_editor.py +242 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/state.py +28 -9
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/__init__.py +166 -4
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/data/SOURCES.md +4 -1
- gratinglab-0.4.1/src/gratinglab/materials/elements.py +59 -0
- gratinglab-0.4.1/src/gratinglab/materials/factors.py +189 -0
- gratinglab-0.4.1/src/gratinglab/materials/nk.py +167 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/optical.py +17 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/typical.py +3 -7
- gratinglab-0.4.1/src/gratinglab/mirror.py +231 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1/src/gratinglab.egg-info}/PKG-INFO +34 -3
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab.egg-info/SOURCES.txt +17 -0
- gratinglab-0.4.1/tests/test_factors.py +195 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_docs.py +5 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_launcher.py +41 -2
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_qt.py +102 -19
- gratinglab-0.4.1/tests/test_gui_stack_editor.py +105 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_materials.py +1 -1
- gratinglab-0.4.1/tests/test_materials_view.py +131 -0
- gratinglab-0.4.1/tests/test_mirror.py +128 -0
- gratinglab-0.4.1/tests/test_mirror_view.py +119 -0
- gratinglab-0.4.1/tests/test_nk.py +107 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/LICENSE +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/MANIFEST.in +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/conventions.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/theory/cmethod.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/theory/integral.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/theory/metrology.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/theory/rcwa.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/docs/theory/scalar.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/pyproject.toml +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/setup.cfg +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/setup.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/checks.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/compare.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/convergence.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/geometry.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/app.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/camera3d.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/cmethod_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/comparison.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/diagram.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/diagram3d.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/efficiency_plot.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/failures.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/icon.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/integral_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/label_layout.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/launcher.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/orders.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/provenance.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/compare_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/geometry_window.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/help_menu.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/integral_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/recent.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/sizing.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/theming.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/qt/worker.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/rcwa_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/richtext.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/scalar_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/gui/theme.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/illumination.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/io/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/io/boundary.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/io/efficiency_table.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/io/ggp.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/io/txl.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/fresnel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/materials/refractiveindex.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/measured.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/analyzer.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/boundary/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/boundary/average.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/boundary/swaths.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/cli.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/config.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/analysis.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/image_flatten.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/orientation.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/processing.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/region_mask.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/scars.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/core/tip.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/data/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/data/aggregation.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/icon.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/app.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/gui/state.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/file_io.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/ibw.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/metrics.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/sem.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/io/spm.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/settings.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/stats/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/stats/analysis.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/stats/icc.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/visualization/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/visualization/profiles.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/visualization/statistics.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/flattening.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/overview.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/metrology/workflows.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/problem.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/_base.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/_polyline.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/_shapes.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/_trapezoid.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/profiles/_types.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/resolution.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/result.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/_conditioning.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/_execution.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/_scalar_groove.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/base.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/cmethod/_core.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/cmethod/_series.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_boundary.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_core.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_finite.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_greens.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_kernels.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/rcwa/_core.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab/solvers/scalar.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab.egg-info/dependency_links.txt +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab.egg-info/entry_points.txt +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab.egg-info/requires.txt +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/src/gratinglab.egg-info/top_level.txt +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_changelog.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_checks.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_cmethod.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_compare.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_conditioning.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_convergence.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_cross_method.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_efficiency_table.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_four_way.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_fresnel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_geometry.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_ggp.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_camera3d.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_cmethod_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_cmethod_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_compare_tab.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_diagram.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_diagram3d.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_geometry_window.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_help_menu.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_integral_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_mathtext.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_orders.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_polish.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_provenance.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_provenance_panel.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_rcwa_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_richtext.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_scalar_options.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_state.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_gui_theme.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_illumination.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_core.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_corpus.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_finite.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_graded.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_greens.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_kernels.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_measured_polygon.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_operators.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_integral_solver.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_io_boundary.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_label_layout.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_littrow.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_measured.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_perturbation.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_profiles.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_rayleigh_anomaly.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_rcwa.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_rcwa_benchmarks.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_refractiveindex.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_resolution.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_result.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_scalar.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_solver_conformance.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_solver_execution.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_solver_progress.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_trapezoidal_solvers.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_txl.py +0 -0
- {gratinglab-0.3.17 → gratinglab-0.4.1}/tests/test_typical.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gratinglab
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
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
|
|
@@ -257,11 +257,12 @@ material per file, each named after its material:
|
|
|
257
257
|
| `Pt.txt` | a [CXRO](https://henke.lbl.gov/optical_constants/) export | x-ray |
|
|
258
258
|
| `Pt.yml` | a [refractiveindex.info](https://refractiveindex.info) file, renamed from its author's name | ultraviolet to infrared |
|
|
259
259
|
| `Pt.ari` | a PCGrate table | whatever it covers |
|
|
260
|
+
| `Pt.nk` or `Pt.csv` | your own `wavelength, n, k` columns, such as an ellipsometry export; the header names the unit (`wavelength (nm), n, k`) | whatever it covers |
|
|
260
261
|
|
|
261
262
|
Saving one as `~/.gratinglab/materials/Pt.yml` makes `coating="Pt"` available.
|
|
262
263
|
`GRATINGLAB_MATERIALS` points to a different directory, and
|
|
263
|
-
`materials.from_cxro_file(path)
|
|
264
|
-
file without a library. The YAML files require the `refractiveindex` extra.
|
|
264
|
+
`materials.from_cxro_file(path)`, `from_refractiveindex_file(path)` or
|
|
265
|
+
`from_nk_file(path)` reads a single file without a library. The YAML files require the `refractiveindex` extra.
|
|
265
266
|
[`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
|
|
266
267
|
explains why none are distributed.
|
|
267
268
|
|
|
@@ -272,6 +273,14 @@ an absorption edge or at low energy, the result's provenance says so.
|
|
|
272
273
|
[`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md)
|
|
273
274
|
has the model and how far it agrees with real tables.
|
|
274
275
|
|
|
276
|
+
With tabulated atomic scattering factors, `coating="factors:SiO2@2.2"` computes
|
|
277
|
+
the index of any formula at any density from one `<Symbol>.nff` file per element
|
|
278
|
+
in the library, as CXRO publishes them
|
|
279
|
+
([henke.lbl.gov/optical_constants/asf.html](https://henke.lbl.gov/optical_constants/asf.html)),
|
|
280
|
+
H to U. It keeps the edge structure the model lacks, and still ignores chemical
|
|
281
|
+
bonding. `coating="Au@17.5"` rescales a CXRO export to another density, such as a
|
|
282
|
+
sputtered film's.
|
|
283
|
+
|
|
275
284
|
The core install does not include a plotting stack, so a user who only runs the solvers
|
|
276
285
|
does not install one. A subpackage that needs an optional extra names it when it is
|
|
277
286
|
missing, instead of failing with a bare `ModuleNotFoundError`.
|
|
@@ -330,6 +339,28 @@ ladder, redrawn as the form changes, with no solver. **Send to efficiency window
|
|
|
330
339
|
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
331
340
|
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
332
341
|
|
|
342
|
+
The efficiency window's dock describes the surface as a stack, in its **Surface**
|
|
343
|
+
group: one row per coating layer, outermost at the top as the light meets them, each
|
|
344
|
+
with a material and a thickness in nm, above the **Grating** material the grooves are
|
|
345
|
+
cut into. Every material box lists your library and also takes a typed model name
|
|
346
|
+
such as `typical:Au` or `factors:SiO2@2.2`.
|
|
347
|
+
|
|
348
|
+
The **Materials** tab builds those names from a kind, a table name or formula and an
|
|
349
|
+
optional density, plots the material's index against wavelength with the dock's scan
|
|
350
|
+
shaded, and says whether it covers that scan. Two buttons send it to the stack, as the
|
|
351
|
+
grating material or as a new top layer. Your library is listed there, with the buttons
|
|
352
|
+
that add a table to it, rescan it and open its folder. The **Setup** tab is the
|
|
353
|
+
reference page for what is installed and what a coating means to each solver.
|
|
354
|
+
|
|
355
|
+
The **Mirror** tab treats that stack as a flat mirror, before any grooves, with the
|
|
356
|
+
roughness at every interface. It plots the specular reflectivity against graze angle
|
|
357
|
+
or wavelength, the 1/e penetration depth in each material, and the thickness the
|
|
358
|
+
outermost layer needs before what lies beneath it changes the reflectivity by less
|
|
359
|
+
than a tolerance. Its answer, whether that layer reads as bulk, is one line above the
|
|
360
|
+
plots, and when it does a button makes the layer the grating material on its own. The
|
|
361
|
+
tab recomputes as you type, and an angle scan marks the graze angles your mount puts
|
|
362
|
+
light at. The same calculation is `gratinglab.mirror.Mirror` from Python.
|
|
363
|
+
|
|
333
364
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
334
365
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
335
366
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -213,11 +213,12 @@ material per file, each named after its material:
|
|
|
213
213
|
| `Pt.txt` | a [CXRO](https://henke.lbl.gov/optical_constants/) export | x-ray |
|
|
214
214
|
| `Pt.yml` | a [refractiveindex.info](https://refractiveindex.info) file, renamed from its author's name | ultraviolet to infrared |
|
|
215
215
|
| `Pt.ari` | a PCGrate table | whatever it covers |
|
|
216
|
+
| `Pt.nk` or `Pt.csv` | your own `wavelength, n, k` columns, such as an ellipsometry export; the header names the unit (`wavelength (nm), n, k`) | whatever it covers |
|
|
216
217
|
|
|
217
218
|
Saving one as `~/.gratinglab/materials/Pt.yml` makes `coating="Pt"` available.
|
|
218
219
|
`GRATINGLAB_MATERIALS` points to a different directory, and
|
|
219
|
-
`materials.from_cxro_file(path)
|
|
220
|
-
file without a library. The YAML files require the `refractiveindex` extra.
|
|
220
|
+
`materials.from_cxro_file(path)`, `from_refractiveindex_file(path)` or
|
|
221
|
+
`from_nk_file(path)` reads a single file without a library. The YAML files require the `refractiveindex` extra.
|
|
221
222
|
[`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
|
|
222
223
|
explains why none are distributed.
|
|
223
224
|
|
|
@@ -228,6 +229,14 @@ an absorption edge or at low energy, the result's provenance says so.
|
|
|
228
229
|
[`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md)
|
|
229
230
|
has the model and how far it agrees with real tables.
|
|
230
231
|
|
|
232
|
+
With tabulated atomic scattering factors, `coating="factors:SiO2@2.2"` computes
|
|
233
|
+
the index of any formula at any density from one `<Symbol>.nff` file per element
|
|
234
|
+
in the library, as CXRO publishes them
|
|
235
|
+
([henke.lbl.gov/optical_constants/asf.html](https://henke.lbl.gov/optical_constants/asf.html)),
|
|
236
|
+
H to U. It keeps the edge structure the model lacks, and still ignores chemical
|
|
237
|
+
bonding. `coating="Au@17.5"` rescales a CXRO export to another density, such as a
|
|
238
|
+
sputtered film's.
|
|
239
|
+
|
|
231
240
|
The core install does not include a plotting stack, so a user who only runs the solvers
|
|
232
241
|
does not install one. A subpackage that needs an optional extra names it when it is
|
|
233
242
|
missing, instead of failing with a bare `ModuleNotFoundError`.
|
|
@@ -286,6 +295,28 @@ ladder, redrawn as the form changes, with no solver. **Send to efficiency window
|
|
|
286
295
|
(`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
|
|
287
296
|
solves nothing; the efficiency window keeps its own Grating Geometry tab.
|
|
288
297
|
|
|
298
|
+
The efficiency window's dock describes the surface as a stack, in its **Surface**
|
|
299
|
+
group: one row per coating layer, outermost at the top as the light meets them, each
|
|
300
|
+
with a material and a thickness in nm, above the **Grating** material the grooves are
|
|
301
|
+
cut into. Every material box lists your library and also takes a typed model name
|
|
302
|
+
such as `typical:Au` or `factors:SiO2@2.2`.
|
|
303
|
+
|
|
304
|
+
The **Materials** tab builds those names from a kind, a table name or formula and an
|
|
305
|
+
optional density, plots the material's index against wavelength with the dock's scan
|
|
306
|
+
shaded, and says whether it covers that scan. Two buttons send it to the stack, as the
|
|
307
|
+
grating material or as a new top layer. Your library is listed there, with the buttons
|
|
308
|
+
that add a table to it, rescan it and open its folder. The **Setup** tab is the
|
|
309
|
+
reference page for what is installed and what a coating means to each solver.
|
|
310
|
+
|
|
311
|
+
The **Mirror** tab treats that stack as a flat mirror, before any grooves, with the
|
|
312
|
+
roughness at every interface. It plots the specular reflectivity against graze angle
|
|
313
|
+
or wavelength, the 1/e penetration depth in each material, and the thickness the
|
|
314
|
+
outermost layer needs before what lies beneath it changes the reflectivity by less
|
|
315
|
+
than a tolerance. Its answer, whether that layer reads as bulk, is one line above the
|
|
316
|
+
plots, and when it does a button makes the layer the grating material on its own. The
|
|
317
|
+
tab recomputes as you type, and an angle scan marks the graze angles your mount puts
|
|
318
|
+
light at. The same calculation is `gratinglab.mirror.Mirror` from Python.
|
|
319
|
+
|
|
289
320
|
The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
|
|
290
321
|
system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
|
|
291
322
|
optional, dynamically linked extra, so this package remains under the BSD-3 licence.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# The coating as a flat mirror
|
|
2
|
+
|
|
3
|
+
Implemented in [`mirror.py`](../../src/gratinglab/mirror.py), and shown by the
|
|
4
|
+
Mirror tab. Symbols and sign conventions follow
|
|
5
|
+
[`conventions.md`](../conventions.md). This page says what the calculation is,
|
|
6
|
+
what its three outputs mean, and what has been checked; the section numbers
|
|
7
|
+
are for citing.
|
|
8
|
+
|
|
9
|
+
It is not a grating solver. It answers a question that comes before one: what
|
|
10
|
+
does the coating do on its own, and is its top layer thick enough that the
|
|
11
|
+
layers under it can be left out of the grating calculation?
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. What is modelled
|
|
16
|
+
|
|
17
|
+
A stack of flat, parallel, homogeneous layers under vacuum, on a substrate
|
|
18
|
+
that is taken as infinitely thick. The stack is the one a grating `Problem`
|
|
19
|
+
carries: `coating` (the dock's **Grating** material) is the substrate here,
|
|
20
|
+
and `layers` sit on it, innermost first, so the last layer is the surface the
|
|
21
|
+
light meets.
|
|
22
|
+
|
|
23
|
+
Angles are grazing, measured from the surface, as in
|
|
24
|
+
[`materials/fresnel.py`](../../src/gratinglab/materials/fresnel.py). The
|
|
25
|
+
polarizations are `s` and `p` with respect to the mirror's own plane of
|
|
26
|
+
incidence, which are not the groove-referenced TE and TM of `conventions.md`
|
|
27
|
+
§7; a flat mirror has no grooves to refer to.
|
|
28
|
+
|
|
29
|
+
What a flat stack leaves out is everything the grooves do. On a grating a
|
|
30
|
+
layer is conformal: it follows the groove and rounds its convex corners, and
|
|
31
|
+
the light meets each facet at its own angle. Only the
|
|
32
|
+
[RCWA](rcwa.md) models that (its §6). The mirror tells you about the material
|
|
33
|
+
stack at one angle at a time, which is why the Mirror tab marks the angles
|
|
34
|
+
your mount actually uses (§5).
|
|
35
|
+
|
|
36
|
+
## 2. Reflectivity: Parratt's recursion
|
|
37
|
+
|
|
38
|
+
In each medium `j` the wave has a normal wavevector component, divided by
|
|
39
|
+
`k = 2π/λ`,
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
q_j = sqrt(n_j² − cos²θ)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
with the root that has a non-negative imaginary part, so the wave decays
|
|
46
|
+
going into the material (the `exp(−iωt)` convention of `conventions.md` §2).
|
|
47
|
+
At the interface between `j` and the medium below it the Fresnel coefficients
|
|
48
|
+
are
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
r_s = (q_j − q_j+1) / (q_j + q_j+1)
|
|
52
|
+
r_p = (n_j+1² q_j − n_j² q_j+1) / (n_j+1² q_j + n_j² q_j+1)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
and the reflection seen from inside medium `j`, looking down at everything
|
|
56
|
+
beneath it, is built from the substrate upward:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
X_j = (r + X_j+1 e^{2ik q_j+1 d_j+1}) / (1 + r X_j+1 e^{2ik q_j+1 d_j+1})
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
with `X = 0` in the substrate and `d` a layer's thickness. `X` in the vacuum
|
|
63
|
+
is the mirror's amplitude reflection coefficient, and the reflectivity is its
|
|
64
|
+
modulus squared; unpolarized is the mean of `s` and `p`.
|
|
65
|
+
|
|
66
|
+
The exponential only ever decays, since `Im q ≥ 0`, so the recursion is
|
|
67
|
+
stable for a layer of any thickness, an absorbing one many attenuation
|
|
68
|
+
lengths deep included. That is the same reason the RCWA propagates with a
|
|
69
|
+
scattering matrix (its §4).
|
|
70
|
+
|
|
71
|
+
Roughness is one RMS value `σ` applied at every interface as the
|
|
72
|
+
Névot–Croce factor on the amplitude,
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
r → r · exp(−2 k² q_j q_j+1 σ²)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
which uses the wave on both sides, so it damps little below the critical
|
|
79
|
+
angle, where the transmitted wave is evanescent. One `σ` for every interface
|
|
80
|
+
is a simplification: a real stack's buried interfaces need not be as rough as
|
|
81
|
+
its surface.
|
|
82
|
+
|
|
83
|
+
## 3. How deep the light goes
|
|
84
|
+
|
|
85
|
+
`Mirror.penetration_depth` is, for each material in the stack taken as bulk,
|
|
86
|
+
the depth at which the transmitted wave's intensity has fallen to `1/e`:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
depth = 1 / (2 k Im q)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Below the material's critical angle the wave is evanescent and the depth is a
|
|
93
|
+
few nanometres, set by the angle and nearly independent of absorption. Above
|
|
94
|
+
it the wave propagates and the depth is set by absorption, and is longer by
|
|
95
|
+
one or two orders of magnitude. The jump between the two is the critical
|
|
96
|
+
angle. A material with no absorption has an infinite depth above its critical
|
|
97
|
+
angle, and the function returns that.
|
|
98
|
+
|
|
99
|
+
This is a property of one material at one angle and wavelength. It is drawn
|
|
100
|
+
for every material in the stack, not only the top one, because a layer's own
|
|
101
|
+
depth says how far light gets into it, while the substrate's says whether
|
|
102
|
+
light that reaches it comes back.
|
|
103
|
+
|
|
104
|
+
## 4. When a layer may be taken as bulk
|
|
105
|
+
|
|
106
|
+
The practical question is whether a grating calculation needs the stack, or
|
|
107
|
+
may take the top layer as the grating material alone. The `1/e` depth
|
|
108
|
+
suggests an answer and does not give it: light reflected from the interface
|
|
109
|
+
under the layer interferes with light reflected from its surface, so the
|
|
110
|
+
reflectivity approaches the bulk value through fringes, not as a plain
|
|
111
|
+
exponential.
|
|
112
|
+
|
|
113
|
+
`Mirror.bulk_thickness` therefore sweeps the top layer's thickness, with the
|
|
114
|
+
real layers and substrate beneath it, and returns the smallest thickness
|
|
115
|
+
beyond which the reflectivity stays within a relative `tolerance` of that
|
|
116
|
+
layer's own bulk reflectivity. "Stays" is the point: a thickness where a
|
|
117
|
+
fringe happens to cross the bulk value does not count. The sweep steps finely
|
|
118
|
+
enough to follow both the fringes and the decay, runs to forty `1/e` depths,
|
|
119
|
+
and returns infinity if the reflectivity has not settled by then, as for a
|
|
120
|
+
lossless layer above its critical angle.
|
|
121
|
+
|
|
122
|
+
The Mirror tab compares that thickness with the layer as deposited, at every
|
|
123
|
+
point of the scan, and reports one of three things: the layer reads as bulk
|
|
124
|
+
across the scan, at some of it, or nowhere. For 10 nm of gold on silicon at
|
|
125
|
+
1 nm, with the typical-material model, the gold reads as bulk to one part in
|
|
126
|
+
a thousand only from 0.1° to 0.79° graze. That is a statement about a flat
|
|
127
|
+
mirror at that tolerance, and the tolerance is yours to set.
|
|
128
|
+
|
|
129
|
+
## 5. What it means for a grating
|
|
130
|
+
|
|
131
|
+
The mirror's angle is a graze angle onto a flat surface. A grating meets the
|
|
132
|
+
light at two such angles, and the Mirror tab draws both on an angle scan:
|
|
133
|
+
|
|
134
|
+
- onto the **grating plane**, `sin ζ = sin γ cos α`, and
|
|
135
|
+
- onto the **blaze facet**, `sin ζ = sin γ cos(δ − α)`, for a blazed profile
|
|
136
|
+
([`geometry.facet_graze`](../../src/gratinglab/geometry.py)).
|
|
137
|
+
|
|
138
|
+
If the top layer reads as bulk at those angles, across the wavelengths of
|
|
139
|
+
interest, then taking it as the grating material alone is supported for the
|
|
140
|
+
reflectivity. It is evidence, not proof, for the efficiency: a conformal
|
|
141
|
+
layer on a groove is thinner along some directions than its nominal
|
|
142
|
+
thickness, and multiple reflections between facets see other angles. Where
|
|
143
|
+
the answer matters, model the layers in the RCWA and compare.
|
|
144
|
+
|
|
145
|
+
## 6. Validation evidence
|
|
146
|
+
|
|
147
|
+
Checked in [`tests/test_mirror.py`](../../tests/test_mirror.py):
|
|
148
|
+
|
|
149
|
+
- A bare substrate reproduces the single-interface amplitudes of
|
|
150
|
+
`materials/fresnel.py`, in `s` and `p`, to `10⁻¹²`, from 0.3° to 45°.
|
|
151
|
+
- A four-medium stack agrees with a characteristic-matrix calculation (Born
|
|
152
|
+
and Wolf, §1.6) written out in the test, to `10⁻¹²` at four angles. The two
|
|
153
|
+
share no code.
|
|
154
|
+
- A film of the substrate's own material changes nothing; a thick absorbing
|
|
155
|
+
film reads as its own bulk; the reflectivity stays in `[0, 1]` over angle
|
|
156
|
+
and wavelength; the layer order is innermost first.
|
|
157
|
+
- The evanescent depth below the critical angle matches the closed form for
|
|
158
|
+
a lossless material, and the bulk thickness lies where the reflectivity
|
|
159
|
+
just leaves the tolerance band.
|
|
160
|
+
|
|
161
|
+
## 7. Not yet validated
|
|
162
|
+
|
|
163
|
+
- Against a measured reflectivity curve, or against another code's output.
|
|
164
|
+
The checks above are of the mathematics, and of consistency with this
|
|
165
|
+
project's own Fresnel module.
|
|
166
|
+
- Roughness in a stack. A bare substrate agrees with `fresnel.py` in
|
|
167
|
+
magnitude; nothing independent checks the factor at a buried interface.
|
|
168
|
+
- Whether "bulk on a flat mirror" predicts "bulk on a grating". §5 gives the
|
|
169
|
+
reasoning; no comparison with layered RCWA runs has been made.
|
|
@@ -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.
|
|
25
|
+
__version__ = "0.4.1"
|
|
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
|
|
@@ -32,7 +32,7 @@ __version__ = "0.3.17"
|
|
|
32
32
|
#: the `## <version>` heading, so the release commit that forgets to move it
|
|
33
33
|
#: fails at the point where it is cheapest to fix, the same arrangement as
|
|
34
34
|
#: the version's own section.
|
|
35
|
-
__version_date__ = "2026-11-
|
|
35
|
+
__version_date__ = "2026-11-17"
|
|
36
36
|
|
|
37
37
|
__all__ = [
|
|
38
38
|
"Illumination",
|
|
@@ -71,6 +71,9 @@ _GENERAL_PAGES = (
|
|
|
71
71
|
# made while producing that profile, and those are invisible in the curve.
|
|
72
72
|
# It belongs beside the conventions for the same reason they do.
|
|
73
73
|
("metrology", "Groove Metrology", "theory/metrology.md"),
|
|
74
|
+
# Not a solver either: the coating as a flat stack, which is what the
|
|
75
|
+
# Mirror tab computes and what decides whether a layer may be taken as bulk.
|
|
76
|
+
("mirror", "Flat Mirror & Coating Stacks", "theory/mirror.md"),
|
|
74
77
|
)
|
|
75
78
|
|
|
76
79
|
#: How many parent directories to search before giving up. gui/docs.py sits at
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"""What the Materials tab resolves, draws and says, with no Qt in it.
|
|
2
|
+
|
|
3
|
+
The tab answers three things about one material before it is used: what name
|
|
4
|
+
to write for it, what its index looks like, and whether it covers the
|
|
5
|
+
wavelengths the dock is about to scan. :func:`material_name` builds the name
|
|
6
|
+
from the tab's fields, so nobody has to remember ``factors:SiO2@2.2``;
|
|
7
|
+
:func:`preview` resolves it and checks the scan; :func:`draw` and
|
|
8
|
+
:func:`lines` turn that into the plot and the panel text.
|
|
9
|
+
|
|
10
|
+
Called by :mod:`gratinglab.gui.qt.materials_tab`; tested in
|
|
11
|
+
``tests/test_materials_view.py``.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from dataclasses import dataclass
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
import numpy as np
|
|
20
|
+
|
|
21
|
+
from ..materials import OpticalConstants, lookup
|
|
22
|
+
from ..materials.optical import HC_EV_NM
|
|
23
|
+
from .provenance import Line
|
|
24
|
+
from .theme import order_colors, set_titles, style_axes
|
|
25
|
+
|
|
26
|
+
__all__ = ["KINDS", "MaterialPreview", "material_name", "preview", "draw", "lines"]
|
|
27
|
+
|
|
28
|
+
#: The ways to name a material, as (key, label, what the name field holds).
|
|
29
|
+
KINDS = (
|
|
30
|
+
("table", "Table in your library", "Name"),
|
|
31
|
+
("factors", "Scattering factors + density", "Formula"),
|
|
32
|
+
("typical", "Typical-material model", "Formula"),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def material_name(kind: str, name: str, density: str = "") -> str:
|
|
37
|
+
"""The coating name for the tab's fields; ``""`` when nothing is entered.
|
|
38
|
+
|
|
39
|
+
A density is optional everywhere: a table is rescaled to it
|
|
40
|
+
(``Au@17.5``), and a formula with none uses its default where one exists.
|
|
41
|
+
"""
|
|
42
|
+
name, density = name.strip(), density.strip()
|
|
43
|
+
if not name:
|
|
44
|
+
return ""
|
|
45
|
+
prefix = {"table": "", "factors": "factors:", "typical": "typical:"}[kind]
|
|
46
|
+
return f"{prefix}{name}" + (f"@{density}" if density else "")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass(frozen=True)
|
|
50
|
+
class MaterialPreview:
|
|
51
|
+
name: str
|
|
52
|
+
constants: OpticalConstants
|
|
53
|
+
#: The dock's scan, nm, or None when its fields do not parse.
|
|
54
|
+
scan: tuple[float, float] | None
|
|
55
|
+
#: X-ray-like over most of its range (index near 1): plot the decrement
|
|
56
|
+
#: and absorption on a log axis rather than n and k.
|
|
57
|
+
near_unity: bool
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _scan(start: str, stop: str) -> tuple[float, float] | None:
|
|
61
|
+
try:
|
|
62
|
+
low, high = float(start), float(stop)
|
|
63
|
+
except ValueError:
|
|
64
|
+
return None
|
|
65
|
+
return (low, high) if 0 < low < high else None
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def preview(name: str, scan_start: str = "", scan_stop: str = "") -> MaterialPreview:
|
|
69
|
+
"""Resolve ``name`` and note the scan. Raises what :func:`lookup` raises."""
|
|
70
|
+
constants = lookup(name)
|
|
71
|
+
# Most of the table, not all of it: an X-ray table's longest wavelengths
|
|
72
|
+
# reach |n - 1| of 0.2, and one such corner should not flatten the plot.
|
|
73
|
+
near = bool(constants.near_unity(constants.wavelength_nm).mean() > 0.5)
|
|
74
|
+
return MaterialPreview(name, constants, _scan(scan_start, scan_stop), near)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def covers_scan(p: MaterialPreview) -> bool | None:
|
|
78
|
+
"""Whether the table covers the whole scan; None with no scan to check."""
|
|
79
|
+
if p.scan is None:
|
|
80
|
+
return None
|
|
81
|
+
return bool(p.constants.covers(np.array(p.scan)).all())
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def draw(axes, p: MaterialPreview, theme) -> None:
|
|
85
|
+
"""The index against wavelength, with the dock's scan shaded."""
|
|
86
|
+
axes.clear()
|
|
87
|
+
style_axes(axes, theme)
|
|
88
|
+
c = p.constants
|
|
89
|
+
colors = order_colors(range(2), theme)
|
|
90
|
+
if p.near_unity:
|
|
91
|
+
# Log axes drop a non-positive decrement, as near an edge.
|
|
92
|
+
axes.plot(c.wavelength_nm, np.where(c.decrement > 0, c.decrement, np.nan),
|
|
93
|
+
color=colors[0], label="decrement δ")
|
|
94
|
+
axes.plot(c.wavelength_nm, np.where(c.absorption > 0, c.absorption, np.nan),
|
|
95
|
+
color=colors[1], label="absorption β")
|
|
96
|
+
axes.set_yscale("log")
|
|
97
|
+
axes.set_ylabel("1 − n, k")
|
|
98
|
+
else:
|
|
99
|
+
axes.plot(c.wavelength_nm, 1.0 - c.decrement, color=colors[0], label="n")
|
|
100
|
+
axes.plot(c.wavelength_nm, c.absorption, color=colors[1], label="k")
|
|
101
|
+
axes.set_yscale("linear")
|
|
102
|
+
axes.set_ylabel("n, k")
|
|
103
|
+
axes.set_xscale("log")
|
|
104
|
+
axes.set_xlabel("wavelength (nm)")
|
|
105
|
+
if p.scan is not None:
|
|
106
|
+
axes.axvspan(*p.scan, color=theme.muted, alpha=0.18, label="the dock's scan")
|
|
107
|
+
low, high = c.range_nm
|
|
108
|
+
set_titles(axes, p.name, f"{low:.4g} to {high:.4g} nm, {len(c.wavelength_nm)} points", theme)
|
|
109
|
+
axes.legend(fontsize=8, loc="best")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _short(source: str) -> str:
|
|
113
|
+
"""``source`` with the home directory written ``~``: the library a table
|
|
114
|
+
came from still shows, without a user's whole path in front of it."""
|
|
115
|
+
return source.replace(str(Path.home()), "~")
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def lines(p: MaterialPreview) -> tuple[Line, ...]:
|
|
119
|
+
"""Where it came from, what it covers, and whether that includes the scan."""
|
|
120
|
+
c = p.constants
|
|
121
|
+
low, high = c.range_nm
|
|
122
|
+
out = [
|
|
123
|
+
Line("name: ", "dim"), Line(f"{p.name}\n"),
|
|
124
|
+
Line("source: ", "dim"), Line(f"{_short(c.source)}\n"),
|
|
125
|
+
Line("covers: ", "dim"),
|
|
126
|
+
Line(f"{low:.4g} to {high:.4g} nm ({HC_EV_NM / high:.4g} to {HC_EV_NM / low:.4g} eV)\n"),
|
|
127
|
+
]
|
|
128
|
+
covered = covers_scan(p)
|
|
129
|
+
if covered is None:
|
|
130
|
+
out.append(Line("The dock's wavelength scan is not set, so coverage is not checked.\n", "dim"))
|
|
131
|
+
elif covered:
|
|
132
|
+
out.append(Line(f"Covers the dock's scan, {p.scan[0]:g} to {p.scan[1]:g} nm.\n", "ok"))
|
|
133
|
+
else:
|
|
134
|
+
out.append(Line(
|
|
135
|
+
f"Does not cover the dock's scan, {p.scan[0]:g} to {p.scan[1]:g} nm: a solve "
|
|
136
|
+
"with it would be refused outside the table.\n", "warn"))
|
|
137
|
+
if covered:
|
|
138
|
+
grid = np.linspace(p.scan[0], p.scan[1], 200)
|
|
139
|
+
for caveat in c.caveats(grid):
|
|
140
|
+
out.append(Line(f"{caveat}\n", "warn"))
|
|
141
|
+
return tuple(out)
|