reboost 0.8.3__py3-none-any.whl → 0.8.4__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.
reboost/__main__.py ADDED
@@ -0,0 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+ from .cli import cli
4
+
5
+ if __name__ == "__main__":
6
+ cli()
reboost/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.8.3'
32
- __version_tuple__ = version_tuple = (0, 8, 3)
31
+ __version__ = version = '0.8.4'
32
+ __version_tuple__ = version_tuple = (0, 8, 4)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -0,0 +1,6 @@
1
+ from __future__ import annotations
2
+
3
+ from .cli import optical_cli
4
+
5
+ if __name__ == "__main__":
6
+ optical_cli()
@@ -32,7 +32,7 @@ class OptmapForConvolve(NamedTuple):
32
32
 
33
33
  def open_optmap(optmap_fn: str) -> OptmapForConvolve:
34
34
  dets = lh5.ls(optmap_fn, "/channels/")
35
- detidx = np.arange(0, dets.shape[0])
35
+ detidx = np.arange(0, len(dets))
36
36
 
37
37
  optmap_all = lh5.read("/all/prob", optmap_fn)
38
38
  assert isinstance(optmap_all, Histogram)
@@ -61,14 +61,14 @@ def open_optmap(optmap_fn: str) -> OptmapForConvolve:
61
61
  raise ValueError(msg)
62
62
  else:
63
63
  detidx = np.array([OPTMAP_ANY_CH])
64
- dets = np.array(["all"])
64
+ dets = ["all"]
65
65
 
66
66
  # check the exponent from the optical map file
67
67
  if "_hitcounts_exp" in lh5.ls(optmap_fn):
68
68
  msg = "found _hitcounts_exp which is not supported any more"
69
69
  raise RuntimeError(msg)
70
70
 
71
- dets = [d.replace("/channels/", "") for d in dets]
71
+ dets = np.array([d.replace("/channels/", "") for d in dets])
72
72
 
73
73
  return OptmapForConvolve(dets, detidx, optmap_edges, ow)
74
74
 
reboost/optmap/evt.py CHANGED
@@ -131,9 +131,9 @@ def get_optical_detectors_from_geom(geom_fn) -> dict[int, str]:
131
131
  import pygeomtools
132
132
 
133
133
  geom_registry = pyg4ometry.gdml.Reader(geom_fn).getRegistry()
134
- detectors = pygeomtools.get_all_sensvols(geom_registry)
134
+ detectors = pygeomtools.get_all_sensvols(geom_registry, type_filter="optical")
135
135
  return OrderedDict(
136
- [(d.uid, name) for name, d in detectors.items() if d.detector_type == "optical"]
136
+ [(d.uid, d.ntuple_name if d.ntuple_name else name) for name, d in detectors.items()]
137
137
  )
138
138
 
139
139
 
reboost/optmap/mapview.py CHANGED
@@ -95,7 +95,7 @@ def _read_data(
95
95
  histogram_choice: str = "prob",
96
96
  ) -> tuple[tuple[NDArray], NDArray]:
97
97
  histogram = histogram_choice if histogram_choice != "prob_unc_rel" else "prob"
98
- detid = f"channels/{detid}" if detid != all and not detid.startswith("channels/") else detid
98
+ detid = f"channels/{detid}" if detid != "all" and not detid.startswith("channels/") else detid
99
99
 
100
100
  optmap_all = lh5.read(f"/{detid}/{histogram}", optmap_fn)
101
101
  optmap_edges = tuple([b.edges for b in optmap_all.binning])
reboost/spms/__init__.py CHANGED
@@ -1,5 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
- from .pe import detected_photoelectrons, emitted_scintillation_photons, load_optmap
3
+ from .pe import detected_photoelectrons, emitted_scintillation_photons, load_optmap, load_optmap_all
4
4
 
5
- __all__ = ["detected_photoelectrons", "emitted_scintillation_photons", "load_optmap"]
5
+ __all__ = [
6
+ "detected_photoelectrons",
7
+ "emitted_scintillation_photons",
8
+ "load_optmap",
9
+ "load_optmap_all",
10
+ ]
reboost/spms/pe.py CHANGED
@@ -140,8 +140,8 @@ def detected_photoelectrons(
140
140
  """
141
141
  hits = ak.Array(
142
142
  {
143
- "num_scint_ph": num_scint_ph,
144
- "particle": particle,
143
+ "num_scint_ph": units_conv_ak(num_scint_ph, "dimensionless"),
144
+ "particle": units_conv_ak(particle, "dimensionless"),
145
145
  "time": units_conv_ak(time, "ns"),
146
146
  "xloc": units_conv_ak(xloc, "m"),
147
147
  "yloc": units_conv_ak(yloc, "m"),
@@ -171,7 +171,12 @@ def emitted_scintillation_photons(
171
171
  material
172
172
  scintillating material name.
173
173
  """
174
- hits = ak.Array({"edep": units_conv_ak(edep, "keV"), "particle": particle})
174
+ hits = ak.Array(
175
+ {
176
+ "edep": units_conv_ak(edep, "keV"),
177
+ "particle": units_conv_ak(particle, "dimensionless"),
178
+ }
179
+ )
175
180
 
176
181
  scint_mat_params = convolve._get_scint_params(material)
177
182
  ph = convolve.iterate_stepwise_depositions_scintillate(hits, scint_mat_params)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reboost
3
- Version: 0.8.3
3
+ Version: 0.8.4
4
4
  Summary: New LEGEND Monte-Carlo simulation post-processing
5
5
  Author-email: Manuel Huber <info@manuelhu.de>, Toby Dixon <toby.dixon.23@ucl.ac.uk>, Luigi Pertoldi <gipert@pm.me>
6
6
  Maintainer: The LEGEND Collaboration
@@ -28,7 +28,7 @@ Requires-Dist: scipy
28
28
  Requires-Dist: numba>=0.60
29
29
  Requires-Dist: legend-pydataobj>=1.15.1
30
30
  Requires-Dist: legend-pygeom-optics>=0.15.0
31
- Requires-Dist: legend-pygeom-tools>=0.0.25
31
+ Requires-Dist: legend-pygeom-tools>=0.0.26
32
32
  Requires-Dist: legend-pygeom-hpges
33
33
  Requires-Dist: hist
34
34
  Requires-Dist: dbetto
@@ -1,5 +1,6 @@
1
1
  reboost/__init__.py,sha256=VZz9uo7i2jgAx8Zi15SptLZnE_qcnGuNWwqkD3rYHFA,278
2
- reboost/_version.py,sha256=vG9GelPWtHXRUy7hmX4yak1DOSnho8XScbsq70cQTPY,704
2
+ reboost/__main__.py,sha256=42koSxY2st4mMIRSAnKz06nP5HppMPxBVFf2jaHljGs,95
3
+ reboost/_version.py,sha256=6jY56wQpNbuVX1aDDCpFgsBq74u7lloIJcrJSefeVec,704
3
4
  reboost/build_evt.py,sha256=VXIfK_pfe_Cgym6gI8dESwONZi-v_4fll0Pn09vePQY,3767
4
5
  reboost/build_glm.py,sha256=IerSLQfe51ZO7CQP2kmfPnOIVaDtcfw3byOM02Vaz6o,9472
5
6
  reboost/build_hit.py,sha256=N_nxvH69SvILVNmyvVfhQwQdD_PDW8tlsqj2ciO5nKE,17409
@@ -21,22 +22,23 @@ reboost/math/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
22
  reboost/math/functions.py,sha256=OymiYTcA0NXxxm-MBDw5kqyNwHoLCmuv4J48AwnSrbU,5633
22
23
  reboost/math/stats.py,sha256=Rq4Wdzv-3aoSK7EsPZCuOEHfnOz3w0moIzCEHbC07xw,3173
23
24
  reboost/optmap/__init__.py,sha256=imvuyld-GLw8qdwqW-lXCg2feptcTyQo3wIzPvDHwmY,93
25
+ reboost/optmap/__main__.py,sha256=DfzkXQ7labOe53hd7jH5pAbTW491jjQYSMLyl72L4Rk,111
24
26
  reboost/optmap/cli.py,sha256=_7WBlx55eRyW_wWB-ELbFaWXin2d3xsh6Q5bFoNJaHE,8694
25
- reboost/optmap/convolve.py,sha256=43hK2QoU6zwAOepJ5f3qBQEZPd1vD31r1bkCEi3u5So,10767
27
+ reboost/optmap/convolve.py,sha256=0UCOVy6BIu5OYoSWeAb6fuROqvGu9rVswly6XvnxYoE,10763
26
28
  reboost/optmap/create.py,sha256=GmGd0-F0eWmw7ywH8pT1lKiMb60QXCq9al8Ka_ySD1Q,14382
27
- reboost/optmap/evt.py,sha256=p5ngsCuvOxIZDDQNL9efcLn8Q4CfGL7G726BRrCpE6Y,5637
28
- reboost/optmap/mapview.py,sha256=_zGiONqCWc4kCp1yHvNFRkh7svvud4ZLqaSHkNieo_M,6878
29
+ reboost/optmap/evt.py,sha256=nZcB3aOPtMhySu00J23KlOTijeI5Oazde-vfM5A71e8,5664
30
+ reboost/optmap/mapview.py,sha256=fswwXolA6au8u8gljBKy8PSXC2W7Cy_GwOV86-duYG8,6880
29
31
  reboost/optmap/numba_pdg.py,sha256=y8cXR5PWE2Liprp4ou7vl9do76dl84vXU52ZJD9_I7A,731
30
32
  reboost/optmap/optmap.py,sha256=3clc1RA8jA4YJte83w085MY8zLpG-G7DBkpZ2UeKPpM,12825
31
33
  reboost/shape/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
34
  reboost/shape/cluster.py,sha256=nwR1Dnf00SDICGPqpXeM1Q7_DwTtO9uP3wmuML45c3g,8195
33
35
  reboost/shape/group.py,sha256=gOCYgir2gZqmW1JXtbNRPlQqP0gmUcbe7RVb9CbY1pU,5540
34
36
  reboost/shape/reduction.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- reboost/spms/__init__.py,sha256=ffi0rH-ZFGmpURbFt-HY1ZAHCdady0mLXNsblRNh-JY,207
36
- reboost/spms/pe.py,sha256=JD9seItsudb2kQ_gtqwU1XqI1u3rKjlFHsTxONAf-BU,5685
37
- reboost-0.8.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
38
- reboost-0.8.3.dist-info/METADATA,sha256=a-Z7i-CeNGcnL2zeD3kMx2bGg-ngtN8UEkhRLKi3NX8,3877
39
- reboost-0.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- reboost-0.8.3.dist-info/entry_points.txt,sha256=DxhD6BidSWNot9BrejHJjQ7RRLmrMaBIl52T75oWTwM,93
41
- reboost-0.8.3.dist-info/top_level.txt,sha256=q-IBsDepaY_AbzbRmQoW8EZrITXRVawVnNrB-_zyXZs,8
42
- reboost-0.8.3.dist-info/RECORD,,
37
+ reboost/spms/__init__.py,sha256=24b9GelP4ngXc7JibpWqLOtUuIaQQa0DzDQYP8lVKUc,262
38
+ reboost/spms/pe.py,sha256=cFj-D1-pj5djRHmrfYMjNscNnQfveACMZMJq4u4th3w,5830
39
+ reboost-0.8.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
40
+ reboost-0.8.4.dist-info/METADATA,sha256=YdOpd1dR4rVjYwz6dkjtxvQ6qoJQmAMR6DXgvAvH1zM,3877
41
+ reboost-0.8.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ reboost-0.8.4.dist-info/entry_points.txt,sha256=DxhD6BidSWNot9BrejHJjQ7RRLmrMaBIl52T75oWTwM,93
43
+ reboost-0.8.4.dist-info/top_level.txt,sha256=q-IBsDepaY_AbzbRmQoW8EZrITXRVawVnNrB-_zyXZs,8
44
+ reboost-0.8.4.dist-info/RECORD,,