reboost 0.8.0__tar.gz → 0.8.2__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 (81) hide show
  1. {reboost-0.8.0 → reboost-0.8.2}/PKG-INFO +2 -1
  2. {reboost-0.8.0 → reboost-0.8.2}/pyproject.toml +1 -0
  3. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/_version.py +3 -3
  4. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/hpge/psd.py +11 -9
  5. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/cli.py +0 -6
  6. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/convolve.py +40 -83
  7. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/create.py +2 -5
  8. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/spms/pe.py +4 -4
  9. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/PKG-INFO +2 -1
  10. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/requires.txt +1 -0
  11. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/spms.yaml +4 -4
  12. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/test_build_hit.py +3 -5
  13. {reboost-0.8.0 → reboost-0.8.2}/LICENSE +0 -0
  14. {reboost-0.8.0 → reboost-0.8.2}/README.md +0 -0
  15. {reboost-0.8.0 → reboost-0.8.2}/setup.cfg +0 -0
  16. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/__init__.py +0 -0
  17. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/build_evt.py +0 -0
  18. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/build_glm.py +0 -0
  19. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/build_hit.py +0 -0
  20. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/cli.py +0 -0
  21. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/core.py +0 -0
  22. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/daq/__init__.py +0 -0
  23. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/daq/core.py +0 -0
  24. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/daq/utils.py +0 -0
  25. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/hpge/__init__.py +0 -0
  26. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/hpge/surface.py +0 -0
  27. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/hpge/utils.py +0 -0
  28. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/iterator.py +0 -0
  29. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/log_utils.py +0 -0
  30. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/math/__init__.py +0 -0
  31. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/math/functions.py +0 -0
  32. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/math/stats.py +0 -0
  33. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/__init__.py +0 -0
  34. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/evt.py +0 -0
  35. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/mapview.py +0 -0
  36. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/numba_pdg.py +0 -0
  37. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/optmap/optmap.py +0 -0
  38. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/profile.py +0 -0
  39. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/shape/__init__.py +0 -0
  40. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/shape/cluster.py +0 -0
  41. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/shape/group.py +0 -0
  42. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/shape/reduction.py +0 -0
  43. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/spms/__init__.py +0 -0
  44. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/units.py +0 -0
  45. {reboost-0.8.0 → reboost-0.8.2}/src/reboost/utils.py +0 -0
  46. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/SOURCES.txt +0 -0
  47. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/dependency_links.txt +0 -0
  48. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/entry_points.txt +0 -0
  49. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/not-zip-safe +0 -0
  50. {reboost-0.8.0 → reboost-0.8.2}/src/reboost.egg-info/top_level.txt +0 -0
  51. {reboost-0.8.0 → reboost-0.8.2}/tests/conftest.py +0 -0
  52. {reboost-0.8.0 → reboost-0.8.2}/tests/evt/test_evt.py +0 -0
  53. {reboost-0.8.0 → reboost-0.8.2}/tests/glm/test_build_glm.py +0 -0
  54. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/args.yaml +0 -0
  55. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/basic.yaml +0 -0
  56. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/foward_only.yaml +0 -0
  57. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/geom.gdml +0 -0
  58. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/hit_config.yaml +0 -0
  59. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/pars.yaml +0 -0
  60. {reboost-0.8.0 → reboost-0.8.2}/tests/hit/configs/reshape.yaml +0 -0
  61. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/simulation/gammas.mac +0 -0
  62. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/simulation/geometry.gdml +0 -0
  63. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/simulation/make_dt_map.jl +0 -0
  64. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/simulation/make_geom.py +0 -0
  65. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_current.py +0 -0
  66. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_dt_heuristic.py +0 -0
  67. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_files/drift_time_maps.lh5 +0 -0
  68. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_files/internal_electron.lh5 +0 -0
  69. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_hpge_map.py +0 -0
  70. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_r90.py +0 -0
  71. {reboost-0.8.0 → reboost-0.8.2}/tests/hpge/test_surface.py +0 -0
  72. {reboost-0.8.0 → reboost-0.8.2}/tests/spms/test_pe.py +0 -0
  73. {reboost-0.8.0 → reboost-0.8.2}/tests/test_cli.py +0 -0
  74. {reboost-0.8.0 → reboost-0.8.2}/tests/test_core.py +0 -0
  75. {reboost-0.8.0 → reboost-0.8.2}/tests/test_math.py +0 -0
  76. {reboost-0.8.0 → reboost-0.8.2}/tests/test_optmap.py +0 -0
  77. {reboost-0.8.0 → reboost-0.8.2}/tests/test_optmap_dets.gdml +0 -0
  78. {reboost-0.8.0 → reboost-0.8.2}/tests/test_profile.py +0 -0
  79. {reboost-0.8.0 → reboost-0.8.2}/tests/test_shape.py +0 -0
  80. {reboost-0.8.0 → reboost-0.8.2}/tests/test_units.py +0 -0
  81. {reboost-0.8.0 → reboost-0.8.2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reboost
3
- Version: 0.8.0
3
+ Version: 0.8.2
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
@@ -704,6 +704,7 @@ Requires-Dist: numba>=0.60
704
704
  Requires-Dist: legend-pydataobj>=1.15.1
705
705
  Requires-Dist: legend-pygeom-optics>=0.12.0
706
706
  Requires-Dist: legend-pygeom-tools>=0.0.11
707
+ Requires-Dist: legend-pygeom-hpges
707
708
  Requires-Dist: hist
708
709
  Requires-Dist: dbetto
709
710
  Requires-Dist: particle
@@ -40,6 +40,7 @@ dependencies = [
40
40
  "legend-pydataobj >=1.15.1",
41
41
  "legend-pygeom-optics >=0.12.0",
42
42
  "legend-pygeom-tools >=0.0.11",
43
+ "legend-pygeom-hpges",
43
44
  "hist",
44
45
  "dbetto",
45
46
  "particle",
@@ -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.0'
32
- __version_tuple__ = version_tuple = (0, 8, 0)
31
+ __version__ = version = '0.8.2'
32
+ __version_tuple__ = version_tuple = (0, 8, 2)
33
33
 
34
- __commit_id__ = commit_id = 'g1c98fe8fc'
34
+ __commit_id__ = commit_id = 'gc0299ec86'
@@ -262,11 +262,13 @@ def _current_pulse_model(
262
262
 
263
263
  Consists of a Gaussian, a high side exponential tail and a low side tail:
264
264
 
265
- .. math::
265
+ .. math::
266
266
 
267
- A(t) = A_{max}\times (1-p-p_h)\times \text{Gauss}(t,\mu,\sigma)+ A \times p (1-\text{Erf}((t-\mu)/sigma_i))\times
268
- \frac{e^{( t/\tau)}}{2e^{\mu/\tau}} + A \times p_h (1-\text{Erf}(-(t-\mu)/sigma_i))\times
269
- \frac{e^{-( t/\tau)}}{2}
267
+ \begin{align}
268
+ A(t) = \; &A_\text{max} \times (1-p-p_h) \times \text{Gauss}(t;\mu,\sigma) \\
269
+ &+ A \times p \; \left(1 - \text{erf}\left(\frac{t-\mu}{\sigma_i}\right)\right) \times \frac{e^{t/\tau}}{2e^{\mu/\tau}} \\
270
+ &+ A \times p_h \; \left(1 - \text{erf}\left(-\frac{t-\mu}{\sigma_i}\right)\right) \times \frac{1}{2}e^{-t/\tau}
271
+ \end{align}
270
272
 
271
273
  Parameters
272
274
  ----------
@@ -397,13 +399,13 @@ def get_current_waveform(
397
399
  the template.
398
400
 
399
401
  .. math::
400
- A(t) = \sum_i E_i \times N f(t,dt_i,\vector{\theta})
402
+ A(t) = \sum_i E_i \times N f(t, dt_i, \vec{\theta})
401
403
 
402
404
  Where:
403
- - $f(t)$ is the template
404
- - $\vector{\theta}$ are the parameters (sigma, p, tau)
405
- - $E_i$ and $dt_i$ are the deposited energy and drift time.
406
- - N is a normalisation term
405
+ - :math:`f(t)` is the template
406
+ - :math`\vec{\theta}` are the parameters :math:`(\sigma, p, \tau)`
407
+ - :math:`E_i` and :math:`dt_i` are the deposited energy and drift time.
408
+ - :math:`N` is a normalisation term
407
409
 
408
410
  Parameters
409
411
  ----------
@@ -55,11 +55,6 @@ def optical_cli() -> None:
55
55
  "--geom",
56
56
  help="GDML geometry file",
57
57
  )
58
- map_parser_det_group.add_argument(
59
- "--evt",
60
- action="store_true",
61
- help="the input file is already an optmap-evt file.",
62
- )
63
58
  map_parser.add_argument(
64
59
  "--n-procs",
65
60
  "-N",
@@ -197,7 +192,6 @@ def optical_cli() -> None:
197
192
  args.input,
198
193
  settings,
199
194
  args.bufsize,
200
- is_stp_file=(not args.evt),
201
195
  chfilter=chfilter,
202
196
  output_lh5_fn=args.output,
203
197
  check_after_create=args.check,
@@ -1,7 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import logging
4
- import re
5
4
  from typing import NamedTuple
6
5
 
7
6
  import awkward as ak
@@ -10,7 +9,7 @@ import numba
10
9
  import numpy as np
11
10
  from legendoptics import fibers, lar, pen
12
11
  from lgdo import lh5
13
- from lgdo.types import Array, Histogram, Table
12
+ from lgdo.types import Histogram
14
13
  from numba import njit
15
14
  from numpy.typing import NDArray
16
15
 
@@ -20,24 +19,20 @@ log = logging.getLogger(__name__)
20
19
 
21
20
 
22
21
  OPTMAP_ANY_CH = -1
23
- OPTMAP_SUM_CH = -2
24
22
 
25
23
 
26
24
  class OptmapForConvolve(NamedTuple):
27
25
  """A loaded optmap for convolving."""
28
26
 
29
- detids: NDArray
27
+ dets: NDArray
30
28
  detidx: NDArray
31
29
  edges: NDArray
32
30
  weights: NDArray
33
31
 
34
32
 
35
33
  def open_optmap(optmap_fn: str) -> OptmapForConvolve:
36
- maps = lh5.ls(optmap_fn)
37
- # only accept _<number> (/all is read separately)
38
- det_ntuples = [m for m in maps if re.match(r"_\d+$", m)]
39
- detids = np.array([int(m.lstrip("_")) for m in det_ntuples])
40
- detidx = np.arange(0, detids.shape[0])
34
+ dets = lh5.ls(optmap_fn, "/channels/")
35
+ detidx = np.arange(0, dets.shape[0])
41
36
 
42
37
  optmap_all = lh5.read("/all/prob", optmap_fn)
43
38
  assert isinstance(optmap_all, Histogram)
@@ -46,7 +41,7 @@ def open_optmap(optmap_fn: str) -> OptmapForConvolve:
46
41
  ow = np.empty((detidx.shape[0] + 2, *optmap_all.weights.nda.shape), dtype=np.float64)
47
42
  # 0, ..., len(detidx)-1 AND OPTMAP_ANY_CH might be negative.
48
43
  ow[OPTMAP_ANY_CH] = optmap_all.weights.nda
49
- for i, nt in zip(detidx, det_ntuples, strict=True):
44
+ for i, nt in zip(detidx, dets, strict=True):
50
45
  optmap = lh5.read(f"/{nt}/prob", optmap_fn)
51
46
  assert isinstance(optmap, Histogram)
52
47
  ow[i] = optmap.weights.nda
@@ -54,61 +49,51 @@ def open_optmap(optmap_fn: str) -> OptmapForConvolve:
54
49
  # if we have any individual channels registered, the sum is potentially larger than the
55
50
  # probability to find _any_ hit.
56
51
  if len(detidx) != 0:
57
- ow[OPTMAP_SUM_CH] = np.sum(ow[0:-2], axis=0, where=(ow[0:-2] >= 0))
58
- assert not np.any(ow[OPTMAP_SUM_CH] < 0)
52
+ map_sum = np.sum(ow[0:-2], axis=0, where=(ow[0:-2] >= 0))
53
+ assert not np.any(map_sum < 0)
54
+
55
+ # give this check some numerical slack.
56
+ if np.any(
57
+ np.abs(map_sum[ow[OPTMAP_ANY_CH] >= 0] - ow[OPTMAP_ANY_CH][ow[OPTMAP_ANY_CH] >= 0])
58
+ < -1e-15
59
+ ):
60
+ msg = "optical map does not fulfill relation sum(p_i) >= p_any"
61
+ raise ValueError(msg)
59
62
  else:
60
63
  detidx = np.array([OPTMAP_ANY_CH])
61
- detids = np.array([0])
62
- ow[OPTMAP_SUM_CH] = ow[OPTMAP_ANY_CH]
64
+ dets = np.array(["all"])
63
65
 
64
- # give this check some numerical slack.
65
- if np.any(
66
- np.abs(
67
- ow[OPTMAP_SUM_CH][ow[OPTMAP_ANY_CH] >= 0] - ow[OPTMAP_ANY_CH][ow[OPTMAP_ANY_CH] >= 0]
68
- )
69
- < -1e-15
70
- ):
71
- msg = "optical map does not fulfill relation sum(p_i) >= p_any"
72
- raise ValueError(msg)
66
+ # check the exponent from the optical map file
67
+ if "_hitcounts_exp" in lh5.ls(optmap_fn):
68
+ msg = "found _hitcounts_exp which is not supported any more"
69
+ raise RuntimeError(msg)
70
+
71
+ dets = [d.replace("/channels/", "") for d in dets]
72
+
73
+ return OptmapForConvolve(dets, detidx, optmap_edges, ow)
73
74
 
74
- try:
75
- # check the exponent from the optical map file
76
- optmap_multi_det_exp = lh5.read("/_hitcounts_exp", optmap_fn).value
77
- assert isinstance(optmap_multi_det_exp, float)
78
- if np.isfinite(optmap_multi_det_exp):
79
- msg = f"found finite _hitcounts_exp {optmap_multi_det_exp} which is not supported any more"
80
- raise RuntimeError(msg)
81
- except lh5.exceptions.LH5DecodeError: # the _hitcounts_exp might not be always present.
82
- pass
83
-
84
- return OptmapForConvolve(detids, detidx, optmap_edges, ow)
85
-
86
-
87
- def open_optmap_single(optmap_fn: str, spm_det_uid: int) -> OptmapForConvolve:
88
- try:
89
- # check the exponent from the optical map file
90
- optmap_multi_det_exp = lh5.read("/_hitcounts_exp", optmap_fn).value
91
- assert isinstance(optmap_multi_det_exp, float)
92
- if np.isfinite(optmap_multi_det_exp):
93
- msg = f"found finite _hitcounts_exp {optmap_multi_det_exp} which is not supported any more"
94
- raise RuntimeError(msg)
95
- except lh5.exceptions.LH5DecodeError: # the _hitcounts_exp might not be always present.
96
- pass
97
-
98
- optmap = lh5.read(f"/_{spm_det_uid}/prob", optmap_fn)
75
+
76
+ def open_optmap_single(optmap_fn: str, spm_det: str) -> OptmapForConvolve:
77
+ # check the exponent from the optical map file
78
+ if "_hitcounts_exp" in lh5.ls(optmap_fn):
79
+ msg = "found _hitcounts_exp which is not supported any more"
80
+ raise RuntimeError(msg)
81
+
82
+ h5_path = f"channels/{spm_det}" if spm_det != "all" else spm_det
83
+ optmap = lh5.read(f"/{h5_path}/prob", optmap_fn)
99
84
  assert isinstance(optmap, Histogram)
100
85
  ow = np.empty((1, *optmap.weights.nda.shape), dtype=np.float64)
101
86
  ow[0] = optmap.weights.nda
102
87
  optmap_edges = tuple([b.edges for b in optmap.binning])
103
88
 
104
- return OptmapForConvolve(np.array([spm_det_uid]), np.array([0]), optmap_edges, ow)
89
+ return OptmapForConvolve(np.array([spm_det]), np.array([0]), optmap_edges, ow)
105
90
 
106
91
 
107
92
  def iterate_stepwise_depositions_pois(
108
93
  edep_hits: ak.Array,
109
94
  optmap: OptmapForConvolve,
110
95
  scint_mat_params: sc.ComputedScintParams,
111
- det_uid: int,
96
+ det: str,
112
97
  map_scaling: float = 1,
113
98
  map_scaling_sigma: float = 0,
114
99
  rng: np.random.Generator | None = None,
@@ -117,11 +102,15 @@ def iterate_stepwise_depositions_pois(
117
102
  msg = "the pe processors only support already reshaped output"
118
103
  raise ValueError(msg)
119
104
 
105
+ if det not in optmap.dets:
106
+ msg = f"channel {det} not available in optical map (contains {optmap.dets})"
107
+ raise ValueError(msg)
108
+
120
109
  rng = np.random.default_rng() if rng is None else rng
121
110
  res, output_list = _iterate_stepwise_depositions_pois(
122
111
  edep_hits,
123
112
  rng,
124
- np.where(optmap.detids == det_uid)[0][0],
113
+ np.where(optmap.dets == det)[0][0],
125
114
  map_scaling,
126
115
  map_scaling_sigma,
127
116
  optmap.edges,
@@ -314,38 +303,6 @@ def _iterate_stepwise_depositions_scintillate(
314
303
  return output_list
315
304
 
316
305
 
317
- def get_output_table(output_map):
318
- ph_count_o = 0
319
- for _rawid, (_evtid, det, _times) in output_map.items():
320
- ph_count_o += det.shape[0]
321
-
322
- out_idx = 0
323
- out_evtid = np.empty(ph_count_o, dtype=np.int64)
324
- out_det = np.empty(ph_count_o, dtype=np.int64)
325
- out_times = np.empty(ph_count_o, dtype=np.float64)
326
- for _rawid, (evtid, det, times) in output_map.items():
327
- o_len = det.shape[0]
328
- out_evtid[out_idx : out_idx + o_len] = evtid
329
- out_det[out_idx : out_idx + o_len] = det
330
- out_times[out_idx : out_idx + o_len] = times
331
- out_idx += o_len
332
-
333
- tbl = Table({"evtid": Array(out_evtid), "det_uid": Array(out_det), "time": Array(out_times)})
334
- return ph_count_o, tbl
335
-
336
-
337
- def _reflatten_scint_vov(arr: ak.Array) -> ak.Array:
338
- if all(arr[f].ndim == 1 for f in ak.fields(arr)):
339
- return arr
340
-
341
- group_num = ak.num(arr["edep"]).to_numpy()
342
- flattened = {
343
- f: ak.flatten(arr[f]) if arr[f].ndim > 1 else np.repeat(arr[f].to_numpy(), group_num)
344
- for f in ak.fields(arr)
345
- }
346
- return ak.Array(flattened)
347
-
348
-
349
306
  def _get_scint_params(material: str):
350
307
  if material == "lar":
351
308
  return sc.precompute_scintillation_params(
@@ -369,11 +369,8 @@ def check_optical_map(map_l5_file: str):
369
369
 
370
370
  This checks for consistency, and outputs details on map statistics.
371
371
  """
372
- if (
373
- "_hitcounts_exp" in lh5.ls(map_l5_file)
374
- and lh5.read("_hitcounts_exp", lh5_file=map_l5_file).value != np.inf
375
- ):
376
- log.error("unexpected _hitcounts_exp not equal to positive infinity")
372
+ if "_hitcounts_exp" in lh5.ls(map_l5_file):
373
+ log.error("found _hitcounts_exp which is not supported any more")
377
374
  return
378
375
 
379
376
  all_binning = None
@@ -105,7 +105,7 @@ def detected_photoelectrons(
105
105
  zloc: ak.Array,
106
106
  optmap: convolve.OptmapForConvolve,
107
107
  material: str,
108
- spm_detector_uid: int,
108
+ spm_detector: str,
109
109
  map_scaling: float = 1,
110
110
  map_scaling_sigma: float = 0,
111
111
  ) -> VectorOfVectors:
@@ -130,8 +130,8 @@ def detected_photoelectrons(
130
130
  the optical map loaded via py:func:`load_optmap`.
131
131
  material
132
132
  scintillating material name.
133
- spm_detector_uid
134
- SiPM detector uid as used in the optical map.
133
+ spm_detector
134
+ SiPM detector name as used in the optical map.
135
135
  map_scaling
136
136
  scale the detection probability in the map for this detector by this factor.
137
137
  map_scaling_sigma
@@ -151,7 +151,7 @@ def detected_photoelectrons(
151
151
 
152
152
  scint_mat_params = convolve._get_scint_params(material)
153
153
  pe = convolve.iterate_stepwise_depositions_pois(
154
- hits, optmap, scint_mat_params, spm_detector_uid, map_scaling, map_scaling_sigma
154
+ hits, optmap, scint_mat_params, spm_detector, map_scaling, map_scaling_sigma
155
155
  )
156
156
 
157
157
  return VectorOfVectors(pe, attrs={"units": "ns"})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reboost
3
- Version: 0.8.0
3
+ Version: 0.8.2
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
@@ -704,6 +704,7 @@ Requires-Dist: numba>=0.60
704
704
  Requires-Dist: legend-pydataobj>=1.15.1
705
705
  Requires-Dist: legend-pygeom-optics>=0.12.0
706
706
  Requires-Dist: legend-pygeom-tools>=0.0.11
707
+ Requires-Dist: legend-pygeom-hpges
707
708
  Requires-Dist: hist
708
709
  Requires-Dist: dbetto
709
710
  Requires-Dist: particle
@@ -6,6 +6,7 @@ numba>=0.60
6
6
  legend-pydataobj>=1.15.1
7
7
  legend-pygeom-optics>=0.12.0
8
8
  legend-pygeom-tools>=0.0.11
9
+ legend-pygeom-hpges
9
10
  hist
10
11
  dbetto
11
12
  particle
@@ -1,11 +1,11 @@
1
1
  objects:
2
- spms: "{'S001': 11, 'S002': 12}"
2
+ spms: "['S001', 'S002']"
3
3
 
4
4
  processing_groups:
5
5
  - name: spms
6
6
 
7
7
  detector_mapping:
8
- - output: OBJECTS.spms.keys()
8
+ - output: OBJECTS.spms
9
9
  input: det001
10
10
 
11
11
  outputs:
@@ -21,10 +21,10 @@ processing_groups:
21
21
  "lar")
22
22
 
23
23
  detector_objects:
24
- optmap_lar: reboost.spms.load_optmap(ARGS.optmap_path, OBJECTS.spms[DETECTOR])
24
+ optmap_lar: reboost.spms.load_optmap(ARGS.optmap_path, DETECTOR)
25
25
 
26
26
  operations:
27
27
  pe_times_lar:
28
28
  reboost.spms.detected_photoelectrons( HITS.num_scint_ph, HITS.particle,
29
29
  HITS.time, HITS.xloc, HITS.yloc, HITS.zloc, DETECTOR_OBJECTS.optmap_lar,
30
- "lar", OBJECTS.spms[DETECTOR] )
30
+ "lar", DETECTOR )
@@ -327,14 +327,12 @@ def test_spms(test_gen_lh5_scint, tmptestdir):
327
327
 
328
328
  # create a simple test map
329
329
  map_file = f"{tmptestdir}/spms_hit_map.lh5"
330
- m = OpticalMap.create_empty(
331
- "_11", {"range_in_m": [[-1, 1], [-1, 1], [-1, 1]], "bins": [1, 1, 1]}
332
- )
330
+ m = OpticalMap.create_empty("_", {"range_in_m": [[-1, 1], [-1, 1], [-1, 1]], "bins": [1, 1, 1]})
333
331
  m._nda(m.h_vertex)[0, 0, 0] = 100
334
332
  m._nda(m.h_hits)[0, 0, 0] = 10
335
333
  m.create_probability()
336
- m.write_lh5(map_file, "_11", "overwrite_file")
337
- m.write_lh5(map_file, "_12", "write_safe")
334
+ m.write_lh5(map_file, "channels/S001", "overwrite_file")
335
+ m.write_lh5(map_file, "channels/S002", "write_safe")
338
336
 
339
337
  outfile = f"{tmptestdir}/spms_hit.lh5"
340
338
  reboost.build_hit(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes