legend-dataflow-scripts 0.3.0a4__tar.gz → 0.3.0a5__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.
- {legend_dataflow_scripts-0.3.0a4/src/legend_dataflow_scripts.egg-info → legend_dataflow_scripts-0.3.0a5}/PKG-INFO +1 -1
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5/src/legend_dataflow_scripts.egg-info}/PKG-INFO +1 -1
- legend_dataflow_scripts-0.3.0a5/src/legenddataflowscripts/_version.py +24 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/hit/aoe.py +12 -1
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/log.py +27 -28
- legend_dataflow_scripts-0.3.0a4/src/legenddataflowscripts/_version.py +0 -34
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/LICENSE +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/README.md +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/pyproject.toml +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/setup.cfg +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/SOURCES.txt +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/dependency_links.txt +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/entry_points.txt +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/not-zip-safe +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/requires.txt +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legend_dataflow_scripts.egg-info/top_level.txt +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/dplms.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/eopt.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/evtsel.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/nopt.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/pz.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/svm.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/dsp/svm_build.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/hit/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/hit/ecal.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/hit/lq.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/par/geds/hit/qc.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/tier/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/tier/dsp.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/tier/hit.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/alias_table.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/cfgtools.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/convert_np.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/plot_dict.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/utils/pulser_removal.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/workflow/__init__.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/workflow/execenv.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/workflow/filedb.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/workflow/pre_compile_catalog.py +0 -0
- {legend_dataflow_scripts-0.3.0a4 → legend_dataflow_scripts-0.3.0a5}/src/legenddataflowscripts/workflow/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: legend-dataflow-scripts
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0a5
|
|
4
4
|
Summary: Python package for the processing scripts for LEGEND-200 data
|
|
5
5
|
Author-email: George Marshall <ggmarsh@uw.edu>, Luigi Pertoldi <gipert@pm.me>
|
|
6
6
|
Maintainer: The LEGEND Collaboration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: legend-dataflow-scripts
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0a5
|
|
4
4
|
Summary: Python package for the processing scripts for LEGEND-200 data
|
|
5
5
|
Author-email: George Marshall <ggmarsh@uw.edu>, Luigi Pertoldi <gipert@pm.me>
|
|
6
6
|
Maintainer: The LEGEND Collaboration
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.3.0a5'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 0, 'a5')
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'g2f2cce849'
|
|
@@ -56,6 +56,7 @@ def run_aoe_calibration(
|
|
|
56
56
|
plot_dicts,
|
|
57
57
|
config,
|
|
58
58
|
debug_mode=False,
|
|
59
|
+
override_dict=None,
|
|
59
60
|
):
|
|
60
61
|
if isinstance(config, str | list):
|
|
61
62
|
config = Props.read_from(config)
|
|
@@ -136,7 +137,7 @@ def run_aoe_calibration(
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
)
|
|
139
|
-
aoe.calibrate(data, "AoE_Uncorr")
|
|
140
|
+
aoe.calibrate(data, "AoE_Uncorr", override_dict=override_dict)
|
|
140
141
|
|
|
141
142
|
msg = f"A/E calibration completed in {time.time() - start:.2f} seconds"
|
|
142
143
|
log.info(msg)
|
|
@@ -213,6 +214,11 @@ def par_geds_hit_aoe() -> None:
|
|
|
213
214
|
|
|
214
215
|
argparser.add_argument("--table-name", help="table name", type=str, required=True)
|
|
215
216
|
|
|
217
|
+
argparser.add_argument("--detector", help="detector name", type=str)
|
|
218
|
+
argparser.add_argument(
|
|
219
|
+
"--override-files", help="override files", nargs="*", type=str
|
|
220
|
+
)
|
|
221
|
+
|
|
216
222
|
argparser.add_argument("--plot-file", help="plot_file", type=str, required=False)
|
|
217
223
|
argparser.add_argument("--hit-pars", help="hit_pars", type=str)
|
|
218
224
|
argparser.add_argument("--aoe-results", help="aoe_results", type=str)
|
|
@@ -288,6 +294,10 @@ def par_geds_hit_aoe() -> None:
|
|
|
288
294
|
|
|
289
295
|
data["run_timestamp"] = args.timestamp
|
|
290
296
|
|
|
297
|
+
if args.override.files:
|
|
298
|
+
override_dict = Props.read_from(args.override.files)
|
|
299
|
+
override_dict = override_dict.get(args.detector, None)
|
|
300
|
+
|
|
291
301
|
cal_dict, results_dicts, object_dicts, plot_dicts = run_aoe_calibration(
|
|
292
302
|
data,
|
|
293
303
|
{args.timestamp: cal_dict},
|
|
@@ -296,6 +306,7 @@ def par_geds_hit_aoe() -> None:
|
|
|
296
306
|
{args.timestamp: out_plot_dict},
|
|
297
307
|
kwarg_dict,
|
|
298
308
|
debug_mode=args.debug,
|
|
309
|
+
override_dict=override_dict,
|
|
299
310
|
)
|
|
300
311
|
cal_dict = cal_dict[args.timestamp]
|
|
301
312
|
results_dict = results_dicts[args.timestamp]
|
|
@@ -39,6 +39,9 @@ def build_log(
|
|
|
39
39
|
log_file
|
|
40
40
|
The path to the log file.
|
|
41
41
|
"""
|
|
42
|
+
if log_file is None:
|
|
43
|
+
return logging.getLogger(fallback)
|
|
44
|
+
|
|
42
45
|
# Accept either:
|
|
43
46
|
# - a str pointing to a logging properties file
|
|
44
47
|
# - a plain logging dict (handlers/formatters/etc.)
|
|
@@ -60,39 +63,35 @@ def build_log(
|
|
|
60
63
|
if isinstance(log_config, str):
|
|
61
64
|
log_config = Props.read_from(log_config)
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"level": dataflow_level,
|
|
86
|
-
"handlers": ["dataflow"],
|
|
87
|
-
}
|
|
66
|
+
Path(log_file).parent.mkdir(parents=True, exist_ok=True)
|
|
67
|
+
# Ensure the logging config has a handlers->dataflow entry; create
|
|
68
|
+
# minimal structure if needed so we can set the filename.
|
|
69
|
+
if isinstance(log_config, dict):
|
|
70
|
+
handlers = log_config.setdefault("handlers", {})
|
|
71
|
+
dataflow = handlers.setdefault("dataflow", {})
|
|
72
|
+
# Set the filename for the dataflow handler
|
|
73
|
+
dataflow["filename"] = log_file
|
|
74
|
+
dataflow.setdefault("class", "logging.FileHandler")
|
|
75
|
+
dataflow.setdefault("level", "INFO")
|
|
76
|
+
log_config.setdefault("version", 1)
|
|
77
|
+
if (
|
|
78
|
+
"handlers" in log_config
|
|
79
|
+
and "dataflow" in log_config["handlers"]
|
|
80
|
+
and "root" not in log_config
|
|
81
|
+
and "loggers" not in log_config
|
|
82
|
+
):
|
|
83
|
+
dataflow_level = log_config["handlers"]["dataflow"].get("level", "INFO")
|
|
84
|
+
log_config["root"] = {
|
|
85
|
+
"level": dataflow_level,
|
|
86
|
+
"handlers": ["dataflow"],
|
|
87
|
+
}
|
|
88
88
|
|
|
89
89
|
dictConfig(log_config)
|
|
90
90
|
log = logging.getLogger(config_dict["options"].get("logger", "prod"))
|
|
91
91
|
|
|
92
92
|
else:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
logging.basicConfig(level=logging.INFO, filename=log_file, filemode="w")
|
|
93
|
+
Path(log_file).parent.mkdir(parents=True, exist_ok=True)
|
|
94
|
+
logging.basicConfig(level=logging.INFO, filename=log_file, filemode="w")
|
|
96
95
|
|
|
97
96
|
log = logging.getLogger(fallback)
|
|
98
97
|
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# file generated by setuptools-scm
|
|
2
|
-
# don't change, don't track in version control
|
|
3
|
-
|
|
4
|
-
__all__ = [
|
|
5
|
-
"__version__",
|
|
6
|
-
"__version_tuple__",
|
|
7
|
-
"version",
|
|
8
|
-
"version_tuple",
|
|
9
|
-
"__commit_id__",
|
|
10
|
-
"commit_id",
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
TYPE_CHECKING = False
|
|
14
|
-
if TYPE_CHECKING:
|
|
15
|
-
from typing import Tuple
|
|
16
|
-
from typing import Union
|
|
17
|
-
|
|
18
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
-
COMMIT_ID = Union[str, None]
|
|
20
|
-
else:
|
|
21
|
-
VERSION_TUPLE = object
|
|
22
|
-
COMMIT_ID = object
|
|
23
|
-
|
|
24
|
-
version: str
|
|
25
|
-
__version__: str
|
|
26
|
-
__version_tuple__: VERSION_TUPLE
|
|
27
|
-
version_tuple: VERSION_TUPLE
|
|
28
|
-
commit_id: COMMIT_ID
|
|
29
|
-
__commit_id__: COMMIT_ID
|
|
30
|
-
|
|
31
|
-
__version__ = version = '0.3.0a4'
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 3, 0, 'a4')
|
|
33
|
-
|
|
34
|
-
__commit_id__ = commit_id = 'g753e798bf'
|
|
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
|
|
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
|