TDCRPy 1.5.13__py3-none-any.whl → 1.5.14__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.
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.5.14.dist-info}/METADATA +1 -1
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.5.14.dist-info}/RECORD +7 -7
- tdcrpy/TDCRPy.py +34 -270
- tdcrpy/TDCR_model_lib.py +1 -1
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.5.14.dist-info}/LICENCE.md +0 -0
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.5.14.dist-info}/WHEEL +0 -0
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.5.14.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
tdcrpy/TDCRPy.py,sha256=
|
|
1
|
+
tdcrpy/TDCRPy.py,sha256=XIoVqyk8HRyURy0lbrIk2pZ_f_JB44Y2ZuIi1km5Wgs,50078
|
|
2
2
|
tdcrpy/TDCRPy1.py,sha256=ZS4riwGPyITxkg0RHxTO59yzue7uLSFa9S7UrM8NGOI,38777
|
|
3
|
-
tdcrpy/TDCR_model_lib.py,sha256=
|
|
3
|
+
tdcrpy/TDCR_model_lib.py,sha256=BUTZ5YzjjaTA11-Ev5bADD1R41Dl-Jg9kbRR3tvKyFQ,71663
|
|
4
4
|
tdcrpy/TDCRoptimize.py,sha256=Mo5vEULS1_FCEzIVyv0C6Yte6qo072HLRWETNyIs7SU,4552
|
|
5
5
|
tdcrpy/__init__.py,sha256=pxZ5gMTFSEzeGQLzeRjy-Imu7bZIfhg9eqloOq5FTM4,130
|
|
6
6
|
tdcrpy/config.toml,sha256=mWDY-Fm3SxO9zsYzkjt9iQGWwzOH7z4CuCN1I8ASOYA,1542
|
|
@@ -67,8 +67,8 @@ tdcrpy/docs/_build/html/source/modules.html,sha256=gJrhuEaMQHkYGewGHPWGmgVsPgVV6
|
|
|
67
67
|
tdcrpy/docs/_build/html/source/tdcrpy.html,sha256=VZV_LFdrCCIvYBXzsZE9mZx8iGa7ZjhEsXtE8BqqU9g,90373
|
|
68
68
|
tdcrpy/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
69
|
tdcrpy/test/test_tdcrpy.py,sha256=dWZpfvarkr8lr_K_zUakt2AOcF0FfCOjBOQPl4vnTWc,4116
|
|
70
|
-
TDCRPy-1.5.
|
|
71
|
-
TDCRPy-1.5.
|
|
72
|
-
TDCRPy-1.5.
|
|
73
|
-
TDCRPy-1.5.
|
|
74
|
-
TDCRPy-1.5.
|
|
70
|
+
TDCRPy-1.5.14.dist-info/LICENCE.md,sha256=fuYzrZRiOAjJBzA1tsGQwojCgGROArb2Ec48GDTjlWM,1086
|
|
71
|
+
TDCRPy-1.5.14.dist-info/METADATA,sha256=BwCTCtDC-WwbkJdmu54kNK9Yh1GWrYSwxCENdP0VPqg,15930
|
|
72
|
+
TDCRPy-1.5.14.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
73
|
+
TDCRPy-1.5.14.dist-info/top_level.txt,sha256=VgPJa9YJ7fi8wrr9qDJPLhu3tK1BcFRIP6Ib4r3BEfs,7
|
|
74
|
+
TDCRPy-1.5.14.dist-info/RECORD,,
|
tdcrpy/TDCRPy.py
CHANGED
|
@@ -42,16 +42,16 @@ def relaxAtom(daughter_relax,particle_vec,energy_vec,rad,Display=False,uncData=F
|
|
|
42
42
|
relaxation = False
|
|
43
43
|
elif tf == "Auger K":
|
|
44
44
|
particle_vec[i_part] = "Atom_L"
|
|
45
|
-
particle_vec.append("Atom_L")
|
|
46
45
|
particle_vec.append(tf)
|
|
47
46
|
energy_vec.append(ef)
|
|
47
|
+
particle_vec.append("Atom_L")
|
|
48
48
|
energy_vec.append(0)
|
|
49
49
|
relaxation = True
|
|
50
50
|
elif tf == "Auger L":
|
|
51
51
|
particle_vec[i_part] = "Atom_M"
|
|
52
|
-
particle_vec.append("Atom_M")
|
|
53
52
|
particle_vec.append(tf)
|
|
54
53
|
energy_vec.append(ef)
|
|
54
|
+
particle_vec.append("Atom_M")
|
|
55
55
|
energy_vec.append(0)
|
|
56
56
|
relaxation = False
|
|
57
57
|
else:
|
|
@@ -277,7 +277,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
277
277
|
if particle_branch=="Atom_O": print("\t\t Electron capture on O shell")
|
|
278
278
|
else:
|
|
279
279
|
print("\t\t Particle: ", particle_branch)
|
|
280
|
-
print("\t\t Energy of the
|
|
280
|
+
print("\t\t Energy of the branch transition = ", energy_branch, " keV")
|
|
281
281
|
print("\t\t Level of the daughter nucleus: ", levelOftheDaughter)
|
|
282
282
|
#========
|
|
283
283
|
# Scoring
|
|
@@ -313,6 +313,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
313
313
|
# test whether the decay occurs within the coincidence resolving time or not
|
|
314
314
|
if t1 > tau*1e-9:
|
|
315
315
|
evenement = evenement + 1
|
|
316
|
+
if Display: print(f"\t\t Transition time from decay {round(t1*1e9,2)} ns > {tau} ns \n\t\t (half-life = {round(trans_halfLife[index_rad][iDaughter][i_level][0]*1e9,2)} ns)")
|
|
316
317
|
|
|
317
318
|
if transitionType[index_rad][iDaughter][i_level] != []:
|
|
318
319
|
#====================================================================
|
|
@@ -440,10 +441,9 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
440
441
|
i_level = levelNumber[index_rad][iDaughter].index([levelOftheDaughter])
|
|
441
442
|
print("warning:pas de données de transition:daughter,niveau,niveau d'énergie",DaughterVec[index_rad][iDaughter],levelOftheDaughter,levelEnergy[index_rad][iDaughter][i_level] )
|
|
442
443
|
levelOftheDaughter = 0 # set the next level
|
|
443
|
-
|
|
444
|
+
|
|
444
445
|
if Display:
|
|
445
|
-
print("\n\t NUCLEAR DECAY")
|
|
446
|
-
print("\t Summary of the prompt nuclear decay")
|
|
446
|
+
print("\n\t NUCLEAR DECAY--Prompt")
|
|
447
447
|
if "Atom" in particle_vec[0]:
|
|
448
448
|
print(f'\t\t capture of an electron from the {particle_vec[0][5:]} shell')
|
|
449
449
|
else:
|
|
@@ -456,65 +456,24 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
456
456
|
print(f'\t\t emitted {particle_vec[i]} of energy = {energy_vec[i]}, keV')
|
|
457
457
|
|
|
458
458
|
if evenement != 1:
|
|
459
|
-
print("\t
|
|
459
|
+
print("\n\t NUCLEAR DECAY--Delayed")
|
|
460
460
|
for i, p in enumerate(particle_vec2):
|
|
461
461
|
if p[:4] != "Atom":
|
|
462
|
-
print(f'\t\t {p} transition of energy = {energy_vec2[i]}, keV')
|
|
462
|
+
print(f'\t\t\t {p} transition of energy = {energy_vec2[i]}, keV')
|
|
463
463
|
else:
|
|
464
|
-
print(f'\t\t an electron of intern conversion from the {p[5:]} shell')
|
|
464
|
+
print(f'\t\t\t an electron of intern conversion from the {p[5:]} shell')
|
|
465
465
|
|
|
466
466
|
'''
|
|
467
467
|
==========================
|
|
468
468
|
II. LA RELAXATION ATOMIQUE
|
|
469
469
|
==========================
|
|
470
470
|
'''
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
if Display:
|
|
474
|
-
print("\n\t ATOMIC RECOMBINATION--Prompt\n\t Summary of the atomic relaxation")
|
|
471
|
+
|
|
475
472
|
daughter_relax = DaughterVec[index_rad][iDaughter]
|
|
476
473
|
particle_vec, energy_vec = relaxAtom(daughter_relax,particle_vec,energy_vec,Rad[index_rad],Display=Display,uncData=uncData)
|
|
477
|
-
|
|
478
|
-
# relaxation = False
|
|
479
|
-
# if "Atom_K" in particle_vec[i_part] or "Atom_L" in particle_vec[i_part] or "Atom_M" in particle_vec[i_part]:
|
|
480
|
-
# relaxation = True
|
|
481
|
-
# while relaxation:
|
|
482
|
-
# tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec[i_part],uncData=uncData)
|
|
483
|
-
# if tf == "XKA":
|
|
484
|
-
# particle_vec[i_part] = "Atom_L"
|
|
485
|
-
# particle_vec.append(tf)
|
|
486
|
-
# energy_vec.append(ef)
|
|
487
|
-
# relaxation = True
|
|
488
|
-
# elif tf == "XKB":
|
|
489
|
-
# particle_vec[i_part] = "Atom_M"
|
|
490
|
-
# particle_vec.append(tf)
|
|
491
|
-
# energy_vec.append(ef)
|
|
492
|
-
# relaxation = False
|
|
493
|
-
# elif tf == "XL":
|
|
494
|
-
# particle_vec[i_part] = "Atom_M"
|
|
495
|
-
# particle_vec.append(tf)
|
|
496
|
-
# energy_vec.append(ef)
|
|
497
|
-
# relaxation = False
|
|
498
|
-
# elif tf == "Auger K":
|
|
499
|
-
# particle_vec[i_part] = "Atom_L"
|
|
500
|
-
# particle_vec.append("Atom_L")
|
|
501
|
-
# particle_vec.append(tf)
|
|
502
|
-
# energy_vec.append(ef)
|
|
503
|
-
# energy_vec.append(0)
|
|
504
|
-
# relaxation = True
|
|
505
|
-
# elif tf == "Auger L":
|
|
506
|
-
# particle_vec[i_part] = "Atom_M"
|
|
507
|
-
# particle_vec.append("Atom_M")
|
|
508
|
-
# particle_vec.append(tf)
|
|
509
|
-
# energy_vec.append(ef)
|
|
510
|
-
# energy_vec.append(0)
|
|
511
|
-
# relaxation = False
|
|
512
|
-
# else:
|
|
513
|
-
# if Display: print("\t\t untermined x or Auger")
|
|
514
|
-
# relaxation = False
|
|
515
|
-
# e_sum += ef
|
|
516
|
-
|
|
474
|
+
## evenement normal
|
|
517
475
|
if Display:
|
|
476
|
+
print("\n\t ATOMIC RECOMBINATION--Prompt")
|
|
518
477
|
for i, p in enumerate(particle_vec):
|
|
519
478
|
if p[:4] != "Atom":
|
|
520
479
|
if p=="beta" or p=="beta+":
|
|
@@ -524,47 +483,11 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
524
483
|
else:
|
|
525
484
|
print(f'\t\t an electron left the {p[5:]} shell')
|
|
526
485
|
|
|
527
|
-
|
|
528
486
|
## evenement retardee
|
|
529
487
|
if evenement != 1:
|
|
530
|
-
|
|
531
|
-
for i_part in range(len(particle_vec2)):
|
|
532
|
-
relaxation = False
|
|
533
|
-
if "Atom_K" in particle_vec2[i_part] or "Atom_L" in particle_vec2[i_part] or "Atom_M" in particle_vec2[i_part]:
|
|
534
|
-
relaxation = True
|
|
535
|
-
while relaxation:
|
|
536
|
-
tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec2[i_part],uncData=uncData)
|
|
537
|
-
if tf == "XKA":
|
|
538
|
-
particle_vec2[i_part] = "Atom_L"
|
|
539
|
-
particle_vec2.append(tf)
|
|
540
|
-
energy_vec2.append(ef)
|
|
541
|
-
relaxation = True
|
|
542
|
-
elif tf == "XKB":
|
|
543
|
-
particle_vec2[i_part] = "Atom_M"
|
|
544
|
-
particle_vec2.append(tf)
|
|
545
|
-
energy_vec2.append(ef)
|
|
546
|
-
relaxation = False
|
|
547
|
-
elif tf == "XL":
|
|
548
|
-
particle_vec2[i_part] = "Atom_M"
|
|
549
|
-
particle_vec2.append(tf)
|
|
550
|
-
energy_vec2.append(ef)
|
|
551
|
-
relaxation = False
|
|
552
|
-
elif tf == "Auger K":
|
|
553
|
-
particle_vec2[i_part] = "Atom_L"
|
|
554
|
-
particle_vec2.append(tf)
|
|
555
|
-
energy_vec2.append(ef)
|
|
556
|
-
relaxation = True
|
|
557
|
-
elif tf == "Auger L":
|
|
558
|
-
particle_vec2[i_part] = "Atom_M"
|
|
559
|
-
particle_vec2.append(tf)
|
|
560
|
-
energy_vec2.append(ef)
|
|
561
|
-
relaxation = False
|
|
562
|
-
else:
|
|
563
|
-
if Display: print("\t\t x ray or Auger electron from X shell")
|
|
564
|
-
relaxation = False
|
|
565
|
-
e_sum2 += ef
|
|
566
|
-
|
|
488
|
+
particle_vec2, energy_vec2 = relaxAtom(daughter_relax,particle_vec2,energy_vec2,Rad[index_rad],Display=Display,uncData=uncData)
|
|
567
489
|
if Display:
|
|
490
|
+
print("\n\t ATOMIC RECOMBINATION--Delay")
|
|
568
491
|
for i, p in enumerate(particle_vec2):
|
|
569
492
|
if p[:4] != "Atom":
|
|
570
493
|
if p=="beta" or p=="beta+":
|
|
@@ -616,9 +539,15 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
616
539
|
|
|
617
540
|
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
618
541
|
p0 = particle_vec[i]
|
|
619
|
-
|
|
542
|
+
Ei = energy_vec[i]
|
|
543
|
+
Ed = tl.energie_dep_gamma2(Ei,v=V) # sampling energy free from photon
|
|
544
|
+
if Ei == Ed: # effet photoelectrique
|
|
545
|
+
# particle_vec.append("Atom_K")
|
|
546
|
+
# particle_vec.append(0)
|
|
547
|
+
energy_vec[i]=Ed
|
|
548
|
+
else: # diffusion Compton
|
|
549
|
+
energy_vec[i]=Ed
|
|
620
550
|
particle_vec[i] = "electron"
|
|
621
|
-
if Display:print(f"\t\t {p0} give energy {energy_vec[i]} keV to electron")
|
|
622
551
|
|
|
623
552
|
if p == "Auger K" or p == "Auger L":
|
|
624
553
|
particle_vec[i] = "electron"
|
|
@@ -627,12 +556,13 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
627
556
|
if Display:
|
|
628
557
|
print("\n\t INTERACTION--Prompt \n\t Summary of the energy deposited by charged particles")
|
|
629
558
|
for i, p in enumerate(particle_vec):
|
|
630
|
-
if p[:4] != "Atom" and energy_vec[i]!=0:
|
|
559
|
+
if p[:4] != "Atom" and energy_vec[i]!=0:
|
|
560
|
+
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL": (f"\t\t the {p0} gives {energy_vec[i]} keV to a recoil electron")
|
|
561
|
+
else: print(f"\t\t {p} of energy = {round(energy_vec[i],3)} keV")
|
|
562
|
+
|
|
631
563
|
|
|
632
564
|
if evenement!=1:
|
|
633
565
|
energy_vec_initial2 = energy_vec2.copy()
|
|
634
|
-
if Display:
|
|
635
|
-
print("\n\t INTERACTION--Delay \n\t Summary of the energy deposited by charged particles")
|
|
636
566
|
for i, p in enumerate(particle_vec2):
|
|
637
567
|
if p == "electron":
|
|
638
568
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
@@ -641,7 +571,8 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
641
571
|
p0 = particle_vec2[i]
|
|
642
572
|
energy_vec2[i] = tl.energie_dep_gamma2(energy_vec2[i],v=V) # sampling energy free from photon
|
|
643
573
|
particle_vec2[i] = "electron"
|
|
644
|
-
if Display:
|
|
574
|
+
if Display:
|
|
575
|
+
print(f"\t\t {p0} give energy {energy_vec2[i]} keV to electron")
|
|
645
576
|
|
|
646
577
|
|
|
647
578
|
if p == "Auger K" or p == "Auger L":
|
|
@@ -649,9 +580,12 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
649
580
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
650
581
|
|
|
651
582
|
if Display:
|
|
583
|
+
print("\n\t INTERACTION--Delay \n\t Summary of the energy deposited by charged particles")
|
|
652
584
|
for i, p in enumerate(particle_vec2):
|
|
653
|
-
if p[:4] != "Atom" and energy_vec2[i]!=0:
|
|
654
|
-
|
|
585
|
+
if p[:4] != "Atom" and energy_vec2[i]!=0:
|
|
586
|
+
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL": (f"\t\t the {p0} gives {energy_vec2[i]} keV to a recoil electron")
|
|
587
|
+
else: print(f"\t\t {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
588
|
+
|
|
655
589
|
'''
|
|
656
590
|
====================
|
|
657
591
|
IV. LA SCINTILLATION
|
|
@@ -676,7 +610,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
676
610
|
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", np.round(e_quenching[i],3), "keV")
|
|
677
611
|
|
|
678
612
|
if evenement!=1:
|
|
679
|
-
if Display: print(f"\n\t SCINTILLATION--
|
|
613
|
+
if Display: print(f"\n\t SCINTILLATION--Delayed \n\t\t Birks constant = {kB} cm/keV\n\t Summary of the estimation of quenched energies")
|
|
680
614
|
e_quenching2=[]
|
|
681
615
|
for i, p in enumerate(particle_vec2):
|
|
682
616
|
if p == "alpha":
|
|
@@ -690,137 +624,6 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
690
624
|
if Display:
|
|
691
625
|
for i, p in enumerate(particle_vec2):
|
|
692
626
|
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", round(e_quenching2[i],3), "keV")
|
|
693
|
-
|
|
694
|
-
#if evenement != 1:
|
|
695
|
-
# if Display: print("\n\t Summary of the delayed emission")
|
|
696
|
-
# for i_part in range(len(particle_vec2)):
|
|
697
|
-
# relaxation = False
|
|
698
|
-
# if "Atom_K" in particle_vec2[i_part] or "Atom_L" in particle_vec2[i_part] or "Atom_M" in particle_vec2[i_part]:
|
|
699
|
-
# relaxation = True
|
|
700
|
-
# while relaxation:
|
|
701
|
-
# tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec2[i_part],uncData=uncData)
|
|
702
|
-
# if tf == "XKA":
|
|
703
|
-
# particle_vec2[i_part] = "Atom_L"
|
|
704
|
-
# particle_vec2.append(tf)
|
|
705
|
-
# energy_vec2.append(ef)
|
|
706
|
-
# relaxation = True
|
|
707
|
-
# elif tf == "XKB":
|
|
708
|
-
# particle_vec2[i_part] = "Atom_M"
|
|
709
|
-
# particle_vec2.append(tf)
|
|
710
|
-
# energy_vec2.append(ef)
|
|
711
|
-
# relaxation = False
|
|
712
|
-
# elif tf == "XL":
|
|
713
|
-
# particle_vec2[i_part] = "Atom_M"
|
|
714
|
-
# particle_vec2.append(tf)
|
|
715
|
-
# energy_vec2.append(ef)
|
|
716
|
-
# relaxation = False
|
|
717
|
-
# elif tf == "Auger K":
|
|
718
|
-
# particle_vec2[i_part] = "Atom_L"
|
|
719
|
-
# particle_vec2.append(tf)
|
|
720
|
-
# energy_vec2.append(ef)
|
|
721
|
-
# relaxation = True
|
|
722
|
-
# elif tf == "Auger L":
|
|
723
|
-
# particle_vec2[i_part] = "Atom_M"
|
|
724
|
-
# particle_vec2.append(tf)
|
|
725
|
-
# energy_vec2.append(ef)
|
|
726
|
-
# relaxation = False
|
|
727
|
-
# else:
|
|
728
|
-
# if Display: print("\t\t x ray or Auger electron from X shell")
|
|
729
|
-
# relaxation = False
|
|
730
|
-
# e_sum2 += ef
|
|
731
|
-
|
|
732
|
-
# if Display:
|
|
733
|
-
# print("\n\t ATOMIC RECOMBINATION\n\t Summary of the atomic relaxation (prompt)")
|
|
734
|
-
# for i, p in enumerate(particle_vec):
|
|
735
|
-
# if p[:4] != "Atom":
|
|
736
|
-
# if p=="beta" or p=="beta+":
|
|
737
|
-
# print(f'\t\t {p} transition of energy = {energy_vec[i]}, keV')
|
|
738
|
-
# else:
|
|
739
|
-
# print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
740
|
-
# else:
|
|
741
|
-
# print(f'\t\t an electron left the {p[5:]} shell')
|
|
742
|
-
|
|
743
|
-
'''
|
|
744
|
-
==========================================================
|
|
745
|
-
III.a SPECTRES D'EMISSION
|
|
746
|
-
==========================================================
|
|
747
|
-
'''
|
|
748
|
-
|
|
749
|
-
# if ("beta" in particle_vec2) or ("beta+" in particle_vec2):
|
|
750
|
-
# if Display: print("\t Summary of sampling of beta particles")
|
|
751
|
-
# for i, p in enumerate(particle_vec2):
|
|
752
|
-
# if p == "beta":
|
|
753
|
-
# e_b,p_b = tl.readBetaShape(rad_i,"beta-",level_before_trans) # read the data of BetaShape
|
|
754
|
-
# index_beta_energy = tl.sampling(p_b) # sampling energy of beta
|
|
755
|
-
# particle_vec2[i] = "electron"
|
|
756
|
-
# energy_vec2[i] = e_b[index_beta_energy]
|
|
757
|
-
# if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
758
|
-
|
|
759
|
-
# if p == "beta+":
|
|
760
|
-
# e_b,p_b = tl.readBetaShape(rad_i,"beta+",level_before_trans)
|
|
761
|
-
# index_beta_energy = tl.sampling(p_b)
|
|
762
|
-
# particle_vec2[i] = "positron"
|
|
763
|
-
# energy_vec2[i] = e_b[index_beta_energy]
|
|
764
|
-
# particle_vec2.append("gamma")
|
|
765
|
-
# particle_vec2.append("gamma")
|
|
766
|
-
# energy_vec2.append(511)
|
|
767
|
-
# energy_vec2.append(511)
|
|
768
|
-
# if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
769
|
-
# energy_vec_initial2 = energy_vec2
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
'''
|
|
773
|
-
==========================================================
|
|
774
|
-
III.b INTERACTION RAYONNEMENT/MATIERE
|
|
775
|
-
==========================================================
|
|
776
|
-
'''
|
|
777
|
-
|
|
778
|
-
# for i, p in enumerate(particle_vec2):
|
|
779
|
-
# if p == "electron":
|
|
780
|
-
# energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
781
|
-
|
|
782
|
-
# if p == "beta+":
|
|
783
|
-
# energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
784
|
-
|
|
785
|
-
# if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
786
|
-
# energy_vec2[i] = tl.energie_dep_gamma2(energy_vec2[i],v=V) # sampling energy free from photon
|
|
787
|
-
# particle_vec2[i] = "electron"
|
|
788
|
-
|
|
789
|
-
# if p == "Auger K" or p == "Auger L":
|
|
790
|
-
# particle_vec2[i] = "electron"
|
|
791
|
-
# energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
792
|
-
|
|
793
|
-
# if Display:
|
|
794
|
-
# print("\n\t INTERACTION \n\t Summary of the energy deposited by charged particles (delay)")
|
|
795
|
-
# for i, p in enumerate(particle_vec2):
|
|
796
|
-
# if p[:4] != "Atom" and energy_vec2[i]!=0: print(f"\t\t {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
'''
|
|
802
|
-
====================
|
|
803
|
-
IV. LA SCINTILLATION
|
|
804
|
-
Calculation of the scintillation quenching with the Birks Model
|
|
805
|
-
====================
|
|
806
|
-
'''
|
|
807
|
-
|
|
808
|
-
# changer l'intégration E_i - E_d à E_i
|
|
809
|
-
|
|
810
|
-
# if Display: print(f"\n\t SCINTILLATION \n\t\t Birks constant = {kB} cm/keV\n\t Summary of the estimation of quenched energies (delay)")
|
|
811
|
-
# e_quenching2=[]
|
|
812
|
-
# for i, p in enumerate(particle_vec2):
|
|
813
|
-
# if p == "alpha":
|
|
814
|
-
# energy_vec2[i] = tl.Em_a(energy_vec2[i],kB,nE_alpha)
|
|
815
|
-
# e_quenching2.append(energy_vec2[i])
|
|
816
|
-
# elif p == "electron" or p == "positron":
|
|
817
|
-
# energy_vec2[i] = tl.Em_e(energy_vec_initial2[i]*1e3,energy_vec2[i]*1e3,kB*1e3,nE_electron)*1e-3
|
|
818
|
-
# e_quenching2.append(energy_vec2[i])
|
|
819
|
-
# else:
|
|
820
|
-
# e_quenching2.append(0)
|
|
821
|
-
# if Display:
|
|
822
|
-
# for i, p in enumerate(particle_vec2):
|
|
823
|
-
# if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", round(e_quenching2[i],3), "keV")
|
|
824
627
|
|
|
825
628
|
'''
|
|
826
629
|
====================
|
|
@@ -914,9 +717,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
914
717
|
if Display: print("\t\t Efficiency of double events: ", round(efficiency_D[-1],5))
|
|
915
718
|
if Display: print("\t\t Efficiency of triple events: ", round(efficiency_T[-1],5))
|
|
916
719
|
|
|
917
|
-
|
|
918
720
|
|
|
919
|
-
|
|
920
721
|
'''
|
|
921
722
|
====================
|
|
922
723
|
VI. CALCULATION OF THE FINAL ESTIMATORS
|
|
@@ -945,27 +746,6 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
945
746
|
TABmodel = mean_efficiency_T/mean_efficiency_AB
|
|
946
747
|
TBCmodel = mean_efficiency_T/mean_efficiency_BC
|
|
947
748
|
TACmodel = mean_efficiency_T/mean_efficiency_AC
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
# x = np.arange(np.mean(efficiency_T),1.001,0.001)
|
|
951
|
-
# plt.figure("efficiency distribution")
|
|
952
|
-
# plt.clf()
|
|
953
|
-
# plt.hist(np.asarray(efficiency_D),bins=x,label="Efficiency of double coincidences")[0]
|
|
954
|
-
# plt.hist(np.asarray(efficiency_T),bins=x,label="Efficiency of triple coincidences")[0]
|
|
955
|
-
# plt.xlabel("Efficiency", fontsize = 14)
|
|
956
|
-
# plt.ylabel(r"Number of counts", fontsize = 14)
|
|
957
|
-
# plt.legend(fontsize = 12)
|
|
958
|
-
# plt.savefig('Effdistribution.png')
|
|
959
|
-
|
|
960
|
-
# x = np.arange(np.mean(tdcr),1.001,0.001)
|
|
961
|
-
# plt.figure("TDCR distribution")
|
|
962
|
-
# plt.clf()
|
|
963
|
-
# plt.hist(np.asarray(tdcr),bins=x,label="Calculated TDCR")[0]
|
|
964
|
-
# plt.plot(x,st.norm.pdf(x, TDCR_measure, u_TDCR_measure),label="measured TDCR")[0]
|
|
965
|
-
# plt.xlabel("Efficiency", fontsize = 14)
|
|
966
|
-
# plt.ylabel(r"Number of counts", fontsize = 14)
|
|
967
|
-
# plt.legend(fontsize = 12)
|
|
968
|
-
# plt.savefig('TDCRdistribution.png')
|
|
969
749
|
|
|
970
750
|
if mode2=="sym":
|
|
971
751
|
res=(TDCR_calcul-TD)**2
|
|
@@ -982,19 +762,3 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
982
762
|
return mean_efficiency_S, std_efficiency_S, mean_efficiency_D, std_efficiency_D, mean_efficiency_T, std_efficiency_T
|
|
983
763
|
if mode =="dis":
|
|
984
764
|
return efficiency_S, efficiency_D, efficiency_T
|
|
985
|
-
|
|
986
|
-
# L = 1
|
|
987
|
-
# TD = 0.977667386529166
|
|
988
|
-
# TAB = 0.992232838598821
|
|
989
|
-
# TBC = 0.992343419459002
|
|
990
|
-
# TAC = 0.99275350064608
|
|
991
|
-
# Rad="Fe-55"
|
|
992
|
-
# pmf_1="1"
|
|
993
|
-
# N = 10
|
|
994
|
-
# kB =1.0e-5
|
|
995
|
-
# V = 10
|
|
996
|
-
# # mode = "dis"
|
|
997
|
-
# mode ="eff"
|
|
998
|
-
# mode2 = "sym"
|
|
999
|
-
|
|
1000
|
-
# TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=True, barp=False,uncData=False)
|
tdcrpy/TDCR_model_lib.py
CHANGED
|
@@ -1003,7 +1003,7 @@ Matrice_e = read_matrice(fe,'e')
|
|
|
1003
1003
|
|
|
1004
1004
|
Matrice10_e_1 = read_matrice(fe1,0)
|
|
1005
1005
|
Matrice10_e_2 = read_matrice(fe2,1)
|
|
1006
|
-
Matrice10_e_3 = read_matrice(
|
|
1006
|
+
Matrice10_e_3 = read_matrice(fe3,2)
|
|
1007
1007
|
Matrice16_e_1 = read_matrice(fe4,0)
|
|
1008
1008
|
Matrice16_e_2 = read_matrice(fe5,1)
|
|
1009
1009
|
Matrice16_e_3 = read_matrice(fe6,2)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|