gratinglab 0.4.0__tar.gz → 0.5.0__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.
Files changed (253) hide show
  1. {gratinglab-0.4.0/src/gratinglab.egg-info → gratinglab-0.5.0}/PKG-INFO +36 -12
  2. {gratinglab-0.4.0 → gratinglab-0.5.0}/README.md +35 -11
  3. gratinglab-0.5.0/docs/theory/mirror.md +170 -0
  4. {gratinglab-0.4.0 → gratinglab-0.5.0}/pyproject.toml +1 -0
  5. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/__init__.py +2 -2
  6. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/app.py +20 -0
  7. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/docs.py +3 -0
  8. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/launcher.py +14 -0
  9. gratinglab-0.5.0/src/gratinglab/gui/materials_view.py +141 -0
  10. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/mirror_view.py +125 -24
  11. gratinglab-0.5.0/src/gratinglab/gui/qt/coatings_window.py +178 -0
  12. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_panel.py +76 -17
  13. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/launcher.py +64 -2
  14. gratinglab-0.5.0/src/gratinglab/gui/qt/library_bar.py +178 -0
  15. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/main_window.py +32 -12
  16. gratinglab-0.5.0/src/gratinglab/gui/qt/materials_tab.py +263 -0
  17. gratinglab-0.5.0/src/gratinglab/gui/qt/mirror_tab.py +326 -0
  18. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/setup_tab.py +29 -156
  19. gratinglab-0.5.0/src/gratinglab/gui/qt/stack_editor.py +242 -0
  20. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/__init__.py +16 -0
  21. {gratinglab-0.4.0 → gratinglab-0.5.0/src/gratinglab.egg-info}/PKG-INFO +36 -12
  22. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab.egg-info/SOURCES.txt +9 -0
  23. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab.egg-info/entry_points.txt +1 -0
  24. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_factors.py +3 -0
  25. gratinglab-0.5.0/tests/test_gui_coatings_window.py +163 -0
  26. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_docs.py +5 -0
  27. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_launcher.py +48 -7
  28. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_qt.py +34 -41
  29. gratinglab-0.5.0/tests/test_gui_stack_editor.py +105 -0
  30. gratinglab-0.5.0/tests/test_materials_view.py +129 -0
  31. gratinglab-0.5.0/tests/test_mirror_view.py +139 -0
  32. gratinglab-0.4.0/src/gratinglab/gui/qt/mirror_tab.py +0 -212
  33. gratinglab-0.4.0/tests/test_mirror_view.py +0 -75
  34. {gratinglab-0.4.0 → gratinglab-0.5.0}/LICENSE +0 -0
  35. {gratinglab-0.4.0 → gratinglab-0.5.0}/MANIFEST.in +0 -0
  36. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/conventions.md +0 -0
  37. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/theory/cmethod.md +0 -0
  38. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/theory/integral.md +0 -0
  39. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/theory/metrology.md +0 -0
  40. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/theory/rcwa.md +0 -0
  41. {gratinglab-0.4.0 → gratinglab-0.5.0}/docs/theory/scalar.md +0 -0
  42. {gratinglab-0.4.0 → gratinglab-0.5.0}/setup.cfg +0 -0
  43. {gratinglab-0.4.0 → gratinglab-0.5.0}/setup.py +0 -0
  44. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/checks.py +0 -0
  45. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/compare.py +0 -0
  46. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/convergence.py +0 -0
  47. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/geometry.py +0 -0
  48. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/__init__.py +0 -0
  49. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/camera3d.py +0 -0
  50. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/cmethod_options.py +0 -0
  51. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/comparison.py +0 -0
  52. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/diagram.py +0 -0
  53. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/diagram3d.py +0 -0
  54. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/efficiency_plot.py +0 -0
  55. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/failures.py +0 -0
  56. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/icon.py +0 -0
  57. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/integral_options.py +0 -0
  58. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/label_layout.py +0 -0
  59. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/orders.py +0 -0
  60. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/provenance.py +0 -0
  61. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/__init__.py +0 -0
  62. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
  63. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  64. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  65. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_window.py +0 -0
  66. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/help_menu.py +0 -0
  67. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/integral_tab.py +0 -0
  68. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  69. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
  70. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
  71. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/recent.py +0 -0
  72. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
  73. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  74. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/sizing.py +0 -0
  75. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/theming.py +0 -0
  76. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  77. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/qt/worker.py +0 -0
  78. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/rcwa_options.py +0 -0
  79. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/richtext.py +0 -0
  80. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/scalar_options.py +0 -0
  81. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/state.py +0 -0
  82. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/gui/theme.py +0 -0
  83. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/illumination.py +0 -0
  84. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/io/__init__.py +0 -0
  85. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/io/boundary.py +0 -0
  86. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/io/efficiency_table.py +0 -0
  87. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/io/ggp.py +0 -0
  88. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/io/txl.py +0 -0
  89. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/data/SOURCES.md +0 -0
  90. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/elements.py +0 -0
  91. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/factors.py +0 -0
  92. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/fresnel.py +0 -0
  93. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/nk.py +0 -0
  94. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/optical.py +0 -0
  95. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/refractiveindex.py +0 -0
  96. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/materials/typical.py +0 -0
  97. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/measured.py +0 -0
  98. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/__init__.py +0 -0
  99. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
  100. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/analyzer.py +0 -0
  101. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  102. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/average.py +0 -0
  103. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  104. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  105. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  106. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/cli.py +0 -0
  107. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/config.py +0 -0
  108. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/__init__.py +0 -0
  109. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/analysis.py +0 -0
  110. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  111. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/orientation.py +0 -0
  112. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/processing.py +0 -0
  113. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/region_mask.py +0 -0
  114. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/scars.py +0 -0
  115. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/core/tip.py +0 -0
  116. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/data/__init__.py +0 -0
  117. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/data/aggregation.py +0 -0
  118. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/__init__.py +0 -0
  119. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/icon.py +0 -0
  120. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  121. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  122. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  123. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  124. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  125. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  126. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  127. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  128. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  129. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  130. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  131. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/state.py +0 -0
  132. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/__init__.py +0 -0
  133. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/file_io.py +0 -0
  134. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/ibw.py +0 -0
  135. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/metrics.py +0 -0
  136. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/sem.py +0 -0
  137. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/io/spm.py +0 -0
  138. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/settings.py +0 -0
  139. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/__init__.py +0 -0
  140. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/analysis.py +0 -0
  141. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/icc.py +0 -0
  142. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  143. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  144. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  145. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  146. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  147. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  148. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  149. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  150. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  151. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  152. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/overview.md +0 -0
  153. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  154. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  155. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  156. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  157. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  158. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/metrology/workflows.py +0 -0
  159. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/mirror.py +0 -0
  160. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/problem.py +0 -0
  161. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/__init__.py +0 -0
  162. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/_base.py +0 -0
  163. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/_polyline.py +0 -0
  164. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/_shapes.py +0 -0
  165. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/_trapezoid.py +0 -0
  166. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/profiles/_types.py +0 -0
  167. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/resolution.py +0 -0
  168. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/result.py +0 -0
  169. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/__init__.py +0 -0
  170. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/_conditioning.py +0 -0
  171. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/_execution.py +0 -0
  172. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/_scalar_groove.py +0 -0
  173. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/base.py +0 -0
  174. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
  175. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  176. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  177. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/__init__.py +0 -0
  178. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  179. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_core.py +0 -0
  180. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_finite.py +0 -0
  181. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_greens.py +0 -0
  182. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_kernels.py +0 -0
  183. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  184. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
  185. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  186. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  187. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab/solvers/scalar.py +0 -0
  188. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  189. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab.egg-info/requires.txt +0 -0
  190. {gratinglab-0.4.0 → gratinglab-0.5.0}/src/gratinglab.egg-info/top_level.txt +0 -0
  191. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_changelog.py +0 -0
  192. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_checks.py +0 -0
  193. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_cmethod.py +0 -0
  194. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_compare.py +0 -0
  195. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_conditioning.py +0 -0
  196. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_convergence.py +0 -0
  197. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_cross_method.py +0 -0
  198. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_efficiency_table.py +0 -0
  199. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_four_way.py +0 -0
  200. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_fresnel.py +0 -0
  201. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_geometry.py +0 -0
  202. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_ggp.py +0 -0
  203. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_camera3d.py +0 -0
  204. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_cmethod_options.py +0 -0
  205. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_cmethod_tab.py +0 -0
  206. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_compare_tab.py +0 -0
  207. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_diagram.py +0 -0
  208. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_diagram3d.py +0 -0
  209. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_geometry_window.py +0 -0
  210. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_help_menu.py +0 -0
  211. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_integral_options.py +0 -0
  212. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_mathtext.py +0 -0
  213. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_orders.py +0 -0
  214. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_polish.py +0 -0
  215. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_provenance.py +0 -0
  216. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_provenance_panel.py +0 -0
  217. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_rcwa_options.py +0 -0
  218. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_richtext.py +0 -0
  219. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_scalar_options.py +0 -0
  220. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_state.py +0 -0
  221. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_gui_theme.py +0 -0
  222. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_illumination.py +0 -0
  223. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_core.py +0 -0
  224. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_corpus.py +0 -0
  225. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_finite.py +0 -0
  226. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_graded.py +0 -0
  227. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_greens.py +0 -0
  228. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_kernels.py +0 -0
  229. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_measured_polygon.py +0 -0
  230. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_operators.py +0 -0
  231. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_integral_solver.py +0 -0
  232. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_io_boundary.py +0 -0
  233. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_label_layout.py +0 -0
  234. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_littrow.py +0 -0
  235. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_materials.py +0 -0
  236. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_measured.py +0 -0
  237. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_mirror.py +0 -0
  238. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_nk.py +0 -0
  239. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_perturbation.py +0 -0
  240. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_profiles.py +0 -0
  241. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_rayleigh_anomaly.py +0 -0
  242. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_rcwa.py +0 -0
  243. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_rcwa_benchmarks.py +0 -0
  244. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_refractiveindex.py +0 -0
  245. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_resolution.py +0 -0
  246. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_result.py +0 -0
  247. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_scalar.py +0 -0
  248. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_solver_conformance.py +0 -0
  249. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_solver_execution.py +0 -0
  250. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_solver_progress.py +0 -0
  251. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_trapezoidal_solvers.py +0 -0
  252. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_txl.py +0 -0
  253. {gratinglab-0.4.0 → gratinglab-0.5.0}/tests/test_typical.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.4.0
3
+ Version: 0.5.0
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
@@ -318,10 +318,11 @@ pipeline recovers the period and blaze angle used to generate it.
318
318
  gratinglab-app # the chooser: one place to start, every window
319
319
  gratinglab-gui # straight to geometry, solvers, comparison
320
320
  gratinglab-geometry # straight to the geometry, with no solver
321
+ gratinglab-coatings # straight to materials and the coating as a mirror
321
322
  gratinglab-metrology-gui # straight to AFM import, blaze angles, boundary profiles
322
323
  ```
323
324
 
324
- `gratinglab-app` opens a chooser for the three windows, which stays open as the main
325
+ `gratinglab-app` opens a chooser for the four windows, which stays open as the main
325
326
  menu while you work, as Gwiddion's toolbox does; closing it closes every window. Each
326
327
  window has a **Go** menu that switches to another window or back to the chooser
327
328
  (`Ctrl+Shift+M`). There is one window of each kind, so opening one that is already
@@ -330,8 +331,8 @@ open brings it forward. The chooser has the same
330
331
  whole application, and the theory pages can be reached without opening a window
331
332
  first. While the chooser is on screen it imports both windows on a background thread,
332
333
  so the first window opens in about a fifth of a second; the matplotlib and scipy
333
- imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
334
- `gratinglab-metrology-gui` open one window directly.
334
+ imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry`,
335
+ `gratinglab-coatings` and `gratinglab-metrology-gui` open one window directly.
335
336
 
336
337
  The geometry window (**Explore a geometry**) is the efficiency window's geometry form
337
338
  and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
@@ -339,14 +340,37 @@ ladder, redrawn as the form changes, with no solver. **Send to efficiency window
339
340
  (`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
340
341
  solves nothing; the efficiency window keeps its own Grating Geometry tab.
341
342
 
342
- The **Mirror** tab treats the dock's coating stack as a flat mirror, before any
343
- grooves: the Coating as substrate under its Layers (innermost first), with the
344
- Roughness at every interface. It plots the specular reflectivity against graze angle
345
- or wavelength, the 1/e penetration depth in each material, and the thickness the
346
- outermost layer needs before what lies beneath it changes the reflectivity by less
347
- than a tolerance, so you can see whether that layer may be modelled as bulk. The same
348
- is `gratinglab.mirror.Mirror` from Python. Coating and Layers both take model names
349
- such as `typical:Au` and `factors:SiO2@2.2`.
343
+ The efficiency window's dock describes the surface as a stack, in its **Surface**
344
+ group: one row per coating layer, outermost at the top as the light meets them, each
345
+ with a material and a thickness in nm, above the **Grating** material the grooves are
346
+ cut into. Every material box lists your library and also takes a typed model name
347
+ such as `typical:Au` or `factors:SiO2@2.2`.
348
+
349
+ The efficiency window's **Setup** tab is the reference page for what is installed
350
+ and what a coating means to each solver.
351
+
352
+ The coatings window (**Design a coating**) is for the stack on its own, with no
353
+ grooves and no solver. Its dock holds the same stack, over a **Substrate**, and a
354
+ wavelength range. **Send to efficiency window** (`Ctrl+E`) copies the stack into the
355
+ efficiency window's Surface group and leaves its grating, mount and wavelengths
356
+ alone; the efficiency window's **Send coating to coatings window** (`Ctrl+K`) is the
357
+ way back. It has two tabs.
358
+
359
+ **Materials** builds a material's name from a kind, a table name or formula and an
360
+ optional density, plots its index against wavelength with the dock's scan shaded, and
361
+ says whether it covers that scan. Two buttons put it in the stack, as the substrate
362
+ or as a new top layer. Your library is listed there, with the buttons that add a
363
+ table to it, rescan it and open its folder.
364
+
365
+ **Mirror** treats the stack as a flat mirror, with the roughness at every interface.
366
+ It plots the specular reflectivity against graze angle or wavelength, the 1/e
367
+ penetration depth in each material, and the thickness the outermost layer needs
368
+ before what lies beneath it changes the reflectivity by less than a tolerance. Its
369
+ answer, whether that layer reads as bulk, is one line above the plots, and when it
370
+ does a button makes the layer the substrate on its own. The tab recomputes as you
371
+ type. An angle scan marks the graze angles named in **Mark angles**, which the
372
+ efficiency window fills with the angles its mount puts light at when it sends a
373
+ coating over. The same calculation is `gratinglab.mirror.Mirror` from Python.
350
374
 
351
375
  The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
352
376
  system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
@@ -274,10 +274,11 @@ pipeline recovers the period and blaze angle used to generate it.
274
274
  gratinglab-app # the chooser: one place to start, every window
275
275
  gratinglab-gui # straight to geometry, solvers, comparison
276
276
  gratinglab-geometry # straight to the geometry, with no solver
277
+ gratinglab-coatings # straight to materials and the coating as a mirror
277
278
  gratinglab-metrology-gui # straight to AFM import, blaze angles, boundary profiles
278
279
  ```
279
280
 
280
- `gratinglab-app` opens a chooser for the three windows, which stays open as the main
281
+ `gratinglab-app` opens a chooser for the four windows, which stays open as the main
281
282
  menu while you work, as Gwiddion's toolbox does; closing it closes every window. Each
282
283
  window has a **Go** menu that switches to another window or back to the chooser
283
284
  (`Ctrl+Shift+M`). There is one window of each kind, so opening one that is already
@@ -286,8 +287,8 @@ open brings it forward. The chooser has the same
286
287
  whole application, and the theory pages can be reached without opening a window
287
288
  first. While the chooser is on screen it imports both windows on a background thread,
288
289
  so the first window opens in about a fifth of a second; the matplotlib and scipy
289
- imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry` and
290
- `gratinglab-metrology-gui` open one window directly.
290
+ imports otherwise take several seconds. `gratinglab-gui`, `gratinglab-geometry`,
291
+ `gratinglab-coatings` and `gratinglab-metrology-gui` open one window directly.
291
292
 
292
293
  The geometry window (**Explore a geometry**) is the efficiency window's geometry form
293
294
  and Grating Geometry tab on their own: the 3D view, the cross-section and the sin β
@@ -295,14 +296,37 @@ ladder, redrawn as the form changes, with no solver. **Send to efficiency window
295
296
  (`Ctrl+E`) copies its form into the efficiency window, opening it if need be, and
296
297
  solves nothing; the efficiency window keeps its own Grating Geometry tab.
297
298
 
298
- The **Mirror** tab treats the dock's coating stack as a flat mirror, before any
299
- grooves: the Coating as substrate under its Layers (innermost first), with the
300
- Roughness at every interface. It plots the specular reflectivity against graze angle
301
- or wavelength, the 1/e penetration depth in each material, and the thickness the
302
- outermost layer needs before what lies beneath it changes the reflectivity by less
303
- than a tolerance, so you can see whether that layer may be modelled as bulk. The same
304
- is `gratinglab.mirror.Mirror` from Python. Coating and Layers both take model names
305
- such as `typical:Au` and `factors:SiO2@2.2`.
299
+ The efficiency window's dock describes the surface as a stack, in its **Surface**
300
+ group: one row per coating layer, outermost at the top as the light meets them, each
301
+ with a material and a thickness in nm, above the **Grating** material the grooves are
302
+ cut into. Every material box lists your library and also takes a typed model name
303
+ such as `typical:Au` or `factors:SiO2@2.2`.
304
+
305
+ The efficiency window's **Setup** tab is the reference page for what is installed
306
+ and what a coating means to each solver.
307
+
308
+ The coatings window (**Design a coating**) is for the stack on its own, with no
309
+ grooves and no solver. Its dock holds the same stack, over a **Substrate**, and a
310
+ wavelength range. **Send to efficiency window** (`Ctrl+E`) copies the stack into the
311
+ efficiency window's Surface group and leaves its grating, mount and wavelengths
312
+ alone; the efficiency window's **Send coating to coatings window** (`Ctrl+K`) is the
313
+ way back. It has two tabs.
314
+
315
+ **Materials** builds a material's name from a kind, a table name or formula and an
316
+ optional density, plots its index against wavelength with the dock's scan shaded, and
317
+ says whether it covers that scan. Two buttons put it in the stack, as the substrate
318
+ or as a new top layer. Your library is listed there, with the buttons that add a
319
+ table to it, rescan it and open its folder.
320
+
321
+ **Mirror** treats the stack as a flat mirror, with the roughness at every interface.
322
+ It plots the specular reflectivity against graze angle or wavelength, the 1/e
323
+ penetration depth in each material, and the thickness the outermost layer needs
324
+ before what lies beneath it changes the reflectivity by less than a tolerance. Its
325
+ answer, whether that layer reads as bulk, is one line above the plots, and when it
326
+ does a button makes the layer the substrate on its own. The tab recomputes as you
327
+ type. An angle scan marks the graze angles named in **Mark angles**, which the
328
+ efficiency window fills with the angles its mount puts light at when it sends a
329
+ coating over. The same calculation is `gratinglab.mirror.Mirror` from Python.
306
330
 
307
331
  The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
308
332
  system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
@@ -0,0 +1,170 @@
1
+ # The coating as a flat mirror
2
+
3
+ Implemented in [`mirror.py`](../../src/gratinglab/mirror.py), and shown by the
4
+ coatings window's 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 efficiency window'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 can mark 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. The efficiency window works both out from its mount
133
+ and sends them with a coating, and the Mirror tab marks them on an angle scan:
134
+
135
+ - onto the **grating plane**, `sin ζ = sin γ cos α`, and
136
+ - onto the **blaze facet**, `sin ζ = sin γ cos(δ − α)`, for a blazed profile
137
+ ([`geometry.facet_graze`](../../src/gratinglab/geometry.py)).
138
+
139
+ If the top layer reads as bulk at those angles, across the wavelengths of
140
+ interest, then taking it as the grating material alone is supported for the
141
+ reflectivity. It is evidence, not proof, for the efficiency: a conformal
142
+ layer on a groove is thinner along some directions than its nominal
143
+ thickness, and multiple reflections between facets see other angles. Where
144
+ the answer matters, model the layers in the RCWA and compare.
145
+
146
+ ## 6. Validation evidence
147
+
148
+ Checked in [`tests/test_mirror.py`](../../tests/test_mirror.py):
149
+
150
+ - A bare substrate reproduces the single-interface amplitudes of
151
+ `materials/fresnel.py`, in `s` and `p`, to `10⁻¹²`, from 0.3° to 45°.
152
+ - A four-medium stack agrees with a characteristic-matrix calculation (Born
153
+ and Wolf, §1.6) written out in the test, to `10⁻¹²` at four angles. The two
154
+ share no code.
155
+ - A film of the substrate's own material changes nothing; a thick absorbing
156
+ film reads as its own bulk; the reflectivity stays in `[0, 1]` over angle
157
+ and wavelength; the layer order is innermost first.
158
+ - The evanescent depth below the critical angle matches the closed form for
159
+ a lossless material, and the bulk thickness lies where the reflectivity
160
+ just leaves the tolerance band.
161
+
162
+ ## 7. Not yet validated
163
+
164
+ - Against a measured reflectivity curve, or against another code's output.
165
+ The checks above are of the mathematics, and of consistency with this
166
+ project's own Fresnel module.
167
+ - Roughness in a stack. A bare substrate agrees with `fresnel.py` in
168
+ magnitude; nothing independent checks the factor at a buried interface.
169
+ - Whether "bulk on a flat mirror" predicts "bulk on a grating". §5 gives the
170
+ reasoning; no comparison with layered RCWA runs has been made.
@@ -130,6 +130,7 @@ mut = ["mutmut>=3.2,<3.3"]
130
130
  gratinglab-app = "gratinglab.gui.launcher:main"
131
131
  gratinglab-gui = "gratinglab.gui.app:main"
132
132
  gratinglab-geometry = "gratinglab.gui.app:geometry_main"
133
+ gratinglab-coatings = "gratinglab.gui.app:coatings_main"
133
134
  gratinglab-metrology-gui = "gratinglab.metrology.gui:main"
134
135
  # The metrology CLI, carried over unchanged. It still takes no arguments and
135
136
  # dispatches on `config.ANALYSIS_MODE`; reconciling that with the rest of the
@@ -22,7 +22,7 @@ from .measured import MeasuredEfficiency, MeasurementProvenance
22
22
  from .resolution import ResolvingPower, resolving_power
23
23
  from .result import EfficiencyScan, OrderEfficiency, Provenance
24
24
 
25
- __version__ = "0.4.0"
25
+ __version__ = "0.5.0"
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.4.0"
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-16"
35
+ __version_date__ = "2026-11-17"
36
36
 
37
37
  __all__ = [
38
38
  "Illumination",
@@ -95,5 +95,25 @@ def geometry_main() -> int:
95
95
  return app.exec()
96
96
 
97
97
 
98
+ def coatings_main() -> int:
99
+ """Console-script entry point for ``gratinglab-coatings``.
100
+
101
+ The coatings window alone. Its "Send to efficiency window" opens the
102
+ efficiency window in the same process when it is used.
103
+ """
104
+ QApplication = _require_qt()
105
+ from .launcher import mode
106
+ from .qt.launcher import open_window
107
+
108
+ app = QApplication(sys.argv)
109
+ from .qt.theming import install
110
+
111
+ install(app)
112
+ # Through the launcher, for the Go menu, as `geometry_main` does.
113
+ window = open_window(mode("coatings"))
114
+ _bring_to_front(window)
115
+ return app.exec()
116
+
117
+
98
118
  if __name__ == "__main__": # pragma: no cover
99
119
  sys.exit(main())
@@ -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
@@ -100,6 +100,20 @@ MODES = (
100
100
  script="gratinglab-geometry",
101
101
  summary="look at its geometry",
102
102
  ),
103
+ # Before the solvers, in the order the work goes: what the coating does
104
+ # as a flat mirror decides how it is modelled on the grating. No help of
105
+ # its own; the mirror page is among the efficiency window's.
106
+ Mode(
107
+ key="coatings",
108
+ title="Design a coating",
109
+ blurb="Name a material and see its index, build a stack of layers, "
110
+ "and reflect it as a flat mirror to see how deep the light "
111
+ "goes. Send the stack to the efficiency window when it is "
112
+ "settled.",
113
+ window="gratinglab.gui.qt.coatings_window:CoatingsWindow",
114
+ script="gratinglab-coatings",
115
+ summary="design its coating",
116
+ ),
103
117
  Mode(
104
118
  key="efficiency",
105
119
  title="Compute efficiency",
@@ -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)