gratinglab 0.5.1__tar.gz → 0.5.3__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 (256) hide show
  1. {gratinglab-0.5.1/src/gratinglab.egg-info → gratinglab-0.5.3}/PKG-INFO +8 -1
  2. {gratinglab-0.5.1 → gratinglab-0.5.3}/README.md +6 -0
  3. gratinglab-0.5.3/docs/theory/groove-map.md +207 -0
  4. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/integral.md +1 -1
  5. gratinglab-0.5.3/docs/theory/scalar-transmission.md +233 -0
  6. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/scalar.md +13 -8
  7. {gratinglab-0.5.1 → gratinglab-0.5.3}/pyproject.toml +1 -0
  8. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/__init__.py +2 -2
  9. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/illumination.py +6 -2
  10. {gratinglab-0.5.1 → gratinglab-0.5.3/src/gratinglab.egg-info}/PKG-INFO +8 -1
  11. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab.egg-info/SOURCES.txt +2 -0
  12. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_cmethod.py +29 -10
  13. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_geometry.py +62 -0
  14. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_finite.py +5 -4
  15. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_materials.py +15 -8
  16. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_perturbation.py +64 -0
  17. {gratinglab-0.5.1 → gratinglab-0.5.3}/LICENSE +0 -0
  18. {gratinglab-0.5.1 → gratinglab-0.5.3}/MANIFEST.in +0 -0
  19. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/conventions.md +0 -0
  20. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/cmethod.md +0 -0
  21. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/metrology.md +0 -0
  22. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/mirror.md +0 -0
  23. {gratinglab-0.5.1 → gratinglab-0.5.3}/docs/theory/rcwa.md +0 -0
  24. {gratinglab-0.5.1 → gratinglab-0.5.3}/setup.cfg +0 -0
  25. {gratinglab-0.5.1 → gratinglab-0.5.3}/setup.py +0 -0
  26. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/checks.py +0 -0
  27. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/compare.py +0 -0
  28. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/convergence.py +0 -0
  29. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/geometry.py +0 -0
  30. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/__init__.py +0 -0
  31. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/app.py +0 -0
  32. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/camera3d.py +0 -0
  33. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/cmethod_options.py +0 -0
  34. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/comparison.py +0 -0
  35. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/diagram.py +0 -0
  36. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/diagram3d.py +0 -0
  37. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/docs.py +0 -0
  38. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/efficiency_plot.py +0 -0
  39. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/failures.py +0 -0
  40. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/icon.py +0 -0
  41. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/integral_options.py +0 -0
  42. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/label_layout.py +0 -0
  43. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/launcher.py +0 -0
  44. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/materials_view.py +0 -0
  45. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/mirror_view.py +0 -0
  46. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/orders.py +0 -0
  47. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/provenance.py +0 -0
  48. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/__init__.py +0 -0
  49. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
  50. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/coatings_window.py +0 -0
  51. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  52. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/geometry_panel.py +0 -0
  53. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  54. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/geometry_window.py +0 -0
  55. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/help_menu.py +0 -0
  56. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/integral_tab.py +0 -0
  57. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/launcher.py +0 -0
  58. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/library_bar.py +0 -0
  59. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/main_window.py +0 -0
  60. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/materials_tab.py +0 -0
  61. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/mirror_tab.py +0 -0
  62. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  63. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
  64. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
  65. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/recent.py +0 -0
  66. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
  67. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  68. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/setup_tab.py +0 -0
  69. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/sizing.py +0 -0
  70. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/stack_editor.py +0 -0
  71. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/theming.py +0 -0
  72. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  73. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/qt/worker.py +0 -0
  74. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/rcwa_options.py +0 -0
  75. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/richtext.py +0 -0
  76. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/scalar_options.py +0 -0
  77. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/script.py +0 -0
  78. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/state.py +0 -0
  79. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/gui/theme.py +0 -0
  80. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/io/__init__.py +0 -0
  81. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/io/boundary.py +0 -0
  82. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/io/efficiency_table.py +0 -0
  83. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/io/ggp.py +0 -0
  84. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/io/txl.py +0 -0
  85. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/__init__.py +0 -0
  86. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/data/SOURCES.md +0 -0
  87. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/elements.py +0 -0
  88. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/factors.py +0 -0
  89. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/fresnel.py +0 -0
  90. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/nk.py +0 -0
  91. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/optical.py +0 -0
  92. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/refractiveindex.py +0 -0
  93. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/materials/typical.py +0 -0
  94. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/measured.py +0 -0
  95. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/__init__.py +0 -0
  96. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
  97. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/analyzer.py +0 -0
  98. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  99. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/boundary/average.py +0 -0
  100. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  101. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  102. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  103. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/cli.py +0 -0
  104. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/config.py +0 -0
  105. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/__init__.py +0 -0
  106. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/analysis.py +0 -0
  107. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  108. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/orientation.py +0 -0
  109. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/processing.py +0 -0
  110. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/region_mask.py +0 -0
  111. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/scars.py +0 -0
  112. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/core/tip.py +0 -0
  113. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/data/__init__.py +0 -0
  114. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/data/aggregation.py +0 -0
  115. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/__init__.py +0 -0
  116. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/icon.py +0 -0
  117. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  118. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  119. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  120. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  121. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  122. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  123. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  124. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  125. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  126. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  127. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  128. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/gui/state.py +0 -0
  129. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/__init__.py +0 -0
  130. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/file_io.py +0 -0
  131. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/ibw.py +0 -0
  132. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/metrics.py +0 -0
  133. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/sem.py +0 -0
  134. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/io/spm.py +0 -0
  135. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/settings.py +0 -0
  136. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/stats/__init__.py +0 -0
  137. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/stats/analysis.py +0 -0
  138. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/stats/icc.py +0 -0
  139. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  140. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  141. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  142. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  143. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  144. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  145. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  146. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  147. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  148. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  149. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/overview.md +0 -0
  150. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  151. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  152. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  153. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  154. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  155. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/metrology/workflows.py +0 -0
  156. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/mirror.py +0 -0
  157. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/problem.py +0 -0
  158. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/__init__.py +0 -0
  159. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/_base.py +0 -0
  160. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/_polyline.py +0 -0
  161. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/_shapes.py +0 -0
  162. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/_trapezoid.py +0 -0
  163. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/profiles/_types.py +0 -0
  164. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/resolution.py +0 -0
  165. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/result.py +0 -0
  166. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/__init__.py +0 -0
  167. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/_conditioning.py +0 -0
  168. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/_execution.py +0 -0
  169. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/_scalar_groove.py +0 -0
  170. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/base.py +0 -0
  171. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
  172. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  173. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  174. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/__init__.py +0 -0
  175. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  176. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_core.py +0 -0
  177. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_finite.py +0 -0
  178. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_greens.py +0 -0
  179. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_kernels.py +0 -0
  180. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  181. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
  182. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  183. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  184. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab/solvers/scalar.py +0 -0
  185. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  186. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab.egg-info/entry_points.txt +0 -0
  187. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab.egg-info/requires.txt +0 -0
  188. {gratinglab-0.5.1 → gratinglab-0.5.3}/src/gratinglab.egg-info/top_level.txt +0 -0
  189. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_changelog.py +0 -0
  190. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_checks.py +0 -0
  191. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_compare.py +0 -0
  192. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_conditioning.py +0 -0
  193. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_convergence.py +0 -0
  194. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_cross_method.py +0 -0
  195. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_efficiency_table.py +0 -0
  196. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_examples.py +0 -0
  197. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_factors.py +0 -0
  198. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_four_way.py +0 -0
  199. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_fresnel.py +0 -0
  200. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_ggp.py +0 -0
  201. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_camera3d.py +0 -0
  202. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_cmethod_options.py +0 -0
  203. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_cmethod_tab.py +0 -0
  204. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_coatings_window.py +0 -0
  205. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_compare_tab.py +0 -0
  206. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_diagram.py +0 -0
  207. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_diagram3d.py +0 -0
  208. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_docs.py +0 -0
  209. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_geometry_window.py +0 -0
  210. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_help_menu.py +0 -0
  211. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_integral_options.py +0 -0
  212. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_launcher.py +0 -0
  213. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_mathtext.py +0 -0
  214. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_orders.py +0 -0
  215. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_polish.py +0 -0
  216. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_provenance.py +0 -0
  217. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_provenance_panel.py +0 -0
  218. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_qt.py +0 -0
  219. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_rcwa_options.py +0 -0
  220. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_richtext.py +0 -0
  221. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_scalar_options.py +0 -0
  222. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_script.py +0 -0
  223. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_stack_editor.py +0 -0
  224. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_state.py +0 -0
  225. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_gui_theme.py +0 -0
  226. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_illumination.py +0 -0
  227. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_core.py +0 -0
  228. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_corpus.py +0 -0
  229. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_graded.py +0 -0
  230. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_greens.py +0 -0
  231. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_kernels.py +0 -0
  232. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_measured_polygon.py +0 -0
  233. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_operators.py +0 -0
  234. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_integral_solver.py +0 -0
  235. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_io_boundary.py +0 -0
  236. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_label_layout.py +0 -0
  237. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_littrow.py +0 -0
  238. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_materials_view.py +0 -0
  239. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_measured.py +0 -0
  240. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_mirror.py +0 -0
  241. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_mirror_view.py +0 -0
  242. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_nk.py +0 -0
  243. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_profiles.py +0 -0
  244. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_rayleigh_anomaly.py +0 -0
  245. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_rcwa.py +0 -0
  246. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_rcwa_benchmarks.py +0 -0
  247. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_refractiveindex.py +0 -0
  248. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_resolution.py +0 -0
  249. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_result.py +0 -0
  250. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_scalar.py +0 -0
  251. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_solver_conformance.py +0 -0
  252. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_solver_execution.py +0 -0
  253. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_solver_progress.py +0 -0
  254. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_trapezoidal_solvers.py +0 -0
  255. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_txl.py +0 -0
  256. {gratinglab-0.5.1 → gratinglab-0.5.3}/tests/test_typical.py +0 -0
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.5.1
3
+ Version: 0.5.3
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
7
7
  Project-URL: Homepage, https://github.com/jamccoy/gratinglab
8
8
  Project-URL: Changelog, https://github.com/jamccoy/gratinglab/blob/master/CHANGELOG.md
9
+ Project-URL: iOS app, https://apps.apple.com/us/app/gratinglab/id6829310790
9
10
  Keywords: diffraction,grating,diffraction grating,diffraction efficiency,optics,rcwa,integral method,spectroscopy,afm,metrology,blaze,groove profile,ultraviolet,infrared,x-ray
10
11
  Classifier: Development Status :: 2 - Pre-Alpha
11
12
  Classifier: Intended Audience :: Science/Research
@@ -443,6 +444,12 @@ frozen application, so it is not portable to another machine; `python tools/apps
443
444
  check --app gratinglab` reports when that virtualenv has moved. `python tools/apps.py
444
445
  icon --app gratinglab` regenerates the icon from the artwork in `gratinglab.gui.icon`.
445
446
 
447
+ The scalar solver is also ported to JavaScript as an iPhone and iPad app,
448
+ [gratinglab on the App Store](https://apps.apple.com/us/app/gratinglab/id6829310790),
449
+ published by magmacrunch media, LLC. It draws where each diffraction order goes and
450
+ computes scalar efficiencies. It has none of the AFM metrology or the rigorous
451
+ solvers, and this package remains the reference for every formula it uses.
452
+
446
453
  ## Documentation
447
454
 
448
455
  | Document | Contents |
@@ -399,6 +399,12 @@ frozen application, so it is not portable to another machine; `python tools/apps
399
399
  check --app gratinglab` reports when that virtualenv has moved. `python tools/apps.py
400
400
  icon --app gratinglab` regenerates the icon from the artwork in `gratinglab.gui.icon`.
401
401
 
402
+ The scalar solver is also ported to JavaScript as an iPhone and iPad app,
403
+ [gratinglab on the App Store](https://apps.apple.com/us/app/gratinglab/id6829310790),
404
+ published by magmacrunch media, LLC. It draws where each diffraction order goes and
405
+ computes scalar efficiencies. It has none of the AFM metrology or the rigorous
406
+ solvers, and this package remains the reference for every formula it uses.
407
+
402
408
  ## Documentation
403
409
 
404
410
  | Document | Contents |
@@ -0,0 +1,207 @@
1
+ # Groove maps: a design draft
2
+
3
+ **Status: proposal, 2026-11-20. Nothing here is implemented.** It proposes the
4
+ first content for the design description in [`roadmap.md`](../roadmap.md)
5
+ ("A design description, and where the fabrication boundary falls"): curved
6
+ and variable-line-space (VLS) grooves on curved substrates, from Fermat's
7
+ principle and holographic recording. The worked case is the author's slides,
8
+ *On Determining a Groove Map from Holographic Aberration Theory for a
9
+ Back-Diffracting Convex Cylinder* (2022), which follow Noda, Namioka & Seya,
10
+ *Geometric theory of the grating*, JOSA 64, 1031 (1974).
11
+
12
+ ## 1. What it is for, and where it stops
13
+
14
+ The roadmap's design description is meant to be one shared description of
15
+ the grating someone intends to make. That description would feed design,
16
+ predicted efficiency, the written file (`io/txl.py`), metrology and measured
17
+ efficiency. A groove map is the part that exists before any of the rest: where
18
+ each groove goes on the substrate.
19
+
20
+ The boundary follows the roadmap's: **the grating, not the instrument.** This
21
+ package would describe the groove map, its local geometry, its aberrations
22
+ and its efficiency. Tracing a whole instrument stays with PyXFocus, and
23
+ exposure settings stay with `ebl_fracture`.
24
+
25
+ ## 2. The object: a groove function on a surface
26
+
27
+ In Noda, Namioka & Seya's terms, a grating is a **surface** together with a
28
+ **groove function** n(P), where groove n passes through the points with
29
+ n(P) = n.
30
+
31
+ - **Surface.** The substrate as ξ(w, l), with w across the grooves at the
32
+ centre O and l along them. A plane, a cylinder and a sphere are exact
33
+ constructors. The general a_ij series of the slides' Eq. 1 is a fallback for
34
+ shapes with no closed form.
35
+ - **Groove function.** It is supplied by a constructor:
36
+ - a plane-wave or point-source **hologram**: recording sources C and D and
37
+ the recording wavelength λ₀, with n λ₀ = (CP − DP) − (CO − DO) (slides,
38
+ Eq. 7);
39
+ - a **VLS polynomial** in w;
40
+ - **radial** grooves (ISSI Eq. 17).
41
+ - **Local grating vector.** K(P) = 2π ∇_S n, the surface gradient. It gives the
42
+ local period and the local groove direction at every point, which are what
43
+ the solvers and the vector grating equation (ISSI Eq. 1) consume.
44
+
45
+ ## 3. Two routes, and why both
46
+
47
+ - **Exact, numerical.** Groove positions are the roots of n(P) = integer on
48
+ the exact surface, found by a bracketing root finder one groove at a time.
49
+ Rays are traced through K(P) with the vector grating equation. Nothing is
50
+ truncated, and no root has to be chosen by eye.
51
+ - **Series, analytic.** The light-path function F = AP + PB + nmλ expanded in
52
+ F_ij (slides, Eq. 14), split into mechanical and holographic parts M_ij and
53
+ H_ij (Eq. 16). This is what names the aberrations and shows how a recording
54
+ geometry cancels them.
55
+
56
+ The exact route produces the map. The series explains it, and its closed
57
+ forms become tests of the exact code, as `sinc²` tests the scalar solver's
58
+ quadrature. The two routes share almost nothing, so agreement between them is
59
+ evidence. That is the lesson of the validation inventory: solvers that share
60
+ plumbing cannot check each other's shared parts.
61
+
62
+ ## 4. The worked case, measured
63
+
64
+ The slides' case is plane-wave back-diffraction from a convex cylinder,
65
+ Rc = 155.1 mm, λ = 632.8 nm, m = −1, groove spacing d_O = 1000 nm at O, so
66
+ α = arcsin(mλ/2d_O) = −18.445°. The slides solve a quartic by Ferrari's method
67
+ and compare it with DeRoo's ray trace.
68
+
69
+ **The recording geometry has an exact solution, and it is simple.** The
70
+ recording angles of the slides' Eq. 23 make C and D counter-propagating plane
71
+ waves along the incident beam. Their fringes are planes perpendicular to the
72
+ beam, spaced |m|λ/2. The grooves are where the substrate crosses those planes.
73
+ For back-diffraction in Littrow, each groove then sends the light back
74
+ exactly: the light path F is the same through every point, so every F_i0
75
+ vanishes, not only F_20 and F_40. This holds **for any substrate shape**.
76
+
77
+ On the exact circle, the slides' groove function n d_O = w + cot α · ξ(w)
78
+ (Eq. 24, before truncation) becomes a **quadratic** in w once the square root
79
+ is isolated:
80
+
81
+ ```
82
+ (1 + c²) w² − 2K w + K² − c² Rc² = 0, c = cot α, K = n d_O + c Rc
83
+ ```
84
+
85
+ with the root through w₀ = 0. The slides' quartic appears only because the
86
+ circle was truncated at w⁴.
87
+
88
+ Measured 2026-11-20 with 40-digit arithmetic. The table gives the groove
89
+ spacing, in linear w, from the exact quadratic, and the errors of the slides'
90
+ two approximations against it:
91
+
92
+ | w (mm) | exact spacing (nm) | quartic − exact | quadratic (Eq. 29) − exact |
93
+ |---:|---:|---:|---:|
94
+ | −35 | 3272.98 | −10 nm | −270 nm |
95
+ | −22 | 1753.19 | −0.23 nm | −16 nm |
96
+ | −2.5 | 1050.80 | −1.4 fm | −7.0 pm |
97
+ | 0 | 1000.00 | 0 | 0 |
98
+ | +2.5 | 953.90 | +1.1 fm | +5.6 pm |
99
+ | +22 | 699.49 | +0.030 nm | +2.0 nm |
100
+ | +35 | 590.15 | +0.22 nm | +5.7 nm |
101
+
102
+ This reproduces the slides' own findings: a few picometres for the quadratic
103
+ at |w| ≤ 2.5 mm, a fraction of a nanometre for the quartic to 22 mm, and an
104
+ error that grows faster toward −22 mm than toward +22 mm. So DeRoo's ray
105
+ trace behaves like this exact solution.
106
+
107
+ As an independent check, every groove satisfies the local Littrow condition
108
+ 2|sin α_local| · d_arc = |m|λ. Here α_local is α turned by the local surface
109
+ tilt and d_arc is the spacing along the surface. It holds to between 1e-9 and
110
+ 1e-12 from −35 to +35 mm, which is the finite-difference error of the check
111
+ itself.
112
+
113
+ **What this means for the design.** The convex cylinder in Littrow is a test
114
+ case with a closed form, not a reason to need Ferrari. The general cases do
115
+ need the numerical route: finite source distances, a focusing spectrograph
116
+ where B differs from A, recording not along the beam, sources out of plane,
117
+ and a sphere. The slides' Eq. 13 series and quartic remain useful as tests of
118
+ the truncation regime.
119
+
120
+ The script behind this table is not committed yet. It uses mpmath, which is
121
+ not a dependency of the package, so it would need a guard or a float64 version
122
+ first.
123
+
124
+ ## 5. Conventions to write down first
125
+
126
+ - **Linear position or arc length.** The slides found an ångström-scale
127
+ systematic error from mixing them. EBL wants linear positions, and a ray
128
+ trace works in arc length. The design should store one, convert in one
129
+ function, and name which one at every interface. This belongs in
130
+ `conventions.md`.
131
+ - **The w axis against d̂ and t̂.** `conventions.md` §3 records that the profile
132
+ parameter runs along −d̂. The groove index n, the w axis and d̂ need the same
133
+ explicit mapping.
134
+ - **Signs of m and α.** The slides' Eq. 25 is the package's
135
+ `geometry.littrow_alpha` in plane, in the same sin α + sin β = mλ/d form as
136
+ `conventions.md` §4. The code should call it, not restate it, so it inherits
137
+ the conical check in #87.
138
+
139
+ ## 6. How it would be checked
140
+
141
+ - **Closed forms.** The plane-wave Littrow solution above, exact for any
142
+ surface. The Rowland circle and the Seya–Namioka mount. Holographic
143
+ recordings that are stigmatic for chosen points, where named aberrations
144
+ vanish exactly. Published F_ij values for a standard concave grating.
145
+ - **The slides' truncations.** The exact solver must reproduce the quadratic
146
+ and quartic forms where their truncation holds, to the levels in §4.
147
+ - **DeRoo's ray trace, as data.** It is the only check here from outside the
148
+ author's own derivation. Commit the traced positions with their provenance,
149
+ if DeRoo agrees, so a test holds the code to them on every push.
150
+ - **The local grating equation**, at every groove, with the local tilt and
151
+ arc-length spacing. A different identity from the groove function itself.
152
+ - **Validity measured, not estimated.** With the exact path function
153
+ computable, the series residual F_exact − F_series across the aperture is a
154
+ number, not an estimate. That answers the question the slides leave open
155
+ (slide 11). With Rayleigh's λ/4 on the residual path, it gives an
156
+ aberration-limited resolving power beside `gratinglab.resolution`.
157
+
158
+ ## 7. Outputs
159
+
160
+ - **Groove positions to a `.txl`.** `io/txl.py`'s `groove_edges` takes a period
161
+ callable and builds positions by stepping from each groove's leading edge.
162
+ Over tens of thousands of grooves, any error in where the period is sampled
163
+ accumulates. A groove map already has exact positions, so the writer should
164
+ take positions directly. That is a small addition to `io/txl.py`. The size
165
+ of the stepping error should be measured before deciding whether it matters
166
+ for existing uses.
167
+ - **An efficiency map.** At each point, the local period, groove direction
168
+ and surface tilt give a local α, β and γ, and `to_problem()` (the roadmap's
169
+ design-description contract) gives a `Problem` for the existing solvers.
170
+ This is the local-grating approximation. It needs the surface's radius of
171
+ curvature to be much larger than the period, and it inherits every limit of
172
+ the solver behind it, including the open question about coated scalar
173
+ results in the validation inventory (#86).
174
+
175
+ ## 8. The first slice
176
+
177
+ **In.**
178
+
179
+ - A plane and a cylinder.
180
+ - The plane-wave hologram constructor.
181
+ - Exact groove positions by root finding, with the closed form above as a
182
+ test.
183
+ - The linear-position and arc-length conversion.
184
+ - Positions written to `.txl`.
185
+ - Tests:
186
+ - the slides' quadratic and quartic in their regimes,
187
+ - the local Littrow identity,
188
+ - DeRoo's trace, if the data can be committed.
189
+
190
+ **Out**, for later slices:
191
+
192
+ - point sources at finite distance, and focusing (B different from A),
193
+ - the sphere and the general a_ij surface,
194
+ - out-of-plane sources and off-plane radial grooves,
195
+ - the F_ij analysis API,
196
+ - the efficiency map.
197
+
198
+ ## 9. Open, for a person to decide
199
+
200
+ 1. Whether this is the design description's first content, as proposed, or a
201
+ module of its own that the design description later absorbs.
202
+ 2. Whether the F_ij series is public API (aberration analysis for designers)
203
+ or test-only.
204
+ 3. Which position the design stores as primary: linear w or arc length.
205
+ 4. Whether DeRoo's ray-trace data can be committed, and under what credit.
206
+ 5. Whether off-plane radial grooves belong in the same groove-function object,
207
+ or need their own because they are defined on a fan, not a plane.
@@ -312,7 +312,7 @@ Finite conductivity adds its own ladder of tests (`tests/test_integral_finite.py
312
312
  monotonically toward the conductor.
313
313
  - **Goray & Schmidt Table 3** (dielectric sinusoid, conical, pure E_z incidence;
314
314
  itself a cross-method comparison against Li's CM): every tabulated order,
315
- reflected and transmitted, reproduced within 6e-5. Their Table 4 was found to
315
+ reflected and transmitted, reproduced within 7e-5 (6.5e-5 at worst). Their Table 4 was found to
316
316
  be a publisher's duplication of Table 3 (`docs/findings.md`).
317
317
  - **Lorentz reciprocity survives absorption**: measured at ~5e-5 for Au at X-ray
318
318
  grazing incidence through `checks.check_reciprocity`, unchanged.
@@ -0,0 +1,233 @@
1
+ # Scalar transmission: a design draft (#83)
2
+
3
+ **Status: proposal, 2026-11-20. Nothing here is implemented.** It answers the
4
+ three open questions in issue #83 and records the measurements they rest on.
5
+ The app half is magmacrunch-media/gratinglab#44, which draws transmitted
6
+ orders today and has no efficiency to give them.
7
+
8
+ ## 1. Two axes, not one
9
+
10
+ A transmission grating is not one problem for a scalar model. Two questions
11
+ decide what scalar theory can say about it:
12
+
13
+ - **Continuous relief or discrete bars.** A relief cut into a substrate
14
+ (a blazed or holographic grating in glass) has one interface, and the light
15
+ ends up in the substrate. Bars standing free in vacuum, perhaps on a thin
16
+ support membrane (an X-ray phase grating, HETG-style bars), have two
17
+ interfaces per bar, and the light ends up back in vacuum. The phase profile
18
+ is similar. The flux factor, the material each one needs, and what
19
+ `Problem` has to express are all different.
20
+ - **Thin or thick: can propagation inside the groove region be neglected?**
21
+ A thin element changes the phase at a single plane and nothing else. A thick
22
+ one makes the ray cross the structure on a slant, refract, guide or reflect
23
+ off sidewalls inside it, and the orders couple to each other on the way
24
+ through (the Bragg regime). Scalar theory is a thin-element theory, so thick
25
+ is not a model choice. It is the boundary of the method.
26
+
27
+ | | thin | thick |
28
+ |---|---|---|
29
+ | **continuous relief** | slice 1: scalar, checkable against RCWA today | RCWA / C-method only |
30
+ | **discrete bars** | slice 2: scalar, needs `Problem` work first (§6) | RCWA only (e.g. CAT gratings) |
31
+
32
+ ### Thin versus thick, measured: the Klein–Cook parameter
33
+
34
+ The usual criterion is Klein and Cook's
35
+
36
+ ```
37
+ Q = 2 π λ h / (n Λ²)
38
+ ```
39
+
40
+ where h is the groove depth, Λ the period and n the index of the medium the
41
+ light crosses the grooves in. Q ≪ 1 is thin (Raman–Nath), Q ≫ 1 is thick
42
+ (Bragg). It reads correctly on both of our home regimes:
43
+
44
+ | grating | λ | h | Λ | Q | regime |
45
+ |---|---|---|---|---|---|
46
+ | HETG-like bars | 1 nm | 500 nm | 200 nm | 0.08 | thin, scalar applies |
47
+ | CAT grating | 2 nm | 4 µm | 200 nm | 1.3 | thick, which is how it blazes: sidewall reflection |
48
+ | relief in glass, below | 500 nm | 1 µm | 2.5 µm | 0.34 | already failing |
49
+ | relief in glass, below | 500 nm | 1 µm | 10 µm | 0.021 | thin |
50
+
51
+ In a conical mount the reduced wavelength λ / sin γ goes in place of λ, the
52
+ same reduction `_REDUCED_RATIO_WARN` already makes.
53
+
54
+ Note that **thin is not the same as "neglect refraction"**. A single relief
55
+ interface still refracts. The thin approximation neglects what happens inside
56
+ the groove region, not the bend at the boundary. §2 is about that bend.
57
+
58
+ ## 2. Which phase: does the order's direction enter?
59
+
60
+ Two thin-element phases are available for a relief between vacuum and a
61
+ substrate of index n. Order m leaves at β_m inside the substrate, from the
62
+ grating equation of [`conventions.md`](../conventions.md) §4 with the index
63
+ put in, n sin β_m = mλ/(Λ sin γ) − sin α, on the transmitted branch of the
64
+ same section, cos β_m < 0. In `ScalarSolver`'s own form,
65
+ G_m = ∫ e^{+iΦ_m(t)} e^{−2πimt} dt:
66
+
67
+ - **order-dependent**: Φ_m(t) = k g(t) sin γ (cos α + n cos β_m). This is
68
+ `ScalarSolver`'s reflective phase with nothing changed but the index and
69
+ the branch. A raised surface (§3 puts the material at y ≤ g) shortens the
70
+ path in vacuum by g cos α and lengthens the path in the glass by g n |cos β_m|.
71
+ With cos β_m negative, both are in the one expression, so reflection and
72
+ transmission share a formula. It is symmetric under swapping the incident
73
+ and diffracted waves, so it is reciprocal, and it puts the blaze where a
74
+ refracting prism facet sends the light at every α, not only at one angle.
75
+ - **order-free**: Φ(t) = k g(t) sin γ (cos α + n cos β₀), with β₀ the zero
76
+ order. One transmittance function, so a single FFT, and the sum of
77
+ efficiencies conserves energy (Parseval).
78
+
79
+ This is the same three-way conflict as in [`scalar.md`](scalar.md) §5, carried
80
+ over unchanged: energy conservation, reciprocity and blaze direction cannot
81
+ all hold at once. **The proposal is the order-dependent phase**, so that the
82
+ scalar solver keeps one invariant, reciprocity, in both directions. The
83
+ energy deviation would then be reported, never renormalised away, exactly as
84
+ for reflection. The alternative is to offer both. That is a judgement call
85
+ and is left open in §7.
86
+
87
+ At normal incidence the two phases differ only through cos β_m against
88
+ cos β₀, and the measurements below cannot tell them apart. At α = ±30° they
89
+ can, and in the thin case the order-dependent phase is the one that matches
90
+ RCWA's change with angle (§5).
91
+
92
+ ## 3. The flux factor
93
+
94
+ Proposed: the flat-interface TE Fresnel transmittance,
95
+
96
+ ```
97
+ O_m = 4 cos α · n |cos β_m| / (cos α + n |cos β_m|)²
98
+ ```
99
+
100
+ with the magnitude taken, because cos β_m < 0 on the transmitted branch
101
+ (conventions §6: signed components in the fields, magnitudes in the ratio).
102
+
103
+ It has the same form as the reflective solver's symmetric obliquity and is
104
+ reciprocal for the same reason. In the shallow-groove limit it gives the
105
+ zero order the plain Fresnel transmittance. Measured: 0.8683 against RCWA's
106
+ 0.8678 for a 100 nm lamellar groove at Λ = 10 µm.
107
+
108
+ Scalar theory ignores polarization, and TE and TM Fresnel differ at
109
+ oblique incidence. The candidates are: TE for every polarization, which is
110
+ what was measured; the polarization asked for; or the mean for unpolarized.
111
+ Using the polarization asked for is the least surprising choice. The
112
+ solver's degeneracy note on the provenance would then say that only the
113
+ interface factor depends on polarization.
114
+
115
+ For discrete bars in vacuum at X-ray wavelengths, n ≈ 1 − δ + iβ, so the
116
+ interface factor is 1 to within δ. The bars' absorption is what matters, and
117
+ it enters through the imaginary part of the phase. A bar is then an amplitude
118
+ grating as well as a phase grating, the transmissive counterpart of the
119
+ `"local"` reflectivity model.
120
+
121
+ ## 4. Material index: does a table come back?
122
+
123
+ - **Continuous relief** needs the substrate's real index n. `Transmission`
124
+ already defines a transmitted order only for a lossless substrate, so the
125
+ relief case is real-n by construction. The package takes it through the
126
+ materials layer as it does now. The app can take one typed number, n at the
127
+ wavelength, and ship no table.
128
+ - **Discrete bars** need a complex n, so in practice δ and β, which for X-rays
129
+ means CXRO/Henke-type data. The package already has the answer: a user
130
+ table, `typical:` or `factors:`. The app can again take typed values and
131
+ embed nothing. So **no table has to come back into either half**. The
132
+ public-domain-data rule for the app holds without a decision.
133
+
134
+ ## 5. Measurements
135
+
136
+ Run on 2026-11-20 against `rcwa` (truncation 40 at Λ = 2.5 µm, 90 at 10 µm):
137
+ λ = 500 nm, TE, a relief cut into a lossless n = 1.5 table, transmitted into
138
+ the glass. "Thin" is the order-free phase and "refr" the order-dependent one,
139
+ both with the §3 factor. `python benchmarks/scalar_transmission.py`
140
+ reproduces both tables in under a minute.
141
+
142
+ Normal incidence, efficiency of the orders named:
143
+
144
+ | grating | Q | order | RCWA | thin | refr |
145
+ |---|---|---|---|---|---|
146
+ | lamellar, h 100, Λ 2.5 µm | 0.034 | 0 / ±1 | 0.8645 / 0.0377 | 0.8683 / 0.0372 | 0.8683 / 0.0353 |
147
+ | lamellar, h 500 (π step), Λ 2.5 µm | 0.17 | ±1 / ±2 | 0.3824 / 0.0142 | 0.3898 / 0 | 0.3891 / 0 |
148
+ | lamellar, h 1000 (2π step), Λ 2.5 µm | 0.34 | 0 | **0.6897** | 0.9600 | 0.9600 |
149
+ | blazed into 1st, h 1000, Λ 2.5 µm | 0.34 | blaze | **0.7827** | 0.9617 | 0.9594 |
150
+ | lamellar, h 100, Λ 10 µm | 0.002 | 0 / ±1 | 0.8678 / 0.0372 | 0.8683 / 0.0372 | 0.8683 / 0.0370 |
151
+ | lamellar, h 500, Λ 10 µm | 0.010 | ±1 | 0.3889 | 0.3891 | 0.3891 |
152
+ | lamellar, h 1000, Λ 10 µm | 0.021 | 0 | 0.8799 | 0.9600 | 0.9600 |
153
+ | blazed into 1st, h 1000, Λ 10 µm | 0.021 | blaze | 0.9181 | 0.9601 | 0.9601 |
154
+
155
+ Blaze peak at α = ±30°, same blazed gratings:
156
+
157
+ | Λ | α | RCWA | thin | refr |
158
+ |---|---|---|---|---|
159
+ | 2.5 µm | −30° | 0.6014 | 0.9050 | 0.8085 |
160
+ | 2.5 µm | +30° | 0.6161 | 0.9270 | 0.9365 |
161
+ | 10 µm | −30° | 0.8231 | 0.9112 | 0.8886 |
162
+ | 10 µm | +30° | 0.8669 | 0.9167 | 0.9344 |
163
+ | 10 µm | change, −30° to +30° | +0.044 | +0.006 | +0.046 |
164
+
165
+ What these say:
166
+
167
+ - **Shallow and thin, both phases agree with RCWA to about 0.5%.** That is
168
+ where slice 1 can promise agreement.
169
+ - **Q is the right axis, and the depth of phase matters too.** At Q = 0.34
170
+ both phases miss the blaze peak by 0.18. At Q = 0.021 they are still 0.04 to
171
+ 0.08 over on the 2π-deep gratings, where scalar theory predicts a groove
172
+ that is invisible or perfectly blazed and the real edges scatter. A
173
+ warning threshold therefore wants Q and the phase excursion together, the
174
+ way the reflective solver's energy deviation scales with phase excursion.
175
+ - **In the thin case, the oblique rows favour the order-dependent phase.**
176
+ At Λ = 10 µm (Q = 0.021) RCWA's blaze peak rises by 0.044 from −30° to
177
+ +30°. The order-dependent phase gives 0.046, and the order-free phase
178
+ 0.006. Both sit a near-constant 0.05 to 0.09 above RCWA, the 2π-depth
179
+ excess of the previous point, so it is the change with angle that tells
180
+ them apart. At Λ = 2.5 µm (Q = 0.34) both are 0.2 to 0.3 above RCWA,
181
+ so their changes with angle carry no weight either way.
182
+ - **The signs come from `docs/conventions.md`** (checked 2026-11-20). The angles
183
+ come from `geometry.sin_beta` and `geometry.cos_beta(transmitted=True)`, so
184
+ they are the package's §4. The phase is `ScalarSolver`'s e^{+iΦ} with the
185
+ substrate index put in (§2 above), and it puts the blaze peak on the same
186
+ order as RCWA without being fitted to it. An earlier version of the
187
+ benchmark wrote n sin β_m = sin α + mλ/Λ, the mirrored form that §4 of
188
+ the conventions warns about. It left normal incidence unchanged and
189
+ swapped the scalar columns of the ±30° rows, which had made the
190
+ order-dependent phase look wrong.
191
+
192
+ ## 6. What the API needs
193
+
194
+ - **Slice 1 (continuous relief).** `ScalarSolver.solve` fills
195
+ `scan.transmission` whenever the problem's substrate is lossless at the
196
+ wavelength, exactly as RCWA does. The meaning of `Problem` is unchanged:
197
+ ridges of `coating` (or `substrate`) on that same material. The reflected
198
+ side for such a problem then wants the substrate's Fresnel reflectivity in
199
+ place of the coating's, which the existing reflectivity models already
200
+ supply.
201
+ - **Slice 2 (discrete bars).** `Problem` cannot say "free-standing" today.
202
+ RCWA's own docstring defines a problem as ridges on a semi-infinite
203
+ substrate of the same material. A vacuum substrate, or a thin support
204
+ membrane, needs a `Problem` field. RCWA's `Stack` already has homogeneous
205
+ layers above and below the grating region, so the rigorous side looks like
206
+ wiring, not new numerics. That has not been verified.
207
+ - **Thick.** No scalar code. Warn above a Q threshold, the way
208
+ `_REDUCED_RATIO_WARN` warns, and say in the warning which solver to use.
209
+
210
+ ## 7. Open, for a person to decide
211
+
212
+ 1. The order-dependent phase alone, or both phases behind an option.
213
+ 2. Interface factor: TE throughout, the polarization asked for, or the mean.
214
+ 3. The warning threshold in Q, and whether the phase excursion joins it.
215
+ In §5, every case with Q at or below 0.17 and a phase excursion of π or
216
+ less agrees with RCWA to within 0.01 on its strong orders. Every 2π case
217
+ misses by 0.04 or more, even at Q = 0.021.
218
+ 4. Whether slice 2 is wanted at all, or whether X-ray transmission gratings are
219
+ always RCWA territory in practice. HETG-like bars at Q ≈ 0.08 suggest
220
+ scalar would be useful there.
221
+
222
+ ## 8. How it would be checked
223
+
224
+ - Shallow limit: zero order to Fresnel T, and R₀ + T₀ → 1 with the substrate's
225
+ Fresnel R on the reflected side.
226
+ - Closed forms as tests, as in `scalar.md` §4: a lamellar thin grating gives
227
+ T±1 = (4/π²) sin²(φ/2) times the factor, with φ = k(n − 1)h.
228
+ - Reciprocity to machine precision for the order-dependent phase, by the same
229
+ swap test the reflective solver uses.
230
+ - Against RCWA over a grid in Q and depth. The table in §5 becomes a test,
231
+ and its agreement gate is the threshold chosen in §7.
232
+ - `tools/fixture.json` in the app gains transmitted rows from the same run,
233
+ so the port is held to the package as it is for reflection.
@@ -586,9 +586,9 @@ has no masks, refuses the combination instead of ignoring it.
586
586
 
587
587
  Two caveats apply. The mask is based on ray optics, so near passing-off it
588
588
  overestimates blocking, because diffraction bends around the apex; the
589
- vanishing flux obliquity already suppresses those orders. In addition, like the
590
- geometric mean, it has not yet been validated against a rigorous
591
- finite-conductivity method. It moved the blaze order from 0.69 toward the
589
+ vanishing flux obliquity already suppresses those orders. In addition, it has
590
+ not been validated against a rigorous finite-conductivity method; the geometric
591
+ mean has since been compared, with mixed results (§9 above). It moved the blaze order from 0.69 toward the
592
592
  rigorous 0.21 of the (out-of-regime) perfect-conductor comparison, which is
593
593
  suggestive but not proof. It ships as an opt-in so that existing results
594
594
  reproduce bit-for-bit; the default will change once a finite-conductivity A/B
@@ -614,11 +614,16 @@ The `facet` column is flat by construction. The `local` column is not, and the
614
614
  blaze order changes least, which is how the reduction to $r(\zeta)$ at specular
615
615
  appears in the results.
616
616
 
617
- This model has not yet been validated against a rigorous method. The geometric
618
- mean is a symmetrisation chosen because it preserves the invariant around which
619
- this solver is built, and not because a vector calculation confirmed it. The
620
- corpus A/B comparison in [`findings.md`](../findings.md) is the means by which
621
- it will be judged.
617
+ The geometric mean is a symmetrisation chosen because it preserves the
618
+ invariant around which this solver is built, not because a vector calculation
619
+ confirmed it. It was first checked against the rigorous solvers on 2026-11-20
620
+ ([`findings.md`](../findings.md), "The groove-resolved reflectivity model
621
+ against the rigorous solvers"). Well past the critical angle and in regime,
622
+ `local` tracks the rigorous per-order reflectivity where `average` and `facet`
623
+ cannot. Where the groove's local graze straddles the critical angle it is 45%
624
+ low on the specular order, worse than `facet`. Outside the regime, at the
625
+ reference geometry above, no scalar model follows the orders, though the total
626
+ agrees to about 1.5%.
622
627
 
623
628
  The reflectivity is always computed for unpolarized light, whatever
624
629
  polarization the illumination specifies. The $s$ and $p$ of a Fresnel
@@ -140,6 +140,7 @@ gratinglab-metrology = "gratinglab.metrology.cli:main"
140
140
  [project.urls]
141
141
  Homepage = "https://github.com/jamccoy/gratinglab"
142
142
  Changelog = "https://github.com/jamccoy/gratinglab/blob/master/CHANGELOG.md"
143
+ "iOS app" = "https://apps.apple.com/us/app/gratinglab/id6829310790"
143
144
 
144
145
  # Solver backends register here. A backend may live in its own distribution.
145
146
  [project.entry-points."gratinglab.solvers"]
@@ -65,7 +65,7 @@ def __getattr__(name: str):
65
65
  def __dir__() -> list[str]:
66
66
  return sorted({*globals(), *_LAZY})
67
67
 
68
- __version__ = "0.5.1"
68
+ __version__ = "0.5.3"
69
69
 
70
70
  #: The day this version was released, ISO 8601. It sits beside the version
71
71
  #: rather than being read from CHANGELOG.md at run time because the changelog
@@ -75,7 +75,7 @@ __version__ = "0.5.1"
75
75
  #: the `## <version>` heading, so the release commit that forgets to move it
76
76
  #: fails at the point where it is cheapest to fix, the same arrangement as
77
77
  #: the version's own section.
78
- __version_date__ = "2026-11-17"
78
+ __version_date__ = "2026-12-06"
79
79
 
80
80
  __all__ = [
81
81
  "Problem",
@@ -129,8 +129,12 @@ class Illumination(BaseModel):
129
129
  Parameters
130
130
  ----------
131
131
  graze
132
- Half-cone opening angle :math:`\\gamma`, degrees, which is the graze
133
- angle of the incident wave onto the grating surface.
132
+ Half-cone opening angle :math:`\\gamma`, degrees: the angle between
133
+ the incident wave and the grooves (ISSI §2.1). It is the graze onto
134
+ the grating surface only at ``azimuth = 0``. In general that graze
135
+ is :math:`\\arcsin(\\cos\\alpha\\sin\\gamma)`, 1.41 degrees for
136
+ ``graze = 1.5`` at ``azimuth = 20``, so a measured surface graze
137
+ is not this argument.
134
138
  azimuth
135
139
  Azimuthal angle :math:`\\alpha`, degrees. Near-Littrow blazed
136
140
  operation has ``azimuth`` close to the facet angle.
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.5.1
3
+ Version: 0.5.3
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
7
7
  Project-URL: Homepage, https://github.com/jamccoy/gratinglab
8
8
  Project-URL: Changelog, https://github.com/jamccoy/gratinglab/blob/master/CHANGELOG.md
9
+ Project-URL: iOS app, https://apps.apple.com/us/app/gratinglab/id6829310790
9
10
  Keywords: diffraction,grating,diffraction grating,diffraction efficiency,optics,rcwa,integral method,spectroscopy,afm,metrology,blaze,groove profile,ultraviolet,infrared,x-ray
10
11
  Classifier: Development Status :: 2 - Pre-Alpha
11
12
  Classifier: Intended Audience :: Science/Research
@@ -443,6 +444,12 @@ frozen application, so it is not portable to another machine; `python tools/apps
443
444
  check --app gratinglab` reports when that virtualenv has moved. `python tools/apps.py
444
445
  icon --app gratinglab` regenerates the icon from the artwork in `gratinglab.gui.icon`.
445
446
 
447
+ The scalar solver is also ported to JavaScript as an iPhone and iPad app,
448
+ [gratinglab on the App Store](https://apps.apple.com/us/app/gratinglab/id6829310790),
449
+ published by magmacrunch media, LLC. It draws where each diffraction order goes and
450
+ computes scalar efficiencies. It has none of the AFM metrology or the rigorous
451
+ solvers, and this package remains the reference for every formula it uses.
452
+
446
453
  ## Documentation
447
454
 
448
455
  | Document | Contents |
@@ -5,10 +5,12 @@ pyproject.toml
5
5
  setup.py
6
6
  docs/conventions.md
7
7
  docs/theory/cmethod.md
8
+ docs/theory/groove-map.md
8
9
  docs/theory/integral.md
9
10
  docs/theory/metrology.md
10
11
  docs/theory/mirror.md
11
12
  docs/theory/rcwa.md
13
+ docs/theory/scalar-transmission.md
12
14
  docs/theory/scalar.md
13
15
  src/gratinglab/__init__.py
14
16
  src/gratinglab/checks.py