gratinglab 0.3.3__tar.gz → 0.3.4__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 (212) hide show
  1. {gratinglab-0.3.3/src/gratinglab.egg-info → gratinglab-0.3.4}/PKG-INFO +18 -7
  2. {gratinglab-0.3.3 → gratinglab-0.3.4}/README.md +17 -6
  3. {gratinglab-0.3.3 → gratinglab-0.3.4}/pyproject.toml +6 -6
  4. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/__init__.py +1 -1
  5. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/compare.py +47 -2
  6. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/setup_tab.py +3 -3
  7. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/worker.py +35 -3
  8. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/materials/__init__.py +21 -5
  9. gratinglab-0.3.4/src/gratinglab/materials/data/SOURCES.md +48 -0
  10. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/materials/optical.py +9 -0
  11. gratinglab-0.3.4/src/gratinglab/materials/typical.py +388 -0
  12. gratinglab-0.3.4/src/gratinglab/profiles/__init__.py +61 -0
  13. gratinglab-0.3.4/src/gratinglab/profiles/_base.py +91 -0
  14. gratinglab-0.3.4/src/gratinglab/profiles/_polyline.py +501 -0
  15. gratinglab-0.3.4/src/gratinglab/profiles/_shapes.py +288 -0
  16. gratinglab-0.3.4/src/gratinglab/profiles/_trapezoid.py +360 -0
  17. gratinglab-0.3.4/src/gratinglab/profiles/_types.py +119 -0
  18. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/cmethod/__init__.py +4 -1
  19. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/__init__.py +4 -1
  20. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_kernels.py +14 -2
  21. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/rcwa/__init__.py +10 -2
  22. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/scalar.py +4 -0
  23. {gratinglab-0.3.3 → gratinglab-0.3.4/src/gratinglab.egg-info}/PKG-INFO +18 -7
  24. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab.egg-info/SOURCES.txt +9 -2
  25. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_cmethod.py +8 -7
  26. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_four_way.py +8 -7
  27. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_geometry.py +1 -1
  28. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_qt.py +223 -8
  29. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_measured_polygon.py +4 -2
  30. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_materials.py +31 -31
  31. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_measured.py +47 -0
  32. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_scalar.py +8 -6
  33. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_trapezoidal_solvers.py +6 -5
  34. gratinglab-0.3.4/tests/test_typical.py +227 -0
  35. gratinglab-0.3.3/src/gratinglab/materials/data/SOURCES.md +0 -53
  36. gratinglab-0.3.3/src/gratinglab/profiles.py +0 -1334
  37. {gratinglab-0.3.3 → gratinglab-0.3.4}/LICENSE +0 -0
  38. {gratinglab-0.3.3 → gratinglab-0.3.4}/setup.cfg +0 -0
  39. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/checks.py +0 -0
  40. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/convergence.py +0 -0
  41. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/geometry.py +0 -0
  42. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/__init__.py +0 -0
  43. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/app.py +0 -0
  44. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/cmethod_options.py +0 -0
  45. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/comparison.py +0 -0
  46. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/diagram.py +0 -0
  47. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/diagram3d.py +0 -0
  48. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/docs.py +0 -0
  49. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/efficiency_plot.py +0 -0
  50. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/icon.py +0 -0
  51. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/integral_options.py +0 -0
  52. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/launcher.py +0 -0
  53. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/mathtext.py +0 -0
  54. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/orders.py +0 -0
  55. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/provenance.py +0 -0
  56. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/__init__.py +0 -0
  57. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/cmethod_tab.py +0 -0
  58. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  59. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/geometry_panel.py +0 -0
  60. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  61. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/integral_tab.py +0 -0
  62. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/launcher.py +0 -0
  63. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/main_window.py +0 -0
  64. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  65. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/rcwa_tab.py +0 -0
  66. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/scalar_tab.py +0 -0
  67. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  68. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/sizing.py +0 -0
  69. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/theming.py +0 -0
  70. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  71. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/rcwa_options.py +0 -0
  72. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/richtext.py +0 -0
  73. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/scalar_options.py +0 -0
  74. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/state.py +0 -0
  75. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/gui/theme.py +0 -0
  76. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/illumination.py +0 -0
  77. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/io/__init__.py +0 -0
  78. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/io/boundary.py +0 -0
  79. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/io/efficiency_table.py +0 -0
  80. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/io/ggp.py +0 -0
  81. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/io/txl.py +0 -0
  82. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/materials/fresnel.py +0 -0
  83. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/materials/refractiveindex.py +0 -0
  84. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/measured.py +0 -0
  85. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/__init__.py +0 -0
  86. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/analyzer.py +0 -0
  87. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  88. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/boundary/average.py +0 -0
  89. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  90. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  91. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  92. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/cli.py +0 -0
  93. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/config.py +0 -0
  94. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/__init__.py +0 -0
  95. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/analysis.py +0 -0
  96. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  97. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/orientation.py +0 -0
  98. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/processing.py +0 -0
  99. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/region_mask.py +0 -0
  100. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/scars.py +0 -0
  101. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/core/tip.py +0 -0
  102. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/data/__init__.py +0 -0
  103. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/data/aggregation.py +0 -0
  104. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/__init__.py +0 -0
  105. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/icon.py +0 -0
  106. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  107. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  108. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  109. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  110. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  111. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  112. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  113. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  114. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  115. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  116. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  117. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/gui/state.py +0 -0
  118. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/__init__.py +0 -0
  119. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/file_io.py +0 -0
  120. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/ibw.py +0 -0
  121. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/metrics.py +0 -0
  122. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/sem.py +0 -0
  123. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/io/spm.py +0 -0
  124. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/settings.py +0 -0
  125. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/stats/__init__.py +0 -0
  126. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/stats/analysis.py +0 -0
  127. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/stats/icc.py +0 -0
  128. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  129. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  130. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  131. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  132. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  133. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  134. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  135. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  136. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  137. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  138. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/overview.md +0 -0
  139. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  140. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  141. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  142. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  143. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  144. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/metrology/workflows.py +0 -0
  145. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/problem.py +0 -0
  146. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/resolution.py +0 -0
  147. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/result.py +0 -0
  148. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/__init__.py +0 -0
  149. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/_conditioning.py +0 -0
  150. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/_execution.py +0 -0
  151. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/base.py +0 -0
  152. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  153. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  154. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  155. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_core.py +0 -0
  156. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_finite.py +0 -0
  157. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_greens.py +0 -0
  158. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  159. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  160. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  161. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  162. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab.egg-info/entry_points.txt +0 -0
  163. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab.egg-info/requires.txt +0 -0
  164. {gratinglab-0.3.3 → gratinglab-0.3.4}/src/gratinglab.egg-info/top_level.txt +0 -0
  165. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_changelog.py +0 -0
  166. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_checks.py +0 -0
  167. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_compare.py +0 -0
  168. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_conditioning.py +0 -0
  169. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_convergence.py +0 -0
  170. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_cross_method.py +0 -0
  171. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_efficiency_table.py +0 -0
  172. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_fresnel.py +0 -0
  173. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_ggp.py +0 -0
  174. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_cmethod_options.py +0 -0
  175. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_cmethod_tab.py +0 -0
  176. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_compare_tab.py +0 -0
  177. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_diagram.py +0 -0
  178. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_diagram3d.py +0 -0
  179. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_docs.py +0 -0
  180. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_integral_options.py +0 -0
  181. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_launcher.py +0 -0
  182. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_mathtext.py +0 -0
  183. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_orders.py +0 -0
  184. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_provenance.py +0 -0
  185. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_rcwa_options.py +0 -0
  186. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_richtext.py +0 -0
  187. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_scalar_options.py +0 -0
  188. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_state.py +0 -0
  189. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_gui_theme.py +0 -0
  190. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_illumination.py +0 -0
  191. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_core.py +0 -0
  192. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_corpus.py +0 -0
  193. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_finite.py +0 -0
  194. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_graded.py +0 -0
  195. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_greens.py +0 -0
  196. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_kernels.py +0 -0
  197. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_operators.py +0 -0
  198. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_integral_solver.py +0 -0
  199. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_io_boundary.py +0 -0
  200. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_littrow.py +0 -0
  201. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_perturbation.py +0 -0
  202. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_profiles.py +0 -0
  203. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_rayleigh_anomaly.py +0 -0
  204. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_rcwa.py +0 -0
  205. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_rcwa_benchmarks.py +0 -0
  206. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_refractiveindex.py +0 -0
  207. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_resolution.py +0 -0
  208. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_result.py +0 -0
  209. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_solver_conformance.py +0 -0
  210. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_solver_execution.py +0 -0
  211. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_solver_progress.py +0 -0
  212. {gratinglab-0.3.3 → gratinglab-0.3.4}/tests/test_txl.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Open platform for diffraction grating groove metrology and efficiency analysis
5
5
  Author: Jake McCoy, Aditi Gangadharan
6
6
  License: BSD-3-Clause
@@ -249,8 +249,9 @@ uv tool install "gratinglab[gui]" # gratinglab-gui as a standalone
249
249
 
250
250
  From a checkout, use `pip install -e ".[dev,gui,metrology,refractiveindex]"` instead.
251
251
 
252
- No optical constant tables are distributed with the package, so absolute efficiencies
253
- require tables supplied by the user. A library is a directory of such tables, one
252
+ Neither the package nor its repository carries optical constant tables, so absolute
253
+ efficiencies, and the `coating="Au"` examples above, require tables supplied by the
254
+ user. A library is a directory of such tables, one
254
255
  material per file, each named after its material:
255
256
 
256
257
  | File | From | Range |
@@ -264,7 +265,14 @@ Saving one as `~/.gratinglab/materials/Pt.yml` makes `coating="Pt"` available.
264
265
  `materials.from_cxro_file(path)` or `from_refractiveindex_file(path)` reads a single
265
266
  file without a library. The YAML files require the `refractiveindex` extra.
266
267
  [`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
267
- explains why no tables are distributed.
268
+ explains why none are distributed.
269
+
270
+ Without a table, `coating="typical:Au"` (or `typical:SiO2`, `typical:C@2.0` with
271
+ a density) uses an approximate X-ray model built from physical facts, 30 eV to
272
+ 30 keV, for Au, Pt, Ni, C, Si and O. Where it cannot answer for its index, near
273
+ an absorption edge or at low energy, the result's provenance says so.
274
+ [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md)
275
+ has the model and how far it agrees with real tables.
268
276
 
269
277
  The core install does not include a plotting stack, so a user who only runs the solvers
270
278
  does not install one. A subpackage that needs an optional extra names it when it is
@@ -392,6 +400,7 @@ gratinglab` regenerates the icon from the artwork in `gratinglab.gui.icon`.
392
400
  | [`docs/theory/scalar.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/scalar.md) | The derivation of the scalar solver, its closed-form results and its limits |
393
401
  | [`docs/theory/integral.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/integral.md) | The boundary-integral solver: conical formulation, perfect and finite conductivity |
394
402
  | [`docs/theory/metrology.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/metrology.md) | The assumptions of the AFM pipeline, what it measures and what it does not, including what tip erosion can recover |
403
+ | [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md) | The X-ray index model used without a table, what it is checked against, and its measured accuracy |
395
404
  | [`docs/findings.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/findings.md) | Empirical results, each with the evidence for it |
396
405
  | [`docs/references.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/references.md) | The literature each part of the package is based on |
397
406
  | [`docs/mutation-testing.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/mutation-testing.md) | What is mutated, what is not, and how to interpret a surviving mutant |
@@ -514,9 +523,11 @@ no such question.
514
523
 
515
524
  ### What this licence does not cover
516
525
 
517
- **Optical constant tables.** None are distributed with the package, and a table you
518
- add is governed by the terms of whoever published it, not by this licence. CXRO and
519
- refractiveindex.info each state their own, and a table exported from another program
526
+ **Optical constant tables.** None are distributed with the package or kept in the
527
+ repository: the suite runs on an invented gold-sized table of its own, and its
528
+ refractiveindex.info reader fixtures are files that site dedicates CC0. A table you
529
+ add is governed by the terms of whoever published it, not by this licence. refractiveindex.info
530
+ dedicates its files CC0, CXRO states no terms at all, and a table exported from another program
520
531
  carries whatever that program's terms attach to it.
521
532
  [`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
522
533
  records where each kind comes from and why none ships here.
@@ -204,8 +204,9 @@ uv tool install "gratinglab[gui]" # gratinglab-gui as a standalone
204
204
 
205
205
  From a checkout, use `pip install -e ".[dev,gui,metrology,refractiveindex]"` instead.
206
206
 
207
- No optical constant tables are distributed with the package, so absolute efficiencies
208
- require tables supplied by the user. A library is a directory of such tables, one
207
+ Neither the package nor its repository carries optical constant tables, so absolute
208
+ efficiencies, and the `coating="Au"` examples above, require tables supplied by the
209
+ user. A library is a directory of such tables, one
209
210
  material per file, each named after its material:
210
211
 
211
212
  | File | From | Range |
@@ -219,7 +220,14 @@ Saving one as `~/.gratinglab/materials/Pt.yml` makes `coating="Pt"` available.
219
220
  `materials.from_cxro_file(path)` or `from_refractiveindex_file(path)` reads a single
220
221
  file without a library. The YAML files require the `refractiveindex` extra.
221
222
  [`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
222
- explains why no tables are distributed.
223
+ explains why none are distributed.
224
+
225
+ Without a table, `coating="typical:Au"` (or `typical:SiO2`, `typical:C@2.0` with
226
+ a density) uses an approximate X-ray model built from physical facts, 30 eV to
227
+ 30 keV, for Au, Pt, Ni, C, Si and O. Where it cannot answer for its index, near
228
+ an absorption edge or at low energy, the result's provenance says so.
229
+ [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md)
230
+ has the model and how far it agrees with real tables.
223
231
 
224
232
  The core install does not include a plotting stack, so a user who only runs the solvers
225
233
  does not install one. A subpackage that needs an optional extra names it when it is
@@ -347,6 +355,7 @@ gratinglab` regenerates the icon from the artwork in `gratinglab.gui.icon`.
347
355
  | [`docs/theory/scalar.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/scalar.md) | The derivation of the scalar solver, its closed-form results and its limits |
348
356
  | [`docs/theory/integral.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/integral.md) | The boundary-integral solver: conical formulation, perfect and finite conductivity |
349
357
  | [`docs/theory/metrology.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/theory/metrology.md) | The assumptions of the AFM pipeline, what it measures and what it does not, including what tip erosion can recover |
358
+ | [`docs/typical-materials.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/typical-materials.md) | The X-ray index model used without a table, what it is checked against, and its measured accuracy |
350
359
  | [`docs/findings.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/findings.md) | Empirical results, each with the evidence for it |
351
360
  | [`docs/references.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/references.md) | The literature each part of the package is based on |
352
361
  | [`docs/mutation-testing.md`](https://github.com/jamccoy/gratinglab/blob/master/docs/mutation-testing.md) | What is mutated, what is not, and how to interpret a surviving mutant |
@@ -469,9 +478,11 @@ no such question.
469
478
 
470
479
  ### What this licence does not cover
471
480
 
472
- **Optical constant tables.** None are distributed with the package, and a table you
473
- add is governed by the terms of whoever published it, not by this licence. CXRO and
474
- refractiveindex.info each state their own, and a table exported from another program
481
+ **Optical constant tables.** None are distributed with the package or kept in the
482
+ repository: the suite runs on an invented gold-sized table of its own, and its
483
+ refractiveindex.info reader fixtures are files that site dedicates CC0. A table you
484
+ add is governed by the terms of whoever published it, not by this licence. refractiveindex.info
485
+ dedicates its files CC0, CXRO states no terms at all, and a table exported from another program
475
486
  carries whatever that program's terms attach to it.
476
487
  [`SOURCES.md`](https://github.com/jamccoy/gratinglab/blob/master/src/gratinglab/materials/data/SOURCES.md)
477
488
  records where each kind comes from and why none ships here.
@@ -145,11 +145,11 @@ version = { attr = "gratinglab.__version__" }
145
145
  [tool.setuptools.packages.find]
146
146
  where = ["src"]
147
147
 
148
- # Optical constant TABLES do not ship: whether CXRO's may be redistributed is
149
- # not settled, so the wheel and sdist carry none and `available()` is empty on
150
- # install. That is the one place a checkout and an install differ on purpose,
151
- # and both halves are checked: the suite uses `data/Au.txt` from the checkout,
152
- # and release.yml asserts the wheel holds no table and that an install refuses
148
+ # Optical constant TABLES do not ship, and the repository holds none: only
149
+ # data that is ours or in the public domain is committed, and no published
150
+ # table is clearly either. So `available()` is empty on install. The suite
151
+ # uses an invented table from `tests/data/materials/` instead, and
152
+ # release.yml asserts the wheel holds no table and that an install refuses
153
153
  # `lookup("Au")` with the message that says what to do instead. A missing table
154
154
  # raises rather than degrading, so the difference cannot pass for a result.
155
155
  # SOURCES.md ships, because it is how a user finds out where to get one.
@@ -241,7 +241,7 @@ do_not_mutate = [
241
241
  # are covered by tests/test_illumination.py and tests/test_profiles.py.
242
242
  "*/illumination.py",
243
243
  "*/problem.py",
244
- "*/profiles.py",
244
+ "*/profiles/*",
245
245
  ]
246
246
 
247
247
  # corpus.toml, which the reference tests read.
@@ -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.3.3"
25
+ __version__ = "0.3.4"
26
26
 
27
27
  __all__ = [
28
28
  "Illumination",
@@ -173,6 +173,8 @@ class Residuals:
173
173
  with no stated uncertainty cannot say how far off it is in those units.
174
174
  ``propagating`` is the *model's* flag: a measured order that the model
175
175
  calls evanescent is a disagreement worth seeing, and its ``model`` is 0.
176
+ :meth:`evanescent_warning` says how many there are and in which orders,
177
+ because the residual alone cannot tell a wrong mount from a wrong model.
176
178
  """
177
179
 
178
180
  measurement: str
@@ -201,8 +203,11 @@ class Residuals:
201
203
 
202
204
  ``chi2`` sums ``pull**2`` over the points that have a sigma, and
203
205
  ``n_with_sigma`` says how many that was, so the number is never read
204
- without its denominator. ``at_wavelength`` and ``at_order`` locate the
205
- largest absolute residual.
206
+ without its denominator. ``n_evanescent`` counts the measured points
207
+ on orders the model does not propagate, which are inside every other
208
+ figure here at a model value of exactly 0; see
209
+ :meth:`evanescent_warning`. ``at_wavelength`` and ``at_order`` locate
210
+ the largest absolute residual.
206
211
  """
207
212
  residual = self.residual
208
213
  pull = self.pull
@@ -214,10 +219,50 @@ class Residuals:
214
219
  "chi2": float(np.sum(pull[finite] ** 2)),
215
220
  "n_points": float(len(self)),
216
221
  "n_with_sigma": float(np.count_nonzero(finite)),
222
+ "n_evanescent": float(np.count_nonzero(~self.propagating)),
217
223
  "at_wavelength": float(self.wavelength[worst]),
218
224
  "at_order": int(self.order[worst]),
219
225
  }
220
226
 
227
+ def evanescent_warning(self) -> str | None:
228
+ """Say which measured points the model cannot propagate, or None.
229
+
230
+ Something was measured at each of these points, so either the model
231
+ or the mount it was given is wrong there. Two shapes are common and
232
+ they mean different things. A point or two at the end of the arc,
233
+ the most negative or most positive order at its energy, can be a
234
+ real order close to its cutoff. Whole orders stranded at every
235
+ wavelength they were measured at is a mount problem, and the sign
236
+ of alpha is the first thing to check: the June 2017 SCIL campaign's angle file put 59
237
+ of 123 points there, and the only symptom without this count was an
238
+ RMS residual of 0.157 (``docs/findings.md``).
239
+
240
+ Nothing is decided here. The message gives the count per order,
241
+ against how many points that order has, and leaves the reading to
242
+ whoever runs the comparison. It is not raised as a Python warning,
243
+ because the edge-of-arc case is legitimate and a campaign that has
244
+ one would warn on every run.
245
+ """
246
+ stranded = ~self.propagating
247
+ if not stranded.any():
248
+ return None
249
+ parts = []
250
+ for m in np.unique(self.order[stranded]):
251
+ in_order = self.order == m
252
+ parts.append(
253
+ f"m={int(m):+d} ({np.count_nonzero(stranded & in_order)} of "
254
+ f"{np.count_nonzero(in_order)})"
255
+ )
256
+ return (
257
+ f"{np.count_nonzero(stranded)} of {len(self)} measured points in "
258
+ f"{self.measurement!r} fall on orders {self.method!r} does not "
259
+ f"propagate, where it reads exactly 0: {', '.join(parts)}. A point "
260
+ "at the end of the arc can be a real order near its cutoff. A whole "
261
+ "order stranded usually means the mount is wrong: check the sign of "
262
+ "alpha first, and take the one under which the measured orders "
263
+ "propagate (docs/conventions.md, section 4)."
264
+ )
265
+
221
266
 
222
267
  @dataclass(frozen=True, slots=True)
223
268
  class Comparison:
@@ -193,9 +193,9 @@ code changes. Or load a table from anywhere without adding it:
193
193
 
194
194
  {citations}
195
195
 
196
- The package ships no tables: CXRO's terms for redistributing them inside a
197
- BSD-3 package have not been confirmed, and `SOURCES.md` beside the bundled
198
- directory records why. Each table's source names the file it was read from,
196
+ The package ships no tables: it carries only data that is its own or in the
197
+ public domain, and no published table is clearly either. `SOURCES.md` beside
198
+ the bundled directory records why. Each table's source names the file it was read from,
199
199
  so a result's provenance says which library answered.
200
200
 
201
201
  ## Surface roughness
@@ -26,6 +26,8 @@ and the clear is silently lost.
26
26
 
27
27
  from __future__ import annotations
28
28
 
29
+ import inspect
30
+ import os
29
31
  import threading
30
32
  from typing import TYPE_CHECKING, NamedTuple
31
33
 
@@ -79,6 +81,32 @@ def _energy(scan) -> "EnergyReport":
79
81
  return check_energy_balance(scan, tolerance=_ENERGY_DEVIATION_WARN)
80
82
 
81
83
 
84
+ #: Threads a scan's wavelengths are solved on, for the solvers that take
85
+ #: ``workers``. The library defaults to 1, and nothing in the window passed
86
+ #: anything else, so a scan used one core of however many there were. A
87
+ #: 32-wavelength integral scan on MC1 (16 cores) took 5.05 s at 1, 1.69 s at
88
+ #: 4, 1.34 s at 8 and 1.22 s at 12, identical to the serial result each time,
89
+ #: so 8 is where it stops paying. One core is left for the window itself.
90
+ _SCAN_WORKERS = max(1, min(8, (os.cpu_count() or 2) - 1))
91
+
92
+
93
+ def _with_workers(method: str, options: dict) -> dict:
94
+ """``options`` with :data:`_SCAN_WORKERS` added, if ``method`` takes it.
95
+
96
+ A ``workers`` already present is kept. The solver's own signature is what
97
+ decides, so a solver that gains the option later is covered without an
98
+ edit here, and one without it (scalar, the C-method) is never sent a
99
+ keyword it would refuse.
100
+ """
101
+ from ...solvers.base import get_solver
102
+
103
+ if "workers" in options:
104
+ return options
105
+ if "workers" not in inspect.signature(get_solver(method).solve).parameters:
106
+ return options
107
+ return {**options, "workers": _SCAN_WORKERS}
108
+
109
+
82
110
  class SolveWorker(QObject):
83
111
  """Run one solve at a time on a dedicated thread, for whichever solver asked.
84
112
 
@@ -123,7 +151,7 @@ class SolveWorker(QObject):
123
151
  geometry.illumination,
124
152
  geometry.wavelengths,
125
153
  [method],
126
- options={method: options},
154
+ options={method: _with_workers(method, options)},
127
155
  progress=self._reporter(token, cancel),
128
156
  )[0]
129
157
  self.finished.emit(token, method, SolveResult(scan, _energy(scan)))
@@ -172,7 +200,11 @@ class SolveWorker(QObject):
172
200
  geometry.illumination,
173
201
  geometry.wavelengths,
174
202
  progress=self._reporter(token, cancel),
175
- **{k: v for k, v in options.items() if k != knob},
203
+ **{
204
+ k: v
205
+ for k, v in _with_workers(method, options).items()
206
+ if k != knob
207
+ },
176
208
  )
177
209
  self.converged.emit(
178
210
  token,
@@ -238,7 +270,7 @@ class SolveWorker(QObject):
238
270
  geometry.illumination,
239
271
  geometry.wavelengths,
240
272
  [method],
241
- options={method: method_options},
273
+ options={method: _with_workers(method, method_options)},
242
274
  progress=step,
243
275
  )[0]
244
276
  except Cancelled:
@@ -6,6 +6,7 @@ from gratinglab import materials
6
6
  materials.available() # every material in every library
7
7
  pt = materials.lookup("Pt") # ~/.gratinglab/materials/Pt.txt, say
8
8
  mine = materials.from_cxro_file("Ni_CXRO.txt") # any file, no library
9
+ au = materials.typical("Au") # a model, not a table: see typical.py
9
10
  ```
10
11
 
11
12
  A library is a directory of tables, one material per file, named for it:
@@ -13,8 +14,14 @@ A library is a directory of tables, one material per file, named for it:
13
14
  ultraviolet to infrared) or `Pt.ari` (PCGrate) is `coating="Pt"`. Yours is
14
15
  `~/.gratinglab/materials`, or whatever `GRATINGLAB_MATERIALS` names, and it is
15
16
  searched before the tables bundled with a checkout, so your own replaces a
16
- bundled one of the same name. The release packages bundle none, because CXRO's
17
- terms for redistributing its tables are not settled; `data/SOURCES.md` says so.
17
+ bundled one of the same name. Neither the repository nor a release bundles
18
+ any, because no published table is clearly public domain; `data/SOURCES.md`
19
+ says so.
20
+
21
+ A name beginning `typical:` (`coating="typical:Au"`) is not looked up in any
22
+ library: it is the X-ray model in :mod:`.typical`, built from physical facts,
23
+ approximate, and named so that a result says it used a model. A plain `"Au"`
24
+ with no table still refuses rather than falling back to it.
18
25
 
19
26
  Lookup is by name, because that is what a
20
27
  :class:`~gratinglab.problem.Problem` carries: `coating="Au"` keeps a benchmark
@@ -45,11 +52,14 @@ from .optical import (
45
52
  write_ari,
46
53
  )
47
54
  from .refractiveindex import read_refractiveindex
55
+ from .typical import PREFIX as TYPICAL_PREFIX
56
+ from .typical import TypicalConstants, from_name, typical
48
57
 
49
58
  __all__ = [
50
59
  "HC_EV_NM",
51
60
  "LIBRARY_ENV",
52
61
  "OpticalConstants",
62
+ "TypicalConstants",
53
63
  "UnknownMaterial",
54
64
  "available",
55
65
  "data_dir",
@@ -62,12 +72,13 @@ __all__ = [
62
72
  "read_ari",
63
73
  "read_cxro",
64
74
  "read_refractiveindex",
75
+ "typical",
65
76
  "user_dir",
66
77
  "write_ari",
67
78
  ]
68
79
 
69
- #: Tables bundled with a checkout live here. The release packages ship none;
70
- #: see ``data/SOURCES.md``.
80
+ #: Bundled tables would live here, and there are none, in a checkout or a
81
+ #: release; see ``data/SOURCES.md``. The test suite points this elsewhere.
71
82
  _DATA = Path(__file__).parent / "data"
72
83
 
73
84
  #: Names your own library directories, separated by ``os.pathsep``. When set it
@@ -168,7 +179,12 @@ def available() -> tuple[str, ...]:
168
179
 
169
180
 
170
181
  def lookup(name: str) -> OpticalConstants:
171
- """A material by name, e.g. ``"Au"``, from the first library that has it."""
182
+ """A material by name, e.g. ``"Au"``, from the first library that has it.
183
+
184
+ ``typical:<formula>[@<density>]`` is the model in :mod:`.typical` instead.
185
+ """
186
+ if name.startswith(TYPICAL_PREFIX):
187
+ return from_name(name)
172
188
  for directory in library_dirs():
173
189
  path = _tables(directory).get(name)
174
190
  if path is not None:
@@ -0,0 +1,48 @@
1
+ # Optical constants: none here, and where to get them
2
+
3
+ This directory holds no tables, in the repository or in a release. gratinglab
4
+ commits only data that is its own or in the public domain, and no published
5
+ optical constants table is clearly either. CXRO's site states no data licence,
6
+ and refractiveindex.info's files, though dedicated CC0, report other people's
7
+ measurements.
8
+
9
+ Until 2026-11-11 the repository carried one, `Au.txt`: a verbatim CXRO/Henke
10
+ export of gold, 200 eV to 2 keV in 500 points, used by the test suite. It never
11
+ shipped in a wheel or sdist, and it remains in the git history and in the
12
+ source archives GitHub generates for releases up to 0.3.3. The suite now uses
13
+ an invented gold-sized table, `tests/data/materials/Au.txt`, written by
14
+ `make_au.py` beside it, and `coating="Au"` resolves to that file only inside
15
+ the tests.
16
+
17
+ An install therefore starts with no materials, and `lookup` refuses with a
18
+ message naming the way out. The one exception is not a table:
19
+ `coating="typical:Au"` and its siblings are an approximate X-ray model computed
20
+ from physical facts (atomic numbers and weights, core-level binding energies
21
+ from the X-ray Data Booklet, first ionization energies, densities), each stated
22
+ with its source in `materials/typical.py`. See `docs/typical-materials.md`. Nothing in `gratinglab` requires a table to exist;
23
+ `test_an_empty_data_directory_is_a_supported_state` holds it to that, and
24
+ `test_the_package_data_directory_has_no_table` holds this directory empty.
25
+
26
+ ## Adding a material
27
+
28
+ Put the table in your own library, `~/.gratinglab/materials` or a directory
29
+ named in `GRATINGLAB_MATERIALS`, as `<Name>.txt` for a CXRO export, `<Name>.yml`
30
+ for a refractiveindex.info file or `<Name>.ari` for PCGrate's format. That is
31
+ searched before this directory, survives an upgrade, and is never published.
32
+ See `materials/__init__.py`.
33
+
34
+ | Kind | Where | Range |
35
+ |---|---|---|
36
+ | CXRO/Henke export | <https://henke.lbl.gov/optical_constants/>, `getdb2.html`, one material, energy scan | X-ray |
37
+ | refractiveindex.info | <https://refractiveindex.info>, the YAML file for a dataset | ultraviolet to infrared |
38
+
39
+ A table you add is governed by whoever published it, not by gratinglab's
40
+ licence.
41
+
42
+ ## Citation
43
+
44
+ Work using CXRO tables should cite the compilation behind them:
45
+
46
+ > B.L. Henke, E.M. Gullikson, and J.C. Davis, *X-ray interactions:
47
+ > photoabsorption, scattering, transmission, and reflection at E = 50–30000 eV,
48
+ > Z = 1–92*, Atomic Data and Nuclear Data Tables **54** (2), 181–342 (1993).
@@ -221,6 +221,15 @@ class OpticalConstants:
221
221
  """
222
222
  return self._near_unity(self.n(wavelength_nm))
223
223
 
224
+ def caveats(self, wavelength_nm: ArrayLike) -> tuple[str, ...]:
225
+ """Provenance warnings this material asks for at these wavelengths.
226
+
227
+ A table answers for its whole range, so it has none; a model may not
228
+ (``typical.TypicalConstants``). Every solver adds these to its
229
+ warnings, so a material can say where it should not be relied on.
230
+ """
231
+ return ()
232
+
224
233
  @staticmethod
225
234
  def _near_unity(n: NDArray[np.complex128]) -> NDArray[np.bool_]:
226
235
  return np.abs(n - 1.0) <= NEAR_UNITY