wums 0.1.9__py3-none-any.whl → 0.1.10__py3-none-any.whl

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.
wums/boostHistHelpers.py CHANGED
@@ -528,9 +528,27 @@ def disableAxisFlow(ax, under=False, over=False):
528
528
  circular=ax.traits.circular,
529
529
  )
530
530
 
531
+ def enableAxisFlow(ax, overflow=True, underflow=True):
532
+ if isinstance(ax, hist.axis.Integer):
533
+ args = [ax.edges[0], ax.edges[-1]]
534
+ elif isinstance(ax, hist.axis.Regular):
535
+ args = [ax.size, ax.edges[0], ax.edges[-1]]
536
+ else:
537
+ args = [ax.edges]
538
+
539
+ return type(ax)(
540
+ *args,
541
+ name=ax.name,
542
+ overflow=overflow,
543
+ underflow=underflow,
544
+ circular=ax.traits.circular,
545
+ )
531
546
 
532
- def disableFlow(h, axis_name, under=False, over=False):
533
- # axes_name can be either string or a list of strings with the axis name(s) to disable the flow
547
+ def disableFlow(h, axis_name=None, under=False, over=False):
548
+ # axes_name can be 'None' for all axes, a string or a list of strings with the axis name(s) to disable the flow
549
+ if axis_name is None:
550
+ axis_name = [n for n in h.axes.name]
551
+
534
552
  if not isinstance(axis_name, str):
535
553
  for var in axis_name:
536
554
  if var in h.axes.name:
wums/plot_tools.py CHANGED
@@ -644,7 +644,7 @@ def add_decor(
644
644
  make_label(
645
645
  ax=ax,
646
646
  lumi=lumi,
647
- lumi_format="{0:.3g}",
647
+ lumi_format="{}" if isinstance(lumi, (list, tuple, np.ndarray)) else "{0:.3g}",
648
648
  fontsize=text_size,
649
649
  label=label,
650
650
  data=data,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wums
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: .
5
5
  Author-email: David Walter <david.walter@cern.ch>, Josh Bendavid <josh.bendavid@cern.ch>, Kenneth Long <kenneth.long@cern.ch>, Jan Eysermans <jan.eysermans@cern.ch>
6
6
  License: MIT
@@ -1,14 +1,14 @@
1
1
  wums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- wums/boostHistHelpers.py,sha256=KMZXVPLlx7_v0XgGEQg6mZmuzEOQ6AWO5Wd_mPaAPjg,41636
2
+ wums/boostHistHelpers.py,sha256=AIkJ8QttysAzlH-yoEyS5pV1PwzcVS14fUUGv-zBUts,42163
3
3
  wums/fitutils.py,sha256=sPCMJqZGdXvDfc8OxjOB-Bpf45GWHKxmKkDV3SlMUQs,38297
4
4
  wums/fitutilsjax.py,sha256=HE1AcIZmI6N_xIHo8OHCPaYkHSnND_B-vI4Gl3vaUmA,2659
5
5
  wums/ioutils.py,sha256=EyCOBin7ifStLtdgKl7J1_0VWB6RnXWtIWFge9x73Ow,12465
6
6
  wums/logging.py,sha256=L4514Xyq7L1z77Tkh8KE2HX88ZZ06o6SSRyQo96DbC0,4494
7
7
  wums/output_tools.py,sha256=89rQPOWpwGuzJK5ZQBDv38rmO9th1D2206QOe9PE-gY,7572
8
- wums/plot_tools.py,sha256=0olJuXAnuDDXJrbF9GF_ZaWBJ14ljOzF5ww19VGCG_g,54662
8
+ wums/plot_tools.py,sha256=YcMoYiUt-YNntE239vPYL7AMp7HA5tdI-Bz1fHQVm-o,54719
9
9
  wums/tfutils.py,sha256=9efkkvxH7VtwJN2yBS6_-P9dLKs3CXdxMFdrEBNsna8,2892
10
10
  wums/Templates/index.php,sha256=9EYmfc0ltMqr5oOdA4_BVIHdSbef5aA0ORoRZBEADVw,4348
11
- wums-0.1.9.dist-info/METADATA,sha256=TgZpEIJTjE_xZ3J_cbrXaD2EClyo3iEKS6MHl5lanLU,1784
12
- wums-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- wums-0.1.9.dist-info/top_level.txt,sha256=DCE1TVg7ySraosR3kYZkLIZ2w1Pwk2pVTdkqx6E-yRY,5
14
- wums-0.1.9.dist-info/RECORD,,
11
+ wums-0.1.10.dist-info/METADATA,sha256=NPyB3B2uOKwH_LGXPA7q91jx83rHA0Vn8F6dXlnC1LE,1785
12
+ wums-0.1.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
13
+ wums-0.1.10.dist-info/top_level.txt,sha256=DCE1TVg7ySraosR3kYZkLIZ2w1Pwk2pVTdkqx6E-yRY,5
14
+ wums-0.1.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5