TDCRPy 2.12.13__tar.gz → 2.14.0__tar.gz
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.
- {tdcrpy-2.12.13/TDCRPy.egg-info → tdcrpy-2.14.0}/PKG-INFO +2 -2
- {tdcrpy-2.12.13 → tdcrpy-2.14.0/TDCRPy.egg-info}/PKG-INFO +2 -2
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/setup.py +2 -2
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/TDCRPy.py +4 -4
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/TDCR_model_lib.py +27 -25
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/test_randomGen.py +11 -15
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/LICENCE.md +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/MANIFEST.in +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/README.md +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/TDCRPy.egg-info/SOURCES.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/TDCRPy.egg-info/dependency_links.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/TDCRPy.egg-info/requires.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/TDCRPy.egg-info/top_level.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/setup.cfg +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_C-14.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ca-45.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Co-60.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_H-3.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ni-63.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pm-147.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pu-241.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_S-35.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-89.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-90.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Tc-99.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/E_depose.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_2000_10000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Micelle/2nmfaq01.csv +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Micelle/faq01.csv +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_0.015.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.1e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.2e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.3e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.4e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.5e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1e-05.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_6e-06.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_7e-06.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_8e-06.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyAlpha_9e-06.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.006.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.007.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.008.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.009.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.01.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.011.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.012.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.013.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.014.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.015.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/TandataUG.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/alpha_toulene.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/inputVecteurAlpha.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/Quenching/inputVecteurElectron.txt +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/TDCRPy1.py +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/TDCRoptimize.py +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/__init__.py +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/config.toml +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/decayData/All-nuclides_BetaShape.zip +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/decayData/All-nuclides_PenNuc.zip +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/decayData/atom-ENDF-VII0.zip +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/decayData/photo-ENDF.zip +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/docs/_build/html/genindex.html +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/docs/_build/html/index.html +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/docs/_build/html/search.html +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/docs/_build/html/source/modules.html +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/docs/_build/html/source/tdcrpy.html +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/test/__init__.py +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/test/test_tdcrpy.py +0 -0
- {tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/test2.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: TDCRPy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.14.0
|
|
4
4
|
Summary: TDCR model
|
|
5
5
|
Home-page: https://pypi.org/project/TDCRPy/
|
|
6
6
|
Author: RomainCoulon (Romain Coulon)
|
|
7
7
|
Author-email: <romain.coulon@bipm.org>
|
|
8
8
|
Project-URL: Documentation, https://github.com/RomainCoulon/TDCRPy/
|
|
9
9
|
Keywords: Python,TDCR,Monte-Carlo,radionuclide,scintillation,counting
|
|
10
|
-
Classifier: Development Status ::
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Science/Research
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Natural Language :: English
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: TDCRPy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.14.0
|
|
4
4
|
Summary: TDCR model
|
|
5
5
|
Home-page: https://pypi.org/project/TDCRPy/
|
|
6
6
|
Author: RomainCoulon (Romain Coulon)
|
|
7
7
|
Author-email: <romain.coulon@bipm.org>
|
|
8
8
|
Project-URL: Documentation, https://github.com/RomainCoulon/TDCRPy/
|
|
9
9
|
Keywords: Python,TDCR,Monte-Carlo,radionuclide,scintillation,counting
|
|
10
|
-
Classifier: Development Status ::
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Science/Research
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Natural Language :: English
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
import codecs
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
-
VERSION = "2.
|
|
5
|
+
VERSION = "2.14.0"
|
|
6
6
|
|
|
7
7
|
DESCRIPTION = "TDCR model"
|
|
8
8
|
|
|
@@ -30,7 +30,7 @@ setup(
|
|
|
30
30
|
python_requires='>=3.11',
|
|
31
31
|
keywords = ["Python","TDCR","Monte-Carlo","radionuclide","scintillation","counting"],
|
|
32
32
|
classifiers=[
|
|
33
|
-
"Development Status ::
|
|
33
|
+
"Development Status :: 5 - Production/Stable",
|
|
34
34
|
"Intended Audience :: Science/Research",
|
|
35
35
|
"License :: OSI Approved :: MIT License",
|
|
36
36
|
"Natural Language :: English",
|
|
@@ -1108,8 +1108,8 @@ def eff(TD, Rad, pmf_1, kB, V, N=10000, L=1, maxiter=20, xatol=1e-7, disp=False)
|
|
|
1108
1108
|
|
|
1109
1109
|
TDCRPy(L, Rad, pmf_1, N, kB, V, record = True)
|
|
1110
1110
|
|
|
1111
|
-
if symm: r=opt.minimize_scalar(objectFct, args=(TD, Rad, pmf_1, N, kB, V), method='bounded', bounds = (0.
|
|
1112
|
-
else: r=opt.minimize_scalar(objectFct, args=(TD[0], Rad, pmf_1, N, kB, V), method='bounded', bounds = (0.
|
|
1111
|
+
if symm: r=opt.minimize_scalar(objectFct, args=(TD, Rad, pmf_1, N, kB, V), method='bounded', bounds = (0.01, 50), options={'disp': disp, 'maxiter':maxiter})
|
|
1112
|
+
else: r=opt.minimize_scalar(objectFct, args=(TD[0], Rad, pmf_1, N, kB, V), method='bounded', bounds = (0.01, 50), options={'disp': disp, 'maxiter':maxiter})
|
|
1113
1113
|
L0=r.x
|
|
1114
1114
|
L=(L0, L0, L0)
|
|
1115
1115
|
print(f"global free parameter = {L0} keV-1")
|
|
@@ -1204,8 +1204,8 @@ def effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7, disp=False):
|
|
|
1204
1204
|
else:
|
|
1205
1205
|
symm = True
|
|
1206
1206
|
|
|
1207
|
-
if symm: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD, TD, TD, TD, Rad, kB, V, "res", 1e3), method='bounded', bounds = (0.
|
|
1208
|
-
else: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD[0], TD[1], TD[2], TD[3], Rad, kB, V, "res", 1e3), method='bounded', bounds = (0.
|
|
1207
|
+
if symm: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD, TD, TD, TD, Rad, kB, V, "res", 1e3), method='bounded', bounds = (0.01, 50), options={'disp': disp, 'maxiter':maxiter})
|
|
1208
|
+
else: r=opt.minimize_scalar(tl.modelAnalytical, args=(TD[0], TD[1], TD[2], TD[3], Rad, kB, V, "res", 1e3), method='bounded', bounds = (0.01, 50), options={'disp': disp, 'maxiter':maxiter})
|
|
1209
1209
|
L0=r.x
|
|
1210
1210
|
L=(L0, L0, L0)
|
|
1211
1211
|
print(f"global free parameter = {L0} keV-1")
|
|
@@ -11,7 +11,6 @@ Bureau International des Poids et Mesures
|
|
|
11
11
|
"""
|
|
12
12
|
======= Import Python Module =======
|
|
13
13
|
"""
|
|
14
|
-
|
|
15
14
|
import importlib.resources
|
|
16
15
|
from importlib.resources import files
|
|
17
16
|
import pkg_resources
|
|
@@ -121,7 +120,7 @@ def readConfigAsstr():
|
|
|
121
120
|
def writeConfifAsstr(data):
|
|
122
121
|
path2config = str(config.read(file_conf)[0])
|
|
123
122
|
with open(path2config, 'w') as file:
|
|
124
|
-
file.write(data)
|
|
123
|
+
file.write(data)
|
|
125
124
|
|
|
126
125
|
def modifynE_electron(x):
|
|
127
126
|
data0 = readConfigAsstr()
|
|
@@ -2907,7 +2906,7 @@ def buildBetaSpectra(rad, V, N, prt=False):
|
|
|
2907
2906
|
else: file.write(f"{b}\t{p2[i]}\n")
|
|
2908
2907
|
print("file written in local")
|
|
2909
2908
|
|
|
2910
|
-
def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime):
|
|
2909
|
+
def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime, effQuantic = effQuantic):
|
|
2911
2910
|
"""
|
|
2912
2911
|
Calculate detection probabilities for LS counting systems - see Broda, R., Cassette, P., Kossert, K., 2007. Radionuclide metrology using liquid scintillation counting. Metrologia 44. https://doi.org/10.1088/0026-1394/44/4/S06
|
|
2913
2912
|
|
|
@@ -2948,17 +2947,20 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
2948
2947
|
"""
|
|
2949
2948
|
if isinstance(L, (tuple, list)):
|
|
2950
2949
|
symm = False
|
|
2950
|
+
mu = effQuantic
|
|
2951
2951
|
else:
|
|
2952
2952
|
symm = True
|
|
2953
|
+
mu = np.mean(effQuantic)
|
|
2953
2954
|
|
|
2955
|
+
|
|
2954
2956
|
|
|
2955
2957
|
if symm:
|
|
2956
2958
|
|
|
2957
2959
|
if evenement !=1 and t1 > extDT*1e-6 and t1 < measTime*60:
|
|
2958
2960
|
# TDCR
|
|
2959
|
-
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
2961
|
+
p_nosingle = np.exp(-L*mu*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
2960
2962
|
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
2961
|
-
p_nosingle2 = np.exp(-L*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
2963
|
+
p_nosingle2 = np.exp(-L*mu*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
2962
2964
|
p_single2 = 1-p_nosingle2
|
|
2963
2965
|
efficiency0_S = 1-p_nosingle**3+1-p_nosingle2**3
|
|
2964
2966
|
efficiency0_T = p_single**3+p_single2**3
|
|
@@ -2968,16 +2970,16 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
2968
2970
|
efficiency0_AC = efficiency0_AB
|
|
2969
2971
|
|
|
2970
2972
|
# CN
|
|
2971
|
-
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
2973
|
+
p_nosingle = np.exp(-L*mu*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
2972
2974
|
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
2973
|
-
p_nosingle2 = np.exp(-L*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
2975
|
+
p_nosingle2 = np.exp(-L*mu*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
2974
2976
|
p_single2 = 1-p_nosingle2
|
|
2975
2977
|
efficiency0_A2 = p_single+p_single2
|
|
2976
2978
|
efficiency0_B2 = efficiency0_A2
|
|
2977
2979
|
efficiency0_D2 = p_single**2+p_single2**2
|
|
2978
2980
|
else:
|
|
2979
2981
|
# TDCR
|
|
2980
|
-
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
2982
|
+
p_nosingle = np.exp(-L*mu*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
2981
2983
|
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
2982
2984
|
efficiency0_S = 1-p_nosingle**3
|
|
2983
2985
|
efficiency0_T = p_single**3
|
|
@@ -2987,7 +2989,7 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
2987
2989
|
efficiency0_AC = efficiency0_AB
|
|
2988
2990
|
|
|
2989
2991
|
# CN
|
|
2990
|
-
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
2992
|
+
p_nosingle = np.exp(-L*mu*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
2991
2993
|
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
2992
2994
|
efficiency0_A2 = p_single
|
|
2993
2995
|
efficiency0_B2 = efficiency0_A2
|
|
@@ -2995,18 +2997,18 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
2995
2997
|
else:
|
|
2996
2998
|
if evenement !=1 and t1 > extDT*1e-6 and t1 < measTime*60:
|
|
2997
2999
|
# TDCR
|
|
2998
|
-
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3000
|
+
pA_nosingle = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
2999
3001
|
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
3000
|
-
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3002
|
+
pB_nosingle = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3001
3003
|
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
3002
|
-
pC_nosingle = np.exp(-L[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3004
|
+
pC_nosingle = np.exp(-L[2]*mu[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3003
3005
|
pC_single = 1-pC_nosingle # probability to have at least 1 electrons in a PMT
|
|
3004
3006
|
|
|
3005
|
-
pA_nosingle2 = np.exp(-L[0]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3007
|
+
pA_nosingle2 = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3006
3008
|
pA_single2 = 1-pA_nosingle2 # probability to have at least 1 electrons in a PMT
|
|
3007
|
-
pB_nosingle2 = np.exp(-L[1]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3009
|
+
pB_nosingle2 = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3008
3010
|
pB_single2 = 1-pB_nosingle2 # probability to have at least 1 electrons in a PMT
|
|
3009
|
-
pC_nosingle2 = np.exp(-L[2]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3011
|
+
pC_nosingle2 = np.exp(-L[2]*mu[2]*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
|
|
3010
3012
|
pC_single2 = 1-pC_nosingle2 # probability to have at least 1 electrons in a PMT
|
|
3011
3013
|
|
|
3012
3014
|
efficiency0_A2 = pA_single+pA_single2
|
|
@@ -3021,24 +3023,24 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
3021
3023
|
|
|
3022
3024
|
|
|
3023
3025
|
# CN
|
|
3024
|
-
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3026
|
+
pA_nosingle = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3025
3027
|
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
3026
|
-
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3028
|
+
pB_nosingle = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3027
3029
|
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
3028
3030
|
|
|
3029
|
-
pA_nosingle2 = np.exp(-L[0]*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
3031
|
+
pA_nosingle2 = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
3030
3032
|
pA_single2 = 1-pA_nosingle2 # probability to have at least 1 electrons in a PMT
|
|
3031
|
-
pB_nosingle2 = np.exp(-L[1]*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
3033
|
+
pB_nosingle2 = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching2))/2) # probability to have 0 electrons in a PMT
|
|
3032
3034
|
pB_single2 = 1-pB_nosingle2 # probability to have at least 1 electrons in a PMT
|
|
3033
3035
|
|
|
3034
3036
|
efficiency0_D2 = pA_single*pB_single+pA_single2*pB_single2
|
|
3035
3037
|
else:
|
|
3036
3038
|
# TDCR
|
|
3037
|
-
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3039
|
+
pA_nosingle = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3038
3040
|
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
3039
|
-
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3041
|
+
pB_nosingle = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3040
3042
|
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
3041
|
-
pC_nosingle = np.exp(-L[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3043
|
+
pC_nosingle = np.exp(-L[2]*mu[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
3042
3044
|
pC_single = 1-pC_nosingle # probability to have at least 1 electrons in a PMT
|
|
3043
3045
|
|
|
3044
3046
|
efficiency0_A2 = pA_single
|
|
@@ -3051,9 +3053,9 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
|
|
|
3051
3053
|
efficiency0_S = 1-pA_nosingle*pB_nosingle*pC_nosingle
|
|
3052
3054
|
|
|
3053
3055
|
# CN
|
|
3054
|
-
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3056
|
+
pA_nosingle = np.exp(-L[0]*mu[0]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3055
3057
|
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
3056
|
-
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3058
|
+
pB_nosingle = np.exp(-L[1]*mu[1]*np.sum(np.asarray(e_quenching))/2) # probability to have 0 electrons in a PMT
|
|
3057
3059
|
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
3058
3060
|
efficiency0_D2 = pA_single*pB_single
|
|
3059
3061
|
|
|
@@ -3207,7 +3209,7 @@ def detectProbabilitiesMC(L, e_quenching, e_quenching2, t1, evenement, extDT, me
|
|
|
3207
3209
|
def stochasOpticModel(e_q, L, mu):
|
|
3208
3210
|
n_e=np.zeros(3); n_eCN=np.zeros(2) # initilize the number of photoelectrons
|
|
3209
3211
|
|
|
3210
|
-
n_ph = np.random.poisson(sum(np.asarray(e_q))*np.mean(L)
|
|
3212
|
+
n_ph = np.random.poisson(sum(np.asarray(e_q))*np.mean(L)) # sample the number of scintillation photons
|
|
3211
3213
|
|
|
3212
3214
|
pTD = stochasticDepTD(diffP, PMTspace) # probabilities for photons to move towards the different PMTs (TDCR configuration)
|
|
3213
3215
|
n_phPMT = np.random.multinomial(n_ph, pTD) # sample the number of photons in each PMTs (TDCR configuration)
|
|
@@ -19,39 +19,35 @@ import numpy as np
|
|
|
19
19
|
# print(ps0-ps1,ups1)
|
|
20
20
|
# print(abs(ps0-ps1)<2*ups1)
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
import importlib
|
|
23
23
|
import tdcrpy
|
|
24
|
-
tdcrpy.TDCR_model_lib.modifyEffQ("0.
|
|
24
|
+
tdcrpy.TDCR_model_lib.modifyEffQ("0.1, 0.1, 0.1")
|
|
25
25
|
# tdcrpy.TDCR_model_lib.modifyOptModel("stochastic-dependence")
|
|
26
26
|
tdcrpy.TDCR_model_lib.modifyOptModel("poisson")
|
|
27
|
-
L = [
|
|
28
|
-
e_q = [
|
|
29
|
-
tdcrpy.TDCR_model_lib.readParameters(disp=True)
|
|
30
|
-
|
|
31
|
-
import tdcrpy
|
|
27
|
+
L = [1.0, 1.0, 1.0]
|
|
28
|
+
e_q = [100]
|
|
32
29
|
diffP = 1
|
|
33
|
-
|
|
30
|
+
importlib.reload(tdcrpy.TDCR_model_lib)
|
|
34
31
|
|
|
35
32
|
Q = tdcrpy.TDCR_model_lib.readEffQ0()
|
|
36
33
|
Q = Q.split(",")
|
|
37
34
|
Q = [float(i) for i in Q]
|
|
38
35
|
QL = [float(Qi)*L[i] for i, Qi in enumerate(Q)]
|
|
39
|
-
print("EffQ = ", Q)
|
|
40
|
-
print("EffQ*L = ", QL)
|
|
41
36
|
|
|
42
37
|
e_q2 = [0]; t1 = 0; evenement = 1; extDT = 50; measTime = 60000
|
|
43
38
|
|
|
44
|
-
# S,D,T,_,_,_,_ = detectProbabilities(QL, e_q, e_q2, t1, evenement, extDT, measTime)
|
|
45
39
|
S,D,T,_,_,_,_ = tdcrpy.TDCR_model_lib.detectProbabilities(QL, e_q, e_q2, t1, evenement, extDT, measTime)
|
|
46
40
|
SmcI=[];DmcI=[];TmcI=[]
|
|
47
41
|
nIter=100000
|
|
48
42
|
for i in range(nIter):
|
|
49
|
-
Smc,Dmc,Tmc,_,_,_,_ = tdcrpy.TDCR_model_lib.detectProbabilitiesMC(L, e_q, e_q2, t1, evenement, extDT, measTime,
|
|
50
|
-
PMTspace=0, diffP=diffP, effQuantic = Q)
|
|
51
|
-
# Smc,Dmc,Tmc,_,_,_,_ = detectProbabilitiesMC(L, e_q, e_q2, t1, evenement, extDT, measTime,
|
|
52
|
-
# PMTspace=0,diffP=diffP)
|
|
43
|
+
Smc,Dmc,Tmc,_,_,_,_ = tdcrpy.TDCR_model_lib.detectProbabilitiesMC(L, e_q, e_q2, t1, evenement, extDT, measTime, dispParam=True)
|
|
53
44
|
SmcI.append(Smc); DmcI.append(Dmc); TmcI.append(Tmc)
|
|
54
45
|
|
|
46
|
+
print('\n')
|
|
47
|
+
tdcrpy.TDCR_model_lib.readParameters(disp=True)
|
|
48
|
+
|
|
49
|
+
print("\nEffQ = ", Q, "\tEffQ*L = ", QL, "\n")
|
|
50
|
+
|
|
55
51
|
print("\nEFF, EFFmc, +/-")
|
|
56
52
|
print("single eff = ",round(S,4),round(np.mean(SmcI),4),round(np.std(SmcI)/np.sqrt(nIter),4))
|
|
57
53
|
print("double eff = ",round(D,4),round(np.mean(DmcI),4),round(np.std(DmcI)/np.sqrt(nIter),4))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt
RENAMED
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_200_2000k.txt
RENAMED
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt
RENAMED
|
File without changes
|
{tdcrpy-2.12.13 → tdcrpy-2.14.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|