TDCRPy 2.1.0__tar.gz → 2.4.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.

Files changed (87) hide show
  1. {tdcrpy-2.1.0/TDCRPy.egg-info → tdcrpy-2.4.0}/PKG-INFO +14 -2
  2. {tdcrpy-2.1.0 → tdcrpy-2.4.0/TDCRPy.egg-info}/PKG-INFO +14 -2
  3. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/setup.py +1 -1
  4. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/TDCRPy.py +88 -22
  5. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/TDCR_model_lib.py +159 -2
  6. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/LICENCE.md +0 -0
  7. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/MANIFEST.in +0 -0
  8. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/README.md +0 -0
  9. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/TDCRPy.egg-info/SOURCES.txt +0 -0
  10. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/TDCRPy.egg-info/dependency_links.txt +0 -0
  11. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/TDCRPy.egg-info/requires.txt +0 -0
  12. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/TDCRPy.egg-info/top_level.txt +0 -0
  13. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/setup.cfg +0 -0
  14. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_C-14.txt +0 -0
  15. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ca-45.txt +0 -0
  16. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Co-60.txt +0 -0
  17. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_H-3.txt +0 -0
  18. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ni-63.txt +0 -0
  19. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pm-147.txt +0 -0
  20. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pu-241.txt +0 -0
  21. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_S-35.txt +0 -0
  22. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-89.txt +0 -0
  23. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-90.txt +0 -0
  24. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Tc-99.txt +0 -0
  25. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/E_depose.txt +0 -0
  26. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt +0 -0
  27. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_2000_10000k.txt +0 -0
  28. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt +0 -0
  29. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt +0 -0
  30. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt +0 -0
  31. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt +0 -0
  32. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_1_200k.txt +0 -0
  33. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_2000_10000k.txt +0 -0
  34. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_200_2000k.txt +0 -0
  35. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_1_200k.txt +0 -0
  36. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_2000_10000k.txt +0 -0
  37. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-photon_200_2000k.txt +0 -0
  38. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt +0 -0
  39. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_2000_10000k.txt +0 -0
  40. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt +0 -0
  41. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt +0 -0
  42. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_2000_10000k.txt +0 -0
  43. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt +0 -0
  44. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Micelle/2nmfaq01.csv +0 -0
  45. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Micelle/faq01.csv +0 -0
  46. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_0.015.txt +0 -0
  47. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.1e-05.txt +0 -0
  48. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.2e-05.txt +0 -0
  49. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.3e-05.txt +0 -0
  50. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.4e-05.txt +0 -0
  51. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1.5e-05.txt +0 -0
  52. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_1e-05.txt +0 -0
  53. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_6e-06.txt +0 -0
  54. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_7e-06.txt +0 -0
  55. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_8e-06.txt +0 -0
  56. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyAlpha_9e-06.txt +0 -0
  57. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.006.txt +0 -0
  58. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.007.txt +0 -0
  59. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.008.txt +0 -0
  60. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.009.txt +0 -0
  61. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.01.txt +0 -0
  62. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.011.txt +0 -0
  63. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.012.txt +0 -0
  64. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.013.txt +0 -0
  65. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.014.txt +0 -0
  66. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/QuenchEnergyElectron_0.015.txt +0 -0
  67. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/TandataUG.txt +0 -0
  68. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/alpha_toulene.txt +0 -0
  69. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/inputVecteurAlpha.txt +0 -0
  70. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/Quenching/inputVecteurElectron.txt +0 -0
  71. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/TDCRPy1.py +0 -0
  72. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/TDCRoptimize.py +0 -0
  73. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/__init__.py +0 -0
  74. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/config.toml +0 -0
  75. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/decayData/All-nuclides_BetaShape.zip +0 -0
  76. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
  77. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/decayData/All-nuclides_PenNuc.zip +0 -0
  78. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/decayData/atom-ENDF-VII0.zip +0 -0
  79. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/decayData/photo-ENDF.zip +0 -0
  80. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/docs/_build/html/genindex.html +0 -0
  81. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/docs/_build/html/index.html +0 -0
  82. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/docs/_build/html/search.html +0 -0
  83. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/docs/_build/html/source/modules.html +0 -0
  84. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/docs/_build/html/source/tdcrpy.html +0 -0
  85. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/test/__init__.py +0 -0
  86. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/test/test_tdcrpy.py +0 -0
  87. {tdcrpy-2.1.0 → tdcrpy-2.4.0}/tdcrpy/test2.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: TDCRPy
3
- Version: 2.1.0
3
+ Version: 2.4.0
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -27,6 +27,18 @@ Requires-Dist: scipy
27
27
  Requires-Dist: configparser
28
28
  Requires-Dist: importlib.resources
29
29
  Requires-Dist: matplotlib
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: keywords
37
+ Dynamic: license-file
38
+ Dynamic: project-url
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
30
42
 
31
43
  # 1. About TDCRPy
32
44
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: TDCRPy
3
- Version: 2.1.0
3
+ Version: 2.4.0
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -27,6 +27,18 @@ Requires-Dist: scipy
27
27
  Requires-Dist: configparser
28
28
  Requires-Dist: importlib.resources
29
29
  Requires-Dist: matplotlib
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: keywords
37
+ Dynamic: license-file
38
+ Dynamic: project-url
39
+ Dynamic: requires-dist
40
+ Dynamic: requires-python
41
+ Dynamic: summary
30
42
 
31
43
  # 1. About TDCRPy
32
44
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
  import codecs
3
3
  import os
4
4
 
5
- VERSION = "2.1.0"
5
+ VERSION = "2.4.0"
6
6
 
7
7
  DESCRIPTION = "TDCR model"
8
8
 
@@ -84,7 +84,7 @@ def relaxAtom(daughter_relax,particle_vec,energy_vec,rad,Display=False,uncData=F
84
84
  relaxation = False
85
85
  return particle_vec, energy_vec
86
86
 
87
- def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smodel=True, record = False, readRecHist = False, uncData=False):
87
+ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smodel=True, record = False, readRecHist = False, uncData = False, fullMC = False):
88
88
  """
89
89
  This is the main function of the TDCRPy package.
90
90
  The computation is made for a given solution containing a radionuclide (or a mixture of radionuclides), a given volume of scintillator V and a given Birks constant kB.
@@ -254,7 +254,10 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
254
254
  if decay != decaym:
255
255
  if decay>0:
256
256
  # print(decay-1,e_quenching,e_quenching2, evenement)
257
- efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
257
+ if fullMC:
258
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilitiesMC(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
259
+ else:
260
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
258
261
  efficiency_S.append(efficiency0_S)
259
262
  efficiency_T.append(efficiency0_T)
260
263
  efficiency_D.append(efficiency0_D)
@@ -281,8 +284,11 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
281
284
  e_quenching2.append(energy)
282
285
  else:
283
286
  e_quenching.append(energy)
284
-
285
- efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
287
+
288
+ if fullMC:
289
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilitiesMC(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
290
+ else:
291
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
286
292
  efficiency_S.append(efficiency0_S)
287
293
  efficiency_T.append(efficiency0_T)
288
294
  efficiency_D.append(efficiency0_D)
@@ -691,7 +697,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
691
697
 
692
698
  if p == "electron" or ("Auger" in p): col1 = "1"
693
699
  elif p == "gamma" or ("X" in p): col1 = "2"
694
- elif p == "beta+": col1 = "3"
700
+ elif p == "positron": col1 = "3"
695
701
  elif p == "alpha": col1 = "4"
696
702
  else: writeOn = False
697
703
 
@@ -709,7 +715,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
709
715
 
710
716
  if p == "electron" or ("Auger" in p): col1 = "1"
711
717
  elif p == "gamma" or ("X" in p): col1 = "2"
712
- elif p == "beta+": col1 = "3"
718
+ elif p == "positron": col1 = "3"
713
719
  elif p == "alpha": col1 = "4"
714
720
  else: writeOn = False
715
721
 
@@ -825,7 +831,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
825
831
 
826
832
  if p == "electron" or ("Auger" in p): col1 = "1"
827
833
  elif p == "gamma" or ("X" in p): col1 = "2"
828
- elif p == "beta+": col1 = "3"
834
+ elif p == "positron": col1 = "3"
829
835
  elif p == "alpha": col1 = "4"
830
836
  else: writeOn = False
831
837
 
@@ -843,7 +849,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
843
849
 
844
850
  if p == "electron" or ("Auger" in p): col1 = "1"
845
851
  elif p == "gamma" or ("X" in p): col1 = "2"
846
- elif p == "beta+": col1 = "3"
852
+ elif p == "positron": col1 = "3"
847
853
  elif p == "alpha": col1 = "4"
848
854
  else: writeOn = False
849
855
 
@@ -911,7 +917,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
911
917
 
912
918
  if p == "electron" or ("Auger" in p): col1 = "1"
913
919
  elif p == "gamma" or ("X" in p): col1 = "2"
914
- elif p == "beta+": col1 = "3"
920
+ elif p == "positron": col1 = "3"
915
921
  elif p == "alpha": col1 = "4"
916
922
  else: writeOn = False
917
923
 
@@ -929,7 +935,7 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
929
935
 
930
936
  if p == "electron" or ("Auger" in p): col1 = "1"
931
937
  elif p == "gamma" or ("X" in p): col1 = "2"
932
- elif p == "beta+": col1 = "3"
938
+ elif p == "positron": col1 = "3"
933
939
  elif p == "alpha": col1 = "4"
934
940
  else: writeOn = False
935
941
 
@@ -949,7 +955,10 @@ def TDCRPy(L, Rad, pmf_1, N, kB, V, mode="eff", Display=False, barp=False, Smode
949
955
  ====================
950
956
  '''
951
957
  if evenement == 1: e_quenching2 = 0; t1=0
952
- efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
958
+ if fullMC:
959
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilitiesMC(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
960
+ else:
961
+ efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2 = tl.detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime)
953
962
  efficiency_S.append(efficiency0_S)
954
963
  efficiency_T.append(efficiency0_T)
955
964
  efficiency_D.append(efficiency0_D)
@@ -1137,7 +1146,7 @@ def effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7, disp=False):
1137
1146
  Parameters
1138
1147
  ----------
1139
1148
  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)
1149
+ 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/D, T/AB, T/BC, T/AC)
1141
1150
  Rad : string
1142
1151
  List of radionuclides (eg. "H-3, Co-60").
1143
1152
  pmf_1 : string
@@ -1226,18 +1235,74 @@ def effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7, disp=False):
1226
1235
 
1227
1236
 
1228
1237
 
1238
+ # mode = "eff" # ask for efficiency calculation
1239
+ # Rad="Na-22" # radionuclides
1240
+ # pmf_1="1" # relatives fractions of the radionulides
1241
+ # N = 1000 # number of Monte Carlo trials
1242
+ # kB =1.0e-5 # Birks constant in cm keV-1
1243
+ # V = 10 # volume of scintillator in mL
1244
+ # L=np.logspace(-3,2,num=100) # free parameter in keV-1
1245
+
1246
+ # # TDCRPy(1, Rad, pmf_1, 10, kB, V, mode, Display= True, barp=False, record=True)
1247
+ # # Record decay histories in temporary files
1248
+ # TDCRPy(L[0], Rad, pmf_1, N, kB, V, mode, barp=False, record=True)
1249
+
1250
+ # effS, u_effS, effD, u_effD, effT, u_effT, effD2, u_effD2 = [], [],[], [],[], [], [], []
1251
+ # for l in tqdm(L, desc="free parameters ", unit=" iterations"):
1252
+ # out = TDCRPy(l, Rad, pmf_1, N, kB, V, mode, readRecHist=True)
1253
+ # effS.append(out[2])
1254
+ # u_effS.append(out[3])
1255
+ # effD.append(out[2])
1256
+ # u_effD.append(out[3])
1257
+ # effT.append(out[4])
1258
+ # u_effT.append(out[5])
1259
+ # effD2.append(out[12])
1260
+ # u_effD2.append(out[13])
1261
+
1262
+ # effS=np.asarray(effS)
1263
+ # effT=np.asarray(effT)
1264
+ # effD=np.asarray(effD)
1265
+ # effD2=np.asarray(effD2)
1266
+ # u_effS=np.asarray(u_effS)
1267
+ # u_effT=np.asarray(u_effT)
1268
+ # u_effD=np.asarray(u_effD)
1269
+ # u_effD2=np.asarray(u_effD2)
1270
+
1271
+ # tdcr=effT/effD
1272
+ # u_tdcr=np.sqrt(u_effD**2*effT**2/effD**4+u_effT**2/effD**2)
1273
+
1274
+ # import matplotlib.pyplot as plt
1275
+ # plt.figure("efficiency vs free parameter")
1276
+ # plt.clf()
1277
+ # plt.errorbar(L,effD,yerr=u_effD,fmt="-k",label="double coincidences")
1278
+ # plt.errorbar(L,effT,yerr=u_effT,fmt="-r",label="triple coincidences")
1279
+ # plt.errorbar(L,effD2,yerr=u_effD2,fmt="-g",label="double coincidences (CIEMAT/NIST)")
1280
+ # plt.xscale('log')
1281
+ # plt.xlabel(r'$L$ /keV$^{-1}$', fontsize=14)
1282
+ # plt.ylabel(r'$\epsilon$', fontsize=14)
1283
+ # plt.legend()
1284
+
1285
+ # plt.figure("efficiency vs TDCR")
1286
+ # plt.clf()
1287
+ # plt.errorbar(tdcr,effD,xerr=u_tdcr,yerr=u_effD,fmt="-k")
1288
+ # #plt.xscale('log')
1289
+ # plt.xlabel(r'$R_T/R_D$', fontsize=14)
1290
+ # plt.ylabel(r'$\epsilon_{D}$', fontsize=14)
1291
+ # plt.show()
1229
1292
 
1230
1293
 
1231
1294
  # L = 1
1232
1295
  # # L = (1.1, 1.05, 1.15)
1233
- # TD = 0.977667386529166
1234
- # # TD = (0.977667386529166, 0.992232838598821, 0.992343419459002, 0.99275350064608)
1235
- # # # TD = (0.977667386529166, 0.995232838598821, 0.990343419459002, 0.99275350064608)
1236
- # Rad="Co-60"
1296
+ # # TD = 0.977667386529166
1297
+ # # TD = (0.9767359812638453, 0.9925429293804757, 0.991829757077315, 0.9919970813639295) # source 1
1298
+ # # TD = (0.9768862920127371, 0.9928478299182348, 0.9912531441227223, 0.9924249578285456) # source 2
1299
+ # # TD = (0.9769014488454436, 0.9918130431206161, 0.9920156754198314, 0.9927119011073454) # source 3
1300
+ # TD = (0.9764032345164899, 0.9928417189012709, 0.9911455450383777, 0.9920402844839974) # source 4
1301
+ # Rad="Tc-99"
1237
1302
  # pmf_1="1"
1238
- # N = 1000
1239
- # kB =1.0e-5
1240
- # V = 10
1303
+ # N = 10000
1304
+ # kB =1.4e-5
1305
+ # V = 16
1241
1306
  # mode = "eff"
1242
1307
 
1243
1308
 
@@ -1246,6 +1311,7 @@ def effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7, disp=False):
1246
1311
  # # # out = TDCRPy(L, Rad, pmf_1, N, kB, V, Display = False, record = False, readRecHist = True)
1247
1312
  # # # print("result", out)
1248
1313
 
1249
- # # out = eff(TD, Rad, pmf_1, kB, V, N=1000, L=1, maxiter=20, xatol=1e-7)
1250
- # out = effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7)
1251
- # print(out)
1314
+ # outS = eff(TD, Rad, pmf_1, kB, V, N=10000, L=1, maxiter=20, xatol=1e-7)
1315
+ # outA = effA(TD, Rad, pmf_1, kB, V, L=1, maxiter=20, xatol=1e-7)
1316
+ # print(outS)
1317
+ # print(outA)
@@ -2894,6 +2894,7 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
2894
2894
  symm = False
2895
2895
  else:
2896
2896
  symm = True
2897
+
2897
2898
 
2898
2899
  if symm:
2899
2900
  # print(evenement !=1, t1 > extDT*1e-6, t1 < measTime*60)
@@ -2935,8 +2936,6 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
2935
2936
  efficiency0_A2 = p_single
2936
2937
  efficiency0_B2 = efficiency0_A2
2937
2938
  efficiency0_D2 = p_single**2
2938
-
2939
-
2940
2939
  else:
2941
2940
  if evenement !=1 and t1 > extDT*1e-6 and t1 < measTime*60:
2942
2941
  # TDCR
@@ -3005,6 +3004,164 @@ def detectProbabilities(L, e_quenching, e_quenching2, t1, evenement, extDT, meas
3005
3004
  return efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2
3006
3005
 
3007
3006
 
3007
+ def detectProbabilitiesMC(L, e_quenching, e_quenching2, t1, evenement, extDT, measTime):
3008
+ """
3009
+ 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
3010
+
3011
+ Parameters
3012
+ ----------
3013
+ L : float or tuple
3014
+ If L is float, then L is the global free parameter. If L is tuple, then L is a triplet of free parameters. unit keV-1
3015
+ e_quenching : list
3016
+ List of quenched deposited energies from prompt particles in keV.
3017
+ e_quenching2 : list
3018
+ List of quenched deposited energies from delayed particles in keV.
3019
+ t1 : float
3020
+ decay time of the delayed transitions in s.
3021
+ evenement : interger
3022
+ number of pulses per decay (prompt (1), prompt + delayed (2)).
3023
+ extDT : float
3024
+ extended dead time of the system in ns.
3025
+ measTime : float
3026
+ measurement time in minutes.
3027
+
3028
+ Returns
3029
+ -------
3030
+ efficiency0_S : float
3031
+ detection probability of single event.
3032
+ efficiency0_D : float
3033
+ detection probability of double coincidences.
3034
+ efficiency0_T : float
3035
+ detection probability of triple coincidences.
3036
+ efficiency0_AB : float
3037
+ detection probability of coincidences between channels A and B.
3038
+ efficiency0_BC : float
3039
+ detection probability of coincidences between channels B and C.
3040
+ efficiency0_AC : float
3041
+ detection probability of coincidences between channels A and C.
3042
+ efficiency0_D2 : float
3043
+ detection probability of coincidences in a C/N system.
3044
+
3045
+ """
3046
+ if isinstance(L, (tuple, list)):
3047
+ symm = False
3048
+ else:
3049
+ symm = True
3050
+
3051
+ if symm:
3052
+ if evenement !=1 and t1 > extDT*1e-6 and t1 < measTime*60:
3053
+ m = len(e_quenching)
3054
+ n_ph = np.random.poisson(np.asarray((e_quenching+e_quenching2)*L))
3055
+ n_S = 0; n_D = 0; n_T = 0; n_AB = 0; n_BC = 0; n_AC = 0; n_D2 = 0; n_A2 = 0; n_B2 = 0;
3056
+ for j in n_ph:
3057
+ n_phPMT = np.random.multinomial(j, [1/3, 1/3, 1/3])
3058
+ if sum(n_phPMT>1)>0: n_S +=1
3059
+ if sum(n_phPMT>1)>1: n_D +=1
3060
+ if sum(n_phPMT>1)>2: n_T +=1
3061
+ if n_phPMT[0]>1 and n_phPMT[1]>1: n_AB +=1
3062
+ if n_phPMT[1]>1 and n_phPMT[2]>1: n_BC +=1
3063
+ if n_phPMT[0]>1 and n_phPMT[2]>1: n_AC +=1
3064
+ efficiency0_S = n_S/m
3065
+ efficiency0_T = n_T/m
3066
+ efficiency0_D = n_D/m
3067
+ efficiency0_AB = n_AB/m
3068
+ efficiency0_BC = n_BC/m
3069
+ efficiency0_AC = n_AC/m
3070
+ for j in n_ph:
3071
+ n_phPMT = np.random.multinomial(j, [1/2, 1/2])
3072
+ if sum(n_phPMT>1)>1: n_D2 +=1
3073
+ if n_phPMT[0]>1: n_A2 +=1
3074
+ if n_phPMT[1]>1: n_B2 +=1
3075
+ # efficiency0_A2 = n_A2/m
3076
+ # efficiency0_B2 = n_B2/m
3077
+ efficiency0_D2 = n_D2/m
3078
+ else: # symm and no deleayed event sum
3079
+ m = len(e_quenching)
3080
+ n_ph = np.random.poisson(np.asarray(e_quenching*L))
3081
+ n_S = 0; n_D = 0; n_T = 0; n_AB = 0; n_BC = 0; n_AC = 0; n_D2 = 0; n_A2 = 0; n_B2 = 0;
3082
+ for j in n_ph:
3083
+ n_phPMT = np.random.multinomial(j, [1/3, 1/3, 1/3])
3084
+ if sum(n_phPMT>1)>0: n_S +=1
3085
+ if sum(n_phPMT>1)>1: n_D +=1
3086
+ if sum(n_phPMT>1)>2: n_T +=1
3087
+ if n_phPMT[0]>1 and n_phPMT[1]>1: n_AB +=1
3088
+ if n_phPMT[1]>1 and n_phPMT[2]>1: n_BC +=1
3089
+ if n_phPMT[0]>1 and n_phPMT[2]>1: n_AC +=1
3090
+ efficiency0_S = n_S/m
3091
+ efficiency0_T = n_T/m
3092
+ efficiency0_D = n_D/m
3093
+ efficiency0_AB = n_AB/m
3094
+ efficiency0_BC = n_BC/m
3095
+ efficiency0_AC = n_AC/m
3096
+ for j in n_ph:
3097
+ n_phPMT = np.random.multinomial(j, [1/2, 1/2])
3098
+ if sum(n_phPMT>1)>1: n_D2 +=1
3099
+ if n_phPMT[0]>1: n_A2 +=1
3100
+ if n_phPMT[1]>1: n_B2 +=1
3101
+ # efficiency0_A2 = n_A2/m
3102
+ # efficiency0_B2 = n_B2/m
3103
+ efficiency0_D2 = n_D2/m
3104
+ else: # asym
3105
+ if evenement !=1 and t1 > extDT*1e-6 and t1 < measTime*60: # sum of delayed event
3106
+ m = len(e_quenching)
3107
+ Lm = np.mean(L)
3108
+ n_ph = np.random.poisson(np.asarray(e_quenching+e_quenching2)*Lm)
3109
+ n_S = 0; n_D = 0; n_T = 0; n_AB = 0; n_BC = 0; n_AC = 0; n_D2 = 0; n_A2 = 0; n_B2 = 0;
3110
+ for j in n_ph:
3111
+ n_phPMT = np.random.multinomial(j, [L[0]/(3*Lm), L[1]/(3*Lm), L[2]/(3*Lm)])
3112
+ if sum(n_phPMT>1)>0: n_S +=1
3113
+ if sum(n_phPMT>1)>1: n_D +=1
3114
+ if sum(n_phPMT>1)>2: n_T +=1
3115
+ if n_phPMT[0]>1 and n_phPMT[1]>1: n_AB +=1
3116
+ if n_phPMT[1]>1 and n_phPMT[2]>1: n_BC +=1
3117
+ if n_phPMT[0]>1 and n_phPMT[2]>1: n_AC +=1
3118
+ efficiency0_S = n_S/m
3119
+ efficiency0_T = n_T/m
3120
+ efficiency0_D = n_D/m
3121
+ efficiency0_AB = n_AB/m
3122
+ efficiency0_BC = n_BC/m
3123
+ efficiency0_AC = n_AC/m
3124
+ for j in n_ph:
3125
+ n_phPMT = np.random.multinomial(j, [L[0]/(2*Lm), L[1]/(2*Lm)])
3126
+ if sum(n_phPMT>1)>1: n_D2 +=1
3127
+ if n_phPMT[0]>1: n_A2 +=1
3128
+ if n_phPMT[1]>1: n_B2 +=1
3129
+ # efficiency0_A2 = n_A2/m
3130
+ # efficiency0_B2 = n_B2/m
3131
+ efficiency0_D2 = n_D2/m
3132
+ else: # asym and no sum of delayed events
3133
+ m = len(e_quenching)
3134
+ Lm = np.mean(L)
3135
+ n_ph = np.random.poisson(np.asarray((e_quenching+e_quenching2)*Lm))
3136
+ n_S = 0; n_D = 0; n_T = 0; n_AB = 0; n_BC = 0; n_AC = 0; n_D2 = 0; n_A2 = 0; n_B2 = 0;
3137
+ for j in n_ph:
3138
+ n_phPMT = np.random.multinomial(j, [L[0]/(3*Lm), L[1]/(3*Lm), L[2]/(3*Lm)])
3139
+ if sum(n_phPMT>1)>0: n_S +=1
3140
+ if sum(n_phPMT>1)>1: n_D +=1
3141
+ if sum(n_phPMT>1)>2: n_T +=1
3142
+ if n_phPMT[0]>1 and n_phPMT[1]>1: n_AB +=1
3143
+ if n_phPMT[1]>1 and n_phPMT[2]>1: n_BC +=1
3144
+ if n_phPMT[0]>1 and n_phPMT[2]>1: n_AC +=1
3145
+ efficiency0_S = n_S/m
3146
+ efficiency0_T = n_T/m
3147
+ efficiency0_D = n_D/m
3148
+ efficiency0_AB = n_AB/m
3149
+ efficiency0_BC = n_BC/m
3150
+ efficiency0_AC = n_AC/m
3151
+ for j in n_ph:
3152
+ n_phPMT = np.random.multinomial(j, [L[0]/(2*Lm), L[1]/(2*Lm)])
3153
+ if sum(n_phPMT>1)>1: n_D2 +=1
3154
+ if n_phPMT[0]>1: n_A2 +=1
3155
+ if n_phPMT[1]>1: n_B2 +=1
3156
+ # efficiency0_A2 = n_A2/m
3157
+ # efficiency0_B2 = n_B2/m
3158
+ efficiency0_D2 = n_D2/m
3159
+ return efficiency0_S, efficiency0_D, efficiency0_T, efficiency0_AB, efficiency0_BC, efficiency0_AC, efficiency0_D2
3160
+
3161
+
3162
+
3163
+
3164
+
3008
3165
  def efficienciesEstimates(efficiency_S, efficiency_D, efficiency_T, efficiency_AB, efficiency_BC, efficiency_AC, efficiency_D2, N):
3009
3166
  """
3010
3167
  Calculate detection efficiencies from list of detection probabilities per decays.
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