legend-dataflow-scripts 0.2.3__py3-none-any.whl → 0.2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: legend-dataflow-scripts
3
- Version: 0.2.3
3
+ Version: 0.2.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,5 +1,5 @@
1
1
  legenddataflowscripts/__init__.py,sha256=hlpvTxSBjOyXlZUyOyYx3VwT5LS6zNzhAZnTmfT3NjU,303
2
- legenddataflowscripts/_version.py,sha256=kBRz0P2plw1eVdIpt70W6m1LMbEIhLY3RyOfVGdubaI,704
2
+ legenddataflowscripts/_version.py,sha256=NRw4Jle4n9v_DD2wtplRqflGCvX8OU5eAjycYY0vY3Y,704
3
3
  legenddataflowscripts/par/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  legenddataflowscripts/par/geds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  legenddataflowscripts/par/geds/dsp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -11,10 +11,10 @@ legenddataflowscripts/par/geds/dsp/pz.py,sha256=l9nc3MmSjghmYOR3LBbbGZMnHc52MFy5
11
11
  legenddataflowscripts/par/geds/dsp/svm.py,sha256=eDneRB_PQZp8Q4n2VheTX3kbu4ufZQ-jnuCCjvtwFpk,826
12
12
  legenddataflowscripts/par/geds/dsp/svm_build.py,sha256=w5-vT6rXmpl7V9rdkfc7_g6GTzn86i41tHkIT-3f5YI,1931
13
13
  legenddataflowscripts/par/geds/hit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- legenddataflowscripts/par/geds/hit/aoe.py,sha256=jAH0Rh3JCnV67vhv9xUZtPdGB8ADJXgG9Lo8t8YQjqs,10841
15
- legenddataflowscripts/par/geds/hit/ecal.py,sha256=j8Z90r9UP5Hn-cawf2lvDL8tF2Uvfp4rDjlM4sGbM-M,27009
16
- legenddataflowscripts/par/geds/hit/lq.py,sha256=vXgK83RlJJ4UUjQQJWfmFGIbT0AEP3EaLALM5LhvZ6s,11133
17
- legenddataflowscripts/par/geds/hit/qc.py,sha256=vr6j5sRTvjmDmErW2uUteCPsj5qfBrpn7ssvLKzov4M,12408
14
+ legenddataflowscripts/par/geds/hit/aoe.py,sha256=DEruYu-mFcgUMdR6jTdgoBY2Q3ijvktqcctu_Cexa6s,10973
15
+ legenddataflowscripts/par/geds/hit/ecal.py,sha256=Ki1YGzFYMcQhh2S2VgNs1ApkMjJjGVq0V-AdKpcCV4A,27125
16
+ legenddataflowscripts/par/geds/hit/lq.py,sha256=aY2tRwbTI9U7b5bxwDohQitY-Tuhe1tXdAA5dqeaznc,11264
17
+ legenddataflowscripts/par/geds/hit/qc.py,sha256=j3oWN28zfGrR_WMMZMGWJ46dpegKf38Fq8J3zH815sU,12606
18
18
  legenddataflowscripts/tier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  legenddataflowscripts/tier/dsp.py,sha256=J_ABEqbQurZHJOg8LV2aporNjZQpPg2bDZG6DkmuAL4,8633
20
20
  legenddataflowscripts/tier/hit.py,sha256=-LCfsqYAYPAuN2OKbPuh4G2P5B4uA4YmQGcqUtbZxis,4989
@@ -30,8 +30,8 @@ legenddataflowscripts/workflow/execenv.py,sha256=qTG4N9ovEPxA0QtqG0wWUIuK50BZIcY
30
30
  legenddataflowscripts/workflow/filedb.py,sha256=6scz8DjdvbXs8OXOy2-6BJWVSALQzmy5cLLn-OsdXsU,3656
31
31
  legenddataflowscripts/workflow/pre_compile_catalog.py,sha256=cEK0KXh-ClSE2Bo9MK471o79XG22bMY5r-2tIihtCfk,790
32
32
  legenddataflowscripts/workflow/utils.py,sha256=VVCsj7wNaqV6sw2Xnk_xykhVv3BKTX4hqQtKE4UUayg,3170
33
- legend_dataflow_scripts-0.2.3.dist-info/METADATA,sha256=BhkwgP_I60cx2ZfV0ExKx0uye1LGTWlxfNTUsApT_gw,3085
34
- legend_dataflow_scripts-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
- legend_dataflow_scripts-0.2.3.dist-info/entry_points.txt,sha256=B197waSm-orA_ZS-9rkxNDsmOHdCn8CbWodnlqXQKRg,1313
36
- legend_dataflow_scripts-0.2.3.dist-info/top_level.txt,sha256=s8E2chjJNYUbrN6whFG_VCsJKySFp1IOXLcUefA7DB0,22
37
- legend_dataflow_scripts-0.2.3.dist-info/RECORD,,
33
+ legend_dataflow_scripts-0.2.4.dist-info/METADATA,sha256=vQ9uxbFCQUTNbkVqZlpOVWKOnKxnKj8Ew-b8e6Zr4O0,3085
34
+ legend_dataflow_scripts-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
35
+ legend_dataflow_scripts-0.2.4.dist-info/entry_points.txt,sha256=B197waSm-orA_ZS-9rkxNDsmOHdCn8CbWodnlqXQKRg,1313
36
+ legend_dataflow_scripts-0.2.4.dist-info/top_level.txt,sha256=s8E2chjJNYUbrN6whFG_VCsJKySFp1IOXLcUefA7DB0,22
37
+ legend_dataflow_scripts-0.2.4.dist-info/RECORD,,
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.2.3'
32
- __version_tuple__ = version_tuple = (0, 2, 3)
31
+ __version__ = version = '0.2.4'
32
+ __version_tuple__ = version_tuple = (0, 2, 4)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -251,14 +251,13 @@ def par_geds_hit_aoe() -> None:
251
251
  ]
252
252
 
253
253
  if "dt_param" in kwarg_dict:
254
- params += kwarg_dict["dt_param"]
254
+ params.append(kwarg_dict["dt_param"])
255
255
  else:
256
256
  params.append("dt_eff")
257
257
 
258
258
  if "dt_cut" in kwarg_dict and kwarg_dict["dt_cut"] is not None:
259
259
  cal_dict.update(kwarg_dict["dt_cut"]["cut"])
260
260
  params.append(kwarg_dict["dt_cut"]["out_param"])
261
-
262
261
  # load data in
263
262
  data, threshold_mask = load_data(
264
263
  files,
@@ -271,9 +270,12 @@ def par_geds_hit_aoe() -> None:
271
270
  msg = f"Loaded {len(data)} events"
272
271
  log.info(msg)
273
272
 
274
- mask = get_pulser_mask(
275
- pulser_file=args.pulser_file,
276
- )
273
+ if args.pulser_file is not None:
274
+ mask = get_pulser_mask(
275
+ pulser_file=args.pulser_file,
276
+ )
277
+ else:
278
+ mask = np.zeros(len(threshold_mask), dtype=bool)
277
279
 
278
280
  data["is_pulser"] = mask[threshold_mask]
279
281
 
@@ -532,9 +532,12 @@ def par_geds_hit_ecal() -> None:
532
532
  cal_energy_param="trapTmax",
533
533
  )
534
534
 
535
- mask = get_pulser_mask(
536
- pulser_file=args.pulser_file,
537
- )
535
+ if args.pulser_file is not None:
536
+ mask = get_pulser_mask(
537
+ pulser_file=args.pulser_file,
538
+ )
539
+ else:
540
+ mask = np.zeros(len(threshold_mask), dtype=bool)
538
541
 
539
542
  data["is_pulser"] = mask[threshold_mask]
540
543
 
@@ -288,9 +288,12 @@ def par_geds_hit_lq() -> None:
288
288
  msg = f"Loaded {len(data)} events"
289
289
  log.info(msg)
290
290
 
291
- mask = get_pulser_mask(
292
- pulser_file=args.pulser_file,
293
- )
291
+ if args.pulser_file is not None:
292
+ mask = get_pulser_mask(
293
+ pulser_file=args.pulser_file,
294
+ )
295
+ else:
296
+ mask = np.zeros(len(threshold_mask), dtype=bool)
294
297
 
295
298
  data["is_pulser"] = mask[threshold_mask]
296
299
 
@@ -39,17 +39,18 @@ def build_qc(
39
39
  ):
40
40
  search_name = table_name if table_name[-1] == "/" else table_name + "/"
41
41
 
42
- kwarg_dict_fft = config["fft_fields"]
42
+ kwarg_dict_fft = config.get("fft_fields", None)
43
43
  kwarg_dict_cal = config["cal_fields"]
44
44
 
45
45
  cut_fields = get_keys(
46
46
  [key.replace(search_name, "") for key in ls(cal_files[0], search_name)],
47
47
  kwarg_dict_cal["cut_parameters"],
48
48
  )
49
- cut_fields += get_keys(
50
- [key.replace(search_name, "") for key in ls(cal_files[0], search_name)],
51
- kwarg_dict_fft["cut_parameters"],
52
- )
49
+ if kwarg_dict_fft is not None:
50
+ cut_fields += get_keys(
51
+ [key.replace(search_name, "") for key in ls(cal_files[0], search_name)],
52
+ kwarg_dict_fft["cut_parameters"],
53
+ )
53
54
 
54
55
  if "initial_cal_cuts" in config:
55
56
  init_cal = config["initial_cal_cuts"]
@@ -147,9 +148,12 @@ def build_qc(
147
148
  cal_energy_param="trapTmax",
148
149
  )
149
150
 
150
- mask = get_pulser_mask(
151
- pulser_file=pulser_file,
152
- )
151
+ if pulser_file is not None:
152
+ mask = get_pulser_mask(
153
+ pulser_file=pulser_file,
154
+ )
155
+ else:
156
+ mask = np.zeros(len(threshold_mask), dtype=bool)
153
157
 
154
158
  data["is_pulser"] = mask[threshold_mask]
155
159
 
@@ -289,7 +293,9 @@ def build_qc(
289
293
  def par_geds_hit_qc() -> None:
290
294
  argparser = argparse.ArgumentParser()
291
295
  argparser.add_argument("--cal-files", help="cal_files", nargs="*", type=str)
292
- argparser.add_argument("--fft-files", help="fft_files", nargs="*", type=str)
296
+ argparser.add_argument(
297
+ "--fft-files", help="fft_files", nargs="*", type=str, default=[]
298
+ )
293
299
 
294
300
  argparser.add_argument(
295
301
  "--tcm-filelist", help="tcm_filelist", type=str, required=False