gratinglab 0.3.8__tar.gz → 0.3.9__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 (229) hide show
  1. {gratinglab-0.3.8/src/gratinglab.egg-info → gratinglab-0.3.9}/PKG-INFO +3 -3
  2. {gratinglab-0.3.8 → gratinglab-0.3.9}/pyproject.toml +2 -2
  3. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/__init__.py +1 -1
  4. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/cmethod_tab.py +2 -1
  5. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/help_menu.py +26 -28
  6. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/integral_tab.py +2 -1
  7. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/rcwa_tab.py +2 -1
  8. gratinglab-0.3.9/src/gratinglab/gui/qt/recent.py +14 -0
  9. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/scalar_tab.py +2 -1
  10. gratinglab-0.3.9/src/gratinglab/gui/qt/theming.py +57 -0
  11. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/theme.py +27 -131
  12. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/io/boundary.py +4 -2
  13. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/io/ggp.py +2 -1
  14. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/metrics.py +3 -1
  15. {gratinglab-0.3.8 → gratinglab-0.3.9/src/gratinglab.egg-info}/PKG-INFO +3 -3
  16. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab.egg-info/requires.txt +2 -2
  17. gratinglab-0.3.8/src/gratinglab/gui/qt/recent.py +0 -59
  18. gratinglab-0.3.8/src/gratinglab/gui/qt/theming.py +0 -249
  19. {gratinglab-0.3.8 → gratinglab-0.3.9}/LICENSE +0 -0
  20. {gratinglab-0.3.8 → gratinglab-0.3.9}/MANIFEST.in +0 -0
  21. {gratinglab-0.3.8 → gratinglab-0.3.9}/README.md +0 -0
  22. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/conventions.md +0 -0
  23. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/theory/cmethod.md +0 -0
  24. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/theory/integral.md +0 -0
  25. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/theory/metrology.md +0 -0
  26. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/theory/rcwa.md +0 -0
  27. {gratinglab-0.3.8 → gratinglab-0.3.9}/docs/theory/scalar.md +0 -0
  28. {gratinglab-0.3.8 → gratinglab-0.3.9}/setup.cfg +0 -0
  29. {gratinglab-0.3.8 → gratinglab-0.3.9}/setup.py +0 -0
  30. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/checks.py +0 -0
  31. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/compare.py +0 -0
  32. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/convergence.py +0 -0
  33. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/geometry.py +0 -0
  34. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/__init__.py +0 -0
  35. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/app.py +0 -0
  36. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/cmethod_options.py +0 -0
  37. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/comparison.py +0 -0
  38. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/diagram.py +0 -0
  39. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/diagram3d.py +0 -0
  40. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/docs.py +0 -0
  41. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/efficiency_plot.py +0 -0
  42. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/failures.py +0 -0
  43. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/icon.py +0 -0
  44. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/integral_options.py +0 -0
  45. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/launcher.py +0 -0
  46. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/mathtext.py +0 -0
  47. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/orders.py +0 -0
  48. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/provenance.py +0 -0
  49. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/__init__.py +0 -0
  50. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/compare_tab.py +0 -0
  51. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/geometry_panel.py +0 -0
  52. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/geometry_tab.py +0 -0
  53. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/launcher.py +0 -0
  54. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/main_window.py +0 -0
  55. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/profile_plot_panel.py +0 -0
  56. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/provenance_panel.py +0 -0
  57. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/scene3d_panel.py +0 -0
  58. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/setup_tab.py +0 -0
  59. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/sizing.py +0 -0
  60. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/theory_viewer.py +0 -0
  61. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/qt/worker.py +0 -0
  62. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/rcwa_options.py +0 -0
  63. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/richtext.py +0 -0
  64. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/scalar_options.py +0 -0
  65. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/gui/state.py +0 -0
  66. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/illumination.py +0 -0
  67. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/io/__init__.py +0 -0
  68. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/io/efficiency_table.py +0 -0
  69. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/io/txl.py +0 -0
  70. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/__init__.py +0 -0
  71. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/data/SOURCES.md +0 -0
  72. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/fresnel.py +0 -0
  73. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/optical.py +0 -0
  74. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/refractiveindex.py +0 -0
  75. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/materials/typical.py +0 -0
  76. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/measured.py +0 -0
  77. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/__init__.py +0 -0
  78. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/_analyzer_summary.py +0 -0
  79. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/analyzer.py +0 -0
  80. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/boundary/__init__.py +0 -0
  81. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/boundary/average.py +0 -0
  82. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/boundary/cross_section.py +0 -0
  83. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/boundary/pipeline.py +0 -0
  84. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/boundary/swaths.py +0 -0
  85. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/cli.py +0 -0
  86. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/config.py +0 -0
  87. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/__init__.py +0 -0
  88. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/analysis.py +0 -0
  89. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/image_flatten.py +0 -0
  90. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/orientation.py +0 -0
  91. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/processing.py +0 -0
  92. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/region_mask.py +0 -0
  93. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/scars.py +0 -0
  94. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/core/tip.py +0 -0
  95. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/data/__init__.py +0 -0
  96. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/data/aggregation.py +0 -0
  97. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/__init__.py +0 -0
  98. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/icon.py +0 -0
  99. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/__init__.py +0 -0
  100. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/app.py +0 -0
  101. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/boundary_view.py +0 -0
  102. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/canvas.py +0 -0
  103. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/efficiency_dialog.py +0 -0
  104. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/import_view.py +0 -0
  105. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/layout.py +0 -0
  106. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/main_window.py +0 -0
  107. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/swath_dialog.py +0 -0
  108. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/wiki_view.py +0 -0
  109. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/qt/worker.py +0 -0
  110. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/gui/state.py +0 -0
  111. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/__init__.py +0 -0
  112. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/file_io.py +0 -0
  113. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/ibw.py +0 -0
  114. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/sem.py +0 -0
  115. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/io/spm.py +0 -0
  116. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/settings.py +0 -0
  117. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/stats/__init__.py +0 -0
  118. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/stats/analysis.py +0 -0
  119. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/stats/icc.py +0 -0
  120. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/visualization/__init__.py +0 -0
  121. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/visualization/diagnostics.py +0 -0
  122. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/visualization/profiles.py +0 -0
  123. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/visualization/statistics.py +0 -0
  124. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/__init__.py +0 -0
  125. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/facet-fitting.md +0 -0
  126. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/file-formats.md +0 -0
  127. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/flattening.md +0 -0
  128. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/groove-orientation.md +0 -0
  129. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/icc-correction.md +0 -0
  130. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/overview.md +0 -0
  131. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/reading-outputs.md +0 -0
  132. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/row-groups.md +0 -0
  133. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/scars-and-masking.md +0 -0
  134. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/swath-statistics.md +0 -0
  135. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/wiki/tip-correction.md +0 -0
  136. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/metrology/workflows.py +0 -0
  137. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/problem.py +0 -0
  138. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/__init__.py +0 -0
  139. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/_base.py +0 -0
  140. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/_polyline.py +0 -0
  141. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/_shapes.py +0 -0
  142. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/_trapezoid.py +0 -0
  143. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/profiles/_types.py +0 -0
  144. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/resolution.py +0 -0
  145. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/result.py +0 -0
  146. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/__init__.py +0 -0
  147. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/_conditioning.py +0 -0
  148. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/_execution.py +0 -0
  149. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/_scalar_groove.py +0 -0
  150. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/base.py +0 -0
  151. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/cmethod/__init__.py +0 -0
  152. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/cmethod/_core.py +0 -0
  153. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/cmethod/_series.py +0 -0
  154. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/__init__.py +0 -0
  155. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_boundary.py +0 -0
  156. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_core.py +0 -0
  157. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_finite.py +0 -0
  158. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_greens.py +0 -0
  159. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_kernels.py +0 -0
  160. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/integral/_nystrom.py +0 -0
  161. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/rcwa/__init__.py +0 -0
  162. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/rcwa/_core.py +0 -0
  163. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/rcwa/_stack.py +0 -0
  164. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab/solvers/scalar.py +0 -0
  165. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab.egg-info/SOURCES.txt +0 -0
  166. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab.egg-info/dependency_links.txt +0 -0
  167. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab.egg-info/entry_points.txt +0 -0
  168. {gratinglab-0.3.8 → gratinglab-0.3.9}/src/gratinglab.egg-info/top_level.txt +0 -0
  169. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_changelog.py +0 -0
  170. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_checks.py +0 -0
  171. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_cmethod.py +0 -0
  172. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_compare.py +0 -0
  173. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_conditioning.py +0 -0
  174. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_convergence.py +0 -0
  175. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_cross_method.py +0 -0
  176. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_efficiency_table.py +0 -0
  177. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_four_way.py +0 -0
  178. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_fresnel.py +0 -0
  179. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_geometry.py +0 -0
  180. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_ggp.py +0 -0
  181. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_cmethod_options.py +0 -0
  182. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_cmethod_tab.py +0 -0
  183. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_compare_tab.py +0 -0
  184. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_diagram.py +0 -0
  185. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_diagram3d.py +0 -0
  186. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_docs.py +0 -0
  187. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_help_menu.py +0 -0
  188. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_integral_options.py +0 -0
  189. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_launcher.py +0 -0
  190. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_mathtext.py +0 -0
  191. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_orders.py +0 -0
  192. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_polish.py +0 -0
  193. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_provenance.py +0 -0
  194. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_provenance_panel.py +0 -0
  195. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_qt.py +0 -0
  196. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_rcwa_options.py +0 -0
  197. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_richtext.py +0 -0
  198. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_scalar_options.py +0 -0
  199. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_state.py +0 -0
  200. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_gui_theme.py +0 -0
  201. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_illumination.py +0 -0
  202. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_core.py +0 -0
  203. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_corpus.py +0 -0
  204. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_finite.py +0 -0
  205. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_graded.py +0 -0
  206. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_greens.py +0 -0
  207. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_kernels.py +0 -0
  208. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_measured_polygon.py +0 -0
  209. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_operators.py +0 -0
  210. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_integral_solver.py +0 -0
  211. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_io_boundary.py +0 -0
  212. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_littrow.py +0 -0
  213. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_materials.py +0 -0
  214. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_measured.py +0 -0
  215. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_perturbation.py +0 -0
  216. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_profiles.py +0 -0
  217. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_rayleigh_anomaly.py +0 -0
  218. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_rcwa.py +0 -0
  219. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_rcwa_benchmarks.py +0 -0
  220. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_refractiveindex.py +0 -0
  221. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_resolution.py +0 -0
  222. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_result.py +0 -0
  223. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_scalar.py +0 -0
  224. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_solver_conformance.py +0 -0
  225. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_solver_execution.py +0 -0
  226. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_solver_progress.py +0 -0
  227. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_trapezoidal_solvers.py +0 -0
  228. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_txl.py +0 -0
  229. {gratinglab-0.3.8 → gratinglab-0.3.9}/tests/test_typical.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.3.8
3
+ Version: 0.3.9
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
@@ -21,7 +21,7 @@ License-File: LICENSE
21
21
  Requires-Dist: numpy>=1.26
22
22
  Requires-Dist: scipy>=1.11
23
23
  Requires-Dist: pydantic>=2.6
24
- Requires-Dist: endstation>=0.2.6
24
+ Requires-Dist: endstation>=0.3.0
25
25
  Requires-Dist: threadpoolctl>=3.1
26
26
  Provides-Extra: dev
27
27
  Requires-Dist: pytest>=9.2; extra == "dev"
@@ -33,7 +33,7 @@ Provides-Extra: gui
33
33
  Requires-Dist: matplotlib>=3.8; extra == "gui"
34
34
  Requires-Dist: PySide6-Essentials!=6.12.0,>=6.7; python_version < "3.12" and extra == "gui"
35
35
  Requires-Dist: PySide6-Essentials>=6.7; python_version >= "3.12" and extra == "gui"
36
- Requires-Dist: endstation[qt]>=0.2.6; extra == "gui"
36
+ Requires-Dist: endstation[qt]>=0.3.0; extra == "gui"
37
37
  Provides-Extra: metrology
38
38
  Requires-Dist: matplotlib>=3.9; extra == "metrology"
39
39
  Provides-Extra: refractiveindex
@@ -54,7 +54,7 @@ dependencies = [
54
54
  # `dependencies = []` and has a test that fails if that stops being true,
55
55
  # so this line adds no transitive weight -- the Qt and matplotlib parts sit
56
56
  # behind its own extras, which our `gui` extra asks for by name.
57
- "endstation>=0.2.6",
57
+ "endstation>=0.3.0",
58
58
  # The rigorous solvers cap BLAS threads for the length of a solve
59
59
  # (solvers/_execution.py): OpenBLAS's thread-per-core default made RCWA
60
60
  # up to 135x slower on a busy machine, measured in benchmarks/
@@ -101,7 +101,7 @@ gui = [
101
101
  "matplotlib>=3.8",
102
102
  "PySide6-Essentials>=6.7,!=6.12.0; python_version < '3.12'",
103
103
  "PySide6-Essentials>=6.7; python_version >= '3.12'",
104
- "endstation[qt]>=0.2.6",
104
+ "endstation[qt]>=0.3.0",
105
105
  ]
106
106
  # Groove metrology: reading AFM scans and averaging them into a boundary
107
107
  # profile. An extra for the same reason the GUI is one -- `pip install
@@ -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.8"
25
+ __version__ = "0.3.9"
26
26
 
27
27
  #: The day this version was released, ISO 8601. It sits beside the version
28
28
  #: rather than being read from CHANGELOG.md at run time because the changelog
@@ -21,6 +21,7 @@ import dataclasses
21
21
  from pathlib import Path
22
22
  from typing import Sequence
23
23
 
24
+ from endstation.files import atomic_open
24
25
  from PySide6.QtCore import Qt, Signal
25
26
  from PySide6.QtWidgets import (
26
27
  QAbstractItemView,
@@ -445,7 +446,7 @@ class CMethodTab(QWidget):
445
446
  return
446
447
  recent.remember("exports", path)
447
448
  rows = self._scan.to_records()
448
- with open(path, "w", newline="", encoding="utf-8") as handle:
449
+ with atomic_open(path, newline="", encoding="utf-8") as handle:
449
450
  writer = csv.DictWriter(handle, fieldnames=list(rows[0]))
450
451
  writer.writeheader()
451
452
  writer.writerows(rows)
@@ -16,29 +16,30 @@ at once.
16
16
  ``menu_bar`` exists because the chooser is a plain ``QWidget`` and has no
17
17
  ``menuBar()`` of its own; it hands in the one it put in its layout. The
18
18
  windows pass nothing and get theirs.
19
+
20
+ The menu itself is built by :func:`endstation.qt.help_menu.install_help_menu`;
21
+ what this module supplies is the About text and the pages.
19
22
  """
20
23
 
21
24
  from __future__ import annotations
22
25
 
26
+ from endstation.qt.help_menu import HELP_MENU_TITLE
27
+ from endstation.qt.help_menu import install_help_menu as _install
23
28
  from PySide6.QtWidgets import QMessageBox
24
29
 
25
30
  __all__ = ["HELP_MENU_TITLE", "install_help_menu", "show_about", "show_theory"]
26
31
 
27
- #: Title of the menu. One constant, so a test and both windows agree.
28
- HELP_MENU_TITLE = "&Help"
32
+ def _about_text() -> str:
33
+ from ... import __version__, __version_date__
34
+ from .. import provenance
35
+
36
+ return provenance.about_text(__version__, __version_date__)
29
37
 
30
38
 
31
39
  def show_about(parent=None) -> None:
32
40
  """The About box. Its text is :func:`gratinglab.gui.provenance.about_text`,
33
41
  which is a plain string so it can be asserted without a dialog."""
34
- from ... import __version__, __version_date__
35
- from .. import provenance
36
-
37
- QMessageBox.about(
38
- parent,
39
- "About gratinglab",
40
- provenance.about_text(__version__, __version_date__),
41
- )
42
+ QMessageBox.about(parent, "About gratinglab", _about_text())
42
43
 
43
44
 
44
45
  def show_theory(page, parent=None):
@@ -68,26 +69,23 @@ def install_help_menu(window, menu_bar=None):
68
69
  from ..docs import general_pages, theory_pages
69
70
  from ..richtext import menu_label
70
71
 
71
- bar = window.menuBar() if menu_bar is None else menu_bar
72
- menu = bar.addMenu(HELP_MENU_TITLE)
73
- menu.addAction("About gratinglab", lambda: show_about(window))
74
- menu.addSeparator()
72
+ def entry(page, suffix):
73
+ return (menu_label(page.title, suffix), lambda: show_theory(page, window))
74
+
75
+ def missing(page):
76
+ return "" if page.available else " (not written yet)"
75
77
 
76
78
  # Foundational, solver-independent reference first -- the generalized
77
79
  # grating equation and the angle conventions -- then one page per method.
78
- for page in general_pages():
79
- suffix = "" if page.available else " (not written yet)"
80
- menu.addAction(
81
- menu_label(page.title, suffix),
82
- lambda p=page: show_theory(p, window),
83
- )
84
- menu.addSeparator()
85
- for page in theory_pages():
86
- suffix = " Theory" + ("" if page.available else " (not written yet)")
87
- menu.addAction(
88
- menu_label(page.title, suffix),
89
- lambda p=page: show_theory(p, window),
90
- )
91
-
80
+ menu = _install(
81
+ window,
82
+ about_title="About gratinglab",
83
+ about_text=_about_text,
84
+ pages=[
85
+ [entry(page, missing(page)) for page in general_pages()],
86
+ [entry(page, " Theory" + missing(page)) for page in theory_pages()],
87
+ ],
88
+ menu_bar=menu_bar,
89
+ )
92
90
  window._gratinglab_help_menu = menu
93
91
  return menu
@@ -21,6 +21,7 @@ import dataclasses
21
21
  from pathlib import Path
22
22
  from typing import Sequence
23
23
 
24
+ from endstation.files import atomic_open
24
25
  from PySide6.QtCore import Qt, Signal
25
26
  from PySide6.QtWidgets import (
26
27
  QAbstractItemView,
@@ -481,7 +482,7 @@ class IntegralTab(QWidget):
481
482
  return
482
483
  recent.remember("exports", path)
483
484
  rows = self._scan.to_records()
484
- with open(path, "w", newline="", encoding="utf-8") as handle:
485
+ with atomic_open(path, newline="", encoding="utf-8") as handle:
485
486
  writer = csv.DictWriter(handle, fieldnames=list(rows[0]))
486
487
  writer.writeheader()
487
488
  writer.writerows(rows)
@@ -20,6 +20,7 @@ import dataclasses
20
20
  from pathlib import Path
21
21
  from typing import Sequence
22
22
 
23
+ from endstation.files import atomic_open
23
24
  from PySide6.QtCore import Qt, Signal
24
25
  from PySide6.QtWidgets import (
25
26
  QAbstractItemView,
@@ -442,7 +443,7 @@ class RcwaTab(QWidget):
442
443
  return
443
444
  recent.remember("exports", path)
444
445
  rows = self._scan.to_records()
445
- with open(path, "w", newline="", encoding="utf-8") as handle:
446
+ with atomic_open(path, newline="", encoding="utf-8") as handle:
446
447
  writer = csv.DictWriter(handle, fieldnames=list(rows[0]))
447
448
  writer.writeheader()
448
449
  writer.writerows(rows)
@@ -0,0 +1,14 @@
1
+ """The last folder per kind of file, and window layout: :mod:`endstation.qt.recent`.
2
+
3
+ Kept as a module so the windows and dialogs import it from here. It writes to
4
+ the store :mod:`gratinglab.gui.qt.theming` names, so ``GRATINGLAB_SETTINGS``
5
+ redirects it with the theme.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from endstation.qt.recent import remember, restore_layout, save_layout, start_in
11
+
12
+ from . import theming as _theming # noqa: F401 - names the settings store
13
+
14
+ __all__ = ["start_in", "remember", "restore_layout", "save_layout"]
@@ -18,6 +18,7 @@ import dataclasses
18
18
  from pathlib import Path
19
19
  from typing import Sequence
20
20
 
21
+ from endstation.files import atomic_open
21
22
  from PySide6.QtCore import Qt, Signal
22
23
  from PySide6.QtWidgets import (
23
24
  QAbstractItemView,
@@ -513,7 +514,7 @@ class ScalarTab(QWidget):
513
514
  return
514
515
  recent.remember("exports", path)
515
516
  rows = self._scan.to_records()
516
- with open(path, "w", newline="", encoding="utf-8") as handle:
517
+ with atomic_open(path, newline="", encoding="utf-8") as handle:
517
518
  writer = csv.DictWriter(handle, fieldnames=list(rows[0]))
518
519
  writer.writeheader()
519
520
  writer.writerows(rows)
@@ -0,0 +1,57 @@
1
+ """gratinglab's themes, applied by :mod:`endstation.qt.theming`.
2
+
3
+ The manager, the View > Theme menu, the palette and the settings store are
4
+ endstation's. This module names the store and passes gratinglab's themes
5
+ (:mod:`gratinglab.gui.theme`, which add the diagram and order colours), so
6
+ the rest of the package keeps importing from here.
7
+
8
+ The choice is stored with ``QSettings`` under ``gratinglab``.
9
+ ``GRATINGLAB_SETTINGS`` names an INI file to use instead, which is what the
10
+ test suite sets, the same arrangement as ``GRATINGLAB_MATERIALS``: a run of
11
+ the tests must never write to the user's own settings.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ from endstation.qt import settings as _settings_store
17
+ from endstation.qt import theming as _theming
18
+ from endstation.qt.theming import ThemeManager, ThemeMenu, manager, palette, subscribe, swatch
19
+ from PySide6.QtGui import QIcon
20
+ from PySide6.QtWidgets import QApplication
21
+
22
+ from ..theme import LIGHT, THEMES, Theme
23
+
24
+ __all__ = [
25
+ "QIcon",
26
+ "SETTINGS_ENV",
27
+ "ThemeMenu",
28
+ "ThemeManager",
29
+ "current",
30
+ "install",
31
+ "manager",
32
+ "palette",
33
+ "settings",
34
+ "subscribe",
35
+ "swatch",
36
+ ]
37
+
38
+ #: Names an INI file to keep settings in instead of the platform's store.
39
+ SETTINGS_ENV = "GRATINGLAB_SETTINGS"
40
+
41
+ # At import, so every entry point (both windows, the chooser, a test) reads
42
+ # and writes the same store. The organization and application names are the
43
+ # ones the store had before it moved to endstation, so saved choices carry over.
44
+ _settings_store.configure("gratinglab", "gratinglab", env=SETTINGS_ENV)
45
+
46
+ settings = _settings_store.settings
47
+ _settings = settings
48
+
49
+
50
+ def install(app: QApplication) -> ThemeManager:
51
+ """The application's manager with gratinglab's themes, created on first call."""
52
+ return _theming.install(app, THEMES)
53
+
54
+
55
+ def current() -> Theme:
56
+ """The theme in effect, or :data:`gratinglab.gui.theme.LIGHT` before any is installed."""
57
+ return _theming.current(LIGHT)
@@ -8,8 +8,10 @@ the active theme for a colour by meaning, never by value, which is the
8
8
  arrangement ``provenance.TAG_COLORS`` and ``diagram.TAG_COLORS`` already
9
9
  had.
10
10
 
11
- ``LIGHT`` is the look the windows had before themes existed, value for
12
- value, so choosing it changes nothing but the order colours.
11
+ The window palette, plot surfaces and verdict colours of every theme are
12
+ :mod:`endstation.theme`'s, which took them from here unchanged; this module
13
+ adds the diagram's colours and the order colours. ``LIGHT`` is the look the
14
+ windows had before themes existed.
13
15
 
14
16
  Order colours are by sign rather than from a cycle. The plots used
15
17
  matplotlib's ten-colour cycle, so a scan with sixteen orders drew m = -3
@@ -26,6 +28,9 @@ import colorsys
26
28
  from collections.abc import Iterable, Mapping
27
29
  from dataclasses import dataclass, field
28
30
 
31
+ from endstation import theme as _es
32
+ from endstation.theme import SYSTEM, contrast, pane, rc_params
33
+
29
34
  __all__ = [
30
35
  "THEMES",
31
36
  "LIGHT",
@@ -42,50 +47,23 @@ __all__ = [
42
47
  "style_figure",
43
48
  ]
44
49
 
45
- #: The choice that follows the operating system's light or dark setting.
46
- SYSTEM = "system"
50
+ @dataclass(frozen=True)
51
+ class Theme(_es.Theme):
52
+ """endstation's theme plus gratinglab's own colours.
47
53
 
54
+ The window palette, plot surfaces and verdicts are
55
+ :class:`endstation.theme.Theme`'s; this adds the diagram's tag colours, as
56
+ ``diagram.TAG_COLORS`` names them, and the lightness and saturation of
57
+ the order-colour hue ramps.
58
+ """
48
59
 
49
- @dataclass(frozen=True)
50
- class Theme:
51
- """One theme. Every field is a ``#rrggbb`` colour except the first three."""
52
-
53
- key: str
54
- label: str
55
- dark: bool
56
- # Window palette.
57
- window: str
58
- base: str
59
- alt_base: str
60
- text: str
61
- muted: str
62
- button: str
63
- highlight: str
64
- highlight_text: str
65
- link: str
66
- # Plot surfaces.
67
- figure: str
68
- axes: str
69
- ink: str
70
- grid: str
71
- # Verdicts, as provenance uses them.
72
- warn: str
73
- bad: str
74
- ok: str
75
- # Diagram tags, as ``diagram.TAG_COLORS`` names them.
76
60
  diagram: Mapping[str, str] = field(default_factory=dict)
77
- # Order colours: lightness and saturation of the hue ramps.
78
61
  order_lightness: float = 0.42
79
62
  order_saturation: float = 0.75
80
63
 
81
64
 
82
- LIGHT = Theme(
83
- key="light", label="Light", dark=False,
84
- window="#efefef", base="#ffffff", alt_base="#f7f7f7", text="#1a1a1a",
85
- muted="#666666", button="#efefef", highlight="#2d5aa8",
86
- highlight_text="#ffffff", link="#2d5aa8",
87
- figure="#ffffff", axes="#ffffff", ink="#1a1a1a", grid="#b0b0b0",
88
- warn="#a5370d", bad="#b00020", ok="#0a7d28",
65
+ LIGHT = Theme.extend(
66
+ _es.LIGHT,
89
67
  diagram={
90
68
  "surface": "#1f3b73", "facet": "#2d5aa8", "incident": "#8fa3c8",
91
69
  "zero": "#666666", "order": "#4dc4ff", "blaze": "#ffc233",
@@ -95,13 +73,8 @@ LIGHT = Theme(
95
73
  order_lightness=0.46, order_saturation=0.90,
96
74
  )
97
75
 
98
- DARK = Theme(
99
- key="dark", label="Dark", dark=True,
100
- window="#1f2125", base="#17181b", alt_base="#222429", text="#e6e6e6",
101
- muted="#9aa0a6", button="#2a2d32", highlight="#2f6fd6",
102
- highlight_text="#ffffff", link="#7fb0ff",
103
- figure="#17181b", axes="#17181b", ink="#e6e6e6", grid="#4a4f55",
104
- warn="#ff9f5a", bad="#ff6b81", ok="#5ad17a",
76
+ DARK = Theme.extend(
77
+ _es.DARK,
105
78
  diagram={
106
79
  "surface": "#8fb0ff", "facet": "#b5c9ff", "incident": "#8fa3c8",
107
80
  "zero": "#b0b0b0", "order": "#4dc4ff", "blaze": "#ffc233",
@@ -111,15 +84,7 @@ DARK = Theme(
111
84
  order_lightness=0.66, order_saturation=0.80,
112
85
  )
113
86
 
114
- # Solarized, Ethan Schoonover's palette: the base tones and accents are his.
115
- _S = {
116
- "base03": "#002b36", "base02": "#073642", "base01": "#586e75",
117
- "base00": "#657b83", "base0": "#839496", "base1": "#93a1a1",
118
- "base2": "#eee8d5", "base3": "#fdf6e3", "yellow": "#b58900",
119
- "orange": "#cb4b16", "red": "#dc322f", "magenta": "#d33682",
120
- "violet": "#6c71c4", "blue": "#268bd2", "cyan": "#2aa198",
121
- "green": "#859900",
122
- }
87
+ _S = _es.SOLARIZED
123
88
  _SOLARIZED_DIAGRAM = {
124
89
  "surface": _S["blue"], "facet": _S["violet"], "incident": _S["base1"],
125
90
  "zero": _S["base00"], "order": _S["cyan"], "blaze": _S["yellow"],
@@ -127,36 +92,21 @@ _SOLARIZED_DIAGRAM = {
127
92
  "axis": _S["base1"],
128
93
  }
129
94
 
130
- SOLARIZED_LIGHT = Theme(
131
- key="solarized-light", label="Solarized Light", dark=False,
132
- window=_S["base2"], base=_S["base3"], alt_base="#f5efdc", text=_S["base02"],
133
- muted=_S["base01"], button=_S["base2"], highlight="#1f6fae",
134
- highlight_text=_S["base3"], link="#1f6fae",
135
- figure=_S["base3"], axes=_S["base3"], ink=_S["base02"], grid="#d9d2bf",
136
- warn="#b4410f", bad="#c42a27", ok="#5f6e00",
95
+ SOLARIZED_LIGHT = Theme.extend(
96
+ _es.SOLARIZED_LIGHT,
137
97
  diagram=_SOLARIZED_DIAGRAM,
138
98
  order_lightness=0.46, order_saturation=0.85,
139
99
  )
140
100
 
141
- SOLARIZED_DARK = Theme(
142
- key="solarized-dark", label="Solarized Dark", dark=True,
143
- window=_S["base02"], base=_S["base03"], alt_base="#04313d", text=_S["base2"],
144
- muted=_S["base1"], button=_S["base02"], highlight="#1f6fae",
145
- highlight_text=_S["base3"], link="#5fb3f0",
146
- figure=_S["base03"], axes=_S["base03"], ink=_S["base2"], grid="#1c4a56",
147
- warn="#e8743b", bad="#f06260", ok="#a4bf1d",
101
+ SOLARIZED_DARK = Theme.extend(
102
+ _es.SOLARIZED_DARK,
148
103
  diagram={**_SOLARIZED_DIAGRAM, "surface": "#5fb3f0", "facet": "#9a9ee8",
149
104
  "zero": _S["base1"], "evanescent": "#f06260"},
150
105
  order_lightness=0.62,
151
106
  )
152
107
 
153
- HIGH_CONTRAST = Theme(
154
- key="high-contrast", label="High contrast", dark=True,
155
- window="#000000", base="#1a1a1a", alt_base="#262626", text="#ffffff",
156
- muted="#a8a8a8", button="#2a2a2a", highlight="#ffff00",
157
- highlight_text="#000000", link="#00ffff",
158
- figure="#000000", axes="#000000", ink="#ffffff", grid="#5a5a5a",
159
- warn="#ffb000", bad="#ff5c5c", ok="#3cff6e",
108
+ HIGH_CONTRAST = Theme.extend(
109
+ _es.HIGH_CONTRAST,
160
110
  diagram={
161
111
  "surface": "#ffffff", "facet": "#00ffff", "incident": "#c0c0c0",
162
112
  "zero": "#ffffff", "order": "#00ffff", "blaze": "#ffff00",
@@ -238,60 +188,6 @@ def provenance_colors(theme: Theme) -> dict[str, str]:
238
188
  return {"warn": theme.warn, "bad": theme.bad, "ok": theme.ok, "dim": theme.muted}
239
189
 
240
190
 
241
- def _luminance(color: str) -> float:
242
- def channel(c: float) -> float:
243
- return c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4
244
-
245
- value = color.lstrip("#")
246
- red, green, blue = (int(value[i:i + 2], 16) / 255.0 for i in (0, 2, 4))
247
- return 0.2126 * channel(red) + 0.7152 * channel(green) + 0.0722 * channel(blue)
248
-
249
-
250
- def contrast(foreground: str, background: str) -> float:
251
- """WCAG 2 contrast ratio between two ``#rrggbb`` colours, 1 to 21."""
252
- a, b = sorted((_luminance(foreground), _luminance(background)), reverse=True)
253
- return (a + 0.05) / (b + 0.05)
254
-
255
-
256
- def rc_params(theme: Theme) -> dict[str, object]:
257
- """matplotlib settings for this theme, for ``rcParams.update``.
258
-
259
- They govern what is created after they are set. A figure that already
260
- exists also needs :func:`style_figure`, and each panel restyles its axes
261
- when it redraws.
262
- """
263
- return {
264
- "figure.facecolor": theme.figure,
265
- "figure.edgecolor": theme.figure,
266
- "savefig.facecolor": theme.figure,
267
- "savefig.edgecolor": theme.figure,
268
- "axes.facecolor": theme.axes,
269
- "axes.edgecolor": theme.ink,
270
- "axes.labelcolor": theme.ink,
271
- "axes.titlecolor": theme.ink,
272
- "text.color": theme.ink,
273
- "xtick.color": theme.ink,
274
- "ytick.color": theme.ink,
275
- "xtick.labelcolor": theme.ink,
276
- "ytick.labelcolor": theme.ink,
277
- "grid.color": theme.grid,
278
- "legend.facecolor": theme.axes,
279
- "legend.edgecolor": theme.grid,
280
- "legend.labelcolor": theme.ink,
281
- "axes3d.xaxis.panecolor": _pane(theme),
282
- "axes3d.yaxis.panecolor": _pane(theme),
283
- "axes3d.zaxis.panecolor": _pane(theme),
284
- }
285
-
286
-
287
- def _pane(theme: Theme) -> tuple[float, float, float, float]:
288
- """A 3D pane tinted a little away from the axes colour."""
289
- value = theme.axes.lstrip("#")
290
- red, green, blue = (int(value[i:i + 2], 16) / 255.0 for i in (0, 2, 4))
291
- shift = 0.06 if theme.dark else -0.04
292
- return (*(max(0.0, min(1.0, c + shift)) for c in (red, green, blue)), 1.0)
293
-
294
-
295
191
  def style_axes(axes, theme: Theme) -> None:
296
192
  """Restyle one existing axes, 2D or 3D, after a clear."""
297
193
  axes.set_facecolor(theme.axes)
@@ -305,7 +201,7 @@ def style_axes(axes, theme: Theme) -> None:
305
201
  if zaxis is not None:
306
202
  zaxis.label.set_color(theme.ink)
307
203
  for axis in (axes.xaxis, axes.yaxis, zaxis):
308
- axis.set_pane_color(_pane(theme))
204
+ axis.set_pane_color(pane(theme))
309
205
  axis.line.set_color(theme.ink)
310
206
 
311
207
 
@@ -29,6 +29,8 @@ extra and this module must not.
29
29
 
30
30
  from __future__ import annotations
31
31
 
32
+ from endstation.files import atomic_write
33
+
32
34
  import dataclasses
33
35
  import json
34
36
  import math
@@ -138,7 +140,7 @@ def write_boundary_json(
138
140
  "provenance": _provenance(profile, source, settings),
139
141
  }
140
142
  text = json.dumps(document, indent=1, allow_nan=False) + "\n"
141
- path.write_bytes(text.encode("utf-8"))
143
+ atomic_write(path, text.encode("utf-8"))
142
144
  return path
143
145
 
144
146
 
@@ -216,7 +218,7 @@ def write_boundary_csv(
216
218
  lines.append(
217
219
  "# t and y are fractions of one period; x_nm and y_nm are the same points times the period")
218
220
  lines += [f"{ti!r},{yi!r},{ti * period!r},{yi * period!r}" for ti, yi in zip(t, y)]
219
- path.write_bytes(("\n".join(lines) + "\n").encode("utf-8"))
221
+ atomic_write(path, ("\n".join(lines) + "\n").encode("utf-8"))
220
222
  return path
221
223
 
222
224
 
@@ -176,6 +176,7 @@ from dataclasses import dataclass, field
176
176
  from pathlib import Path
177
177
 
178
178
  import numpy as np
179
+ from endstation.files import atomic_open
179
180
  from numpy.typing import ArrayLike
180
181
 
181
182
  from ..profiles import FromProfileData
@@ -834,7 +835,7 @@ def write_ggp(
834
835
  if points and _rounds_to(fmt, t_values[-1], 1.0) and _rounds_to(fmt, y_values[-1], 0.0):
835
836
  points[-1] = "1 0"
836
837
  lines = [GGP_HEADER, *points] if header else points
837
- with path.open("w", encoding="utf-8", newline="\r\n") as handle:
838
+ with atomic_open(path, encoding="utf-8", newline="\r\n") as handle:
838
839
  handle.write("\n".join(lines) + "\n")
839
840
  return path
840
841
 
@@ -11,12 +11,14 @@ parses it back. The numbers that a solver needs travel through
11
11
  :meth:`~gratinglab.metrology.boundary.BoundaryProfile.to_problem`.
12
12
  """
13
13
 
14
+ from endstation.files import atomic_open
15
+
14
16
  from ..core.tip import format_angles
15
17
 
16
18
 
17
19
  def write_profile_metrics(path, metrics):
18
20
  """Write the slope/curvature summary that accompanies a boundary profile"""
19
- with open(path, 'w', encoding="utf-8") as f:
21
+ with atomic_open(path, encoding="utf-8") as f:
20
22
  f.write("=== Groove Profile Analysis (Final Phase-Shifted Data) ===\n")
21
23
  f.write(f"Period: {metrics['period_nm']:.2f} nm\n")
22
24
  f.write(f"Grooves averaged: {metrics['n_grooves']}\n")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gratinglab
3
- Version: 0.3.8
3
+ Version: 0.3.9
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
@@ -21,7 +21,7 @@ License-File: LICENSE
21
21
  Requires-Dist: numpy>=1.26
22
22
  Requires-Dist: scipy>=1.11
23
23
  Requires-Dist: pydantic>=2.6
24
- Requires-Dist: endstation>=0.2.6
24
+ Requires-Dist: endstation>=0.3.0
25
25
  Requires-Dist: threadpoolctl>=3.1
26
26
  Provides-Extra: dev
27
27
  Requires-Dist: pytest>=9.2; extra == "dev"
@@ -33,7 +33,7 @@ Provides-Extra: gui
33
33
  Requires-Dist: matplotlib>=3.8; extra == "gui"
34
34
  Requires-Dist: PySide6-Essentials!=6.12.0,>=6.7; python_version < "3.12" and extra == "gui"
35
35
  Requires-Dist: PySide6-Essentials>=6.7; python_version >= "3.12" and extra == "gui"
36
- Requires-Dist: endstation[qt]>=0.2.6; extra == "gui"
36
+ Requires-Dist: endstation[qt]>=0.3.0; extra == "gui"
37
37
  Provides-Extra: metrology
38
38
  Requires-Dist: matplotlib>=3.9; extra == "metrology"
39
39
  Provides-Extra: refractiveindex
@@ -1,7 +1,7 @@
1
1
  numpy>=1.26
2
2
  scipy>=1.11
3
3
  pydantic>=2.6
4
- endstation>=0.2.6
4
+ endstation>=0.3.0
5
5
  threadpoolctl>=3.1
6
6
 
7
7
  [dev]
@@ -13,7 +13,7 @@ ruff>=0.17
13
13
 
14
14
  [gui]
15
15
  matplotlib>=3.8
16
- endstation[qt]>=0.2.6
16
+ endstation[qt]>=0.3.0
17
17
 
18
18
  [gui:python_version < "3.12"]
19
19
  PySide6-Essentials!=6.12.0,>=6.7