TDCRPy 1.12.2__py3-none-any.whl → 1.12.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.

Potentially problematic release.


This version of TDCRPy might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TDCRPy
3
- Version: 1.12.2
3
+ Version: 1.12.4
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -1,6 +1,6 @@
1
1
  tdcrpy/TDCRPy.py,sha256=-HhkBRjAU04jTMroHgSQ3yfI_IpYTrK35cPo67bV1RI,53904
2
2
  tdcrpy/TDCRPy1.py,sha256=QTBZh5B5JWnGB0BQfD-cFmwA9W080OD4sG-aj50-ejo,38106
3
- tdcrpy/TDCR_model_lib.py,sha256=Nx_ojL8CEIE_LqSYAdvwYQdGFaRKUgTLoJDdF0HYzos,105625
3
+ tdcrpy/TDCR_model_lib.py,sha256=-A76ITMcu9o5_E7yQ-H-MaRNKSYY7FTmXpgFNwY4E28,105935
4
4
  tdcrpy/TDCRoptimize.py,sha256=c2XIGveeLdVYYek4Rg6dygMvVA2xIrIkMb3L-_jUucM,6496
5
5
  tdcrpy/__init__.py,sha256=vQslGLsoZPIceaitnSHOqN6lUdjEyJ3YhfJ6tYdXt-s,127
6
6
  tdcrpy/config.toml,sha256=rHuuM520HZquGrEd8LAVUdvnzZGtk90pigudy-MXnm8,1389
@@ -1081,8 +1081,8 @@ tdcrpy/docs/_build/html/source/modules.html,sha256=Jf-qxVBId0UgpwyvYuyjtMNG-ezPO
1081
1081
  tdcrpy/docs/_build/html/source/tdcrpy.html,sha256=-38lHMNFB22p1tWJEeN3yDqfDiCYE304vxDamO1-iRc,3779
1082
1082
  tdcrpy/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1083
1083
  tdcrpy/test/test_tdcrpy.py,sha256=JINqSEMFoNpptE4f3h6ZzTYW1rBx90KkaoQzltSg-No,4692
1084
- TDCRPy-1.12.2.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
- TDCRPy-1.12.2.dist-info/METADATA,sha256=e3t-fMqWdC1O0QEQufEk-EUpo5hXoQPdfeqW5VVlcOs,15832
1086
- TDCRPy-1.12.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1087
- TDCRPy-1.12.2.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
- TDCRPy-1.12.2.dist-info/RECORD,,
1084
+ TDCRPy-1.12.4.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
+ TDCRPy-1.12.4.dist-info/METADATA,sha256=mzHjhp-6eyqB214_MET93Q1MUlvsaSPr2iLs0Ch2i80,15832
1086
+ TDCRPy-1.12.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
1087
+ TDCRPy-1.12.4.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
+ TDCRPy-1.12.4.dist-info/RECORD,,
tdcrpy/TDCR_model_lib.py CHANGED
@@ -29,37 +29,43 @@ from tqdm import tqdm
29
29
  """
30
30
 
31
31
  # import advanced configuration data
32
-
33
32
  config = configparser.ConfigParser()
34
- with importlib.resources.as_file(files('tdcrpy').joinpath('config.toml')) as data_path:
35
- file_conf = data_path
36
- config.read(file_conf)
37
-
38
- nE_electron = config["Inputs"].getint("nE_electron")
39
- nE_alpha = config["Inputs"].getint("nE_alpha")
40
- tau = config["Inputs"].getint("tau")
41
- RHO = config["Inputs"].getfloat("density")
42
- Z = config["Inputs"].getfloat("Z")
43
- A = config["Inputs"].getfloat("A")
44
- depthSpline = config["Inputs"].getint("depthSpline")
45
- Einterp_a = config["Inputs"].getfloat("Einterp_a")
46
- Einterp_e = config["Inputs"].getfloat("Einterp_e")
47
- diam_micelle = config["Inputs"].getfloat("diam_micelle")
48
- fAq = config["Inputs"].getfloat("fAq")
49
-
50
- def readParameters():
51
- print(f"number of integration bins for electrons = {nE_electron}")
52
- print(f"number of integration bins for alpha = {nE_alpha}")
53
- print(f"density = {RHO} g/cm3")
54
- print(f"Z = {Z}")
55
- print(f"A = {A}")
56
- print(f"depth of spline interp. = {depthSpline}")
57
- print(f"energy above which interp. in implemented (for alpha) = {Einterp_a} keV")
58
- print(f"energy above which interp. in implemented (for electron) = {Einterp_e} keV")
59
- print(f"diameter of micelle = {diam_micelle} nm")
60
- print(f"acqueous fraction = {fAq}")
33
+
34
+ def readParameters(disp=False):
35
+ global config, file_conf
36
+ config = configparser.ConfigParser()
37
+ with importlib.resources.as_file(files('tdcrpy').joinpath('config.toml')) as data_path:
38
+ file_conf = data_path
39
+ config.read(file_conf)
40
+
41
+ nE_electron = config["Inputs"].getint("nE_electron")
42
+ nE_alpha = config["Inputs"].getint("nE_alpha")
43
+ tau = config["Inputs"].getint("tau")
44
+ RHO = config["Inputs"].getfloat("density")
45
+ Z = config["Inputs"].getfloat("Z")
46
+ A = config["Inputs"].getfloat("A")
47
+ depthSpline = config["Inputs"].getint("depthSpline")
48
+ Einterp_a = config["Inputs"].getfloat("Einterp_a")
49
+ Einterp_e = config["Inputs"].getfloat("Einterp_e")
50
+ diam_micelle = config["Inputs"].getfloat("diam_micelle")
51
+ fAq = config["Inputs"].getfloat("fAq")
52
+
53
+ if disp:
54
+ print(f"number of integration bins for electrons = {nE_electron}")
55
+ print(f"number of integration bins for alpha = {nE_alpha}")
56
+ print(f"density = {RHO} g/cm3")
57
+ print(f"Z = {Z}")
58
+ print(f"A = {A}")
59
+ print(f"depth of spline interp. = {depthSpline}")
60
+ print(f"energy above which interp. in implemented (for alpha) = {Einterp_a} keV")
61
+ print(f"energy above which interp. in implemented (for electron) = {Einterp_e} keV")
62
+ print(f"diameter of micelle = {diam_micelle} nm")
63
+ print(f"acqueous fraction = {fAq}")
64
+
61
65
  return nE_electron, nE_alpha, RHO, Z, A, depthSpline, Einterp_a, Einterp_e, diam_micelle, fAq, tau
62
66
 
67
+ nE_electron, nE_alpha, RHO, Z, A, depthSpline, Einterp_a, Einterp_e, diam_micelle, fAq, tau = readParameters()
68
+
63
69
  def readConfigAsstr():
64
70
  path2config = str(config.read(file_conf)[0])
65
71
  with open(path2config, 'r') as file: