reboost 0.10.0a1__tar.gz → 0.10.0a2__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 (83) hide show
  1. {reboost-0.10.0a1/src/reboost.egg-info → reboost-0.10.0a2}/PKG-INFO +1 -1
  2. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/_version.py +3 -3
  3. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/build_hit.py +2 -0
  4. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/core.py +2 -5
  5. {reboost-0.10.0a1 → reboost-0.10.0a2/src/reboost.egg-info}/PKG-INFO +1 -1
  6. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/basic.yaml +5 -0
  7. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/test_build_hit.py +11 -2
  8. {reboost-0.10.0a1 → reboost-0.10.0a2}/LICENSE +0 -0
  9. {reboost-0.10.0a1 → reboost-0.10.0a2}/README.md +0 -0
  10. {reboost-0.10.0a1 → reboost-0.10.0a2}/pyproject.toml +0 -0
  11. {reboost-0.10.0a1 → reboost-0.10.0a2}/setup.cfg +0 -0
  12. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/__init__.py +0 -0
  13. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/__main__.py +0 -0
  14. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/build_evt.py +0 -0
  15. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/build_glm.py +0 -0
  16. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/cli.py +0 -0
  17. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/daq/__init__.py +0 -0
  18. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/daq/core.py +0 -0
  19. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/daq/utils.py +0 -0
  20. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/hpge/__init__.py +0 -0
  21. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/hpge/psd.py +0 -0
  22. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/hpge/surface.py +0 -0
  23. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/hpge/utils.py +0 -0
  24. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/iterator.py +0 -0
  25. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/log_utils.py +0 -0
  26. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/math/__init__.py +0 -0
  27. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/math/functions.py +0 -0
  28. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/math/stats.py +0 -0
  29. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/__init__.py +0 -0
  30. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/__main__.py +0 -0
  31. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/cli.py +0 -0
  32. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/convolve.py +0 -0
  33. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/create.py +0 -0
  34. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/evt.py +0 -0
  35. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/mapview.py +0 -0
  36. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/numba_pdg.py +0 -0
  37. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/optmap/optmap.py +0 -0
  38. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/profile.py +0 -0
  39. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/shape/__init__.py +0 -0
  40. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/shape/cluster.py +0 -0
  41. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/shape/group.py +0 -0
  42. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/shape/reduction.py +0 -0
  43. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/spms/__init__.py +0 -0
  44. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/spms/pe.py +0 -0
  45. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/units.py +0 -0
  46. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost/utils.py +0 -0
  47. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/SOURCES.txt +0 -0
  48. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/dependency_links.txt +0 -0
  49. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/entry_points.txt +0 -0
  50. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/not-zip-safe +0 -0
  51. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/requires.txt +0 -0
  52. {reboost-0.10.0a1 → reboost-0.10.0a2}/src/reboost.egg-info/top_level.txt +0 -0
  53. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/conftest.py +0 -0
  54. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/evt/test_evt.py +0 -0
  55. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/glm/test_build_glm.py +0 -0
  56. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/args.yaml +0 -0
  57. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/foward_only.yaml +0 -0
  58. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/geom.gdml +0 -0
  59. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/hit_config.yaml +0 -0
  60. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/pars.yaml +0 -0
  61. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/reshape.yaml +0 -0
  62. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hit/configs/spms.yaml +0 -0
  63. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/simulation/gammas.mac +0 -0
  64. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/simulation/geometry.gdml +0 -0
  65. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/simulation/make_dt_map.jl +0 -0
  66. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/simulation/make_geom.py +0 -0
  67. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_current.py +0 -0
  68. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_dt_heuristic.py +0 -0
  69. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_files/drift_time_maps.lh5 +0 -0
  70. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_files/internal_electron.lh5 +0 -0
  71. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_hpge_map.py +0 -0
  72. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_r90.py +0 -0
  73. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/hpge/test_surface.py +0 -0
  74. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/spms/test_pe.py +0 -0
  75. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_cli.py +0 -0
  76. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_core.py +0 -0
  77. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_math.py +0 -0
  78. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_optmap.py +0 -0
  79. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_optmap_dets.gdml +0 -0
  80. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_profile.py +0 -0
  81. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_shape.py +0 -0
  82. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_units.py +0 -0
  83. {reboost-0.10.0a1 → reboost-0.10.0a2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reboost
3
- Version: 0.10.0a1
3
+ Version: 0.10.0a2
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 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.10.0a1'
32
- __version_tuple__ = version_tuple = (0, 10, 0, 'a1')
31
+ __version__ = version = '0.10.0a2'
32
+ __version_tuple__ = version_tuple = (0, 10, 0, 'a2')
33
33
 
34
- __commit_id__ = commit_id = 'g6793c98a5'
34
+ __commit_id__ = commit_id = 'g8f2cabc6a'
@@ -452,6 +452,8 @@ def _evaluate_operation(
452
452
  time_dict=time_dict,
453
453
  name=field,
454
454
  )
455
+ if not isinstance(info, str) and "units" in info:
456
+ col = units.attach_units(col, info["units"])
455
457
  units.move_units_to_flattened_data(col)
456
458
 
457
459
  core.add_field_with_nesting(hit_table, field, col)
@@ -538,8 +538,5 @@ def remove_columns(tab: Table, outputs: list) -> Table:
538
538
 
539
539
  def merge(hit_table: Table, output_table: ak.Array | None):
540
540
  """Merge the table with the array."""
541
- return (
542
- hit_table.view_as("ak")
543
- if output_table is None
544
- else ak.concatenate((output_table, hit_table.view_as("ak")))
545
- )
541
+ hit_table = hit_table.view_as("ak", with_units=True)
542
+ return hit_table if output_table is None else ak.concatenate((output_table, hit_table))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reboost
3
- Version: 0.10.0a1
3
+ Version: 0.10.0a2
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
@@ -6,11 +6,16 @@ processing_groups:
6
6
 
7
7
  outputs:
8
8
  - t0
9
+ - t0_u
9
10
  - evtid
10
11
  - energy
12
+ - xloc
11
13
 
12
14
  operations:
13
15
  t0: ak.fill_none(ak.firsts(HITS.time, axis=-1), np.nan)
16
+ t0_u:
17
+ expression: ak.fill_none(ak.firsts(HITS.time, axis=-1), np.nan)
18
+ units: ns
14
19
  energy: ak.sum(HITS.edep, axis=-1)
15
20
 
16
21
  forward:
@@ -194,15 +194,20 @@ def test_basic(test_gen_lh5, tmptestdir):
194
194
  == b"Zstandard compression: http://www.zstd.net"
195
195
  )
196
196
 
197
- hits = lh5.read("hit/det1", outfile).view_as("ak")
197
+ hits = lh5.read("hit/det1", outfile).view_as("ak", with_units=True)
198
198
 
199
199
  assert ak.all(hits.energy == [300, 330])
200
200
  assert ak.all(hits.t0 == [0, 0.1])
201
+
201
202
  assert hits.evtid[0] == 0
202
203
  assert hits.evtid[1] == 1
203
204
 
204
205
  assert len(hits) == 2
205
206
 
207
+ assert ak.parameters(hits.t0) == {}
208
+ assert ak.parameters(hits.t0_u)["units"] == "ns"
209
+ assert ak.parameters(hits.xloc)["units"] == "m"
210
+
206
211
  # test in memory
207
212
 
208
213
  hits, time_dict = reboost.build_hit(
@@ -218,6 +223,10 @@ def test_basic(test_gen_lh5, tmptestdir):
218
223
  assert ak.all(hits["det1"].evtid[0] == [0, 0])
219
224
  assert ak.all(hits["det1"].evtid[1] == [1, 1, 1])
220
225
 
226
+ assert ak.parameters(hits["det1"].t0) == {}
227
+ assert ak.parameters(hits["det1"].t0_u)["units"] == "ns"
228
+ assert ak.parameters(hits["det1"].xloc)["units"] == "m"
229
+
221
230
  assert set(time_dict.keys()) == {"global_objects", "geds"}
222
231
  assert set(time_dict["geds"].keys()) == {
223
232
  "detector_objects",
@@ -226,7 +235,7 @@ def test_basic(test_gen_lh5, tmptestdir):
226
235
  "expressions",
227
236
  }
228
237
  assert set(time_dict["geds"]["read"].keys()) == {"stp"}
229
- assert set(time_dict["geds"]["expressions"].keys()) == {"t0", "energy"}
238
+ assert set(time_dict["geds"]["expressions"].keys()) == {"t0", "t0_u", "energy"}
230
239
 
231
240
 
232
241
  def test_file_merging(test_gen_lh5, tmptestdir):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes