umami-preprocessing 0.2.4__tar.gz → 0.2.5__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 (27) hide show
  1. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/PKG-INFO +6 -6
  2. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/pyproject.toml +9 -9
  3. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/PKG-INFO +6 -6
  4. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/requires.txt +5 -5
  5. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/__init__.py +1 -1
  6. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/merging.py +1 -0
  7. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/plot.py +21 -16
  8. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/README.md +0 -0
  9. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/setup.cfg +0 -0
  10. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/SOURCES.txt +0 -0
  11. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/dependency_links.txt +0 -0
  12. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/entry_points.txt +0 -0
  13. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/umami_preprocessing.egg-info/top_level.txt +0 -0
  14. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/__init__.py +0 -0
  15. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/components.py +0 -0
  16. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/preprocessing_config.py +0 -0
  17. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/region.py +0 -0
  18. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/resampling_config.py +0 -0
  19. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/classes/variable_config.py +0 -0
  20. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/logger.py +0 -0
  21. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/main.py +0 -0
  22. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/__init__.py +0 -0
  23. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/hist.py +0 -0
  24. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/interpolation.py +0 -0
  25. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/normalisation.py +0 -0
  26. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/stages/resampling.py +0 -0
  27. {umami_preprocessing-0.2.4 → umami_preprocessing-0.2.5}/upp/utils.py +0 -0
@@ -1,25 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umami-preprocessing
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Preprocessing for jet tagging
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/umami-hep/umami-preprocessing
7
7
  Requires-Python: <3.12,>=3.8
8
8
  Description-Content-Type: text/markdown
9
+ Requires-Dist: atlas-ftag-tools==0.2.14
10
+ Requires-Dist: dotmap==1.3.30
11
+ Requires-Dist: puma-hep==0.4.9
9
12
  Requires-Dist: pyyaml-include==1.3
10
13
  Requires-Dist: PyYAML>=6.0.1
11
14
  Requires-Dist: rich==12.6.0
12
15
  Requires-Dist: scipy>=1.15.2
13
- Requires-Dist: puma-hep==0.4.5
14
- Requires-Dist: atlas-ftag-tools==0.2.10
15
- Requires-Dist: dotmap==1.3.30
16
16
  Provides-Extra: dev
17
- Requires-Dist: ruff==0.6.2; extra == "dev"
18
17
  Requires-Dist: mypy==1.11.2; extra == "dev"
19
18
  Requires-Dist: pre-commit==3.5.0; extra == "dev"
20
- Requires-Dist: pytest>=7.2.2; extra == "dev"
21
19
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
22
20
  Requires-Dist: pytest-mock==3.11.1; extra == "dev"
21
+ Requires-Dist: pytest>=7.2.2; extra == "dev"
22
+ Requires-Dist: ruff==0.6.2; extra == "dev"
23
23
 
24
24
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
25
25
  [![codecov](https://codecov.io/gh/umami-hep/umami-preprocessing/graph/badge.svg?token=K8MJI20UZO)](https://codecov.io/gh/umami-hep/umami-preprocessing)
@@ -7,23 +7,23 @@ readme = "README.md"
7
7
  requires-python = "<3.12,>=3.8"
8
8
 
9
9
  dependencies = [
10
- "pyyaml-include==1.3",
11
- "PyYAML>=6.0.1",
12
- "rich==12.6.0",
13
- "scipy>=1.15.2",
14
- "puma-hep==0.4.5",
15
- "atlas-ftag-tools==0.2.10",
16
- "dotmap==1.3.30"
10
+ "atlas-ftag-tools==0.2.14",
11
+ "dotmap==1.3.30",
12
+ "puma-hep==0.4.9",
13
+ "pyyaml-include==1.3",
14
+ "PyYAML>=6.0.1",
15
+ "rich==12.6.0",
16
+ "scipy>=1.15.2",
17
17
  ]
18
18
 
19
19
  [project.optional-dependencies]
20
20
  dev = [
21
- "ruff==0.6.2",
22
21
  "mypy==1.11.2",
23
22
  "pre-commit==3.5.0",
24
- "pytest>=7.2.2",
25
23
  "pytest-cov>=4.0.0",
26
24
  "pytest-mock==3.11.1",
25
+ "pytest>=7.2.2",
26
+ "ruff==0.6.2",
27
27
  ]
28
28
 
29
29
  [project.urls]
@@ -1,25 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umami-preprocessing
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Preprocessing for jet tagging
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/umami-hep/umami-preprocessing
7
7
  Requires-Python: <3.12,>=3.8
8
8
  Description-Content-Type: text/markdown
9
+ Requires-Dist: atlas-ftag-tools==0.2.14
10
+ Requires-Dist: dotmap==1.3.30
11
+ Requires-Dist: puma-hep==0.4.9
9
12
  Requires-Dist: pyyaml-include==1.3
10
13
  Requires-Dist: PyYAML>=6.0.1
11
14
  Requires-Dist: rich==12.6.0
12
15
  Requires-Dist: scipy>=1.15.2
13
- Requires-Dist: puma-hep==0.4.5
14
- Requires-Dist: atlas-ftag-tools==0.2.10
15
- Requires-Dist: dotmap==1.3.30
16
16
  Provides-Extra: dev
17
- Requires-Dist: ruff==0.6.2; extra == "dev"
18
17
  Requires-Dist: mypy==1.11.2; extra == "dev"
19
18
  Requires-Dist: pre-commit==3.5.0; extra == "dev"
20
- Requires-Dist: pytest>=7.2.2; extra == "dev"
21
19
  Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
22
20
  Requires-Dist: pytest-mock==3.11.1; extra == "dev"
21
+ Requires-Dist: pytest>=7.2.2; extra == "dev"
22
+ Requires-Dist: ruff==0.6.2; extra == "dev"
23
23
 
24
24
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
25
25
  [![codecov](https://codecov.io/gh/umami-hep/umami-preprocessing/graph/badge.svg?token=K8MJI20UZO)](https://codecov.io/gh/umami-hep/umami-preprocessing)
@@ -1,15 +1,15 @@
1
+ atlas-ftag-tools==0.2.14
2
+ dotmap==1.3.30
3
+ puma-hep==0.4.9
1
4
  pyyaml-include==1.3
2
5
  PyYAML>=6.0.1
3
6
  rich==12.6.0
4
7
  scipy>=1.15.2
5
- puma-hep==0.4.5
6
- atlas-ftag-tools==0.2.10
7
- dotmap==1.3.30
8
8
 
9
9
  [dev]
10
- ruff==0.6.2
11
10
  mypy==1.11.2
12
11
  pre-commit==3.5.0
13
- pytest>=7.2.2
14
12
  pytest-cov>=4.0.0
15
13
  pytest-mock==3.11.1
14
+ pytest>=7.2.2
15
+ ruff==0.6.2
@@ -2,4 +2,4 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "v0.2.4"
5
+ __version__ = "v0.2.5"
@@ -103,6 +103,7 @@ class Merging:
103
103
  shapes,
104
104
  add_flavour_label=self.jets_name,
105
105
  jets_name=self.jets_name,
106
+ num_jets=jets_in_file,
106
107
  )
107
108
 
108
109
  # Copy the metadata attributes
@@ -68,12 +68,8 @@ def make_hist(
68
68
  plot = HistogramPlot(
69
69
  ylabel=f"Normalised Number of {jets_name}",
70
70
  xlabel=xlabel,
71
- bins=50,
72
71
  y_scale=1.5,
73
72
  logy=True,
74
- norm=True,
75
- bins_range=bins_range,
76
- underoverflow=False,
77
73
  )
78
74
 
79
75
  # Define different linestyles for the different samples
@@ -89,20 +85,29 @@ def make_hist(
89
85
  else:
90
86
  cuts = Cuts.from_list([f"flavour_label == {label_value}"])
91
87
 
92
- # Add to histogram
93
- plot.add(
94
- Histogram(
95
- values=(
96
- cuts(values).values[variable] / 1e3
97
- if "pt" in variable
98
- else cuts(values).values[variable]
99
- ),
100
- label=flavour.label + " " + values_key,
101
- colour=flavour.colour,
102
- linestyle=linestiles[counter],
103
- )
88
+ # Get the histogram object
89
+ histo = Histogram(
90
+ values=(
91
+ cuts(values).values[variable] / 1e3
92
+ if "pt" in variable
93
+ else cuts(values).values[variable]
94
+ ),
95
+ bins=50,
96
+ bins_range=bins_range,
97
+ norm=True,
98
+ label=flavour.label + " " + values_key,
99
+ colour=flavour.colour,
100
+ linestyle=linestiles[counter],
101
+ underoverflow=True,
104
102
  )
105
103
 
104
+ # Add to histogram
105
+ plot.add(histogram=histo)
106
+
107
+ # Set bin_edges
108
+ if bins_range is None:
109
+ bins_range = (histo.bin_edges[0], histo.bin_edges[-1])
110
+
106
111
  # Draw plot
107
112
  plot.draw()
108
113