TDCRPy 1.12.10__py3-none-any.whl → 1.12.11__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.10
3
+ Version: 1.12.11
4
4
  Summary: TDCR model
5
5
  Home-page: https://pypi.org/project/TDCRPy/
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -1,4 +1,4 @@
1
- tdcrpy/TDCRPy.py,sha256=r9n6AK4_8Oy7UF-asFMOd7kAgdaXuvT3BYLn33QhUko,54082
1
+ tdcrpy/TDCRPy.py,sha256=BF5D-SXuYJvmpZ4WzGao1rktNkM6Udn6Tj3QB62XPnA,54209
2
2
  tdcrpy/TDCRPy1.py,sha256=QTBZh5B5JWnGB0BQfD-cFmwA9W080OD4sG-aj50-ejo,38106
3
3
  tdcrpy/TDCR_model_lib.py,sha256=Vqbd-JVhGdF9BzW9axYwCHl2MOBfupCJ1ih5Nz_aXts,106906
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-1.12.10.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
- TDCRPy-1.12.10.dist-info/METADATA,sha256=QvGnz71W4UM-DqHH6Hd2_tXhgqm1ZmroKRwlC9SMS-0,15833
1086
- TDCRPy-1.12.10.dist-info/WHEEL,sha256=Rp8gFpivVLXx-k3U95ozHnQw8yDcPxmhOpn_Gx8d5nc,91
1087
- TDCRPy-1.12.10.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
- TDCRPy-1.12.10.dist-info/RECORD,,
1084
+ TDCRPy-1.12.11.dist-info/LICENCE.md,sha256=ZTpWyGU3qv_iwEpgvCijoCuCYpOPpyzJCgOk46WpUKU,1066
1085
+ TDCRPy-1.12.11.dist-info/METADATA,sha256=ehz0XowQstuLX8J7AuXro9VcGc8C-5GOa-in_3YEhwg,15833
1086
+ TDCRPy-1.12.11.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
1087
+ TDCRPy-1.12.11.dist-info/top_level.txt,sha256=f4vzFFcKSEnonAACs0ZXuRczmroLLqtPTqXFymU_VU0,14
1088
+ TDCRPy-1.12.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.0.0)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tdcrpy/TDCRPy.py CHANGED
@@ -700,27 +700,27 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
700
700
  p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
701
701
  p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
702
702
  p_nosingle2 = np.exp(-L*np.sum(np.asarray(e_quenching2))/3) # probability to have 0 electrons in a PMT
703
- p_single2 = 1-p_nosingle2
704
- efficiency_S.append(p_single+p_single2)
703
+ p_single2 = 1-p_nosingle2
704
+ efficiency_S.append(1-p_nosingle**3+1-p_nosingle2**3)
705
705
  efficiency_T.append(p_single**3+p_single2**3)
706
706
  efficiency_D.append(3*(p_single)**2-2*p_single**3+(3*(p_single2)**2-2*p_single2**3))
707
707
  if Display: print(f"\n\t COUNTING--Sym \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement (prompt)")
708
708
  if Display: print("\t\t Free parameter = ", L, "keV-1")
709
- if Display: print("\t\t Efficiency of single events = ", round(p_single,5))
709
+ if Display: print("\t\t Efficiency of single events = ", round(1-p_nosingle**3,5))
710
710
  if Display: print("\t\t Efficiency of double events = ", round(3*(p_single)**2-2*p_single**3,5))
711
711
  if Display: print("\t\t Efficiency of triple events = ", round(p_single**3,5))
712
712
  if Display: print("\t Summary of TDCR measurement (delayed)")
713
- if Display: print("\t\t Efficiency of single events = ", round(p_single2,5))
713
+ if Display: print("\t\t Efficiency of single events = ", round(1-p_nosingle2**3,5))
714
714
  if Display: print("\t\t Efficiency of double events = ", round(3*(p_single2)**2-2*p_single2**3,5))
715
715
  if Display: print("\t\t Efficiency of triple events = ", round(p_single2**3,5))
716
716
  if Display: print("\t Summary of TDCR measurement (prompt + delayed)")
717
- if Display: print("\t\t Efficiency of single events = ", round(p_single+p_single2,5))
717
+ if Display: print("\t\t Efficiency of single events = ", round(1-p_nosingle**3+1-p_nosingle2**3,5))
718
718
  if Display: print("\t\t Efficiency of double events = ", round(3*(p_single)**2-2*p_single**3+(3*(p_single2)**2-2*p_single2**3),5))
719
719
  if Display: print("\t\t Efficiency of triple events = ", round(p_single**3+p_single2**3,5))
720
720
  else:
721
721
  p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
722
722
  p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
723
- efficiency_S.append(p_single)
723
+ efficiency_S.append(1-p_nosingle**3)
724
724
  efficiency_T.append(p_single**3)
725
725
  efficiency_D.append(3*(p_single)**2-2*efficiency_T[-1])
726
726
  if Display: print(f"\n\t COUNTING--Sym \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement (prompt)")
@@ -749,7 +749,8 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
749
749
  efficiency_AC.append(pA_single*pC_single+pA_single2*pC_single2)
750
750
  efficiency_T.append(pA_single*pB_single*pC_single+pA_single2*pB_single2*pC_single2)
751
751
  efficiency_D.append(pA_single*pB_single+pB_single*pC_single+pA_single*pC_single-2*pA_single*pB_single*pC_single+(pA_single2*pB_single2+pB_single2*pC_single2+pA_single2*pC_single2-2*pA_single2*pB_single2*pC_single2))
752
- efficiency_S.append(pA_single+pB_single+pC_single-pA_single*pB_single+pB_single*pC_single+pA_single*pC_single-2*pA_single*pB_single*pC_single-pA_single*pB_single*pC_single+(pA_single2+pB_single2+pC_single2-pA_single2*pB_single2+pB_single2*pC_single2+pA_single2*pC_single2-2*pA_single2*pB_single2*pC_single2-pA_single2*pB_single2*pC_single2))
752
+ #efficiency_S.append(pA_single+pB_single+pC_single-pA_single*pB_single+pB_single*pC_single+pA_single*pC_single-2*pA_single*pB_single*pC_single-pA_single*pB_single*pC_single+(pA_single2+pB_single2+pC_single2-pA_single2*pB_single2+pB_single2*pC_single2+pA_single2*pC_single2-2*pA_single2*pB_single2*pC_single2-pA_single2*pB_single2*pC_single2))
753
+ efficiency_S.append(1-pA_nosingle*pB_nosingle*pC_nosingle+1-pA_nosingle2*pB_nosingle2*pC_nosingle2)
753
754
 
754
755
  if Display: print(f"\n\t COUNTING--Asym \n\t\t Free parameters (A,B,C) = {L[0]},{L[1]},{L[2]} keV-1 \n\t Summary of TDCR measurement (prompt)")
755
756
  #if Display: print("\t Summary of TDCR measurement (prompt)")
@@ -759,7 +760,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
759
760
  if Display: print("\t Summary of TDCR measurement (delayed)")
760
761
  if Display: print("\t\t Efficiency of single events: ", round(pA_single2+pB_single2+pC_single2-pA_single2*pB_single2+pB_single2*pC_single2+pA_single2*pC_single2-2*pA_single2*pB_single2*pC_single2-pA_single2*pB_single2*pC_single2,5))
761
762
  if Display: print("\t\t Efficiency of double events: ", round(pA_single2*pB_single2+pB_single2*pC_single2+pA_single2*pC_single2-2*pA_single2*pB_single2*pC_single2,5))
762
- if Display: print("\t\t Efficiency of triple events: ", round(pA_single2*pB_single2*pC_single2,5))
763
+ if Display: print("\t\t Efficiency of triple events: ", round(efficiency_S[-1],5))
763
764
  else:
764
765
  pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
765
766
  pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
@@ -773,7 +774,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
773
774
  efficiency_AC.append(pA_single*pC_single)
774
775
  efficiency_T.append(pA_single*pB_single*pC_single)
775
776
  efficiency_D.append(efficiency_AB[-1]+efficiency_BC[-1]+efficiency_AC[-1]-2*efficiency_T[-1])
776
- efficiency_S.append(pA_single+pB_single+pC_single-efficiency_D[-1]-efficiency_T[-1])
777
+ efficiency_S.append(1-pA_nosingle*pB_nosingle*pC_nosingle)
777
778
  if Display: print(f"\n\t COUNTING--Asym \n\t\t Free parameters (A,B,C) = {L[0]},{L[1]},{L[2]} keV-1 \n\t Summary of TDCR measurement (prompt)")
778
779
  if Display: print("\t\t Free parameter PMT A: ", L[0], "keV-1")
779
780
  if Display: print("\t\t Free parameter PMT B: ", L[1], "keV-1")