pygama 2.3.8.dev2__tar.gz → 2.3.10__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.
- {pygama-2.3.8.dev2/src/pygama.egg-info → pygama-2.3.10}/PKG-INFO +3 -2
- {pygama-2.3.8.dev2 → pygama-2.3.10}/pyproject.toml +3 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/_version.py +3 -3
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/aggregators.py +2 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/build_evt.py +10 -3
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/build_tcm.py +2 -2
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/geds.py +2 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/spms.py +2 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/xtalk.py +4 -3
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/utils.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/flow/data_loader.py +5 -3
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/flow/file_db.py +4 -4
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/hit/build_hit.py +6 -3
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/AoE_cal.py +330 -111
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/data_cleaning.py +2 -2
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/dplms_ge_dict.py +11 -42
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/survival_fractions.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/utils.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10/src/pygama.egg-info}/PKG-INFO +3 -2
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/requires.txt +2 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/test_build_evt.py +30 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/test_build_tcm.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/test_xtalk.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/test_filedb.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/hit/test_build_hit.py +28 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_aoecal.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_datacleaning.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_dsp_optimize.py +2 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_ecal.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_lqcal.py +1 -1
- {pygama-2.3.8.dev2 → pygama-2.3.10}/LICENSE +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/README.md +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/setup.cfg +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/cli.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/larveto.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/modules/legend.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/evt/tcm.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/flow/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/flow/utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/hit/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/logging.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/binned_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/distributions.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/crystal_ball.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/error_function.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/exgauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/exponential.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss_on_exgauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss_on_exponential.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss_on_linear.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss_on_step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/gauss_on_uniform.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/hpge_peak.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/linear.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/moyal.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/poisson.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/polynomial.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/pygama_continuous.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/sum_dists.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/triple_gauss_on_double_step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/functions/uniform.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/histogram.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/hpge_peak_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/least_squares.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/unbinned_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/units.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/math/utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/__init__.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/dsp_optimize.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/energy_cal.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/energy_optimisation.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/lq_cal.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/noise_optimization.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/pargen/pz_correct.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama/utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/SOURCES.txt +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/dependency_links.txt +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/entry_points.txt +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/not-zip-safe +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/src/pygama.egg-info/top_level.txt +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/configs/icpc-dsp-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/configs/sipm-dplms-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/configs/sipm-dsp-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/conftest.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/configs/basic-evt-config.yaml +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/configs/query-test-evt-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/configs/spms-module-config.yaml +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/configs/spms-p13-config.yaml +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/configs/vov-test-evt-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/modules/larveto.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/test_evt_utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/evt/test_geds.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/configs/config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/configs/data-loader-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/configs/filedb-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/configs/nested/config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/configs/nested/data-loader-config-nested.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/conftest.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/test_data_loader.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/flow/test_flow_utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/hit/configs/aggregations-hit-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/hit/configs/basic-hit-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/hit/configs/hit-multi-config.json +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_crystal_ball.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_error_function.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_exgauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_exponential.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss_on_exgauss.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss_on_exponential.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss_on_linear.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss_on_step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_gauss_on_uniform.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_hpge_peak.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_linear.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_moyal.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_numba_frozen.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_poisson.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_polynomial.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_sum_dists.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_triple_gauss_on_double_step.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/functions/test_uniform.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_binned_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_distribution_selector_in_sum_dists.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_hpge_peak_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_iminuit_integration.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_least_squares.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_math_histogram.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_math_utils.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/math/test_unbinned_fitting.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_energy_optimization.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/pargen/test_pz_correct.py +0 -0
- {pygama-2.3.8.dev2 → pygama-2.3.10}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pygama
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.10
|
|
4
4
|
Summary: Python package for data processing and analysis
|
|
5
5
|
Author: The LEGEND collaboration
|
|
6
6
|
Maintainer: The LEGEND collaboration
|
|
@@ -28,7 +28,8 @@ Requires-Dist: dbetto
|
|
|
28
28
|
Requires-Dist: dspeed>=2.0
|
|
29
29
|
Requires-Dist: h5py>=3.2
|
|
30
30
|
Requires-Dist: iminuit
|
|
31
|
-
Requires-Dist: legend-pydataobj>=
|
|
31
|
+
Requires-Dist: legend-pydataobj>=2
|
|
32
|
+
Requires-Dist: legend-lh5io>=0.2.3
|
|
32
33
|
Requires-Dist: pylegendmeta>=0.9
|
|
33
34
|
Requires-Dist: matplotlib
|
|
34
35
|
Requires-Dist: numba!=0.53.*,!=0.54.*,!=0.57
|
|
@@ -36,7 +36,8 @@ dependencies = [
|
|
|
36
36
|
"dspeed >=2.0",
|
|
37
37
|
"h5py >=3.2",
|
|
38
38
|
"iminuit",
|
|
39
|
-
"legend-pydataobj >=
|
|
39
|
+
"legend-pydataobj >=2",
|
|
40
|
+
"legend-lh5io >=0.2.3",
|
|
40
41
|
"pylegendmeta >=0.9",
|
|
41
42
|
"matplotlib",
|
|
42
43
|
"numba !=0.53.*,!=0.54.*,!=0.57",
|
|
@@ -121,6 +122,7 @@ ignore-words-list = "hist, gaus, nd, ans, crate, nin, puls, spms, fom, FOM"
|
|
|
121
122
|
minversion = "6.0"
|
|
122
123
|
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
|
|
123
124
|
xfail_strict = true
|
|
125
|
+
filterwarnings = "error"
|
|
124
126
|
log_cli_level = "INFO"
|
|
125
127
|
testpaths = "tests"
|
|
126
128
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 3,
|
|
21
|
+
__version__ = version = '2.3.10'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 3, 10)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g18d920898'
|
|
@@ -5,9 +5,10 @@ This module provides aggregators to build the `evt` tier.
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
import awkward as ak
|
|
8
|
+
import lh5
|
|
8
9
|
import numpy as np
|
|
9
10
|
import pandas as pd
|
|
10
|
-
from lgdo import
|
|
11
|
+
from lgdo import types
|
|
11
12
|
|
|
12
13
|
from . import utils
|
|
13
14
|
|
|
@@ -13,8 +13,9 @@ from pathlib import Path
|
|
|
13
13
|
from typing import Any
|
|
14
14
|
|
|
15
15
|
import awkward as ak
|
|
16
|
+
import lh5
|
|
16
17
|
import numpy as np
|
|
17
|
-
from lgdo import Array, ArrayOfEqualSizedArrays, Table, VectorOfVectors
|
|
18
|
+
from lgdo import Array, ArrayOfEqualSizedArrays, Table, VectorOfVectors
|
|
18
19
|
|
|
19
20
|
from ..utils import load_dict
|
|
20
21
|
from . import aggregators, utils
|
|
@@ -130,7 +131,7 @@ def build_evt(
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
wo_mode
|
|
133
|
-
writing mode, see :func:`
|
|
134
|
+
writing mode, see :func:`lh5.io.core.write`.
|
|
134
135
|
"""
|
|
135
136
|
if not isinstance(config, dict):
|
|
136
137
|
config = load_dict(config)
|
|
@@ -252,7 +253,7 @@ def build_evt_cols(
|
|
|
252
253
|
channels
|
|
253
254
|
list of channels to be used in the event table.
|
|
254
255
|
wo_mode
|
|
255
|
-
writing mode, see :func:`
|
|
256
|
+
writing mode, see :func:`lh5.io.core.write`.
|
|
256
257
|
buffer_len
|
|
257
258
|
number of rows to be processed at once.
|
|
258
259
|
channel_mapping
|
|
@@ -308,6 +309,9 @@ def build_evt_cols(
|
|
|
308
309
|
if "lgdo_attrs" in v:
|
|
309
310
|
obj.attrs |= v["lgdo_attrs"]
|
|
310
311
|
|
|
312
|
+
if "description" in v:
|
|
313
|
+
obj.attrs["description"] = v["description"]
|
|
314
|
+
|
|
311
315
|
# else we build the event entry
|
|
312
316
|
else:
|
|
313
317
|
if "channels" not in v:
|
|
@@ -357,6 +361,9 @@ def build_evt_cols(
|
|
|
357
361
|
if "lgdo_attrs" in v:
|
|
358
362
|
obj.attrs |= v["lgdo_attrs"]
|
|
359
363
|
|
|
364
|
+
if "description" in v:
|
|
365
|
+
obj.attrs["description"] = v["description"]
|
|
366
|
+
|
|
360
367
|
# cast to type, if required
|
|
361
368
|
# hijack the poor LGDO
|
|
362
369
|
if "dtype" in v:
|
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
|
|
7
7
|
import awkward as ak
|
|
8
8
|
import lgdo
|
|
9
|
-
|
|
9
|
+
import lh5
|
|
10
10
|
from lgdo.types import Struct, Table, VectorOfVectors
|
|
11
11
|
|
|
12
12
|
from . import tcm as ptcm
|
|
@@ -85,7 +85,7 @@ def build_tcm(
|
|
|
85
85
|
out_name
|
|
86
86
|
name for the TCM table in the output file.
|
|
87
87
|
wo_mode
|
|
88
|
-
mode to send to :meth
|
|
88
|
+
mode to send to :meth:`~lh5.io.store.LH5Store.write`.
|
|
89
89
|
|
|
90
90
|
out_fields
|
|
91
91
|
Optional additional fields to propagate from the input tables into the
|
|
@@ -5,9 +5,10 @@ Module for cross talk correction of energies.
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
import awkward as ak
|
|
8
|
+
import lh5
|
|
8
9
|
import numpy as np
|
|
9
10
|
from dbetto import Props
|
|
10
|
-
from lgdo import
|
|
11
|
+
from lgdo import types
|
|
11
12
|
from numpy.typing import ArrayLike
|
|
12
13
|
|
|
13
14
|
from pygama.hit.build_hit import _remove_uneeded_operations, _reorder_table_operations
|
|
@@ -102,7 +103,7 @@ def gather_energy(
|
|
|
102
103
|
# read the energy data
|
|
103
104
|
data = lh5.read(f"ch{channel}/{group}/{column}", file, idx=tbl_idxs_ch)
|
|
104
105
|
tbl.add_column(name, data)
|
|
105
|
-
except (lh5.exceptions.LH5DecodeError, KeyError):
|
|
106
|
+
except (lh5.io.exceptions.LH5DecodeError, KeyError):
|
|
106
107
|
tbl.add_column(name, types.Array(np.full_like(evt_ids_ch, np.nan)))
|
|
107
108
|
|
|
108
109
|
res = tbl.eval(observable)
|
|
@@ -169,7 +170,7 @@ def filter_hits(
|
|
|
169
170
|
data = lh5.read(f"ch{channel}/{group}/{column}", file, idx=tbl_idxs_ch)
|
|
170
171
|
|
|
171
172
|
tbl.add_column(name, data)
|
|
172
|
-
except (lh5.exceptions.LH5DecodeError, KeyError):
|
|
173
|
+
except (lh5.io.exceptions.LH5DecodeError, KeyError):
|
|
173
174
|
tbl.add_column(name, types.Array(np.full_like(evt_ids_ch, np.nan)))
|
|
174
175
|
|
|
175
176
|
# add the corrected energy to the table
|
|
@@ -11,13 +11,13 @@ from itertools import product
|
|
|
11
11
|
from keyword import iskeyword
|
|
12
12
|
from typing import Iterator
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import lh5
|
|
15
15
|
import numpy as np
|
|
16
16
|
import pandas as pd
|
|
17
17
|
from awkward_pandas import AwkwardDtype
|
|
18
18
|
from dspeed.vis import WaveformBrowser
|
|
19
|
-
from
|
|
20
|
-
from
|
|
19
|
+
from lh5 import LH5Iterator
|
|
20
|
+
from lh5.io.utils import expand_vars
|
|
21
21
|
from lgdo.types import Array, Struct, Table
|
|
22
22
|
from lgdo.types.vovutils import build_cl, explode_arrays
|
|
23
23
|
from tqdm.auto import tqdm
|
|
@@ -1420,6 +1420,7 @@ class DataLoader:
|
|
|
1420
1420
|
field_mask=field_mask,
|
|
1421
1421
|
buffer_len=buffer_len,
|
|
1422
1422
|
friend=lh5_it,
|
|
1423
|
+
safe_mode=False,
|
|
1423
1424
|
)
|
|
1424
1425
|
|
|
1425
1426
|
return lh5_it
|
|
@@ -1516,6 +1517,7 @@ class DataLoader:
|
|
|
1516
1517
|
buffer_len=buffer_len,
|
|
1517
1518
|
field_mask={"tracelist": False},
|
|
1518
1519
|
friend=lh5_it,
|
|
1520
|
+
safe_mode=False,
|
|
1519
1521
|
)
|
|
1520
1522
|
|
|
1521
1523
|
return WaveformBrowser(lh5_it, buffer_len=buffer_len, **kwargs)
|
|
@@ -10,11 +10,11 @@ import string
|
|
|
10
10
|
import warnings
|
|
11
11
|
|
|
12
12
|
import h5py
|
|
13
|
-
import
|
|
13
|
+
import lh5
|
|
14
14
|
import numpy as np
|
|
15
15
|
import pandas as pd
|
|
16
|
-
from
|
|
17
|
-
from
|
|
16
|
+
from lh5 import ls
|
|
17
|
+
from lh5.io.utils import expand_path, expand_vars
|
|
18
18
|
from lgdo.types import Array, Scalar, VectorOfVectors
|
|
19
19
|
from parse import parse
|
|
20
20
|
|
|
@@ -600,7 +600,7 @@ class FileDB:
|
|
|
600
600
|
filename
|
|
601
601
|
output LH5 file name.
|
|
602
602
|
wo_mode
|
|
603
|
-
passed to :
|
|
603
|
+
passed to :func:`~lh5.io.core.write`.
|
|
604
604
|
"""
|
|
605
605
|
log.debug(f"writing database to {filename}")
|
|
606
606
|
|
|
@@ -10,9 +10,9 @@ from collections.abc import Iterable, Mapping
|
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
|
|
12
12
|
import lgdo
|
|
13
|
+
import lh5
|
|
13
14
|
import numpy as np
|
|
14
|
-
from
|
|
15
|
-
from lgdo.lh5 import LH5Iterator, ls
|
|
15
|
+
from lh5 import LH5Iterator, ls
|
|
16
16
|
|
|
17
17
|
from .. import utils
|
|
18
18
|
|
|
@@ -76,7 +76,7 @@ def build_hit(
|
|
|
76
76
|
n_max
|
|
77
77
|
maximum number of rows to process
|
|
78
78
|
wo_mode
|
|
79
|
-
forwarded to :
|
|
79
|
+
forwarded to :func:`lh5.io.core.write`.
|
|
80
80
|
|
|
81
81
|
See Also
|
|
82
82
|
--------
|
|
@@ -156,6 +156,9 @@ def build_hit(
|
|
|
156
156
|
if "lgdo_attrs" in info:
|
|
157
157
|
outcol.attrs |= info["lgdo_attrs"]
|
|
158
158
|
|
|
159
|
+
if "description" in info:
|
|
160
|
+
outcol.attrs["description"] = info["description"]
|
|
161
|
+
|
|
159
162
|
log.debug("made new column %r=%r", outname, outcol)
|
|
160
163
|
outtbl_obj.add_column(outname, outcol)
|
|
161
164
|
|