legend-daq2lh5 1.2.0a2__py3-none-any.whl → 1.2.2__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.
daq2lh5/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.2.0a2'
16
- __version_tuple__ = version_tuple = (1, 2, 0)
15
+ __version__ = version = '1.2.2'
16
+ __version_tuple__ = version_tuple = (1, 2, 2)
daq2lh5/cli.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """legend-daq2lh5's command line interface utilities."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import argparse
daq2lh5/data_decoder.py CHANGED
@@ -1,12 +1,14 @@
1
1
  """
2
2
  Base classes for decoding data into raw LGDO Tables or files
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import lgdo
7
8
  import numpy as np
8
9
  from lgdo import LGDO
9
10
  from lgdo.lh5 import LH5Store
11
+ from lgdo.lh5 import datatype as dtypeutils
10
12
 
11
13
 
12
14
  class DataDecoder:
@@ -72,7 +74,7 @@ class DataDecoder:
72
74
  def __init__(
73
75
  self, garbage_length: int = 256, packet_size_guess: int = 1024
74
76
  ) -> None:
75
- self.garbage_table = lgdo.Table(garbage_length)
77
+ self.garbage_table = lgdo.Table(size=garbage_length)
76
78
  shape_guess = (garbage_length, packet_size_guess)
77
79
  self.garbage_table.add_field(
78
80
  "packets", lgdo.VectorOfVectors(shape_guess=shape_guess, dtype="uint8")
@@ -205,10 +207,10 @@ class DataDecoder:
205
207
  continue
206
208
 
207
209
  # Parse datatype for remaining lgdos
208
- datatype, shape, elements = lgdo.lh5.utils.parse_datatype(datatype)
210
+ lgdotype = dtypeutils.datatype(datatype)
209
211
 
210
212
  # ArrayOfEqualSizedArrays
211
- if datatype == "array_of_equalsized_arrays":
213
+ if lgdotype is lgdo.ArrayOfEqualSizedArrays:
212
214
  length = attrs.pop("length")
213
215
  # only arrays of 1D arrays are supported at present
214
216
  dims = (1, 1)
@@ -219,7 +221,7 @@ class DataDecoder:
219
221
  continue
220
222
 
221
223
  # VectorOfVectors
222
- if elements.startswith("array"):
224
+ if lgdotype is lgdo.VectorOfVectors:
223
225
  length_guess = size
224
226
  if "length_guess" in attrs:
225
227
  length_guess = attrs.pop("length_guess")
@@ -233,7 +235,7 @@ class DataDecoder:
233
235
  raise RuntimeError(
234
236
  type(self).__name__,
235
237
  ": do not know how to make a",
236
- datatype,
238
+ lgdotype.__name__,
237
239
  "for",
238
240
  field,
239
241
  )
daq2lh5/data_streamer.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """
2
2
  Base classes for streaming data.
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import fnmatch
daq2lh5/logging.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """This module implements some helpers for setting up logging."""
2
+
2
3
  import logging
3
4
 
4
5
  import colorlog
@@ -421,13 +421,13 @@ class ORFlashCamListenerStatusDecoder(OrcaDecoder):
421
421
  (fd0 + i_card) * 5 + j
422
422
  ] = packet[i_cd + 14 + j]
423
423
  for j in range(5):
424
- tbl["card_temps"].flattened_data.nda[
425
- (fd0 + i_card) * 5 + j
426
- ] = int_packet[i_cd + 19 + j]
424
+ tbl["card_temps"].flattened_data.nda[(fd0 + i_card) * 5 + j] = (
425
+ int_packet[i_cd + 19 + j]
426
+ )
427
427
  for j in range(6):
428
- tbl["card_voltages"].flattened_data.nda[
429
- (fd0 + i_card) * 6 + j
430
- ] = int_packet[i_cd + 24 + j]
428
+ tbl["card_voltages"].flattened_data.nda[(fd0 + i_card) * 6 + j] = (
429
+ int_packet[i_cd + 24 + j]
430
+ )
431
431
  tbl["card_main_current"].flattened_data.nda[fd0 + i_card] = int_packet[
432
432
  i_cd + 30
433
433
  ]
@@ -435,14 +435,14 @@ class ORFlashCamListenerStatusDecoder(OrcaDecoder):
435
435
  i_cd + 31
436
436
  ]
437
437
  for j in range(2):
438
- tbl["card_adc_temps"].flattened_data.nda[
439
- (fd0 + i_card) * 2 + j
440
- ] = int_packet[i_cd + 32 + j]
438
+ tbl["card_adc_temps"].flattened_data.nda[(fd0 + i_card) * 2 + j] = (
439
+ int_packet[i_cd + 32 + j]
440
+ )
441
441
  # packet[34] is empty / dummy
442
442
  for j in range(4):
443
- tbl["card_cti_links"].flattened_data.nda[
444
- (fd0 + i_card) * 4 + j
445
- ] = packet[i_cd + 35 + j]
443
+ tbl["card_cti_links"].flattened_data.nda[(fd0 + i_card) * 4 + j] = (
444
+ packet[i_cd + 35 + j]
445
+ )
446
446
  for j in range(256):
447
447
  value = packet[i_cd + 39 + j] if j < n_link_states else 0
448
448
  tbl["card_link_states"].flattened_data.nda[
@@ -4,6 +4,7 @@ Provides convenience functions for working with ORCA packets.
4
4
  An ORCA packet is represented by a one-dimensional :class:`numpy.ndarray` of
5
5
  type :class:`numpy.uint32`.
6
6
  """
7
+
7
8
  from __future__ import annotations
8
9
 
9
10
  import logging
daq2lh5/raw_buffer.py CHANGED
@@ -62,6 +62,7 @@ keys.
62
62
  }
63
63
  }
64
64
  """
65
+
65
66
  from __future__ import annotations
66
67
 
67
68
  import os
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: legend_daq2lh5
3
- Version: 1.2.0a2
3
+ Version: 1.2.2
4
4
  Summary: Convert digitizer data to LH5
5
5
  Home-page: https://github.com/legend-exp/legend-daq2lh5
6
6
  Author: Jason Detwiler
@@ -29,7 +29,7 @@ License-File: LICENSE
29
29
  Requires-Dist: dspeed >=1.3.0a4
30
30
  Requires-Dist: h5py >=3.2.0
31
31
  Requires-Dist: hdf5plugin
32
- Requires-Dist: legend-pydataobj >=1.5.0a1
32
+ Requires-Dist: legend-pydataobj >=1.6
33
33
  Requires-Dist: numpy >=1.21
34
34
  Requires-Dist: pyfcutils
35
35
  Requires-Dist: tqdm >=4.27
@@ -60,6 +60,7 @@ Requires-Dist: pytest-cov ; extra == 'test'
60
60
  ![GitHub pull requests](https://img.shields.io/github/issues-pr/legend-exp/legend-daq2lh5?logo=github)
61
61
  ![License](https://img.shields.io/github/license/legend-exp/legend-daq2lh5)
62
62
  [![Read the Docs](https://img.shields.io/readthedocs/legend-daq2lh5?logo=readthedocs)](https://legend-daq2lh5.readthedocs.io)
63
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10721223.svg)](https://doi.org/10.5281/zenodo.10721223)
63
64
 
64
65
  JSON-configurable conversion of digitized data into
65
66
  [LEGEND HDF5](https://legend-exp.github.io/legend-data-format-specs/dev/hdf5/),
@@ -73,3 +74,6 @@ Currently supported DAQ data formats:
73
74
  - FlashCam
74
75
  - [Struck SIS3302](https://www.struck.de/sis3302.htm)
75
76
  - [Struck SIS3316](https://www.struck.de/sis3316.html)
77
+
78
+ If you are using this software, consider
79
+ [citing](https://doi.org/10.5281/zenodo.10721223)!
@@ -1,11 +1,11 @@
1
1
  daq2lh5/__init__.py,sha256=VPmwKuZSA0icpce05ojhnsKWhR4_QUgD0oVXUoN9wks,975
2
- daq2lh5/_version.py,sha256=QdieYxCxCPnvnGJZjmRZ-Yg8ihwA80GE9XsqfSLR8Q0,413
2
+ daq2lh5/_version.py,sha256=XEVwqOPlIChKtEnSO5v_SvghWXnn9WeQSoJ436w3v9Y,411
3
3
  daq2lh5/build_raw.py,sha256=JFXC5ln9u353TUZMksY3zydLiV2HlxqdI6_Y2_ZMCIE,10524
4
- daq2lh5/cli.py,sha256=HCZ9Vyg-gqvairN9zJIpBjw5vLpp9ZUOOQYLFxloLL8,2912
5
- daq2lh5/data_decoder.py,sha256=ka2WIJuPvsG892__HCW1SagCEzyiZJ2kQP6zGDMtlr0,10641
6
- daq2lh5/data_streamer.py,sha256=6SEAekOHyfC4k3E0df0lW37ap6ZemVFbH8PYMl6UvCU,14130
7
- daq2lh5/logging.py,sha256=Nu3wgIoWN7cyUxuzPom5rMwFvTlBu8p8d9uONHDquRg,965
8
- daq2lh5/raw_buffer.py,sha256=dyPUok0N3MP41oP9F8sO_PrH7-SWs9UdPh7dqCF729g,17687
4
+ daq2lh5/cli.py,sha256=7bPfH1XbyAS48wZn_0unj4Y5MD5kF7V34Q5srn4jKVM,2913
5
+ daq2lh5/data_decoder.py,sha256=Cn40fodfKs7pKa2odzG1j806iw9IyQVfbbWObNGmof8,10677
6
+ daq2lh5/data_streamer.py,sha256=uv_pCFR45Yoi8GK7p_MYqGk_lzWspeg8cWZensCDqAQ,14131
7
+ daq2lh5/logging.py,sha256=_1gq0S1PyzfQsSTiNm--ERJy-4FRfborTz0-vkMelyE,966
8
+ daq2lh5/raw_buffer.py,sha256=2jJvH7BbVkJCzF5A2nOIdcgwUs68eLnpvc0FvTjckaI,17688
9
9
  daq2lh5/buffer_processor/__init__.py,sha256=7k6v_KPximtv7805QnX4-xp_S3vqvqwDfdV3q95oZJo,84
10
10
  daq2lh5/buffer_processor/buffer_processor.py,sha256=GUxpNDbqGLuUEZmXjeratipbzmki12RFNYZkxgMtesg,14483
11
11
  daq2lh5/buffer_processor/lh5_buffer_processor.py,sha256=yL1ru0_GTsZx099oi45sXL-FxPfdChtStd_IFtZNI_Q,8222
@@ -22,15 +22,15 @@ daq2lh5/fc/fc_streamer.py,sha256=S0imXdVsiyolPvxI1uiBngpC58DporSNZPqx1HeVi5o,573
22
22
  daq2lh5/orca/__init__.py,sha256=Xf6uOIOzk_QkKH_7VizGlCo3iuiAgLtUE3A07x_HXC0,175
23
23
  daq2lh5/orca/orca_base.py,sha256=-XIolXsHj-1EdewaGxyvJTZvRGZsDyZe-5PzVOd-LFY,1333
24
24
  daq2lh5/orca/orca_digitizers.py,sha256=BsAA3OgQ13YIirDM8pd_xDY3F5FqEY4YjSHviflmov8,20867
25
- daq2lh5/orca/orca_flashcam.py,sha256=gsvPorUXk1Jn-U93GsxXJ5z6pbTK2yjsYDqZFVCm57U,33088
25
+ daq2lh5/orca/orca_flashcam.py,sha256=IntAxrPZEL64LnulnoKkMO7URLOB78DpzjD1_u6PlaE,33096
26
26
  daq2lh5/orca/orca_header.py,sha256=1tDRG8l9Gqu4c0K4BjXBSC5eiLTzY_HaCsgNBiv5EgI,4283
27
27
  daq2lh5/orca/orca_header_decoder.py,sha256=ORIIyfx22ybyKc-uyWy5ER49-dl3BGpHdfV8OCDmjIw,1632
28
- daq2lh5/orca/orca_packet.py,sha256=TcdfuYN8_gcug_Xdjz98KqjHw1MqJ4J98zc7WI2xtf4,2488
28
+ daq2lh5/orca/orca_packet.py,sha256=nOHuBXsTI1SzTjHZtff0txSQYvkwo4XGx3fpk7XfYj8,2489
29
29
  daq2lh5/orca/orca_run_decoder.py,sha256=3atKXC6mDi8_PK6ICUBBJ-LyaTM8OU31kKWIpmttRr4,2065
30
30
  daq2lh5/orca/orca_streamer.py,sha256=VbD9PF-rx_Rk-rEy7XECPmgxr6kZSUf0tC7Qbol3Qeg,15693
31
- legend_daq2lh5-1.2.0a2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
32
- legend_daq2lh5-1.2.0a2.dist-info/METADATA,sha256=PNlMNfJ4N9zdp9WwOjwQw-pTPftK7wD_CYCOdxUsBTY,3755
33
- legend_daq2lh5-1.2.0a2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
34
- legend_daq2lh5-1.2.0a2.dist-info/entry_points.txt,sha256=R08R4NrHi0ab5MJN_qKqzePVzrLSsw5WpmbiwwduYjw,59
35
- legend_daq2lh5-1.2.0a2.dist-info/top_level.txt,sha256=MJQVLyLqMgMKBdVfNXFaCKCjHKakAs19VLbC9ctXZ7A,8
36
- legend_daq2lh5-1.2.0a2.dist-info/RECORD,,
31
+ legend_daq2lh5-1.2.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
32
+ legend_daq2lh5-1.2.2.dist-info/METADATA,sha256=3fISxtb-PvR-D2YG03ZuQYi95ORmLDCPk0w2f0e-wDc,3950
33
+ legend_daq2lh5-1.2.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
34
+ legend_daq2lh5-1.2.2.dist-info/entry_points.txt,sha256=R08R4NrHi0ab5MJN_qKqzePVzrLSsw5WpmbiwwduYjw,59
35
+ legend_daq2lh5-1.2.2.dist-info/top_level.txt,sha256=MJQVLyLqMgMKBdVfNXFaCKCjHKakAs19VLbC9ctXZ7A,8
36
+ legend_daq2lh5-1.2.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5