data-manipulation-utilities 0.1.0__py3-none-any.whl → 0.1.2__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.1
2
2
  Name: data_manipulation_utilities
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: zfit
6
6
  Requires-Dist: logzero
@@ -24,8 +24,6 @@ Requires-Dist: pytest; extra == "dev"
24
24
 
25
25
  These are tools that can be used for different data analysis tasks.
26
26
 
27
- For LHCb specific tools (not useful for people outside LHCb) see [this](doc/lhcb.md)
28
-
29
27
  # GIT
30
28
 
31
29
  ## Pushing
@@ -1,4 +1,4 @@
1
- data_manipulation_utilities-0.1.0.data/scripts/publish,sha256=MHDsn93GTeJxpsM3hNbOJ7JEtsugX21WOFQ2PGWairU,1943
1
+ data_manipulation_utilities-0.1.2.data/scripts/publish,sha256=MHDsn93GTeJxpsM3hNbOJ7JEtsugX21WOFQ2PGWairU,1943
2
2
  dmu/arrays/utilities.py,sha256=PKoYyybPptA2aU-V3KLnJXBudWxTXu4x1uGdIMQ49HY,1722
3
3
  dmu/generic/utilities.py,sha256=0Xnq9t35wuebAqKxbyAiMk1ISB7IcXK4cFH25MT1fgw,1741
4
4
  dmu/logging/log_store.py,sha256=v0tiNz-6ktT_afD5DuvCZ8Nmr82JKQOPli8hgd28P1Q,3960
@@ -6,7 +6,6 @@ dmu/ml/cv_classifier.py,sha256=n81m7i2M6Zq96AEd9EZGwXSrbG5m9jkS5RdeXvbsAXU,3712
6
6
  dmu/ml/cv_predict.py,sha256=Bqxu-f6qquKJokFljhCzL_kiGcjLJLQFhVBD130fsyw,4893
7
7
  dmu/ml/train_mva.py,sha256=d_n-A07DFweikz5nXap4OE_Mqx8VprFT7zbxmnQAbac,9638
8
8
  dmu/ml/utilities.py,sha256=Nue7O9zi1QXgjGRPH6wnSAW9jusMQ2ZOSDJzBqJKIi0,3687
9
- dmu/physics/utilities.py,sha256=I4OqrxtYD6Ui8O_651yOlY6OaAzrTSyVRChXWR2sCGw,1672
10
9
  dmu/plotting/plotter.py,sha256=laa6Kl7P-ZOIhaOFBVjOH4XQ4kPCV7wBNvLIMBnyCwM,7181
11
10
  dmu/plotting/plotter_1d.py,sha256=G-i94uzm2TjNaog1A4agAKar_G0qNdkAqIPCmzhe85Y,3660
12
11
  dmu/plotting/plotter_2d.py,sha256=SWPKns-CfpUZHgBXvwm3gceH3k2eL_mKGXQ8sWpZJB0,2919
@@ -21,7 +20,6 @@ dmu/testing/utilities.py,sha256=WbMM4e9Cn3-B-12Vr64mB5qTKkV32joStlRkD-48lG0,3460
21
20
  dmu/text/transformer.py,sha256=4lrGknbAWRm0-rxbvgzOO-eR1-9bkYk61boJUEV3cQ0,6100
22
21
  dmu_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
22
  dmu_data/ml/tests/train_mva.yaml,sha256=TCniCVpXMEFxZcHa8IIqollKA7ci4OkBnRznLEkXM9o,925
24
- dmu_data/physics/evt_name.yaml,sha256=lf1SIIJIpG2PNVZ_AngMUG_IAYXbPsqUTgejtuGL1Dk,427546
25
23
  dmu_data/plotting/tests/2d.yaml,sha256=lTMNheK3DB8klp4O5QjMDwBI1A1Oh2_Wp2F2Ro9VQKM,282
26
24
  dmu_data/plotting/tests/fig_size.yaml,sha256=7ROq49nwZ1A2EbPiySmu6n3G-Jq6YAOkc3d2X3YNZv0,294
27
25
  dmu_data/plotting/tests/high_stat.yaml,sha256=bLglBLCZK6ft0xMhQ5OltxE76cWsBMPMjO6GG0OkDr8,522
@@ -37,13 +35,12 @@ dmu_data/text/transform_set.txt,sha256=1KivMoP9LxPn9955QrRmOzjEqduEjhTetQ9MXykO5
37
35
  dmu_data/text/transform_trf.txt,sha256=zxBRTgcSmX7RdqfmWF88W1YqbyNHa4Ccruf1MmnYv2A,74
38
36
  dmu_scripts/git/publish,sha256=MHDsn93GTeJxpsM3hNbOJ7JEtsugX21WOFQ2PGWairU,1943
39
37
  dmu_scripts/physics/check_truth.py,sha256=b1P_Pa9ef6VcFtyY6Y9KS9Om9L-QrCBjDKp4dqca0PQ,3964
40
- dmu_scripts/physics/update_decinfo.py,sha256=Y5cO3GdUWtVHeXVd37Q04xlFtQBMTLlqCF-medL8SM8,3322
41
38
  dmu_scripts/rfile/compare_root_files.py,sha256=T8lDnQxsRNMr37x1Y7YvWD8ySHrJOWZki7ZQynxXX9Q,9540
42
39
  dmu_scripts/rfile/print_trees.py,sha256=Ze4Ccl_iUldl4eVEDVnYBoe4amqBT1fSBR1zN5WSztk,941
43
40
  dmu_scripts/ssh/coned.py,sha256=lhilYNHWRCGxC-jtyJ3LQ4oUgWW33B2l1tYCcyHHsR0,4858
44
41
  dmu_scripts/text/transform_text.py,sha256=9akj1LB0HAyopOvkLjNOJiptZw5XoOQLe17SlcrGMD0,1456
45
- data_manipulation_utilities-0.1.0.dist-info/METADATA,sha256=eJ3TmfTK3hkVG7N0ErDC-1zmrmi_07pjiKr3OcKUY5c,20074
46
- data_manipulation_utilities-0.1.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
47
- data_manipulation_utilities-0.1.0.dist-info/entry_points.txt,sha256=-nNgwig7t-dba8EXsI5TxmvLaDet9_qQAbpusuq64Xc,327
48
- data_manipulation_utilities-0.1.0.dist-info/top_level.txt,sha256=n_x5J6uWtSqy9mRImKtdA2V2NJNyU8Kn3u8DTOKJix0,25
49
- data_manipulation_utilities-0.1.0.dist-info/RECORD,,
42
+ data_manipulation_utilities-0.1.2.dist-info/METADATA,sha256=rZH-skce03MM8Hd_eHwsxEakeyJTJVKR0oCFnD-zkJk,19988
43
+ data_manipulation_utilities-0.1.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
44
+ data_manipulation_utilities-0.1.2.dist-info/entry_points.txt,sha256=1TIZDed651KuOH-DgaN5AoBdirKmrKE_oM1b6b7zTUU,270
45
+ data_manipulation_utilities-0.1.2.dist-info/top_level.txt,sha256=n_x5J6uWtSqy9mRImKtdA2V2NJNyU8Kn3u8DTOKJix0,25
46
+ data_manipulation_utilities-0.1.2.dist-info/RECORD,,
@@ -4,4 +4,3 @@ compare_root_files = dmu_scripts.rfile.compare_root_files:main
4
4
  coned = dmu_scripts.ssh.coned:main
5
5
  print_trees = dmu_scripts.rfile.print_trees:main
6
6
  transform_text = dmu_scripts.text.transform_text:main
7
- update_decinfo = dmu_scripts.physics.update_decinfo:main
dmu/physics/utilities.py DELETED
@@ -1,58 +0,0 @@
1
- '''
2
- Module containing utility functions
3
- '''
4
- from importlib.resources import files
5
- from functools import cache
6
-
7
- import yaml
8
-
9
- # ---------------------------------
10
- @cache
11
- def _get_evt_name() -> dict[str,str]:
12
- file_path = files('dmu_data').joinpath('physics/evt_name.yaml')
13
- file_path = str(file_path)
14
- with open(file_path, encoding='utf-8') as ifile:
15
- d_data = yaml.safe_load(ifile)
16
-
17
- return d_data
18
- # ---------------------------------
19
- def _format_nickname(nickname : str, style : str) -> str:
20
- if style == 'literal':
21
- return nickname
22
-
23
- if style != 'safe_1':
24
- raise ValueError(f'Invalid style: {style}')
25
-
26
- nickname = nickname.replace( '.', 'p')
27
- nickname = nickname.replace( '-', 'mn')
28
- nickname = nickname.replace( '+', 'pl')
29
- nickname = nickname.replace( '=','_eq_')
30
- nickname = nickname.replace( ',', '_')
31
- nickname = nickname.replace('DecProdCut', 'DPC')
32
-
33
- return nickname
34
- # ---------------------------------
35
- def read_decay_name(event_type : str, style : str = 'safe_1') -> str:
36
- '''
37
- Takes event type, and style strings, returns nickname of decay as defined in DecFiles package
38
-
39
- Styles:
40
-
41
- literal : No change is made to nickname
42
- safe_1 (default): With following replacements:
43
- . -> p
44
- = -> _eq_
45
- - -> mn
46
- + -> pl
47
- , -> _
48
- '''
49
- d_evt_name = _get_evt_name()
50
-
51
- if event_type not in d_evt_name:
52
- raise ValueError(f'Event type {event_type} not found')
53
-
54
- value = d_evt_name[event_type]
55
- value = _format_nickname(value, style)
56
-
57
- return value
58
- # ---------------------------------