rootfig 0.9.0__tar.gz → 0.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) hide show
  1. {rootfig-0.9.0 → rootfig-0.11.0}/CONTRIBUTING.md +67 -3
  2. {rootfig-0.9.0 → rootfig-0.11.0}/PKG-INFO +12 -7
  3. {rootfig-0.9.0 → rootfig-0.11.0}/README.md +10 -6
  4. {rootfig-0.9.0 → rootfig-0.11.0}/docs/api.md +7 -0
  5. {rootfig-0.9.0 → rootfig-0.11.0}/docs/batch.md +4 -1
  6. {rootfig-0.9.0 → rootfig-0.11.0}/docs/composable.md +5 -0
  7. {rootfig-0.9.0 → rootfig-0.11.0}/docs/ecosystem.md +23 -4
  8. {rootfig-0.9.0 → rootfig-0.11.0}/docs/expressions.md +60 -2
  9. rootfig-0.11.0/docs/images/gallery/efficiency-alice-dark.png +0 -0
  10. rootfig-0.11.0/docs/images/gallery/efficiency-alice.png +0 -0
  11. rootfig-0.11.0/docs/images/gallery/efficiency-atlas-dark.png +0 -0
  12. rootfig-0.11.0/docs/images/gallery/efficiency-atlas.png +0 -0
  13. rootfig-0.11.0/docs/images/gallery/efficiency-cms-dark.png +0 -0
  14. rootfig-0.11.0/docs/images/gallery/efficiency-cms.png +0 -0
  15. rootfig-0.11.0/docs/images/gallery/efficiency-dark.png +0 -0
  16. rootfig-0.11.0/docs/images/gallery/efficiency-dune-dark.png +0 -0
  17. rootfig-0.11.0/docs/images/gallery/efficiency-dune.png +0 -0
  18. rootfig-0.11.0/docs/images/gallery/efficiency-lhcb-dark.png +0 -0
  19. rootfig-0.11.0/docs/images/gallery/efficiency-lhcb.png +0 -0
  20. rootfig-0.11.0/docs/images/gallery/efficiency.png +0 -0
  21. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-alice-dark.png +0 -0
  22. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-alice.png +0 -0
  23. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-atlas-dark.png +0 -0
  24. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-atlas.png +0 -0
  25. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-cms-dark.png +0 -0
  26. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-cms.png +0 -0
  27. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-dark.png +0 -0
  28. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-dune-dark.png +0 -0
  29. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-dune.png +0 -0
  30. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-lhcb-dark.png +0 -0
  31. rootfig-0.11.0/docs/images/gallery/goodness_of_fit-lhcb.png +0 -0
  32. rootfig-0.11.0/docs/images/gallery/goodness_of_fit.png +0 -0
  33. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-alice-dark.png +0 -0
  34. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-alice.png +0 -0
  35. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-atlas-dark.png +0 -0
  36. rootfig-0.11.0/docs/images/gallery/overlay_ratio-atlas.png +0 -0
  37. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-cms-dark.png +0 -0
  38. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-cms.png +0 -0
  39. rootfig-0.11.0/docs/images/gallery/overlay_ratio-dark.png +0 -0
  40. rootfig-0.11.0/docs/images/gallery/overlay_ratio-dune-dark.png +0 -0
  41. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-dune.png +0 -0
  42. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio-lhcb-dark.png +0 -0
  43. rootfig-0.11.0/docs/images/gallery/overlay_ratio-lhcb.png +0 -0
  44. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/overlay_ratio.png +0 -0
  45. rootfig-0.11.0/docs/images/gallery/poisson_data-dark.png +0 -0
  46. rootfig-0.11.0/docs/images/gallery/poisson_data.png +0 -0
  47. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-alice-dark.png +0 -0
  48. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-alice.png +0 -0
  49. rootfig-0.11.0/docs/images/gallery/ratio_reference-atlas-dark.png +0 -0
  50. rootfig-0.11.0/docs/images/gallery/ratio_reference-atlas.png +0 -0
  51. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-cms-dark.png +0 -0
  52. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-cms.png +0 -0
  53. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-dark.png +0 -0
  54. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-dune-dark.png +0 -0
  55. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-dune.png +0 -0
  56. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-lhcb-dark.png +0 -0
  57. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference-lhcb.png +0 -0
  58. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/ratio_reference.png +0 -0
  59. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-alice-dark.png +0 -0
  60. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-alice.png +0 -0
  61. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-atlas-dark.png +0 -0
  62. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-atlas.png +0 -0
  63. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-cms-dark.png +0 -0
  64. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-cms.png +0 -0
  65. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-dark.png +0 -0
  66. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-dune-dark.png +0 -0
  67. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-dune.png +0 -0
  68. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-lhcb-dark.png +0 -0
  69. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins-lhcb.png +0 -0
  70. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/variable_bins.png +0 -0
  71. {rootfig-0.9.0 → rootfig-0.11.0}/docs/plotting.md +410 -39
  72. {rootfig-0.9.0 → rootfig-0.11.0}/docs/quickstart.md +4 -1
  73. {rootfig-0.9.0 → rootfig-0.11.0}/examples/gallery/__init__.py +52 -4
  74. {rootfig-0.9.0 → rootfig-0.11.0}/pyproject.toml +2 -1
  75. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/__init__.py +9 -1
  76. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/_storage.py +7 -7
  77. rootfig-0.11.0/src/rootfig/api/_common.py +139 -0
  78. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/_hists.py +7 -5
  79. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/_panel.py +178 -40
  80. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/batch.py +3 -1
  81. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/data.py +52 -31
  82. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/measures.py +181 -32
  83. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/plots1d.py +169 -68
  84. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/plots2d.py +79 -69
  85. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/tables.py +34 -9
  86. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/expressions/__init__.py +4 -2
  87. rootfig-0.11.0/src/rootfig/expressions/custom.py +90 -0
  88. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/expressions/parser.py +104 -27
  89. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/__init__.py +40 -1
  90. rootfig-0.11.0/src/rootfig/histograms/bayesian.py +145 -0
  91. rootfig-0.11.0/src/rootfig/histograms/binomial.py +326 -0
  92. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/build.py +233 -13
  93. rootfig-0.11.0/src/rootfig/histograms/comparison.py +599 -0
  94. rootfig-0.11.0/src/rootfig/histograms/cutflow.py +329 -0
  95. rootfig-0.11.0/src/rootfig/histograms/efficiency.py +318 -0
  96. rootfig-0.11.0/src/rootfig/histograms/goodness.py +498 -0
  97. rootfig-0.11.0/src/rootfig/histograms/intervals.py +185 -0
  98. rootfig-0.11.0/src/rootfig/histograms/normalize.py +369 -0
  99. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/pipeline.py +27 -10
  100. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/prefetch.py +12 -8
  101. rootfig-0.11.0/src/rootfig/histograms/provenance.py +137 -0
  102. rootfig-0.11.0/src/rootfig/histograms/shape.py +73 -0
  103. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/stored.py +57 -17
  104. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/systematics.py +53 -10
  105. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/__init__.py +6 -1
  106. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/cache.py +11 -7
  107. rootfig-0.11.0/src/rootfig/io/npz.py +217 -0
  108. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/objects.py +43 -11
  109. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/sources.py +35 -10
  110. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/cuts.py +4 -1
  111. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/samples.py +5 -5
  112. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/systematics.py +2 -2
  113. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/variables.py +4 -2
  114. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/__init__.py +2 -1
  115. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/annotations.py +37 -2
  116. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/hist1d.py +21 -16
  117. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/panel.py +116 -22
  118. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/result.py +12 -1
  119. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/selection/columns.py +28 -0
  120. rootfig-0.11.0/tests/data/error_options.root +0 -0
  121. rootfig-0.11.0/tests/helpers.py +40 -0
  122. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_api.py +842 -9
  123. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_batch.py +59 -5
  124. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_discovery.py +17 -1
  125. rootfig-0.11.0/tests/test_efficiency.py +643 -0
  126. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_expressions.py +181 -0
  127. rootfig-0.11.0/tests/test_goodness.py +477 -0
  128. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_histograms.py +314 -461
  129. rootfig-0.11.0/tests/test_intervals.py +736 -0
  130. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_io.py +157 -5
  131. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_model.py +20 -0
  132. rootfig-0.11.0/tests/test_normalize_uncertainty.py +181 -0
  133. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_plotting.py +215 -8
  134. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_selection.py +90 -1
  135. rootfig-0.11.0/tests/test_stat_errors.py +567 -0
  136. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_tutorials.py +54 -0
  137. rootfig-0.9.0/docs/images/gallery/efficiency-alice-dark.png +0 -0
  138. rootfig-0.9.0/docs/images/gallery/efficiency-alice.png +0 -0
  139. rootfig-0.9.0/docs/images/gallery/efficiency-atlas-dark.png +0 -0
  140. rootfig-0.9.0/docs/images/gallery/efficiency-atlas.png +0 -0
  141. rootfig-0.9.0/docs/images/gallery/efficiency-cms-dark.png +0 -0
  142. rootfig-0.9.0/docs/images/gallery/efficiency-cms.png +0 -0
  143. rootfig-0.9.0/docs/images/gallery/efficiency-dark.png +0 -0
  144. rootfig-0.9.0/docs/images/gallery/efficiency-dune-dark.png +0 -0
  145. rootfig-0.9.0/docs/images/gallery/efficiency-dune.png +0 -0
  146. rootfig-0.9.0/docs/images/gallery/efficiency-lhcb-dark.png +0 -0
  147. rootfig-0.9.0/docs/images/gallery/efficiency-lhcb.png +0 -0
  148. rootfig-0.9.0/docs/images/gallery/efficiency.png +0 -0
  149. rootfig-0.9.0/docs/images/gallery/overlay_ratio-atlas.png +0 -0
  150. rootfig-0.9.0/docs/images/gallery/overlay_ratio-dark.png +0 -0
  151. rootfig-0.9.0/docs/images/gallery/overlay_ratio-dune-dark.png +0 -0
  152. rootfig-0.9.0/docs/images/gallery/overlay_ratio-lhcb.png +0 -0
  153. rootfig-0.9.0/docs/images/gallery/ratio_reference-atlas-dark.png +0 -0
  154. rootfig-0.9.0/docs/images/gallery/ratio_reference-atlas.png +0 -0
  155. rootfig-0.9.0/src/rootfig/api/_common.py +0 -73
  156. rootfig-0.9.0/src/rootfig/histograms/comparison.py +0 -374
  157. rootfig-0.9.0/src/rootfig/histograms/cutflow.py +0 -202
  158. rootfig-0.9.0/src/rootfig/histograms/efficiency.py +0 -222
  159. rootfig-0.9.0/src/rootfig/histograms/normalize.py +0 -186
  160. {rootfig-0.9.0 → rootfig-0.11.0}/.gitignore +0 -0
  161. {rootfig-0.9.0 → rootfig-0.11.0}/LICENSE +0 -0
  162. {rootfig-0.9.0 → rootfig-0.11.0}/docs/gallery/index.md +0 -0
  163. {rootfig-0.9.0 → rootfig-0.11.0}/docs/hooks/gallery.py +0 -0
  164. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-alice-dark.png +0 -0
  165. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-alice.png +0 -0
  166. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-atlas-dark.png +0 -0
  167. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-atlas.png +0 -0
  168. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-cms-dark.png +0 -0
  169. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-cms.png +0 -0
  170. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-dark.png +0 -0
  171. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-dune-dark.png +0 -0
  172. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-dune.png +0 -0
  173. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-lhcb-dark.png +0 -0
  174. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays-lhcb.png +0 -0
  175. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/arrays.png +0 -0
  176. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-alice-dark.png +0 -0
  177. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-alice.png +0 -0
  178. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-atlas-dark.png +0 -0
  179. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-atlas.png +0 -0
  180. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-cms-dark.png +0 -0
  181. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-cms.png +0 -0
  182. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-dark.png +0 -0
  183. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-dune-dark.png +0 -0
  184. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-dune.png +0 -0
  185. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-lhcb-dark.png +0 -0
  186. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation-lhcb.png +0 -0
  187. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/correlation.png +0 -0
  188. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-alice-dark.png +0 -0
  189. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-alice.png +0 -0
  190. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-atlas-dark.png +0 -0
  191. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-atlas.png +0 -0
  192. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-cms-dark.png +0 -0
  193. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-cms.png +0 -0
  194. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-dark.png +0 -0
  195. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-dune-dark.png +0 -0
  196. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-dune.png +0 -0
  197. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-lhcb-dark.png +0 -0
  198. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow-lhcb.png +0 -0
  199. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/density_flow.png +0 -0
  200. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-alice-dark.png +0 -0
  201. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-alice.png +0 -0
  202. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-atlas-dark.png +0 -0
  203. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-atlas.png +0 -0
  204. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-cms-dark.png +0 -0
  205. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-cms.png +0 -0
  206. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-dark.png +0 -0
  207. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-dune-dark.png +0 -0
  208. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-dune.png +0 -0
  209. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-lhcb-dark.png +0 -0
  210. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions-lhcb.png +0 -0
  211. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/expressions.png +0 -0
  212. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-alice-dark.png +0 -0
  213. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-alice.png +0 -0
  214. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-atlas-dark.png +0 -0
  215. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-atlas.png +0 -0
  216. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-cms-dark.png +0 -0
  217. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-cms.png +0 -0
  218. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-dark.png +0 -0
  219. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-dune-dark.png +0 -0
  220. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-dune.png +0 -0
  221. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-lhcb-dark.png +0 -0
  222. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats-lhcb.png +0 -0
  223. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/fill_stats.png +0 -0
  224. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-alice-dark.png +0 -0
  225. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-alice.png +0 -0
  226. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-atlas-dark.png +0 -0
  227. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-atlas.png +0 -0
  228. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-cms-dark.png +0 -0
  229. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-cms.png +0 -0
  230. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-dark.png +0 -0
  231. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-dune-dark.png +0 -0
  232. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-dune.png +0 -0
  233. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-lhcb-dark.png +0 -0
  234. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d-lhcb.png +0 -0
  235. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/hist2d.png +0 -0
  236. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-alice-dark.png +0 -0
  237. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-alice.png +0 -0
  238. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-atlas-dark.png +0 -0
  239. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-atlas.png +0 -0
  240. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-cms-dark.png +0 -0
  241. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-cms.png +0 -0
  242. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-dark.png +0 -0
  243. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-dune-dark.png +0 -0
  244. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-dune.png +0 -0
  245. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-lhcb-dark.png +0 -0
  246. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes-lhcb.png +0 -0
  247. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/log_axes.png +0 -0
  248. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/luminosity-dark.png +0 -0
  249. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/luminosity.png +0 -0
  250. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/many_plots-dark.png +0 -0
  251. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/many_plots.png +0 -0
  252. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-alice-dark.png +0 -0
  253. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-alice.png +0 -0
  254. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-atlas-dark.png +0 -0
  255. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-atlas.png +0 -0
  256. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-cms-dark.png +0 -0
  257. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-cms.png +0 -0
  258. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-dark.png +0 -0
  259. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-dune-dark.png +0 -0
  260. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-dune.png +0 -0
  261. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-lhcb-dark.png +0 -0
  262. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event-lhcb.png +0 -0
  263. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/object_vs_event.png +0 -0
  264. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-alice-dark.png +0 -0
  265. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-alice.png +0 -0
  266. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-atlas-dark.png +0 -0
  267. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-atlas.png +0 -0
  268. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-cms-dark.png +0 -0
  269. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-cms.png +0 -0
  270. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-dark.png +0 -0
  271. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-dune-dark.png +0 -0
  272. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-dune.png +0 -0
  273. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-lhcb-dark.png +0 -0
  274. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile-lhcb.png +0 -0
  275. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/profile.png +0 -0
  276. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-alice-dark.png +0 -0
  277. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-alice.png +0 -0
  278. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-atlas-dark.png +0 -0
  279. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-atlas.png +0 -0
  280. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-cms-dark.png +0 -0
  281. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-cms.png +0 -0
  282. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-dark.png +0 -0
  283. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-dune-dark.png +0 -0
  284. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-dune.png +0 -0
  285. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-lhcb-dark.png +0 -0
  286. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull-lhcb.png +0 -0
  287. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/pull.png +0 -0
  288. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-alice-dark.png +0 -0
  289. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-alice.png +0 -0
  290. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-atlas-dark.png +0 -0
  291. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-atlas.png +0 -0
  292. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-cms-dark.png +0 -0
  293. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-cms.png +0 -0
  294. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-dark.png +0 -0
  295. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-dune-dark.png +0 -0
  296. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-dune.png +0 -0
  297. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-lhcb-dark.png +0 -0
  298. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick-lhcb.png +0 -0
  299. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/quick.png +0 -0
  300. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/robust_range-dark.png +0 -0
  301. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/robust_range.png +0 -0
  302. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-alice-dark.png +0 -0
  303. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-alice.png +0 -0
  304. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-atlas-dark.png +0 -0
  305. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-atlas.png +0 -0
  306. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-cms-dark.png +0 -0
  307. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-cms.png +0 -0
  308. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-dark.png +0 -0
  309. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-dune-dark.png +0 -0
  310. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-dune.png +0 -0
  311. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-lhcb-dark.png +0 -0
  312. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack-lhcb.png +0 -0
  313. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/selective_stack.png +0 -0
  314. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-alice-dark.png +0 -0
  315. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-alice.png +0 -0
  316. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-atlas-dark.png +0 -0
  317. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-atlas.png +0 -0
  318. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-cms-dark.png +0 -0
  319. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-cms.png +0 -0
  320. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-dark.png +0 -0
  321. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-dune-dark.png +0 -0
  322. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-dune.png +0 -0
  323. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-lhcb-dark.png +0 -0
  324. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data-lhcb.png +0 -0
  325. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stack_data.png +0 -0
  326. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stored_histograms-dark.png +0 -0
  327. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/stored_histograms.png +0 -0
  328. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/style_colors-dark.png +0 -0
  329. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/style_colors.png +0 -0
  330. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-alice-dark.png +0 -0
  331. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-alice.png +0 -0
  332. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-atlas-dark.png +0 -0
  333. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-atlas.png +0 -0
  334. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-cms-dark.png +0 -0
  335. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-cms.png +0 -0
  336. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-dark.png +0 -0
  337. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-dune-dark.png +0 -0
  338. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-dune.png +0 -0
  339. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-lhcb-dark.png +0 -0
  340. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics-lhcb.png +0 -0
  341. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/systematics.png +0 -0
  342. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-alice-dark.png +0 -0
  343. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-alice.png +0 -0
  344. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-atlas-dark.png +0 -0
  345. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-atlas.png +0 -0
  346. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-cms-dark.png +0 -0
  347. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-cms.png +0 -0
  348. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-dark.png +0 -0
  349. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-dune-dark.png +0 -0
  350. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-dune.png +0 -0
  351. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-lhcb-dark.png +0 -0
  352. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio-lhcb.png +0 -0
  353. {rootfig-0.9.0 → rootfig-0.11.0}/docs/images/gallery/xbreak_ratio.png +0 -0
  354. {rootfig-0.9.0 → rootfig-0.11.0}/docs/index.md +0 -0
  355. {rootfig-0.9.0 → rootfig-0.11.0}/docs/stylesheets/gallery.css +0 -0
  356. {rootfig-0.9.0 → rootfig-0.11.0}/examples/gallery/__main__.py +0 -0
  357. {rootfig-0.9.0 → rootfig-0.11.0}/examples/gallery/data.py +0 -0
  358. {rootfig-0.9.0 → rootfig-0.11.0}/examples/gallery/registry.py +0 -0
  359. {rootfig-0.9.0 → rootfig-0.11.0}/mkdocs.yml +0 -0
  360. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/_mapping.py +0 -0
  361. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/_threads.py +0 -0
  362. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/_typing.py +0 -0
  363. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/__init__.py +0 -0
  364. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/_discover.py +0 -0
  365. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/api/_pdf.py +0 -0
  366. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/errors.py +0 -0
  367. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/expressions/functions.py +0 -0
  368. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/groups.py +0 -0
  369. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/sources.py +0 -0
  370. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/histograms/stats.py +0 -0
  371. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/compat.py +0 -0
  372. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/io/schema.py +0 -0
  373. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/__init__.py +0 -0
  374. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/binning.py +0 -0
  375. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/filenames.py +0 -0
  376. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/groups.py +0 -0
  377. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/inputs.py +0 -0
  378. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/style.py +0 -0
  379. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/model/units.py +0 -0
  380. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/correlation.py +0 -0
  381. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/engine.py +0 -0
  382. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/figure.py +0 -0
  383. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/finish.py +0 -0
  384. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/hist2d.py +0 -0
  385. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/pages.py +0 -0
  386. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/points.py +0 -0
  387. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/plotting/style.py +0 -0
  388. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/py.typed +0 -0
  389. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/selection/__init__.py +0 -0
  390. {rootfig-0.9.0 → rootfig-0.11.0}/src/rootfig/selection/chunks.py +0 -0
  391. {rootfig-0.9.0 → rootfig-0.11.0}/tests/conftest.py +0 -0
  392. {rootfig-0.9.0 → rootfig-0.11.0}/tests/data/embedded_basket.root +0 -0
  393. {rootfig-0.9.0 → rootfig-0.11.0}/tests/data/split_collection.root +0 -0
  394. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_gallery.py +0 -0
  395. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_pages.py +0 -0
  396. {rootfig-0.9.0 → rootfig-0.11.0}/tests/test_save_pdf.py +0 -0
  397. {rootfig-0.9.0 → rootfig-0.11.0}/tests/type_checks/batch.py +0 -0
  398. {rootfig-0.9.0 → rootfig-0.11.0}/tests/type_checks/groups.py +0 -0
  399. {rootfig-0.9.0 → rootfig-0.11.0}/tests/type_checks/systematics.py +0 -0
@@ -62,9 +62,10 @@ docstrings and full type hints.
62
62
 
63
63
  ## Test data
64
64
 
65
- Almost all tests generate their ROOT files with uproot on the fly. Two files
66
- that uproot cannot write are committed, produced with ROOT 6.40; rerun their
67
- scripts only if the layout has to change, and keep the files small.
65
+ Almost all tests generate their ROOT files with uproot on the fly. A few files
66
+ are committed, produced with ROOT 6.40: two that uproot cannot write, and one
67
+ whose point is that ROOT wrote it. Rerun their scripts only if the layout has
68
+ to change, and keep the files small.
68
69
 
69
70
  `tests/data/split_collection.root` has a split `std::vector<struct>` branch and
70
71
  a `TParameter` the way podio/EDM4hep and FCCAnalyses write them (PyROOT):
@@ -120,6 +121,69 @@ void embedded() {
120
121
  }
121
122
  ```
122
123
 
124
+ `tests/data/error_options.root` holds the same counts (0, 1 and 4) saved with
125
+ each of ROOT's statistical error options, and weighted entries saved with
126
+ `kPoisson`, which ROOT itself draws with `sqrt(sum w^2)` (PyROOT):
127
+
128
+ ```python
129
+ import ROOT
130
+
131
+ f = ROOT.TFile("error_options.root", "RECREATE")
132
+ for name, option in (
133
+ ("normal", ROOT.TH1.kNormal),
134
+ ("poisson", ROOT.TH1.kPoisson),
135
+ ("poisson2", ROOT.TH1.kPoisson2),
136
+ ):
137
+ h = ROOT.TH1D(name, name, 3, 0.0, 3.0)
138
+ for x, n in ((1.5, 1), (2.5, 4)):
139
+ for _ in range(n):
140
+ h.Fill(x)
141
+ h.SetBinErrorOption(option)
142
+ h.Write()
143
+ w = ROOT.TH1D("weighted", "weighted", 3, 0.0, 3.0)
144
+ w.Sumw2()
145
+ w.Fill(1.5, 2.0)
146
+ w.Fill(2.5, 1.0)
147
+ w.SetBinErrorOption(ROOT.TH1.kPoisson)
148
+ w.Write()
149
+ f.Close()
150
+ ```
151
+
152
+ `tests/test_goodness.py` pins ROOT 6.40's `TH1::Chi2TestX` and
153
+ `TH1::KolmogorovTest` for the histograms defined at its top (`COUNTS_A`, ...).
154
+ Rerun to check them against another ROOT version (PyROOT):
155
+
156
+ ```python
157
+ import ctypes, math
158
+ import ROOT
159
+
160
+
161
+ def th1(name, values, variances=None): # Sumw2 only for weighted contents
162
+ h = ROOT.TH1D(name, name, len(values), 0.0, float(len(values)))
163
+ if variances is not None:
164
+ h.Sumw2()
165
+ for i, v in enumerate(values, start=1):
166
+ h.SetBinContent(i, v)
167
+ if variances is not None:
168
+ h.SetBinError(i, math.sqrt(variances[i - 1]))
169
+ return h
170
+
171
+
172
+ def chi2_test(h1, h2, option): # (chi2, ndf, p-value, igood)
173
+ chi2, ndf, igood = ctypes.c_double(), ctypes.c_int(), ctypes.c_int()
174
+ p = h1.Chi2TestX(h2, chi2, ndf, igood, option)
175
+ return chi2.value, ndf.value, p, igood.value
176
+
177
+
178
+ a, b = th1("a", COUNTS_A), th1("b", COUNTS_B)
179
+ data, mc = th1("data", DATA), th1("mc", MC, MC_VARIANCES)
180
+ print(chi2_test(a, b, "UU"), chi2_test(data, mc, "UW"))
181
+ scaled = th1("bs", [0.37 * n for n in COUNTS_B], [0.37**2 * n for n in COUNTS_B])
182
+ print(chi2_test(a, scaled, "UU NORM"))
183
+ print(chi2_test(th1("w1", W1, W1_VARIANCES), th1("w2", W2, W2_VARIANCES), "WW"))
184
+ print(a.KolmogorovTest(b), a.KolmogorovTest(b, "M")) # likewise for the other pairs
185
+ ```
186
+
123
187
  ## Figures and the gallery
124
188
 
125
189
  The `examples/gallery` package is both the showcase and the image-regression
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: rootfig
3
- Version: 0.9.0
3
+ Version: 0.11.0
4
4
  Summary: Publication-quality figures straight from ROOT trees and histograms, without ROOT: uproot + Awkward + hist + mplhep with a TTree::Draw-like API.
5
5
  Project-URL: Homepage, https://github.com/jbeirer/rootfig
6
6
  Project-URL: Documentation, https://jbeirer.github.io/rootfig/
@@ -28,6 +28,7 @@ Requires-Dist: hist>=2.9
28
28
  Requires-Dist: matplotlib>=3.11
29
29
  Requires-Dist: mplhep>=1.2.1
30
30
  Requires-Dist: numpy>=1.26
31
+ Requires-Dist: scipy>=1.11.2
31
32
  Requires-Dist: uproot>=5.7.1
32
33
  Description-Content-Type: text/markdown
33
34
 
@@ -141,6 +142,7 @@ p = rf.plot(
141
142
  selection=baseline,
142
143
  stack=True,
143
144
  panel="ratio",
145
+ data_errors="auto", # Poisson intervals for unweighted data
144
146
  logy=True,
145
147
  style=style,
146
148
  )
@@ -175,12 +177,14 @@ book.save_pdf("zh.pdf") # rf.ALL in place of the list plots every histogram the
175
177
  ## What you can do
176
178
 
177
179
  - **Select events and objects with readable expressions.** Write cuts such as
178
- `count(Jet_pt) >= 2` or `Muon_pt > 20`; event and object selections have
179
- explicit rules, and event weights carry through to each selected object.
180
- - **Compare samples with a few keywords.** Overlays, stacks, data points and a
181
- lower panel (ratio, difference, relative difference, pull or significance,
182
- against a reference you name) share binning and propagate histogram
183
- uncertainties; bin edges
180
+ `count(Jet_pt) >= 2` or `Muon_pt > 20`, calling functions of your own where the
181
+ built-in ones end (`functions={"delta_r": delta_r}`); event and object selections
182
+ have explicit rules, and event weights carry through to each selected object.
183
+ - **Compare samples with a few keywords.** Overlays, stacks, data points (`√N`
184
+ as ROOT draws them, or Poisson intervals) and a lower panel (ratio, difference, relative difference, asymmetry, pull or
185
+ significance, against a reference you name) share binning and propagate histogram
186
+ uncertainties; ROOT's χ² and Kolmogorov tests quote the agreement
187
+ (`goodness_of_fit=True`). Bin edges
184
188
  and `(n, low, high)` are used as given, while a range inferred from the data
185
189
  ignores far outliers, so `-999` sentinels do not set the axis. Normalise to
186
190
  unity, density, bin width or luminosity; stack some samples and overlay the rest.
@@ -227,6 +231,7 @@ stack, building on familiar libraries:
227
231
  | Jagged arrays | [Awkward Array](https://github.com/scikit-hep/awkward) | the per-event/per-object rules for cuts and weights |
228
232
  | Histograms | [hist](https://github.com/scikit-hep/hist) / boost-histogram | shared binning, robust automatic ranges, normalisation, ratios |
229
233
  | Drawing | [mplhep](https://github.com/scikit-hep/mplhep) + matplotlib | overlays, stacks, ratio panels, labels and legends with good defaults |
234
+ | Intervals | [SciPy](https://scipy.org) | ROOT's Poisson and efficiency intervals, kept through scaling and normalisation |
230
235
 
231
236
  If your histograms already exist, `rf.plot` draws them too: name a `TH1`
232
237
  stored in the file instead of a branch (`rf.plot("zh_histo.root", "m_recoil")`),
@@ -108,6 +108,7 @@ p = rf.plot(
108
108
  selection=baseline,
109
109
  stack=True,
110
110
  panel="ratio",
111
+ data_errors="auto", # Poisson intervals for unweighted data
111
112
  logy=True,
112
113
  style=style,
113
114
  )
@@ -142,12 +143,14 @@ book.save_pdf("zh.pdf") # rf.ALL in place of the list plots every histogram the
142
143
  ## What you can do
143
144
 
144
145
  - **Select events and objects with readable expressions.** Write cuts such as
145
- `count(Jet_pt) >= 2` or `Muon_pt > 20`; event and object selections have
146
- explicit rules, and event weights carry through to each selected object.
147
- - **Compare samples with a few keywords.** Overlays, stacks, data points and a
148
- lower panel (ratio, difference, relative difference, pull or significance,
149
- against a reference you name) share binning and propagate histogram
150
- uncertainties; bin edges
146
+ `count(Jet_pt) >= 2` or `Muon_pt > 20`, calling functions of your own where the
147
+ built-in ones end (`functions={"delta_r": delta_r}`); event and object selections
148
+ have explicit rules, and event weights carry through to each selected object.
149
+ - **Compare samples with a few keywords.** Overlays, stacks, data points (`√N`
150
+ as ROOT draws them, or Poisson intervals) and a lower panel (ratio, difference, relative difference, asymmetry, pull or
151
+ significance, against a reference you name) share binning and propagate histogram
152
+ uncertainties; ROOT's χ² and Kolmogorov tests quote the agreement
153
+ (`goodness_of_fit=True`). Bin edges
151
154
  and `(n, low, high)` are used as given, while a range inferred from the data
152
155
  ignores far outliers, so `-999` sentinels do not set the axis. Normalise to
153
156
  unity, density, bin width or luminosity; stack some samples and overlay the rest.
@@ -194,6 +197,7 @@ stack, building on familiar libraries:
194
197
  | Jagged arrays | [Awkward Array](https://github.com/scikit-hep/awkward) | the per-event/per-object rules for cuts and weights |
195
198
  | Histograms | [hist](https://github.com/scikit-hep/hist) / boost-histogram | shared binning, robust automatic ranges, normalisation, ratios |
196
199
  | Drawing | [mplhep](https://github.com/scikit-hep/mplhep) + matplotlib | overlays, stacks, ratio panels, labels and legends with good defaults |
200
+ | Intervals | [SciPy](https://scipy.org) | ROOT's Poisson and efficiency intervals, kept through scaling and normalisation |
197
201
 
198
202
  If your histograms already exist, `rf.plot` draws them too: name a `TH1`
199
203
  stored in the file instead of a branch (`rf.plot("zh_histo.root", "m_recoil")`),
@@ -16,6 +16,7 @@
16
16
  ::: rootfig.profile
17
17
  ::: rootfig.evaluate
18
18
  ::: rootfig.compare
19
+ ::: rootfig.goodness_of_fit
19
20
  ::: rootfig.log_bins
20
21
  ::: rootfig.use_style
21
22
  ::: rootfig.dark_theme
@@ -28,6 +29,8 @@
28
29
  ::: rootfig.Cut
29
30
  ::: rootfig.Style
30
31
  ::: rootfig.Systematic
32
+ ::: rootfig.Bayesian
33
+ ::: rootfig.ONE_SIGMA
31
34
 
32
35
  ## Batch plotting
33
36
 
@@ -43,6 +46,7 @@
43
46
  ::: rootfig.Plot
44
47
  ::: rootfig.Histogram
45
48
  ::: rootfig.Comparison
49
+ ::: rootfig.GoodnessOfFit
46
50
  ::: rootfig.Uncertainty
47
51
  ::: rootfig.Summary
48
52
  ::: rootfig.SummaryTable
@@ -65,6 +69,7 @@ above.
65
69
  options:
66
70
  members:
67
71
  - FileSource
72
+ - NpzSource
68
73
  - ArraySource
69
74
  - Source
70
75
  - ReadCache
@@ -92,6 +97,8 @@ above.
92
97
  - fill
93
98
  - sum_histograms
94
99
  - uncertainty
100
+ - poisson_interval
101
+ - shape_covariance
95
102
  - summarize
96
103
  - read_stored
97
104
  - compatible_binning
@@ -78,7 +78,10 @@ prepared histograms. With the signal last and `panel="s/sqrt(b)"` in
78
78
  `plot_kwargs`, both show the same significance panel.
79
79
 
80
80
  Every other keyword of `rf.plot` (`observed=`, `normalize=`, `panel=`,
81
- `systematics=`, `style=`, ...) goes into `plot_kwargs` or a variant. The keyword
81
+ `systematics=`, `style=`, ...) goes into `plot_kwargs` or a variant, also
82
+ `functions=`: with `plot_kwargs={"functions": functions}` every variable and
83
+ selection of the book may call [functions of your own](expressions.md#functions-of-your-own),
84
+ and the branches they are called on are read with the rest of the batch. The keyword
82
85
  names are checked against `rf.plot`'s signature when the book is built, so a
83
86
  misspelt `log_y` is reported, with `logy` as the suggestion, before anything is
84
87
  drawn rather than after the first tasks have written their files; the values are
@@ -26,6 +26,11 @@ mem = rf.Sample({"x": awkward_array, "w": weights}, label="in memory")
26
26
  - `data` may be a path, glob, `"path:tree"`, a list of those, a mapping of
27
27
  arrays, an Awkward record array, a NumPy structured array, or any object
28
28
  implementing the [`Source`][rootfig.io.Source] protocol.
29
+ - A NumPy `.npz` file (`np.savez`) is read as one branch per array
30
+ ([`NpzSource`][rootfig.io.NpzSource]): `rf.plot("events.npz", "Muon_pt", bins=50)`.
31
+ A flat array is per-event, an `(events, n)` array per-object; arrays of no
32
+ dimension (a scalar saved beside the events) are not branches, and object
33
+ arrays (ragged lists) are refused, since NumPy loads them only by unpickling.
29
34
  - `selection` and `weight` belong to the sample and combine with the ones
30
35
  given to `plot()` (`&` and `*` respectively).
31
36
  - `is_data=True` draws points with error bars (in the style's text colour
@@ -1,4 +1,4 @@
1
- # How rootfig relates to uproot, Awkward, hist, mplhep and matplotlib
1
+ # How rootfig relates to uproot, Awkward, hist, mplhep, matplotlib and SciPy
2
2
 
3
3
  rootfig is a thin, opinionated layer over the Scientific Python HEP stack. It
4
4
  owns no file format, array type, histogram type or drawing primitive of its
@@ -42,7 +42,11 @@ ships the style sheets and label helpers of the LHC experiments. rootfig
42
42
  draws every histogram through `mplhep.histplot`/`hist2dplot` and uses
43
43
  mplhep's per-experiment label functions when a `Style(experiment=...)` is
44
44
  given. The experiment-neutral default style and the lower panel (ratios,
45
- differences, pulls, significances) are rootfig's.
45
+ differences, asymmetries, pulls and significances of histograms; ratios,
46
+ differences, asymmetries and pulls of efficiencies and profiles) are rootfig's,
47
+ and so are the Poisson intervals of data: mplhep's (and `hist.intervals`) give
48
+ an empty bin of scaled counts the scale of a neighbour, where rootfig keeps the
49
+ bin's own (see [SciPy](#scipy)).
46
50
 
47
51
  ## matplotlib
48
52
 
@@ -51,6 +55,21 @@ applies its style only inside a `plt.style.context` while drawing, so it does
51
55
  not change global rcParams (unless you call `rf.use_style`). Anything you
52
56
  would do to a matplotlib figure, you can do to `Plot.fig` and `Plot.ax`.
53
57
 
58
+ ## SciPy
59
+
60
+ [SciPy](https://scipy.org) supplies the quantiles behind rootfig's intervals, from
61
+ `scipy.special`: the inverse incomplete gamma functions for the Garwood interval
62
+ of data (ROOT's `TH1::kPoisson`) and the inverse incomplete beta function for the
63
+ Clopper–Pearson and Bayesian intervals of efficiencies (`TEfficiency`'s default
64
+ and its Beta priors); `scipy.optimize.brentq` finds the bounds that have no
65
+ closed form (the shortest Bayesian interval). rootfig decides what the
66
+ quantiles are taken of (the counts behind scaled or normalised contents, which
67
+ interval ROOT would choose) and imports SciPy only when it computes one.
68
+ `hist.intervals` holds the same Garwood, Clopper–Pearson and Poisson-ratio
69
+ intervals, and rootfig's tests check that both agree to round-off. rootfig does
70
+ not call it at run time: it imports `scipy.stats`, which takes 0.4 s or more on
71
+ the first interval of every session, for a computation of a few lines.
72
+
54
73
  ## Trees and histogram files
55
74
 
56
75
  rootfig reads trees and stored `TH1`/`TH2` histograms without ROOT, independently
@@ -68,8 +87,8 @@ can discover shared histograms with `rf.ALL`. See the
68
87
  ## When to use something else
69
88
 
70
89
  - You have flat NumPy columns rather than ROOT files or histograms, or want a
71
- comparison rootfig's lower panel does not offer (an asymmetry, efficiency or
72
- goodness-of-fit panel): [plothist](https://plothist.readthedocs.io).
90
+ comparison rootfig's lower panel does not offer (a goodness-of-fit panel):
91
+ [plothist](https://plothist.readthedocs.io).
73
92
  - You need a full columnar analysis framework with lazy, distributed
74
93
  processing: [coffea](https://coffeateam.github.io/coffea/). rootfig reads
75
94
  the branches a plot needs a chunk of entries at a time, in threads, and holds
@@ -19,8 +19,8 @@ syntax evaluated with NumPy/Awkward semantics over the branches of the tree.
19
19
  operations, so they work on arrays. Dotted names such as
20
20
  `ReconstructedParticles.momentum.x` are read as one branch name (see below);
21
21
  any other attribute access, lambdas, comprehensions, string literals and calls
22
- to anything but the functions below are rejected at parse time with an
23
- [`ExpressionError`][rootfig.ExpressionError].
22
+ to anything but the functions below (built in, or [your own](#functions-of-your-own))
23
+ are rejected at parse time with an [`ExpressionError`][rootfig.ExpressionError].
24
24
  An unknown branch raises [`MissingBranchError`][rootfig.MissingBranchError]
25
25
  with close-match suggestions.
26
26
 
@@ -57,6 +57,64 @@ Kinematics from Cartesian components, as stored by EDM4hep (`momentum.x/y/z`,
57
57
 
58
58
  Reductions applied to a flat (per-event) branch raise an error.
59
59
 
60
+ ## Functions of your own
61
+
62
+ Helpers that are not built in are passed with `functions=`, a mapping from the
63
+ name the expressions use to a callable. Every call that evaluates expressions
64
+ takes it (`plot`, `histogram`, `histograms`, `load`, `summarize`, `cutflow`,
65
+ `efficiency`, `profile`, `plot2d`, `correlation`, `evaluate`; a
66
+ [`PlotBook`](batch.md) in `plot_kwargs` or a variant), for the variable, the
67
+ selection and the weights alike:
68
+
69
+ ```python
70
+ import awkward as ak
71
+ import numpy as np
72
+
73
+
74
+ def delta_phi(phi1, phi2):
75
+ return (phi1 - phi2 + np.pi) % (2 * np.pi) - np.pi
76
+
77
+
78
+ def delta_r(eta1, phi1, eta2, phi2):
79
+ return np.hypot(eta1 - eta2, delta_phi(phi1, phi2))
80
+
81
+
82
+ def nth(x, n):
83
+ """The n-th object of each event (from 0); None where an event has fewer."""
84
+ return ak.pad_none(x, n + 1, axis=1)[:, n]
85
+
86
+
87
+ functions = {"delta_phi": delta_phi, "delta_r": delta_r, "nth": nth}
88
+ dr = "delta_r(nth(Muon_eta, 0), nth(Muon_phi, 0), nth(Muon_eta, 1), nth(Muon_phi, 1))"
89
+
90
+ rf.plot(
91
+ sample,
92
+ "delta_phi(nth(Muon_phi, 0), nth(Muon_phi, 1))",
93
+ selection=f"{dr} > 0.4",
94
+ functions=functions,
95
+ )
96
+ ```
97
+
98
+ - A function receives the branch arrays (NumPy or Awkward, flat per event or
99
+ jagged per object) and returns an array or a number. Its result follows the
100
+ [per-event and per-object rules](#per-event-versus-per-object) like any other,
101
+ and a `None` in it counts as a [missing value](#missing-and-non-finite-values).
102
+ - rootfig evaluates expressions a chunk of events at a time, in several threads at
103
+ once (see [Large inputs](plotting.md#large-inputs)). A function must therefore
104
+ treat each event on its own and change nothing outside it: `x / ak.max(x)`
105
+ would divide by the largest value of the chunk, not of the sample.
106
+ - The names are looked up when a call uses the expression, so a `Variable` or `Cut`
107
+ calling `delta_r` can be built before any `functions=` is given. A name that a
108
+ built-in function or constant already has is refused, and so is a mapping that
109
+ is not one of names to callables.
110
+ - Only the functions given to a call are reachable from its expressions; a later
111
+ call without `functions=` cannot call them. The functions themselves are ordinary
112
+ Python run as you: the expression language limits what an expression can reach,
113
+ not what the functions handed to it do, so pass only code you trust.
114
+
115
+ Names beginning with `__rootfig_` are rootfig's own; a branch so named is written
116
+ in backticks: `` `__rootfig_x` ``.
117
+
60
118
  ## Sub-branches of object collections
61
119
 
62
120
  podio/EDM4hep and other files with split object branches list their leaves