legend-dataflow-scripts 0.1.3__tar.gz → 0.1.4__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 (44) hide show
  1. {legend_dataflow_scripts-0.1.3/src/legend_dataflow_scripts.egg-info → legend_dataflow_scripts-0.1.4}/PKG-INFO +1 -1
  2. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4/src/legend_dataflow_scripts.egg-info}/PKG-INFO +1 -1
  3. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/_version.py +2 -2
  4. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/hit/qc.py +23 -12
  5. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/workflow/__init__.py +2 -0
  6. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/LICENSE +0 -0
  7. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/README.md +0 -0
  8. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/pyproject.toml +0 -0
  9. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/setup.cfg +0 -0
  10. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/SOURCES.txt +0 -0
  11. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/dependency_links.txt +0 -0
  12. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/entry_points.txt +0 -0
  13. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/not-zip-safe +0 -0
  14. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/requires.txt +0 -0
  15. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legend_dataflow_scripts.egg-info/top_level.txt +0 -0
  16. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/__init__.py +0 -0
  17. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/__init__.py +0 -0
  18. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/__init__.py +0 -0
  19. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/__init__.py +0 -0
  20. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/dplms.py +0 -0
  21. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/eopt.py +0 -0
  22. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/evtsel.py +0 -0
  23. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/nopt.py +0 -0
  24. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/pz.py +0 -0
  25. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/svm.py +0 -0
  26. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/dsp/svm_build.py +0 -0
  27. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/hit/__init__.py +0 -0
  28. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/hit/aoe.py +0 -0
  29. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/hit/ecal.py +0 -0
  30. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/par/geds/hit/lq.py +0 -0
  31. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/tier/__init__.py +0 -0
  32. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/tier/dsp.py +0 -0
  33. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/tier/hit.py +0 -0
  34. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/__init__.py +0 -0
  35. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/alias_table.py +0 -0
  36. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/cfgtools.py +0 -0
  37. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/convert_np.py +0 -0
  38. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/log.py +0 -0
  39. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/plot_dict.py +0 -0
  40. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/utils/pulser_removal.py +0 -0
  41. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/workflow/execenv.py +0 -0
  42. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/workflow/filedb.py +0 -0
  43. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/src/legenddataflowscripts/workflow/pre_compile_catalog.py +0 -0
  44. {legend_dataflow_scripts-0.1.3 → legend_dataflow_scripts-0.1.4}/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.1.3
3
+ Version: 0.1.4
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.1.3
3
+ Version: 0.1.4
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
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.1.3'
21
- __version_tuple__ = version_tuple = (0, 1, 3)
20
+ __version__ = version = '0.1.4'
21
+ __version_tuple__ = version_tuple = (0, 1, 4)
@@ -129,6 +129,7 @@ def build_qc(
129
129
  else:
130
130
  hit_dict_fft = {}
131
131
  plot_dict_fft = {}
132
+ fft_data = None
132
133
 
133
134
  if overwrite is not None:
134
135
  for name in kwarg_dict_fft["cut_parameters"]:
@@ -234,7 +235,7 @@ def build_qc(
234
235
  exp = info["expression"]
235
236
  for key in info.get("parameters", None):
236
237
  exp = re.sub(f"(?<![a-zA-Z0-9]){key}(?![a-zA-Z0-9])", f"@{key}", exp)
237
- if outname not in fft_data:
238
+ if fft_data is not None and outname not in fft_data:
238
239
  fft_data[outname] = fft_data.eval(
239
240
  exp, local_dict=info.get("parameters", None)
240
241
  )
@@ -251,24 +252,34 @@ def build_qc(
251
252
  ((sf_cal) * (1 - sf_cal))
252
253
  / len(data.query("~is_pulser & ~is_recovering"))
253
254
  )
254
- sf_fft = len(fft_data.query(f"{entry} & ~is_recovering")) / len(
255
- fft_data.query("~is_recovering")
256
- )
257
- sf_fft_err = 100 * np.sqrt(
258
- ((sf_fft) * (1 - sf_fft)) / len(fft_data.query("~is_recovering"))
259
- )
260
255
  sf_cal *= 100
261
- sf_fft *= 100
262
-
263
- msg = f"{entry} cut applied: {sf_cal:.2f}% of events passed the cut for cal data, {sf_fft:.2f}% for fft data"
256
+ msg = f"{entry} cut applied: {sf_cal:.2f}% of events passed the cut for cal data"
264
257
  log.info(msg)
258
+
265
259
  qc_results[entry] = {
266
260
  "sf_cal": sf_cal,
267
261
  "sf_cal_err": sf_cal_err,
268
- "sf_fft": sf_fft,
269
- "sf_fft_err": sf_fft_err,
270
262
  }
271
263
 
264
+ if fft_data is not None:
265
+ sf_fft = len(fft_data.query(f"{entry} & ~is_recovering")) / len(
266
+ fft_data.query("~is_recovering")
267
+ )
268
+ sf_fft_err = 100 * np.sqrt(
269
+ ((sf_fft) * (1 - sf_fft)) / len(fft_data.query("~is_recovering"))
270
+ )
271
+ sf_fft *= 100
272
+ msg = f"{entry} cut applied: {sf_fft:.2f}% of events passed the cut for fft data"
273
+
274
+ log.info(msg)
275
+
276
+ qc_results[entry].update(
277
+ {
278
+ "sf_fft": sf_fft,
279
+ "sf_fft_err": sf_fft_err,
280
+ }
281
+ )
282
+
272
283
  out_dict = convert_dict_np_to_float(
273
284
  {"operations": hit_dict, "results": {"qc": qc_results}}
274
285
  )
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from .execenv import execenv_prefix, execenv_pyexe
4
+ from .pre_compile_catalog import pre_compile_catalog
4
5
  from .utils import (
5
6
  as_ro,
6
7
  set_last_rule_name,
@@ -13,6 +14,7 @@ __all__ = [
13
14
  "as_ro",
14
15
  "execenv_prefix",
15
16
  "execenv_pyexe",
17
+ "pre_compile_catalog",
16
18
  "set_last_rule_name",
17
19
  "subst_vars",
18
20
  "subst_vars_impl",