gratinglab 0.4.1__tar.gz → 0.5.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.
Files changed (254) hide show
  1. {gratinglab-0.4.1/src/gratinglab.egg-info → gratinglab-0.5.1}/PKG-INFO +33 -19
  2. {gratinglab-0.4.1 → gratinglab-0.5.1}/README.md +32 -18
  3. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/mirror.md +5 -4
  4. {gratinglab-0.4.1 → gratinglab-0.5.1}/pyproject.toml +1 -0
  5. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/__init__.py +57 -1
  6. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/app.py +20 -0
  7. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/launcher.py +14 -0
  8. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/mirror_view.py +43 -7
  9. gratinglab-0.5.1/src/gratinglab/gui/qt/coatings_window.py +204 -0
  10. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/geometry_panel.py +29 -5
  11. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/library_bar.py +18 -2
  12. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/main_window.py +78 -23
  13. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/materials_tab.py +6 -5
  14. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/mirror_tab.py +21 -10
  15. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/setup_tab.py +7 -7
  16. gratinglab-0.5.1/src/gratinglab/gui/script.py +204 -0
  17. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/__init__.py +12 -0
  18. {gratinglab-0.4.1 → gratinglab-0.5.1/src/gratinglab.egg-info}/PKG-INFO +33 -19
  19. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab.egg-info/SOURCES.txt +5 -0
  20. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab.egg-info/entry_points.txt +1 -0
  21. gratinglab-0.5.1/tests/test_examples.py +66 -0
  22. gratinglab-0.5.1/tests/test_gui_coatings_window.py +163 -0
  23. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_launcher.py +7 -5
  24. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_qt.py +30 -78
  25. gratinglab-0.5.1/tests/test_gui_script.py +206 -0
  26. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_materials_view.py +6 -8
  27. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_mirror_view.py +23 -3
  28. {gratinglab-0.4.1 → gratinglab-0.5.1}/LICENSE +0 -0
  29. {gratinglab-0.4.1 → gratinglab-0.5.1}/MANIFEST.in +0 -0
  30. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/conventions.md +0 -0
  31. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/cmethod.md +0 -0
  32. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/integral.md +0 -0
  33. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/metrology.md +0 -0
  34. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/rcwa.md +0 -0
  35. {gratinglab-0.4.1 → gratinglab-0.5.1}/docs/theory/scalar.md +0 -0
  36. {gratinglab-0.4.1 → gratinglab-0.5.1}/setup.cfg +0 -0
  37. {gratinglab-0.4.1 → gratinglab-0.5.1}/setup.py +0 -0
  38. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/checks.py +0 -0
  39. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/compare.py +0 -0
  40. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/convergence.py +0 -0
  41. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/geometry.py +0 -0
  42. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/__init__.py +0 -0
  43. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/camera3d.py +0 -0
  44. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/cmethod_options.py +0 -0
  45. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/comparison.py +0 -0
  46. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/diagram.py +0 -0
  47. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/diagram3d.py +0 -0
  48. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/docs.py +0 -0
  49. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/efficiency_plot.py +0 -0
  50. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/failures.py +0 -0
  51. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/icon.py +0 -0
  52. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/integral_options.py +0 -0
  53. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/label_layout.py +0 -0
  54. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/materials_view.py +0 -0
  55. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/orders.py +0 -0
  56. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/provenance.py +0 -0
  57. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/__init__.py +0 -0
  58. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
  59. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  60. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  61. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/geometry_window.py +0 -0
  62. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/help_menu.py +0 -0
  63. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/integral_tab.py +0 -0
  64. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/launcher.py +0 -0
  65. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  66. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
  67. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
  68. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/recent.py +0 -0
  69. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
  70. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  71. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/sizing.py +0 -0
  72. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/stack_editor.py +0 -0
  73. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/theming.py +0 -0
  74. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  75. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/qt/worker.py +0 -0
  76. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/rcwa_options.py +0 -0
  77. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/richtext.py +0 -0
  78. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/scalar_options.py +0 -0
  79. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/state.py +0 -0
  80. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/gui/theme.py +0 -0
  81. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/illumination.py +0 -0
  82. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/io/__init__.py +0 -0
  83. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/io/boundary.py +0 -0
  84. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/io/efficiency_table.py +0 -0
  85. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/io/ggp.py +0 -0
  86. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/io/txl.py +0 -0
  87. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/__init__.py +0 -0
  88. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/data/SOURCES.md +0 -0
  89. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/elements.py +0 -0
  90. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/factors.py +0 -0
  91. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/fresnel.py +0 -0
  92. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/nk.py +0 -0
  93. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/optical.py +0 -0
  94. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/refractiveindex.py +0 -0
  95. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/materials/typical.py +0 -0
  96. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/measured.py +0 -0
  97. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/__init__.py +0 -0
  98. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
  99. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/analyzer.py +0 -0
  100. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  101. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/boundary/average.py +0 -0
  102. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  103. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  104. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  105. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/cli.py +0 -0
  106. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/config.py +0 -0
  107. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/__init__.py +0 -0
  108. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/analysis.py +0 -0
  109. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  110. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/orientation.py +0 -0
  111. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/processing.py +0 -0
  112. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/region_mask.py +0 -0
  113. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/scars.py +0 -0
  114. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/core/tip.py +0 -0
  115. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/data/__init__.py +0 -0
  116. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/data/aggregation.py +0 -0
  117. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/__init__.py +0 -0
  118. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/icon.py +0 -0
  119. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  120. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  121. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  122. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  123. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  124. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  125. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  126. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  127. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  128. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  129. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  130. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/gui/state.py +0 -0
  131. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/__init__.py +0 -0
  132. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/file_io.py +0 -0
  133. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/ibw.py +0 -0
  134. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/metrics.py +0 -0
  135. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/sem.py +0 -0
  136. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/io/spm.py +0 -0
  137. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/settings.py +0 -0
  138. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/stats/__init__.py +0 -0
  139. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/stats/analysis.py +0 -0
  140. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/stats/icc.py +0 -0
  141. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  142. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  143. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  144. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  145. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  146. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  147. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  148. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  149. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  150. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  151. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/overview.md +0 -0
  152. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  153. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  154. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  155. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  156. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  157. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/metrology/workflows.py +0 -0
  158. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/mirror.py +0 -0
  159. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/problem.py +0 -0
  160. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/__init__.py +0 -0
  161. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/_base.py +0 -0
  162. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/_polyline.py +0 -0
  163. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/_shapes.py +0 -0
  164. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/_trapezoid.py +0 -0
  165. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/profiles/_types.py +0 -0
  166. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/resolution.py +0 -0
  167. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/result.py +0 -0
  168. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/_conditioning.py +0 -0
  169. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/_execution.py +0 -0
  170. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/_scalar_groove.py +0 -0
  171. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/base.py +0 -0
  172. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
  173. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  174. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  175. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/__init__.py +0 -0
  176. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  177. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_core.py +0 -0
  178. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_finite.py +0 -0
  179. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_greens.py +0 -0
  180. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_kernels.py +0 -0
  181. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  182. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
  183. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  184. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  185. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab/solvers/scalar.py +0 -0
  186. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  187. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab.egg-info/requires.txt +0 -0
  188. {gratinglab-0.4.1 → gratinglab-0.5.1}/src/gratinglab.egg-info/top_level.txt +0 -0
  189. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_changelog.py +0 -0
  190. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_checks.py +0 -0
  191. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_cmethod.py +0 -0
  192. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_compare.py +0 -0
  193. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_conditioning.py +0 -0
  194. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_convergence.py +0 -0
  195. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_cross_method.py +0 -0
  196. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_efficiency_table.py +0 -0
  197. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_factors.py +0 -0
  198. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_four_way.py +0 -0
  199. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_fresnel.py +0 -0
  200. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_geometry.py +0 -0
  201. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_ggp.py +0 -0
  202. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_camera3d.py +0 -0
  203. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_cmethod_options.py +0 -0
  204. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_cmethod_tab.py +0 -0
  205. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_compare_tab.py +0 -0
  206. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_diagram.py +0 -0
  207. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_diagram3d.py +0 -0
  208. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_docs.py +0 -0
  209. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_geometry_window.py +0 -0
  210. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_help_menu.py +0 -0
  211. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_integral_options.py +0 -0
  212. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_mathtext.py +0 -0
  213. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_orders.py +0 -0
  214. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_polish.py +0 -0
  215. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_provenance.py +0 -0
  216. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_provenance_panel.py +0 -0
  217. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_rcwa_options.py +0 -0
  218. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_richtext.py +0 -0
  219. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_scalar_options.py +0 -0
  220. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_stack_editor.py +0 -0
  221. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_state.py +0 -0
  222. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_gui_theme.py +0 -0
  223. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_illumination.py +0 -0
  224. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_core.py +0 -0
  225. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_corpus.py +0 -0
  226. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_finite.py +0 -0
  227. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_graded.py +0 -0
  228. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_greens.py +0 -0
  229. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_kernels.py +0 -0
  230. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_measured_polygon.py +0 -0
  231. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_operators.py +0 -0
  232. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_integral_solver.py +0 -0
  233. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_io_boundary.py +0 -0
  234. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_label_layout.py +0 -0
  235. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_littrow.py +0 -0
  236. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_materials.py +0 -0
  237. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_measured.py +0 -0
  238. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_mirror.py +0 -0
  239. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_nk.py +0 -0
  240. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_perturbation.py +0 -0
  241. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_profiles.py +0 -0
  242. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_rayleigh_anomaly.py +0 -0
  243. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_rcwa.py +0 -0
  244. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_rcwa_benchmarks.py +0 -0
  245. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_refractiveindex.py +0 -0
  246. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_resolution.py +0 -0
  247. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_result.py +0 -0
  248. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_scalar.py +0 -0
  249. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_solver_conformance.py +0 -0
  250. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_solver_execution.py +0 -0
  251. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_solver_progress.py +0 -0
  252. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_trapezoidal_solvers.py +0 -0
  253. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_txl.py +0 -0
  254. {gratinglab-0.4.1 → gratinglab-0.5.1}/tests/test_typical.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.4.1
3
+ Version: 0.5.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
@@ -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 β
@@ -345,21 +346,31 @@ with a material and a thickness in nm, above the **Grating** material the groove
345
346
  cut into. Every material box lists your library and also takes a typed model name
346
347
  such as `typical:Au` or `factors:SiO2@2.2`.
347
348
 
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.
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.
363
374
 
364
375
  The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
365
376
  system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
@@ -436,10 +447,13 @@ icon --app gratinglab` regenerates the icon from the artwork in `gratinglab.gui.
436
447
 
437
448
  | Document | Contents |
438
449
  |---|---|
450
+ | [`docs/python.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/python.md) | Using gratinglab from your own code: the objects, the result, materials, the mirror, and "Copy as Python" from the windows |
451
+ | [`examples/`](https://github.com/jamccoy/gratinglab/tree/master/examples) | Short scripts that use gratinglab from your own code: an efficiency scan, two solvers compared, your own optical constants, a coating as a mirror, a parameter sweep; with a table of what to import for what |
439
452
  | [`docs/roadmap.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/roadmap.md) | The current state of the project, planned work and open questions; the place to start |
440
453
  | [`docs/conventions.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/conventions.md) | The normative definitions: signs, units, normalizations, and errata in the references |
441
454
  | [`docs/theory/scalar.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/scalar.md) | The derivation of the scalar solver, its closed-form results and its limits |
442
455
  | [`docs/theory/integral.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/integral.md) | The boundary-integral solver: conical formulation, perfect and finite conductivity |
456
+ | [`docs/theory/mirror.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/mirror.md) | The coating as a flat mirror: the recursion, what the penetration depth and bulk thickness mean, and what is and is not validated |
443
457
  | [`docs/theory/metrology.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/metrology.md) | The assumptions of the AFM pipeline, what it measures and what it does not, including what tip erosion can recover |
444
458
  | [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md) | The X-ray index model used without a table, what it is checked against, and its measured accuracy |
445
459
  | [`docs/findings.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/findings.md) | Empirical results, each with the evidence for it |
@@ -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 β
@@ -301,21 +302,31 @@ with a material and a thickness in nm, above the **Grating** material the groove
301
302
  cut into. Every material box lists your library and also takes a typed model name
302
303
  such as `typical:Au` or `factors:SiO2@2.2`.
303
304
 
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.
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.
319
330
 
320
331
  The windows are built with Qt (PySide6), so `pip install "gratinglab[gui]"` needs no
321
332
  system toolkit to be installed first. PySide6 is licensed under the LGPLv3 and is an
@@ -392,10 +403,13 @@ icon --app gratinglab` regenerates the icon from the artwork in `gratinglab.gui.
392
403
 
393
404
  | Document | Contents |
394
405
  |---|---|
406
+ | [`docs/python.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/python.md) | Using gratinglab from your own code: the objects, the result, materials, the mirror, and "Copy as Python" from the windows |
407
+ | [`examples/`](https://github.com/jamccoy/gratinglab/tree/master/examples) | Short scripts that use gratinglab from your own code: an efficiency scan, two solvers compared, your own optical constants, a coating as a mirror, a parameter sweep; with a table of what to import for what |
395
408
  | [`docs/roadmap.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/roadmap.md) | The current state of the project, planned work and open questions; the place to start |
396
409
  | [`docs/conventions.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/conventions.md) | The normative definitions: signs, units, normalizations, and errata in the references |
397
410
  | [`docs/theory/scalar.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/scalar.md) | The derivation of the scalar solver, its closed-form results and its limits |
398
411
  | [`docs/theory/integral.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/integral.md) | The boundary-integral solver: conical formulation, perfect and finite conductivity |
412
+ | [`docs/theory/mirror.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/mirror.md) | The coating as a flat mirror: the recursion, what the penetration depth and bulk thickness mean, and what is and is not validated |
399
413
  | [`docs/theory/metrology.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/metrology.md) | The assumptions of the AFM pipeline, what it measures and what it does not, including what tip erosion can recover |
400
414
  | [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md) | The X-ray index model used without a table, what it is checked against, and its measured accuracy |
401
415
  | [`docs/findings.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/findings.md) | Empirical results, each with the evidence for it |
@@ -1,7 +1,7 @@
1
1
  # The coating as a flat mirror
2
2
 
3
3
  Implemented in [`mirror.py`](../../src/gratinglab/mirror.py), and shown by the
4
- Mirror tab. Symbols and sign conventions follow
4
+ coatings window's Mirror tab. Symbols and sign conventions follow
5
5
  [`conventions.md`](../conventions.md). This page says what the calculation is,
6
6
  what its three outputs mean, and what has been checked; the section numbers
7
7
  are for citing.
@@ -16,7 +16,7 @@ layers under it can be left out of the grating calculation?
16
16
 
17
17
  A stack of flat, parallel, homogeneous layers under vacuum, on a substrate
18
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,
19
+ carries: `coating` (the efficiency window's **Grating** material) is the substrate here,
20
20
  and `layers` sit on it, innermost first, so the last layer is the surface the
21
21
  light meets.
22
22
 
@@ -30,7 +30,7 @@ What a flat stack leaves out is everything the grooves do. On a grating a
30
30
  layer is conformal: it follows the groove and rounds its convex corners, and
31
31
  the light meets each facet at its own angle. Only the
32
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
33
+ stack at one angle at a time, which is why the Mirror tab can mark the angles
34
34
  your mount actually uses (§5).
35
35
 
36
36
  ## 2. Reflectivity: Parratt's recursion
@@ -129,7 +129,8 @@ mirror at that tolerance, and the tolerance is yours to set.
129
129
  ## 5. What it means for a grating
130
130
 
131
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:
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:
133
134
 
134
135
  - onto the **grating plane**, `sin ζ = sin γ cos α`, and
135
136
  - onto the **blaze facet**, `sin ζ = sin γ cos(δ − α)`, for a blazed profile
@@ -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
@@ -13,16 +13,59 @@ lengths in nm, angles in degrees at the API boundary.
13
13
  >>> from gratinglab import Illumination
14
14
  >>> Illumination.offplane(graze=1.5, azimuth=0.97).gamma_deg
15
15
  1.5
16
+
17
+ What a script needs is importable from here::
18
+
19
+ from gratinglab import Problem, Blazed, Illumination, solve, materials, Mirror
20
+
21
+ The grating, the profiles, the light and the result types are imported with
22
+ the package. The solvers, the comparison and the mirror are looked up on first
23
+ use (:func:`__getattr__`), so ``import gratinglab`` does not pay for scipy's
24
+ linear algebra until something is solved. ``examples/`` shows them in use.
16
25
  """
17
26
 
18
27
  from __future__ import annotations
19
28
 
29
+ from importlib import import_module
30
+ from typing import TYPE_CHECKING
31
+
32
+ from . import materials
20
33
  from .illumination import Illumination, Polarization
21
34
  from .measured import MeasuredEfficiency, MeasurementProvenance
35
+ from .problem import ConformalLayer, Problem
36
+ from .profiles import Blazed, Lamellar, Sinusoidal, Trapezoidal
22
37
  from .resolution import ResolvingPower, resolving_power
23
38
  from .result import EfficiencyScan, OrderEfficiency, Provenance
24
39
 
25
- __version__ = "0.4.1"
40
+ if TYPE_CHECKING: # for editors and type checkers; at run time these are lazy
41
+ from .compare import align, sweep
42
+ from .mirror import Mirror
43
+ from .solvers import available_solvers, get_solver, solve
44
+
45
+ #: Names resolved on first use, and the module each lives in.
46
+ _LAZY = {
47
+ "solve": "gratinglab.solvers",
48
+ "get_solver": "gratinglab.solvers",
49
+ "available_solvers": "gratinglab.solvers",
50
+ "sweep": "gratinglab.compare",
51
+ "align": "gratinglab.compare",
52
+ "Mirror": "gratinglab.mirror",
53
+ }
54
+
55
+
56
+ def __getattr__(name: str):
57
+ """Import a lazy name's module the first time the name is asked for."""
58
+ if name in _LAZY:
59
+ value = getattr(import_module(_LAZY[name]), name)
60
+ globals()[name] = value # so the next lookup is an ordinary one
61
+ return value
62
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
63
+
64
+
65
+ def __dir__() -> list[str]:
66
+ return sorted({*globals(), *_LAZY})
67
+
68
+ __version__ = "0.5.1"
26
69
 
27
70
  #: The day this version was released, ISO 8601. It sits beside the version
28
71
  #: rather than being read from CHANGELOG.md at run time because the changelog
@@ -35,8 +78,21 @@ __version__ = "0.4.1"
35
78
  __version_date__ = "2026-11-17"
36
79
 
37
80
  __all__ = [
81
+ "Problem",
82
+ "ConformalLayer",
83
+ "Blazed",
84
+ "Lamellar",
85
+ "Sinusoidal",
86
+ "Trapezoidal",
38
87
  "Illumination",
39
88
  "Polarization",
89
+ "solve",
90
+ "get_solver",
91
+ "available_solvers",
92
+ "sweep",
93
+ "align",
94
+ "Mirror",
95
+ "materials",
40
96
  "EfficiencyScan",
41
97
  "OrderEfficiency",
42
98
  "Provenance",
@@ -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())
@@ -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",
@@ -6,9 +6,11 @@ one place whether it is about to be ruled or only reflected from. The tab's
6
6
  own settings choose the scan: graze angle at one wavelength, or wavelength at
7
7
  one graze, over the dock's wavelengths or the tab's own. :func:`compute`
8
8
  returns a :class:`MirrorResult`; :func:`verdict` is the one-line answer,
9
- :func:`draw` and :func:`lines` the two plots and the panel text. The dock's
10
- mount is drawn on an angle scan as markers (:func:`mount_markers`), so the
11
- angles the grating will actually be used at can be read off the curve.
9
+ :func:`draw` and :func:`lines` the two plots and the panel text. An angle
10
+ scan marks the graze angles named in the tab's own Mark angles field, so the
11
+ angles a grating will actually be used at can be read off the curve. The
12
+ efficiency window fills that field from its mount when it sends a coating
13
+ over (:func:`mount_markers`, :func:`marks_text`).
12
14
 
13
15
  Called by :mod:`gratinglab.gui.qt.mirror_tab`; tested in
14
16
  ``tests/test_mirror_view.py``.
@@ -30,7 +32,7 @@ from .theme import order_colors, set_titles, style_axes
30
32
 
31
33
  __all__ = [
32
34
  "MirrorSettings", "MirrorResult", "compute", "draw", "lines", "verdict",
33
- "is_bulk_throughout", "mount_markers",
35
+ "is_bulk_throughout", "mount_markers", "marks_text", "parse_marks",
34
36
  ]
35
37
 
36
38
  #: Most points one scan evaluates; each one sweeps a thickness for the bulk test.
@@ -54,6 +56,9 @@ class MirrorSettings:
54
56
  wavelength_start: str = "1.0"
55
57
  wavelength_stop: str = "5.0"
56
58
  wavelength_count: str = "200"
59
+ #: Graze angles to mark on an angle scan: ``"1.5"`` or
60
+ #: ``"grating plane 1.36, blaze facet 1.5"``.
61
+ marks: str = ""
57
62
 
58
63
 
59
64
  @dataclass(frozen=True)
@@ -88,13 +93,44 @@ def mount_markers(form: FormState) -> tuple[tuple[str, float], ...]:
88
93
  return tuple(out)
89
94
 
90
95
 
96
+ def marks_text(markers) -> str:
97
+ """Markers as the Mark angles field holds them."""
98
+ return ", ".join(f"{label} {graze:.4g}" for label, graze in markers)
99
+
100
+
101
+ def parse_marks(text: str, errors: list[FieldError]) -> tuple[tuple[str, float], ...]:
102
+ """``"grating plane 1.36, 2"`` as ``(("grating plane", 1.36), ("marked", 2.0))``.
103
+
104
+ Each entry is one angle in degrees, with a label before or after it if
105
+ you want one. A bad entry is an error on the ``marks`` field.
106
+ """
107
+ out = []
108
+ for entry in (part.strip() for part in text.split(",")):
109
+ if not entry:
110
+ continue
111
+ words = entry.split()
112
+ numbers = []
113
+ for word in words:
114
+ try:
115
+ numbers.append((word, float(word)))
116
+ except ValueError:
117
+ pass
118
+ if len(numbers) != 1 or not 0 < numbers[0][1] <= 90:
119
+ errors.append(FieldError("marks", f"{entry!r} should be one graze angle in "
120
+ "degrees, with a label if you like"))
121
+ continue
122
+ label = " ".join(w for w in words if w != numbers[0][0]) or "marked"
123
+ out.append((label, numbers[0][1]))
124
+ return tuple(out)
125
+
126
+
91
127
  def compute(form: FormState, settings: MirrorSettings) -> MirrorResult:
92
128
  """Build the mirror and evaluate it, raising :class:`FormErrors` for
93
129
  every bad field at once."""
94
130
  errors: list[FieldError] = []
95
131
  substrate = form.coating.strip()
96
132
  if not substrate:
97
- errors.append(FieldError("coating", "a mirror needs a substrate: set the Grating material"))
133
+ errors.append(FieldError("coating", "a mirror needs a substrate"))
98
134
  roughness = _number(form.roughness, "roughness", errors, minimum=0.0)
99
135
  layers = _build_layers(form.layers, errors)
100
136
  tolerance = _number(settings.tolerance, "tolerance", errors, minimum=0.0, exclusive_min=True, maximum=1.0)
@@ -113,6 +149,7 @@ def compute(form: FormState, settings: MirrorSettings) -> MirrorResult:
113
149
  fixed = _number(settings.graze, "graze", errors, minimum=0.0, exclusive_min=True, maximum=90.0)
114
150
  else:
115
151
  raise ValueError(f"scan must be 'angle' or 'wavelength', got {settings.scan!r}")
152
+ markers = parse_marks(settings.marks, errors) if settings.scan == "angle" else ()
116
153
  if start is not None and stop is not None and stop <= start:
117
154
  errors.append(FieldError(f"{'graze' if settings.scan == 'angle' else 'wavelength'}_stop", "must exceed the start"))
118
155
  if errors:
@@ -128,7 +165,6 @@ def compute(form: FormState, settings: MirrorSettings) -> MirrorResult:
128
165
  bulk = np.array([
129
166
  mirror.bulk_thickness(g, w, tolerance, settings.polarization) for g, w in zip(graze, wl)
130
167
  ])
131
- markers = mount_markers(form) if settings.scan == "angle" else ()
132
168
  return MirrorResult(mirror, settings.scan, x, fixed, reflectivity, depths, bulk, tolerance,
133
169
  settings.polarization, markers)
134
170
 
@@ -233,5 +269,5 @@ def lines(result: MirrorResult) -> tuple[Line, ...]:
233
269
  out.append(Line(f"1/e depth in {top.material}: {np.nanmin(depth):.3g} to {np.nanmax(depth):.3g} nm "
234
270
  "over the scan.\n", "dim"))
235
271
  for label, graze in result.markers:
236
- out.append(Line(f"The dock's mount puts light on the {label} at {graze:.3g} deg graze.\n", "dim"))
272
+ out.append(Line(f"Marked: {label} at {graze:.3g} deg graze.\n", "dim"))
237
273
  return tuple(out)