TDCRPy 0.0.46__py3-none-any.whl → 0.0.48__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,13 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TDCRPy
3
- Version: 0.0.46
3
+ Version: 0.0.48
4
4
  Summary: TDCR model
5
5
  Home-page: https://github.com/RomainCoulon/TDCRPy
6
6
  Author: RomainCoulon (Romain Coulon)
7
7
  Author-email: <romain.coulon@bipm.org>
8
- License: UNKNOWN
9
8
  Keywords: python,TDCR,Monte-Carlo,radionuclide,scintillation,counting
10
- Platform: UNKNOWN
11
9
  Classifier: Development Status :: 2 - Pre-Alpha
12
10
  Classifier: Intended Audience :: Science/Research
13
11
  Classifier: License :: OSI Approved :: MIT License
@@ -25,7 +23,53 @@ Requires-Dist: numpy
25
23
  # TDCRPy
26
24
 
27
25
  TDCRPy is a Python code to calculate detection efficiency of a liquide scintillation counter using 3-photomultiplier tubes.
28
- The calculation is based on the photo-physical model called of the Triple-to-Double-Coincidence-Ratio method (TDCR) [[1]](#1) and a Monte-Carlo sampling allowing to adress complexe decay schemes and radionuclide mixtures. The process is summarized in the figure below.
26
+ The calculation is based on the photo-physical model called of the Triple-to-Double-Coincidence-Ratio method (TDCR) [[1]](#1) and a Monte-Carlo sampling allowing to adress complexe decay schemes and radionuclide mixtures.
27
+
28
+ The code is developped and maintained by the BIPM (MIT license).
29
+
30
+
31
+
32
+ ## Installation
33
+
34
+ TDCRPy requires that the following packages are installed in your Python environement.
35
+
36
+ ```shell
37
+ pip install importlib.resources
38
+ pip install configparser
39
+ pip install numpy
40
+ pip install tqdm
41
+ pip install setuptools
42
+ pip install scipy
43
+ ```
44
+ Then, TDCRPy can be installed.
45
+
46
+ ```shell
47
+ pip install TDCRPy
48
+ ```
49
+
50
+ To obtain the last version.
51
+
52
+ ```shell
53
+ pip install TDCRPy --upgrade
54
+ ```
55
+
56
+ The module can be imported in your Python code.
57
+
58
+ ```python
59
+ import tdcrpy
60
+ ```
61
+
62
+ ## The function `TDCRPy()`
63
+
64
+ This
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+ The process is summarized in the figure below.
29
73
 
30
74
  <img src="./FlowChart.jpg" alt="drawing" width="500"/>
31
75
 
@@ -78,5 +122,3 @@ The stopping power of $\alpha$ particles of energy comprises between 1 keV and 8
78
122
  <c id="12">[12]</c> ICRU Report 49, *Stopping Power and Ranges for Protons and Alpha Particles*, https://www.icru.org/report/stopping-power-and-ranges-for-protons-and-alpha-particles-report-49/
79
123
 
80
124
  <c id="13">[13]</c> https://mcnp.lanl.gov/
81
-
82
-
@@ -1,7 +1,7 @@
1
1
  tdcrpy/Activity_TDCR.py,sha256=wcllEOJbeEOexAYzcFGQx2luIBhxSU3LtpEalRmNziw,11530
2
2
  tdcrpy/EfficiencyProfils.py,sha256=-ZUPva1dU7lMRcKbQAewX9QyiTDwCiNQDoaQiw7dOI4,4829
3
- tdcrpy/TDCRPy.py,sha256=5y1XgcLzCInuK_NV78UiLWqAIwZbXlaigFiKw3w6tZU,26274
4
- tdcrpy/TDCR_model_lib.py,sha256=SctcE9lm6MOzMxE9Vr0rcjSaPzJZ-c7EA6Nwr_1_tKQ,48265
3
+ tdcrpy/TDCRPy.py,sha256=5qx3z-kO3ekqQmmEWsfQCHuGjncVx2A8DL8BKxC0LnY,26134
4
+ tdcrpy/TDCR_model_lib.py,sha256=MG1VsHa2J5tBahvKgZoLjLXO41F1L8ncNBmdyAkUR2E,48310
5
5
  tdcrpy/TDCRoptimize.py,sha256=qAdSPzrr7HLznFItZNX03LatOONvAWfZRFR22iLH5mI,2831
6
6
  tdcrpy/__init__.py,sha256=DrgMGzw5vhdxbXvJq3orzdPeFaq8CwtDHzssp1_DqhM,93
7
7
  tdcrpy/config.toml,sha256=Sbu_85L9REvYT9s4uFiqD8yZ8ju6Qyca91RiQOnytA0,1038
@@ -22,8 +22,8 @@ tdcrpy/Quenching/alpha_toulene.txt,sha256=3aIOCC1h19z8E0JZ2_MaSWRWcdnr-mtmT4qEF6
22
22
  tdcrpy/decayData/All-nuclides_BetaShape.zip,sha256=ZBeaOUBO09gKGD6ouUXNW5UzdHavTKN5cACTqPqA-KU,6507983
23
23
  tdcrpy/decayData/All-nuclides_Ensdf.zip,sha256=LVNNlE_akrg0T-N-7puMuGAme4JRzg-D1YaOwXpiIvg,424716
24
24
  tdcrpy/decayData/All-nuclides_PenNuc.zip,sha256=DmhS2CYegWhL8qggc_MO6FgyiXE5qX73dOoH-SSQXoo,388954
25
- TDCRPy-0.0.46.dist-info/LICENCE.md,sha256=fuYzrZRiOAjJBzA1tsGQwojCgGROArb2Ec48GDTjlWM,1086
26
- TDCRPy-0.0.46.dist-info/METADATA,sha256=SlIF-OJ4cfeDEJLopiz6SnC0bpFRiCP3ZCR5Y_5dFpM,5633
27
- TDCRPy-0.0.46.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
28
- TDCRPy-0.0.46.dist-info/top_level.txt,sha256=VgPJa9YJ7fi8wrr9qDJPLhu3tK1BcFRIP6Ib4r3BEfs,7
29
- TDCRPy-0.0.46.dist-info/RECORD,,
25
+ TDCRPy-0.0.48.dist-info/LICENCE.md,sha256=fuYzrZRiOAjJBzA1tsGQwojCgGROArb2Ec48GDTjlWM,1086
26
+ TDCRPy-0.0.48.dist-info/METADATA,sha256=CQsdzzcNnSUoFw7jP5_Rr-qkGOtn_JMiMyRrPlgo1b0,6214
27
+ TDCRPy-0.0.48.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
28
+ TDCRPy-0.0.48.dist-info/top_level.txt,sha256=VgPJa9YJ7fi8wrr9qDJPLhu3tK1BcFRIP6Ib4r3BEfs,7
29
+ TDCRPy-0.0.48.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: bdist_wheel (0.41.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tdcrpy/TDCRPy.py CHANGED
@@ -36,10 +36,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, mode, mode2, Display=False,
36
36
  pmf_1 : string
37
37
  list of probability of each radionuclide (eg. "0.8, 0.2").
38
38
  N : integer
39
- Number of Monte-Carlo trials. recommanded N=10000
40
- N=1000, relative uncertainty from MC calculation = 1.0 %
41
- N=10000, relative uncertainty from MC calculation = 0.33 %
42
- N=100000, relative uncertainty from MC calculation = 0.10 %
39
+ Number of Monte-Carlo trials. recommanded N>10000. Not applied in the case of pure beta emitting radionuclides.
43
40
  kB : float
44
41
  Birks constant in cm/keV.
45
42
  mode : string
@@ -137,7 +134,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, mode, mode2, Display=False,
137
134
  efficiency_BC = []
138
135
  efficiency_AC = []
139
136
 
140
- if barp and not Display: NN = tqdm(range(N), desc="Processing", unit=" trial")
137
+ if barp and not Display: NN = tqdm(range(N), desc="Processing", unit=" decays")
141
138
  else: NN = range(N)
142
139
  for i in NN: # Main Loop - Monte Carlo trials
143
140
  particle_vec=[]
tdcrpy/TDCR_model_lib.py CHANGED
@@ -10,6 +10,7 @@ Bureau International des Poids et Mesures
10
10
 
11
11
  ### IMPORT Python Module
12
12
  import importlib.resources
13
+ import pkg_resources
13
14
  import configparser
14
15
  import numpy as np
15
16
  import zipfile as zf
@@ -1163,29 +1164,25 @@ def clear_terminal():
1163
1164
  def display_header():
1164
1165
  # Function to display the header
1165
1166
  clear_terminal()
1166
- # header_text = r'''
1167
- # ______ ______ ______ _______ ________
1168
- # |__ __|| ___ \| ___|| ___ | | ____ |
1169
- # | | | | | || | | | | | | |___| |___ ___
1170
- # | | | | | || | | |__| | | _____|\ \ | |
1171
- # | | | |__| || |____| __ \ | | \ \ | |
1172
- # |_| |_____/ |_____||_| \__\|_| \ \_| |
1173
- # +++++++++++++++++++++++++++++++++++++++++ / /
1174
- # _________________________________________/ /
1175
- # |_____________________________________________/
1176
-
1177
- # BIPM 2023 - licence MIT
1178
- # https://pypi.org/project/TDCRPy/
1179
- # https://github.com/RomainCoulon/TDCRPy
1180
-
1181
- # Start Calculation
1182
-
1183
- # '''
1167
+ version = pkg_resources.get_distribution("tdcrpy").version
1184
1168
  header_text = r'''
1185
- TDCRPy 0.0.X (version alpha)
1186
- BIPM 2023 - licence MIT
1187
- https://pypi.org/project/TDCRPy/
1188
-
1189
- Start Calculation
1169
+ ______ ______ ______ _______ ________
1170
+ |__ __|| ___ \| ___|| ___ | | ____ |
1171
+ | | | | | || | | | | | | |___| |___ ___
1172
+ | | | | | || | | |__| | | _____|\ \ | |
1173
+ | | | |__| || |____| __ \ | | \ \ | |
1174
+ |_| |_____/ |_____||_| \__\|_| \ \_| |
1175
+ +++++++++++++++++++++++++++++++++++++++++/ /
1176
+ ________________________________________/ /
1177
+ |______________________________________________/
1178
+
1190
1179
  '''
1180
+ header_text2 = "version "+version+"\n\
1181
+ BIPM 2023 - license MIT \n\
1182
+ distribution: https://pypi.org/project/TDCRPy \n\
1183
+ developement: https://github.com/RomainCoulon/TDCRPy \n\n\
1184
+ start calculation..."
1185
+
1186
+ # Start Calculation
1191
1187
  print(header_text)
1188
+ print(header_text2)