legend-daq2lh5 1.2.0a2__py3-none-any.whl → 1.2.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- daq2lh5/_version.py +2 -2
- daq2lh5/cli.py +1 -0
- daq2lh5/data_decoder.py +7 -5
- daq2lh5/data_streamer.py +1 -0
- daq2lh5/logging.py +1 -0
- daq2lh5/orca/orca_flashcam.py +12 -12
- daq2lh5/orca/orca_packet.py +1 -0
- daq2lh5/raw_buffer.py +1 -0
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/METADATA +6 -2
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/RECORD +14 -14
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/WHEEL +1 -1
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/LICENSE +0 -0
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/entry_points.txt +0 -0
- {legend_daq2lh5-1.2.0a2.dist-info → legend_daq2lh5-1.2.2.dist-info}/top_level.txt +0 -0
daq2lh5/_version.py
CHANGED
daq2lh5/cli.py
CHANGED
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
|
-
|
210
|
+
lgdotype = dtypeutils.datatype(datatype)
|
209
211
|
|
210
212
|
# ArrayOfEqualSizedArrays
|
211
|
-
if
|
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
|
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
|
-
|
238
|
+
lgdotype.__name__,
|
237
239
|
"for",
|
238
240
|
field,
|
239
241
|
)
|
daq2lh5/data_streamer.py
CHANGED
daq2lh5/logging.py
CHANGED
daq2lh5/orca/orca_flashcam.py
CHANGED
@@ -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
|
-
|
426
|
-
|
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
|
-
|
430
|
-
|
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
|
-
|
440
|
-
|
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
|
-
|
445
|
-
|
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[
|
daq2lh5/orca/orca_packet.py
CHANGED
daq2lh5/raw_buffer.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: legend_daq2lh5
|
3
|
-
Version: 1.2.
|
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.
|
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=
|
2
|
+
daq2lh5/_version.py,sha256=XEVwqOPlIChKtEnSO5v_SvghWXnn9WeQSoJ436w3v9Y,411
|
3
3
|
daq2lh5/build_raw.py,sha256=JFXC5ln9u353TUZMksY3zydLiV2HlxqdI6_Y2_ZMCIE,10524
|
4
|
-
daq2lh5/cli.py,sha256=
|
5
|
-
daq2lh5/data_decoder.py,sha256=
|
6
|
-
daq2lh5/data_streamer.py,sha256=
|
7
|
-
daq2lh5/logging.py,sha256=
|
8
|
-
daq2lh5/raw_buffer.py,sha256=
|
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=
|
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=
|
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.
|
32
|
-
legend_daq2lh5-1.2.
|
33
|
-
legend_daq2lh5-1.2.
|
34
|
-
legend_daq2lh5-1.2.
|
35
|
-
legend_daq2lh5-1.2.
|
36
|
-
legend_daq2lh5-1.2.
|
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,,
|
File without changes
|
File without changes
|
File without changes
|