gratinglab 0.4.1__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 (251) hide show
  1. {gratinglab-0.4.1/src/gratinglab.egg-info → gratinglab-0.5.0}/PKG-INFO +30 -19
  2. {gratinglab-0.4.1 → gratinglab-0.5.0}/README.md +29 -18
  3. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/mirror.md +5 -4
  4. {gratinglab-0.4.1 → gratinglab-0.5.0}/pyproject.toml +1 -0
  5. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/__init__.py +1 -1
  6. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/app.py +20 -0
  7. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/launcher.py +14 -0
  8. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/mirror_view.py +43 -7
  9. gratinglab-0.5.0/src/gratinglab/gui/qt/coatings_window.py +178 -0
  10. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_panel.py +29 -5
  11. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/library_bar.py +18 -2
  12. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/main_window.py +31 -23
  13. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/materials_tab.py +6 -5
  14. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/mirror_tab.py +21 -10
  15. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/setup_tab.py +7 -7
  16. {gratinglab-0.4.1 → gratinglab-0.5.0/src/gratinglab.egg-info}/PKG-INFO +30 -19
  17. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab.egg-info/SOURCES.txt +2 -0
  18. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab.egg-info/entry_points.txt +1 -0
  19. gratinglab-0.5.0/tests/test_gui_coatings_window.py +163 -0
  20. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_launcher.py +7 -5
  21. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_qt.py +30 -78
  22. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_materials_view.py +6 -8
  23. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_mirror_view.py +23 -3
  24. {gratinglab-0.4.1 → gratinglab-0.5.0}/LICENSE +0 -0
  25. {gratinglab-0.4.1 → gratinglab-0.5.0}/MANIFEST.in +0 -0
  26. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/conventions.md +0 -0
  27. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/cmethod.md +0 -0
  28. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/integral.md +0 -0
  29. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/metrology.md +0 -0
  30. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/rcwa.md +0 -0
  31. {gratinglab-0.4.1 → gratinglab-0.5.0}/docs/theory/scalar.md +0 -0
  32. {gratinglab-0.4.1 → gratinglab-0.5.0}/setup.cfg +0 -0
  33. {gratinglab-0.4.1 → gratinglab-0.5.0}/setup.py +0 -0
  34. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/checks.py +0 -0
  35. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/compare.py +0 -0
  36. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/convergence.py +0 -0
  37. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/geometry.py +0 -0
  38. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/__init__.py +0 -0
  39. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/camera3d.py +0 -0
  40. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/cmethod_options.py +0 -0
  41. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/comparison.py +0 -0
  42. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/diagram.py +0 -0
  43. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/diagram3d.py +0 -0
  44. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/docs.py +0 -0
  45. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/efficiency_plot.py +0 -0
  46. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/failures.py +0 -0
  47. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/icon.py +0 -0
  48. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/integral_options.py +0 -0
  49. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/label_layout.py +0 -0
  50. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/materials_view.py +0 -0
  51. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/orders.py +0 -0
  52. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/provenance.py +0 -0
  53. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/__init__.py +0 -0
  54. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
  55. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  56. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  57. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/geometry_window.py +0 -0
  58. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/help_menu.py +0 -0
  59. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/integral_tab.py +0 -0
  60. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/launcher.py +0 -0
  61. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  62. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
  63. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
  64. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/recent.py +0 -0
  65. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
  66. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  67. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/sizing.py +0 -0
  68. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/stack_editor.py +0 -0
  69. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/theming.py +0 -0
  70. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  71. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/qt/worker.py +0 -0
  72. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/rcwa_options.py +0 -0
  73. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/richtext.py +0 -0
  74. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/scalar_options.py +0 -0
  75. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/state.py +0 -0
  76. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/gui/theme.py +0 -0
  77. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/illumination.py +0 -0
  78. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/io/__init__.py +0 -0
  79. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/io/boundary.py +0 -0
  80. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/io/efficiency_table.py +0 -0
  81. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/io/ggp.py +0 -0
  82. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/io/txl.py +0 -0
  83. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/__init__.py +0 -0
  84. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/data/SOURCES.md +0 -0
  85. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/elements.py +0 -0
  86. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/factors.py +0 -0
  87. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/fresnel.py +0 -0
  88. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/nk.py +0 -0
  89. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/optical.py +0 -0
  90. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/refractiveindex.py +0 -0
  91. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/materials/typical.py +0 -0
  92. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/measured.py +0 -0
  93. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/__init__.py +0 -0
  94. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
  95. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/analyzer.py +0 -0
  96. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  97. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/average.py +0 -0
  98. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  99. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  100. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  101. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/cli.py +0 -0
  102. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/config.py +0 -0
  103. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/__init__.py +0 -0
  104. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/analysis.py +0 -0
  105. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  106. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/orientation.py +0 -0
  107. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/processing.py +0 -0
  108. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/region_mask.py +0 -0
  109. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/scars.py +0 -0
  110. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/core/tip.py +0 -0
  111. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/data/__init__.py +0 -0
  112. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/data/aggregation.py +0 -0
  113. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/__init__.py +0 -0
  114. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/icon.py +0 -0
  115. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  116. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  117. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  118. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  119. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  120. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  121. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  122. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  123. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  124. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  125. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  126. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/gui/state.py +0 -0
  127. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/__init__.py +0 -0
  128. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/file_io.py +0 -0
  129. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/ibw.py +0 -0
  130. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/metrics.py +0 -0
  131. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/sem.py +0 -0
  132. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/io/spm.py +0 -0
  133. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/settings.py +0 -0
  134. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/__init__.py +0 -0
  135. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/analysis.py +0 -0
  136. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/stats/icc.py +0 -0
  137. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  138. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  139. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  140. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  141. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  142. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  143. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  144. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  145. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  146. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  147. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/overview.md +0 -0
  148. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  149. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  150. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  151. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  152. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  153. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/metrology/workflows.py +0 -0
  154. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/mirror.py +0 -0
  155. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/problem.py +0 -0
  156. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/__init__.py +0 -0
  157. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/_base.py +0 -0
  158. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/_polyline.py +0 -0
  159. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/_shapes.py +0 -0
  160. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/_trapezoid.py +0 -0
  161. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/profiles/_types.py +0 -0
  162. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/resolution.py +0 -0
  163. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/result.py +0 -0
  164. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/__init__.py +0 -0
  165. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/_conditioning.py +0 -0
  166. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/_execution.py +0 -0
  167. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/_scalar_groove.py +0 -0
  168. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/base.py +0 -0
  169. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
  170. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  171. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  172. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/__init__.py +0 -0
  173. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  174. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_core.py +0 -0
  175. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_finite.py +0 -0
  176. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_greens.py +0 -0
  177. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_kernels.py +0 -0
  178. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  179. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
  180. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  181. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  182. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab/solvers/scalar.py +0 -0
  183. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  184. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab.egg-info/requires.txt +0 -0
  185. {gratinglab-0.4.1 → gratinglab-0.5.0}/src/gratinglab.egg-info/top_level.txt +0 -0
  186. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_changelog.py +0 -0
  187. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_checks.py +0 -0
  188. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_cmethod.py +0 -0
  189. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_compare.py +0 -0
  190. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_conditioning.py +0 -0
  191. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_convergence.py +0 -0
  192. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_cross_method.py +0 -0
  193. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_efficiency_table.py +0 -0
  194. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_factors.py +0 -0
  195. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_four_way.py +0 -0
  196. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_fresnel.py +0 -0
  197. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_geometry.py +0 -0
  198. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_ggp.py +0 -0
  199. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_camera3d.py +0 -0
  200. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_cmethod_options.py +0 -0
  201. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_cmethod_tab.py +0 -0
  202. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_compare_tab.py +0 -0
  203. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_diagram.py +0 -0
  204. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_diagram3d.py +0 -0
  205. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_docs.py +0 -0
  206. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_geometry_window.py +0 -0
  207. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_help_menu.py +0 -0
  208. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_integral_options.py +0 -0
  209. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_mathtext.py +0 -0
  210. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_orders.py +0 -0
  211. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_polish.py +0 -0
  212. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_provenance.py +0 -0
  213. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_provenance_panel.py +0 -0
  214. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_rcwa_options.py +0 -0
  215. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_richtext.py +0 -0
  216. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_scalar_options.py +0 -0
  217. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_stack_editor.py +0 -0
  218. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_state.py +0 -0
  219. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_gui_theme.py +0 -0
  220. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_illumination.py +0 -0
  221. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_core.py +0 -0
  222. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_corpus.py +0 -0
  223. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_finite.py +0 -0
  224. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_graded.py +0 -0
  225. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_greens.py +0 -0
  226. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_kernels.py +0 -0
  227. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_measured_polygon.py +0 -0
  228. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_operators.py +0 -0
  229. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_integral_solver.py +0 -0
  230. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_io_boundary.py +0 -0
  231. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_label_layout.py +0 -0
  232. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_littrow.py +0 -0
  233. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_materials.py +0 -0
  234. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_measured.py +0 -0
  235. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_mirror.py +0 -0
  236. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_nk.py +0 -0
  237. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_perturbation.py +0 -0
  238. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_profiles.py +0 -0
  239. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_rayleigh_anomaly.py +0 -0
  240. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_rcwa.py +0 -0
  241. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_rcwa_benchmarks.py +0 -0
  242. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_refractiveindex.py +0 -0
  243. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_resolution.py +0 -0
  244. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_result.py +0 -0
  245. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_scalar.py +0 -0
  246. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_solver_conformance.py +0 -0
  247. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_solver_execution.py +0 -0
  248. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_solver_progress.py +0 -0
  249. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_trapezoidal_solvers.py +0 -0
  250. {gratinglab-0.4.1 → gratinglab-0.5.0}/tests/test_txl.py +0 -0
  251. {gratinglab-0.4.1 → 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.1
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 β
@@ -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
@@ -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
@@ -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
@@ -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.1"
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
@@ -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)
@@ -0,0 +1,178 @@
1
+ """The coatings window: a stack of materials, with no grooves in it.
2
+
3
+ The chooser's "Design a coating" card opens it. It answers what a coating
4
+ does before a grating is cut into it: the Materials tab names a material and
5
+ shows its index, and the Mirror tab reflects the stack as a flat mirror and
6
+ says how deep the light goes and whether the top layer may be taken as bulk.
7
+ No solver, no worker thread.
8
+
9
+ It owns its stack. The dock is the efficiency window's geometry panel showing
10
+ its Surface and Wavelengths groups alone, with the base material called the
11
+ Substrate. Editing here changes nothing in the efficiency window until "Send
12
+ to efficiency window" copies the stack across; the efficiency window's "Send
13
+ coating to coatings window" is the way back, and brings its mount's graze
14
+ angles with it for the Mirror tab to mark.
15
+
16
+ The material library is one for the whole application. Its actions are on the
17
+ Materials tab here, and every window follows
18
+ :data:`~gratinglab.gui.qt.library_bar.library_events`.
19
+
20
+ Reads and writes: the dock, the two tabs, and the window layout in the
21
+ settings store under ``"coatings"``. Called by:
22
+ :mod:`gratinglab.gui.qt.launcher`, through the ``coatings`` entry in
23
+ :data:`gratinglab.gui.launcher.MODES`.
24
+ """
25
+
26
+ from __future__ import annotations
27
+
28
+ from PySide6.QtCore import Qt
29
+ from PySide6.QtGui import QKeySequence
30
+ from PySide6.QtWidgets import (
31
+ QApplication,
32
+ QDockWidget,
33
+ QMainWindow,
34
+ QPushButton,
35
+ QScrollArea,
36
+ QTabWidget,
37
+ QVBoxLayout,
38
+ QWidget,
39
+ )
40
+
41
+ from . import recent, theming
42
+ from .geometry_panel import GeometryPanel
43
+ from .library_bar import library_events
44
+ from .materials_tab import MaterialsTab
45
+ from .mirror_tab import MirrorTab
46
+ from .sizing import fit_width_to_contents
47
+
48
+ __all__ = ["CoatingsWindow"]
49
+
50
+ #: The key the window layout is saved under, and this window's mode key.
51
+ _LAYOUT_KEY = "coatings"
52
+
53
+
54
+ class CoatingsWindow(QMainWindow):
55
+ """A coating stack, its materials, and the stack as a mirror."""
56
+
57
+ def __init__(self, parent: QWidget | None = None) -> None:
58
+ super().__init__(parent)
59
+ self.setWindowTitle("gratinglab: coatings")
60
+ self.resize(1180, 820)
61
+ # Before any widget exists, so every figure is born in the theme.
62
+ self._themes = theming.install(QApplication.instance())
63
+
64
+ self._build_dock()
65
+ self.materials_tab = MaterialsTab(self.stack)
66
+ self.mirror_tab = MirrorTab(self.stack)
67
+ self.tabs = QTabWidget()
68
+ self.tabs.addTab(self.materials_tab, "Materials")
69
+ self.tabs.addTab(self.mirror_tab, "Mirror")
70
+ self.tabs.setTabToolTip(0, "Name a material, see its index, and put it in the stack")
71
+ self.tabs.setTabToolTip(1, "The stack as a flat mirror: reflectivity and penetration depth")
72
+ self.setCentralWidget(self.tabs)
73
+ self._build_menu()
74
+
75
+ # The library is the application's; follow it wherever it changed.
76
+ library_events.changed.connect(self.stack.refresh_coatings)
77
+ library_events.changed.connect(self.materials_tab.refresh_library)
78
+ recent.restore_layout(self, _LAYOUT_KEY)
79
+
80
+ # -- construction ----------------------------------------------------
81
+
82
+ def _build_dock(self) -> None:
83
+ """The stack and the wavelengths, with the send button under them."""
84
+ self.stack = GeometryPanel(sections=("surface", "scan"), base_label="Substrate")
85
+ # Enter in a field has nothing to solve here; the tabs follow `changed`.
86
+
87
+ self.send_button = QPushButton("Send to efficiency window")
88
+ self.send_button.setToolTip(
89
+ "Copy this stack into the efficiency window's Surface group:\n"
90
+ "the layers, the substrate as its Grating material, and the\n"
91
+ "roughness. Its grating, mount and wavelengths are left alone,\n"
92
+ "and nothing is solved until you ask."
93
+ )
94
+ self.send_button.clicked.connect(self.send_to_efficiency)
95
+
96
+ column = QWidget()
97
+ layout = QVBoxLayout(column)
98
+ layout.setContentsMargins(0, 0, 0, 0)
99
+ layout.addWidget(self.stack, 0)
100
+ layout.addWidget(self.send_button)
101
+ layout.addStretch(1)
102
+
103
+ scroller = QScrollArea()
104
+ scroller.setWidget(column)
105
+ scroller.setWidgetResizable(True)
106
+ scroller.setMinimumWidth(max(280, fit_width_to_contents(scroller)))
107
+
108
+ dock = self.stack_dock = QDockWidget("Coating stack", self)
109
+ dock.setObjectName("stack_dock")
110
+ dock.setWidget(scroller)
111
+ dock.setFeatures(
112
+ QDockWidget.DockWidgetFeature.DockWidgetClosable
113
+ | QDockWidget.DockWidgetFeature.DockWidgetMovable
114
+ | QDockWidget.DockWidgetFeature.DockWidgetFloatable
115
+ )
116
+ dock.setAllowedAreas(
117
+ Qt.DockWidgetArea.LeftDockWidgetArea | Qt.DockWidgetArea.RightDockWidgetArea
118
+ )
119
+ self.addDockWidget(Qt.DockWidgetArea.LeftDockWidgetArea, dock)
120
+ self.resizeDocks([dock], [300], Qt.Orientation.Horizontal)
121
+
122
+ def _build_menu(self) -> None:
123
+ """File, View and Help, each menu held on the window, as the other
124
+ windows hold theirs: a QMenu reached back through the menu bar is
125
+ not reliably usable under PySide6."""
126
+ from .help_menu import install_help_menu
127
+
128
+ self._menu_bar = self.menuBar()
129
+
130
+ self._file_menu = self._menu_bar.addMenu("&File")
131
+ send = self._file_menu.addAction("&Send to efficiency window")
132
+ send.setShortcut(QKeySequence("Ctrl+E"))
133
+ send.triggered.connect(self.send_to_efficiency)
134
+ self._file_actions = {"send": send}
135
+
136
+ self._view_menu = self._menu_bar.addMenu("&View")
137
+ toggle = self.stack_dock.toggleViewAction()
138
+ toggle.setText("&Coating stack")
139
+ toggle.setShortcut(QKeySequence("Ctrl+G"))
140
+ self._view_menu.addAction(toggle)
141
+ self._view_menu.addSeparator()
142
+ self._theme_menu = theming.ThemeMenu(self)
143
+ self._view_menu.addMenu(self._theme_menu)
144
+
145
+ self._help_menu = install_help_menu(self, self._menu_bar)
146
+
147
+ # -- actions ---------------------------------------------------------
148
+
149
+ def set_theme(self, choice: str) -> None:
150
+ """Switch theme by key, or ``"system"``; the menu calls this."""
151
+ self._themes.set_choice(choice)
152
+
153
+ def open_stack(self, form, marks: str = "") -> None:
154
+ """Take a coating from the efficiency window: its Surface group and
155
+ wavelengths out of ``form``, and its mount's angles as ``marks``."""
156
+ self.stack.write_form(form)
157
+ self.mirror_tab.set_marks(marks)
158
+ if not self.stack_dock.isVisible():
159
+ self.stack_dock.show()
160
+
161
+ def send_to_efficiency(self):
162
+ """Copy this stack into the efficiency window, and return that window.
163
+
164
+ Only the Surface group goes: a mirror has no grating or mount to
165
+ send, and the efficiency window's wavelengths are a scan of its own.
166
+ The window is the one the Go menu opens, so there is never a second.
167
+ """
168
+ from ..launcher import mode
169
+ from .launcher import open_window
170
+
171
+ form = self.stack.read_form()
172
+ window = open_window(mode("efficiency"))
173
+ window.open_surface(form.coating, form.layers, form.roughness)
174
+ return window
175
+
176
+ def closeEvent(self, event) -> None: # noqa: N802 - Qt's spelling
177
+ recent.save_layout(self, _LAYOUT_KEY)
178
+ super().closeEvent(event)
@@ -33,7 +33,10 @@ from . import recent
33
33
  from .stack_editor import StackEditor, Swatch
34
34
  from ..state import ANGLE_LABELS, MOUNTS, PROFILE_FIELDS, PROFILE_KINDS, FormState
35
35
 
36
- __all__ = ["GeometryPanel"]
36
+ __all__ = ["GeometryPanel", "SECTIONS"]
37
+
38
+ #: The dock's four groups, in order, as the keys ``sections`` takes.
39
+ SECTIONS = ("grating", "mount", "surface", "scan")
37
40
 
38
41
 
39
42
  class GeometryPanel(QWidget):
@@ -60,8 +63,21 @@ class GeometryPanel(QWidget):
60
63
  #: `_on_mount_change` set fields. Only a real edit should schedule work.
61
64
  changed = Signal()
62
65
 
63
- def __init__(self, parent: QWidget | None = None) -> None:
66
+ def __init__(
67
+ self,
68
+ parent: QWidget | None = None,
69
+ *,
70
+ sections: tuple[str, ...] = SECTIONS,
71
+ base_label: str = "Grating",
72
+ ) -> None:
73
+ """``sections`` picks the groups shown, from :data:`SECTIONS`; the
74
+ coatings window shows the surface and the wavelengths alone. A hidden
75
+ group keeps its fields at their defaults, so `read_form` is whole.
76
+ ``base_label`` names the material at the foot of the stack, which is
77
+ the grating here and a substrate on a mirror."""
64
78
  super().__init__(parent)
79
+ self._sections = tuple(sections)
80
+ self._base_label = base_label
65
81
  self._fields: dict[str, QWidget] = {}
66
82
  self._build()
67
83
  self._on_mount_change()
@@ -181,8 +197,8 @@ class GeometryPanel(QWidget):
181
197
  coating.editTextChanged.connect(
182
198
  lambda text: self._base_swatch.show_material("" if text == "(none)" else text)
183
199
  )
184
- base_label = QLabel("Grating")
185
- base_label.setToolTip("The material the grooves are cut into, beneath any layers.")
200
+ base_label = QLabel(self._base_label)
201
+ base_label.setToolTip("The material beneath any layers: what the grooves are cut into.")
186
202
  base_row.addWidget(self._base_swatch)
187
203
  base_row.addWidget(base_label)
188
204
  base_row.addWidget(coating, 1)
@@ -196,8 +212,9 @@ class GeometryPanel(QWidget):
196
212
  entry(scan_form, "Stop", "wavelength_stop")
197
213
  entry(scan_form, "Points", "wavelength_count")
198
214
 
199
- for group in (grating, mount, surface, scan):
215
+ for key, group in zip(SECTIONS, (grating, mount, surface, scan)):
200
216
  column.addWidget(group)
217
+ group.setVisible(key in self._sections)
201
218
  column.addStretch(1)
202
219
  self._forms = (grating_form, mount_form, surface_form, scan_form)
203
220
  self._align_forms()
@@ -279,6 +296,13 @@ class GeometryPanel(QWidget):
279
296
  combo.setEditText(name)
280
297
  self.changed.emit()
281
298
 
299
+ def write_surface(self, coating: str, layers: str, roughness: str) -> None:
300
+ """Set the Surface group alone, as a stack sent from another window
301
+ arrives: the grating, the mount and the wavelengths stay as they are."""
302
+ self._fields["layers"].setText(layers)
303
+ self._fields["roughness"].setText(roughness)
304
+ self.set_grating_material(coating)
305
+
282
306
  def replace_stack(self, name: str) -> None:
283
307
  """``name`` as the Grating material with no layers on it: the Mirror
284
308
  tab's hand-off, once it has shown a layer reads as bulk."""
@@ -17,7 +17,7 @@ from __future__ import annotations
17
17
 
18
18
  from pathlib import Path
19
19
 
20
- from PySide6.QtCore import QUrl, Signal
20
+ from PySide6.QtCore import QObject, QUrl, Signal
21
21
  from PySide6.QtGui import QDesktopServices
22
22
  from PySide6.QtWidgets import (
23
23
  QFileDialog,
@@ -31,7 +31,22 @@ from PySide6.QtWidgets import (
31
31
 
32
32
  from . import recent
33
33
 
34
- __all__ = ["LibraryBar"]
34
+ __all__ = ["LibraryBar", "library_events"]
35
+
36
+
37
+ class _LibraryEvents(QObject):
38
+ """One ``changed`` signal for the whole application.
39
+
40
+ The library is the same for every window, and the bar that changes it is
41
+ in the coatings window while the efficiency window's dropdowns list it
42
+ too. A window connects to this rather than to a bar it may not hold.
43
+ """
44
+
45
+ changed = Signal()
46
+
47
+
48
+ #: Connect to ``library_events.changed`` to follow the library.
49
+ library_events = _LibraryEvents()
35
50
 
36
51
 
37
52
  class LibraryBar(QWidget):
@@ -56,6 +71,7 @@ class LibraryBar(QWidget):
56
71
  self._rescan_button.clicked.connect(self.rescan)
57
72
  self._folder_button = QPushButton("Open library folder")
58
73
  self._folder_button.clicked.connect(self.open_library_folder)
74
+ self.library_changed.connect(library_events.changed)
59
75
  self._status = QLabel("")
60
76
  self._status.setWordWrap(True)
61
77