TDCRPy 2.0.2__py3-none-any.whl → 2.0.7__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,4 +1,4 @@
1
- tdcrpy/TDCRPy.py,sha256=Q6ksEJQvjNgbcWPiWFAcT0QDBCN2x5lHs_W4Leh7KO0,61092
1
+ tdcrpy/TDCRPy.py,sha256=WRH8ASoJSEXAl3Vw0t01DZelIJ4Kguu97nEriHuLq-g,64862
2
2
  tdcrpy/TDCRPy1.py,sha256=QTBZh5B5JWnGB0BQfD-cFmwA9W080OD4sG-aj50-ejo,38106
3
3
  tdcrpy/TDCR_model_lib.py,sha256=gnWWLG96hdT0uFkL0sE4CMuXNcP6DTQ3S3Jq_jwnYMg,125487
4
4
  tdcrpy/TDCRoptimize.py,sha256=c2XIGveeLdVYYek4Rg6dygMvVA2xIrIkMb3L-_jUucM,6496
@@ -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-2.0.2.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
- TDCRPy-2.0.2.dist-info/METADATA,sha256=FEl2Wv8r3dccx-1t4dCcsKKRtcDwVfxKzLxtlHyR3qM,15831
1086
- TDCRPy-2.0.2.dist-info/WHEEL,sha256=nCVcAvsfA9TDtwGwhYaRrlPhTLV9m-Ga6mdyDtuwK18,91
1087
- TDCRPy-2.0.2.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
- TDCRPy-2.0.2.dist-info/RECORD,,
1084
+ TDCRPy-2.0.7.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
+ TDCRPy-2.0.7.dist-info/METADATA,sha256=tQ_JoZisK1kCi-WHGcUKzOI8hymMXvGtJfz__0r2jUY,45040
1086
+ TDCRPy-2.0.7.dist-info/WHEEL,sha256=ixB2d4u7mugx_bCBycvM9OzZ5yD7NmPXFRtKlORZS2Y,91
1087
+ TDCRPy-2.0.7.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
+ TDCRPy-2.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (73.0.0)
2
+ Generator: setuptools (74.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tdcrpy/TDCRPy.py CHANGED
@@ -1129,10 +1129,107 @@ def eff(TD, Rad, pmf_1, kB, V, N=10000, L=1, maxiter=20, xatol=1e-7, disp=False)
1129
1129
  return L0, L, eff_S, u_eff_S, eff_D, u_eff_D, eff_T, u_eff_T, eff_AB, u_eff_AB, eff_BC, u_eff_BC, eff_AC, u_eff_AC, eff_D2, u_eff_D2
1130
1130
 
1131
1131
 
1132
- # # L = 1
1133
- # L = (1.1, 1.05, 1.15)
1134
- # # # TD = 0.977667386529166
1135
- # TD = (0.977667386529166, 0.992232838598821, 0.992343419459002, 0.99275350064608)
1132
+ # def effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7, disp=False):
1133
+ # """
1134
+ # Caclulation of the efficiency of a TDCR system based on the model TDCRPy (analytical model).
1135
+ # This function includes optimization procedures from scipy.
1136
+
1137
+ # Parameters
1138
+ # ----------
1139
+ # TD : float or tuple
1140
+ # measurements. If TD is float, then TD is the measured TDCR parameter. If TD is tuple, then TD must contain the global TDCR parameter followed by specific ones (T/B, T/AB, T/BC, T/AC)
1141
+ # Rad : string
1142
+ # List of radionuclides (eg. "H-3, Co-60").
1143
+ # pmf_1 : string
1144
+ # list of probability of each radionuclide (eg. "0.8, 0.2").
1145
+ # kB : float
1146
+ # Birks constant in cm/keV.
1147
+ # V : float
1148
+ # volume of the scintillator in ml.
1149
+ # maxiter : interger, optional
1150
+ # maximum number of iterations of the optimization procedures
1151
+ # xatol : float
1152
+ # convergence parameter of the Nelder Mead optimisation
1153
+ # disp : Boolean
1154
+ # to display detailed results of the procedure. Default is False.
1155
+
1156
+ # Returns
1157
+ # -------
1158
+ # L0 : float
1159
+ # global free parameter.
1160
+ # L : tuple
1161
+ # free parameters (relevant for the asymetric model).
1162
+ # eff_S : float
1163
+ # counting efficiency of single events.
1164
+ # u_eff_S : float
1165
+ # standard uncertainty of eff_S.
1166
+ # eff_D : float
1167
+ # counting efficiency of double coincidences.
1168
+ # u_eff_D : float
1169
+ # standard uncertainty of eff_D.
1170
+ # eff_T : float
1171
+ # counting efficiency of triple coincidences.
1172
+ # u_eff_T : float
1173
+ # standard uncertainty of eff_T.
1174
+ # eff_AB : float
1175
+ # counting efficiency of coincidences AB.
1176
+ # u_eff_AB : float
1177
+ # standard uncertainty of eff_AB.
1178
+ # eff_BC : float
1179
+ # counting efficiency of coincidences BC.
1180
+ # u_eff_BC : float
1181
+ # standard uncertainty of eff_BC.
1182
+ # eff_AC : float
1183
+ # counting efficiency of coincidences AC.
1184
+ # u_eff_AC : float
1185
+ # standard uncertainty of eff_AC.
1186
+ # eff_D : float
1187
+ # counting efficiency of double coincidences in C/N configuation (not relevant).
1188
+ # u_eff_D : float
1189
+ # standard uncertainty of eff_D in C/N configuation (not relevant).
1190
+
1191
+ # """
1192
+ # if isinstance(TD, (tuple, list)):
1193
+ # symm = False
1194
+ # else:
1195
+ # symm = True
1196
+
1197
+ # if symm: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD, TD, TD, TD, Rad, kB, V, "res", True, 1e3), method='bounded', bounds = (0.1, 5), options={'disp': disp, 'maxiter':maxiter})
1198
+ # else: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD[0], TD[1], TD[2], TD[3], Rad, kB, V, "res", True, 1e3), method='bounded', bounds = (0.1, 5), options={'disp': disp, 'maxiter':maxiter})
1199
+ # L0=r.x
1200
+ # L=(L0, L0, L0)
1201
+ # print(f"global free parameter = {L0} keV-1")
1202
+
1203
+ # if not symm:
1204
+ # r=opt.minimize(tl.modelAnalytical, L, args=(TD[0], TD[1], TD[2], TD[3], Rad, kB, V, "res", True, 1e3), method='nelder-mead',options={'xatol': xatol, 'disp': disp, 'maxiter':maxiter})
1205
+ # L=r.x
1206
+ # print(f"free parameters = {L} keV-1")
1207
+
1208
+ # if symm: out=tl.modelAnalytical(L, TD, TD, TD, TD, Rad, kB, V, "eff", True, 1e3)
1209
+ # else: out=tl.modelAnalytical(L, TD[0], TD[1], TD[2], TD[3], Rad, kB, V, "eff", True, 1e3)
1210
+ # eff_S = out[0]
1211
+ # u_eff_S = out[1]
1212
+ # eff_D = out[2]
1213
+ # u_eff_D = out[3]
1214
+ # eff_T = out[4]
1215
+ # u_eff_T = out[5]
1216
+ # eff_AB = out[6]
1217
+ # u_eff_AB = out[7]
1218
+ # eff_BC = out[8]
1219
+ # u_eff_BC = out[9]
1220
+ # eff_AC = out[10]
1221
+ # u_eff_AC = out[11]
1222
+
1223
+ # return L0, L, eff_S, u_eff_S, eff_D, u_eff_D, eff_T, u_eff_T, eff_AB, u_eff_AB, eff_BC, u_eff_BC, eff_AC, u_eff_AC
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+ # L = 1
1230
+ # # L = (1.1, 1.05, 1.15)
1231
+ # TD = 0.977667386529166
1232
+ # # TD = (0.977667386529166, 0.992232838598821, 0.992343419459002, 0.99275350064608)
1136
1233
  # # # TD = (0.977667386529166, 0.995232838598821, 0.990343419459002, 0.99275350064608)
1137
1234
  # Rad="Co-60"
1138
1235
  # pmf_1="1"
@@ -1142,10 +1239,11 @@ def eff(TD, Rad, pmf_1, kB, V, N=10000, L=1, maxiter=20, xatol=1e-7, disp=False)
1142
1239
  # mode = "eff"
1143
1240
 
1144
1241
 
1145
- # # out = TDCRPy(L, Rad, pmf_1, N, kB, V, Display = False, record = True, readRecHist = False)
1146
- # # print("result", out)
1147
- # # out = TDCRPy(L, Rad, pmf_1, N, kB, V, Display = False, record = False, readRecHist = True)
1148
- # # print("result", out)
1242
+ # # # out = TDCRPy(L, Rad, pmf_1, N, kB, V, Display = False, record = True, readRecHist = False)
1243
+ # # # print("result", out)
1244
+ # # # out = TDCRPy(L, Rad, pmf_1, N, kB, V, Display = False, record = False, readRecHist = True)
1245
+ # # # print("result", out)
1149
1246
 
1150
- # out = eff(TD, Rad, pmf_1, kB, V, N=1000, L=1, maxiter=20, xatol=1e-7)
1247
+ # # out = eff(TD, Rad, pmf_1, kB, V, N=1000, L=1, maxiter=20, xatol=1e-7)
1248
+ # out = effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7)
1151
1249
  # print(out)
@@ -1,334 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: TDCRPy
3
- Version: 2.0.2
4
- Summary: TDCR model
5
- Home-page: https://pypi.org/project/TDCRPy/
6
- Author: RomainCoulon (Romain Coulon)
7
- Author-email: <romain.coulon@bipm.org>
8
- Project-URL: Documentation, https://github.com/RomainCoulon/TDCRPy/
9
- Keywords: Python,TDCR,Monte-Carlo,radionuclide,scintillation,counting
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Science/Research
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Natural Language :: English
14
- Classifier: Natural Language :: French
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Operating System :: Unix
17
- Classifier: Operating System :: MacOS :: MacOS X
18
- Classifier: Operating System :: Microsoft :: Windows
19
- Classifier: Topic :: Scientific/Engineering :: Physics
20
- Requires-Python: >=3.11
21
- Description-Content-Type: text/markdown
22
- License-File: LICENCE.md
23
- Requires-Dist: numpy
24
- Requires-Dist: tqdm
25
- Requires-Dist: setuptools
26
- Requires-Dist: scipy
27
- Requires-Dist: configparser
28
- Requires-Dist: importlib.resources
29
- Requires-Dist: matplotlib
30
-
31
- # TDCRPy
32
-
33
- `TDCRPy` is a Python code to calculate detection efficiency of a liquid scintillation counter using 3-photomultiplier tubes.
34
- The calculation is based on the photo-physical model called of the Triple-to-Double-Coincidence-Ratio method (TDCR) and a Monte-Carlo sampling allowing to adress complexe decay schemes and radionuclide mixtures.
35
-
36
- The code is developped and maintained by the BIPM (MIT license).
37
-
38
- ## Installation
39
-
40
- `TDCRPy` requires that the following packages are installed in your `Python` environement.
41
-
42
- ```shell
43
- pip install importlib.resources configparser numpy tqdm setuptools scipy
44
- ```
45
- or in `conda` environement:
46
-
47
- ```shell
48
- conda install importlib.resources configparser numpy tqdm setuptools scipy
49
- ```
50
-
51
- Then, `TDCRPy` can be installed.
52
-
53
- ```shell
54
- pip install TDCRPy
55
- ```
56
-
57
- To obtain the last version.
58
-
59
- ```shell
60
- pip install TDCRPy --upgrade
61
- ```
62
-
63
- The module can be imported in your Python code such as.
64
-
65
- ```python
66
- import tdcrpy
67
- ```
68
-
69
- ## Test
70
-
71
- To run the unit tests of the package:
72
-
73
- ```shell
74
- python -m unittest tdcrpy.test.test_tdcrpy
75
- ```
76
-
77
- or (using the coverage package)
78
-
79
- ```shell
80
- coverage run -m unittest tdcrpy.test.test_tdcrpy
81
- coverage report -m
82
- ```
83
-
84
- ## User guide
85
-
86
- At first, the TDCRPy module must be imported.
87
-
88
- ```python
89
- import tdcrpy
90
- ```
91
- ### TDCRPy()
92
-
93
- The main function of the TDCRPy module is `TDCRPy()` in which the Monte-Carlo Triple-to-Double Coincidence Ratio model is implemented. The computation is made for a given solution containing a radionuclide (or a mixture of radionuclides) `rad`, a given volume of scintillator `V` and a given Birks constant `kB`.
94
-
95
- It can operates in two modes:
96
- * In `mode="eff"`, it calculates the efficiency of the TDCR system as a function of a value (or a triplet) of the free parameter(s) `L`. The measurement data is not used is this mode.
97
- * In `mode="res"`, it calculates the residual of the TDCR model parametrized by a value (or triplet) of the free parameter(s) `L` and the measurement data `TD`, `TAB`, `TBC`, `TAC`. This residual is used in the optimisation procedure `tdcrpy.TDCRoptimize.eff()` that aims to estimate the dection efficiency of the TDCR system (see above).
98
-
99
- Also, two configurations can be set:
100
-
101
- * In `mode2="sym"`, the symmetry is considered between the 3 photomultiplier tubes (PMTs). Here, the free parameter `L` is a scalar and only the global TDCR value `TD` is used as measurement data.
102
- * In `mode2="asym"`, a possible asymmetry between the 3 photomultiplier tubes is considered in the model. Here, the free parameter `L` is a triplet corresponding to each PMTs and only the specific TDCR values `TAB`, `TBC` and `TAC` are used as measurement data.
103
-
104
- The parmeter `N` sets the number of Monte-Carlo trails used for the estimation. Each MC trial corresponds to a simulated radiactive decay.
105
-
106
- TDCRPy() is parametrised by the following parameters:
107
- * `L` is the free parameter(s) in keV^-1^. It represents the number of photoelectrons produced by the PMTs per unit of ionisation energy released in the scintillator during a decay without considering the scintillation quenching. It is of type `float` when `mode2="sym"` and of type `tuple` or `list` when `mode2="asym"`.
108
- * `TD` (type `float`) is the quotient of the triple coincidence count rate divided by the logic sum of the double coincidence count rate.
109
- * `TAB` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel A and B.
110
- * `TBC` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel B and C.
111
- * `TAC` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel A and C.
112
- * `rad` (type `string`) is the list of radionuclides contained in the solution, e.g. `"H-3"`, `"H-3, Co-60"`.
113
- * `pmf_1` (type `string`) is the probability of each radionuclide contained in `rad`. If `rad = "H-3, Co-60"` and `pmf_1="0.8, 0.2"`, the solution contains 80 % of tritium and 20 % of cobalt 60.
114
- * `N` (type `integer`) is the number of Monte-Carlo trials corresponding each to a simulated nuclear decay in the scintillator. Monte-Carlo calculation is not used in the case of pure beta emitting radionuclides where the analytical model is implemented.
115
- * `kB` (type `float`) is the Birks constant caracterizing the scintillator. It is espressed in cm/keV.
116
- * `V` (type `float`) is the volume in ml of the scintillator.
117
- * `mode` sets the type of output: `mode="res"` to return the residual, `mode="eff"` to return efficiencies.
118
- * `mode2` sets whether the TDCR system has to be considered as symetrical by the model `mode2="sym"` or not symetrical `mode2="asym"`.
119
- * `Display` (type `boolean`) is an optional parameter set by default, `Display=False`. If `Display=True`, detailed on the simulated decays are displayed.
120
- * `barp` (type `boolean`) is an optional parameter set by default, `barp=False`. If `barp=True`, the progression bar of the calculation is displayed.
121
- * `Smodel` (type `boolean`) is an optional parameter set by default, `Smodel=True`. If `barp=True`, the stochastic model is applied otherwise the analytical model is applied (suitable for pure beta emitters).
122
- * `uncData` (type `boolean`) is an optional parameter set by default, `uncData=False`. If `uncData=True`, the unceratainty on transition probabilities are propagated by MC sampling (still under study).
123
-
124
-
125
- In `mode="eff"`, `TDCRPy()` returns a `tuple` composed of:
126
- * the estimation of the counting efficiency of single events *S*,
127
- * the standard uncertainty of the estimation of *S*,
128
- * the estimation of the counting efficiency of double coincidences *D*,
129
- * the standard uncertainty of the estimation of *D*,
130
- * the estimation of the counting efficiency of triple coincidences *T*,
131
- * the standard uncertainty of the estimation of *T*,
132
-
133
- Example:
134
-
135
- ```python
136
- import tdcrpy
137
-
138
- L = 1.5
139
- TD = 0.977667386529166
140
- TAB = 0.992232838598821
141
- TBC = 0.992343419459002
142
- TAC = 0.99275350064608
143
- Rad="Co-60"
144
- pmf_1="1"
145
- N = 100
146
- kB =1.0e-5
147
- V = 10
148
- mode = "eff"
149
- mode2 = "sym"
150
-
151
- result = tdcrpy.TDCRPy.TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2)
152
-
153
- print("efficiency S = ", round(result[0],4), "+/-", round(result[1],4))
154
- print("efficiency D = ", round(result[2],4), "+/-", round(result[3],4))
155
- print("efficiency T = ", round(result[4],4), "+/-", round(result[5],4))
156
- ```
157
-
158
- ```Console
159
- efficiency S = 0.9875 +/- 0.007
160
- efficiency D = 0.9903 +/- 0.0072
161
- efficiency T = 0.9749 +/- 0.0121
162
- ```
163
-
164
- In `mode="res"`, TDCRPy() returns the residuals *R* (type `float`) of the TDCR model for the given value of the free parameter `L`.
165
-
166
- Example:
167
-
168
- ```python
169
- import tdcrpy
170
-
171
- L = 1.5
172
- TD = 0.977667386529166
173
- TAB = 0.992232838598821
174
- TBC = 0.992343419459002
175
- TAC = 0.99275350064608
176
- Rad="Co-60"
177
- pmf_1="1"
178
- N = 100
179
- kB =1.0e-5
180
- V = 10
181
- mode = "res"
182
- mode2 = "sym"
183
-
184
- result = tdcrpy.TDCRPy.TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2)
185
-
186
- print("R = ",result)
187
- ```
188
-
189
- ```Console
190
- R = 9.72238771394384e-06
191
- ```
192
-
193
- When a triplet of free parameters is considered, `L` is of type `tuple` and `mode2 = "asym"`. It must be noted that the calculation time is three times higher than in the symetrical model.
194
-
195
- Example:
196
-
197
- ```python
198
- import tdcrpy
199
-
200
- L = (1.5, 1.2, 1.4)
201
- TD = 0.977667386529166
202
- TAB = 0.992232838598821
203
- TBC = 0.992343419459002
204
- TAC = 0.99275350064608
205
- Rad="Co-60"
206
- pmf_1="1"
207
- N = 100
208
- kB =1.0e-5
209
- V = 10
210
- mode = "res"
211
- mode2 = "asym"
212
-
213
- result = tdcrpy.TDCRPy.TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2)
214
-
215
- print("R = ",result)
216
- ```
217
-
218
- ```Console
219
- R = 1.4353680366705997e-05
220
- ```
221
-
222
- By default, the Monte-Carlo model is not applied for the following list radionuclides when used solely (not in a mixture): ^3^H, ^14^C, ^35^S, ^45^Ca, ^63^Ni, ^89^Sr, ^90^Sr, ^99^Tc, ^147^Pm, ^241^Pu. In the latter cases, the analytical model is applied and the calculation time does not dependent to the parameter `N`.
223
-
224
- ### Advance settings
225
-
226
- An advanced setting can be configured in the `config.toml` file for functions `TDCRPy.TDCRPy()` and `TDCRoptimize.eff()`. In this file:
227
- * The number of bins to discretize the linear energy space for quenching calculation can be adjusted. `nE_electron` and `nE_alpha` parameters for respectively electrons and alpha particles are respectiveley set by default such as `nE_electron = 1000` and `nE_alpha = 1000`.
228
- * By default the calculation is set for Ultima-Gold cocktail mixed with a small amount of aqueous solution. You can adapt for a specific scintillator by changing the `density` (default `density=0.96`), the mean charge number `Z` (default `Z=5.2`) and the mean mass number `A` (default `A=11.04`) of the scintillator.
229
- * To process photoelectric interactions, the atomic concentration of the scintillator is spectified. By default `pH = 0.578772`, `pC = 0.338741`, `pN = 0.000302`, `pO = 0.082022`, `pP = 0.000092`, `pCl = 0.000071`
230
- * A correction due reverse micelles in the scintillator is implemented. It is by default activated `micCorr = True`. The diameter of the micelles and the fraction of aqueous solution is specified. By defaut `diam_micelle = 2`, `fAq = 0.1`
231
- * The coincidence resolving time of the LS counter is specified (in ns). By default `tau = 50`.
232
- * To optimize the speed of the Monte-Carlo calculation, a spline interpolation on precalculated quenched energy is applied. The parameter `depthSpline` (default `depthSpline = 5`) sets the number of bins on each side of the energy point on which the interpolation is applied. The parameter `Einterp_a` for alpha particles and `Einterp_e` for electrons (default `Einterp_a = 100` keV, `Einterp_e = 1.5` keV) set the energy (in keV) above which the interpolation is applied.
233
-
234
- ### TDCRoptimize.eff()
235
-
236
- An optimization procedure `TDCRoptimize.eff()` is proposed to estimate the counting efficiency of a TDCR system. It approximates the free parameter(s) `L` in order to minimize the residual estimated by `TDCRPy()` for a given set of measurement data. In `mode2 = "sym"`, the *golden section search technique* is applied with a maximum number of iterations of 20. In `mode2 = "asym"`, the *Nelder-Mead technique* is applied with a maximum number of iterations of 20.
237
-
238
- `TDCRoptimize.eff()` is parametrised by the following parameters:
239
- * `TD` (type `float`) is the quotient of the triple coincidence count rate divided by the logic sum of the double coincidence count rate.
240
- * `TAB` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel A and B.
241
- * `TBC` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel B and C.
242
- * `TAC` (type `float`) is the quotient of the triple coincidence count rate divided by the double coincidence count rate between the channel A and C.
243
- * `rad` (type `string`) is the list of radionuclides contained in the solution, e.g. `"H-3"`, `"H-3, Co-60"`.
244
- * `pmf_1` (type `string`) is the probability of each radionuclide contained in `rad`. If `rad = "H-3, Co-60"` and `pmf_1="0.8, 0.2"`, the solution contains 80 % of tritium and 20 % of cobalt 60.
245
- * `kB` (type `float`) is the Birks constant caracterizing the scintillator. It is espressed in cm/keV.
246
- * `V` (type `float`) is the volume in ml of the scintillator.
247
- * `mode2` sets whether the TDCR system has to be considered symetrical `mode2="sym"` or not symetrical `mode2="asym"`.
248
- * `N` (type `integer`) is the number of Monte-Carlo trials corresponding each, to a simulated nuclear decay in the scintillator. Monte-Carlo calculation is not used in the case of pure beta emitting radionuclides where the analytical model is implemented. It is an optional parameter set by default at `N = 10000`.
249
- * `L` (type `float`) initial guess of the free parameter(s) in keV^-1^. It represents the number of photoelectrons produced by the PMTs per unit of ionisation energy released in the scintillator during a decay and in the abscence of scintillation quenching. It is set by default at `L = 1`.
250
-
251
- `TDCRoptimize.eff()` returns:
252
- * the global free parameter *L*,
253
- * the free parameters related to each channel (*L<sub>A</sub>*, *L<sub>B</sub>*, *L<sub>C</sub>*),
254
- * the estimation of the counting efficiency of single events *S*,
255
- * the standard uncertainty of the estimation of *S*,
256
- * the estimation of the counting efficiency of double coincidences *D*,
257
- * the standard uncertainty of the estimation of *D*,
258
- * the estimation of the counting efficiency of triple coincidences *T*,
259
- * the standard uncertainty of the estimation of *T*.
260
-
261
- Example with `mode2 = "sym"`:
262
-
263
- ```python
264
- import tdcrpy
265
-
266
- TD = 0.977667386529166
267
- TAB = 0.992232838598821
268
- TBC = 0.992343419459002
269
- TAC = 0.99275350064608
270
- Rad="Co-60"
271
- pmf_1="1"
272
- N = 250
273
- kB =1.0e-5
274
- V = 10
275
- mode2 = "sym"
276
-
277
- result = tdcrpy.TDCRoptimize.eff(TD, TAB, TBC, TAC, Rad, pmf_1, kB, V, mode2, N=N)
278
-
279
- print("Global free parameter = \t", round(result[0],4), " keV-1")
280
- print("Free parameter (PMT A) = \t", round(result[1][0],4) , " keV-1")
281
- print("Free parameter (PMT B) = \t", round(result[1][1],4) , " keV-1")
282
- print("Free parameter (PMT C) = \t", round(result[1][2],4) , " keV-1")
283
- print("efficiency S = \t", round(result[2],4), "+/-", round(result[3],4))
284
- print("efficiency D = \t", round(result[4],4), "+/-", round(result[5],4))
285
- print("efficiency T = \t", round(result[6],4), "+/-", round(result[7],4))
286
- ```
287
-
288
- ```Console
289
- Global free parameter = 1.3061 keV-1
290
- Free parameter (PMT A) = 1.3061 keV-1
291
- Free parameter (PMT B) = 1.3061 keV-1
292
- Free parameter (PMT C) = 1.3061 keV-1
293
- efficiency S = 0.979 +/- 0.0067
294
- efficiency D = 0.9833 +/- 0.0064
295
- efficiency T = 0.963 +/- 0.0096
296
- ```
297
-
298
- Example with `mode2 = "asym"`:
299
-
300
- ```python
301
- import tdcrpy
302
-
303
- TD = 0.977667386529166
304
- TAB = 0.992232838598821
305
- TBC = 0.992343419459002
306
- TAC = 0.99275350064608
307
- Rad="Co-60"
308
- pmf_1="1"
309
- N = 250
310
- kB =1.0e-5
311
- V = 10
312
- mode2 = "asym"
313
-
314
- result = tdcrpy.TDCRoptimize.eff(TD, TAB, TBC, TAC, Rad, pmf_1, kB, V, mode2, N=N)
315
-
316
- print("Global free parameter = \t", round(result[0],4), " keV-1")
317
- print("Free parameter (PMT A) = \t", round(result[1][0],4) , " keV-1")
318
- print("Free parameter (PMT B) = \t", round(result[1][1],4) , " keV-1")
319
- print("Free parameter (PMT C) = \t", round(result[1][2],4) , " keV-1")
320
- print("efficiency S = \t", round(result[2],4), "+/-", round(result[3],4))
321
- print("efficiency D = \t", round(result[4],4), "+/-", round(result[5],4))
322
- print("efficiency T = \t", round(result[6],4), "+/-", round(result[7],4))
323
- ```
324
-
325
- ```Console
326
- Global free parameter = 1.3061 keV-1
327
- Free parameter (PMT A) = 1.3061 keV-1
328
- Free parameter (PMT B) = 1.3061 keV-1
329
- Free parameter (PMT C) = 1.3061 keV-1
330
- efficiency S = 0.979 +/- 0.0067
331
- efficiency D = 0.9833 +/- 0.0064
332
- efficiency T = 0.963 +/- 0.0096
333
- ```
334
-