TDCRPy 1.5.13__py3-none-any.whl → 1.6.0__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.6.0.dist-info}/METADATA +1 -1
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.6.0.dist-info}/RECORD +9 -8
- tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_13ml-beta-_200_2000k.txt +1003 -0
- tdcrpy/TDCRPy.py +139 -223
- tdcrpy/TDCR_model_lib.py +83 -39
- tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.6.0.dist-info}/LICENCE.md +0 -0
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.6.0.dist-info}/WHEEL +0 -0
- {TDCRPy-1.5.13.dist-info → TDCRPy-1.6.0.dist-info}/top_level.txt +0 -0
tdcrpy/TDCRPy.py
CHANGED
|
@@ -19,6 +19,7 @@ import numpy as np
|
|
|
19
19
|
from tqdm import tqdm
|
|
20
20
|
|
|
21
21
|
def relaxAtom(daughter_relax,particle_vec,energy_vec,rad,Display=False,uncData=False):
|
|
22
|
+
|
|
22
23
|
for i_part in range(len(particle_vec)):
|
|
23
24
|
relaxation = False
|
|
24
25
|
if "Atom_K" in particle_vec[i_part] or "Atom_L" in particle_vec[i_part] or "Atom_M" in particle_vec[i_part]:
|
|
@@ -40,22 +41,37 @@ def relaxAtom(daughter_relax,particle_vec,energy_vec,rad,Display=False,uncData=F
|
|
|
40
41
|
particle_vec.append(tf)
|
|
41
42
|
energy_vec.append(ef)
|
|
42
43
|
relaxation = False
|
|
43
|
-
elif tf == "Auger
|
|
44
|
+
elif tf == "Auger KLL":
|
|
44
45
|
particle_vec[i_part] = "Atom_L"
|
|
45
|
-
|
|
46
|
+
tf1,ef1 = tl.relaxation_atom(daughter_relax,rad,'Atom_L',uncData=uncData)
|
|
46
47
|
particle_vec.append(tf)
|
|
48
|
+
particle_vec.append(tf1)
|
|
47
49
|
energy_vec.append(ef)
|
|
48
|
-
energy_vec.append(
|
|
50
|
+
energy_vec.append(ef1)
|
|
49
51
|
relaxation = True
|
|
50
|
-
elif tf == "Auger
|
|
52
|
+
elif tf == "Auger KLX":
|
|
53
|
+
particle_vec[i_part] = "Atom_L"
|
|
54
|
+
particle_vec.append("Atom_M")
|
|
55
|
+
particle_vec.append(tf)
|
|
56
|
+
energy_vec.append(0)
|
|
57
|
+
energy_vec.append(ef)
|
|
58
|
+
relaxation = True
|
|
59
|
+
elif tf == "Auger KXY":
|
|
51
60
|
particle_vec[i_part] = "Atom_M"
|
|
52
61
|
particle_vec.append("Atom_M")
|
|
53
62
|
particle_vec.append(tf)
|
|
63
|
+
energy_vec.append(0)
|
|
54
64
|
energy_vec.append(ef)
|
|
65
|
+
relaxation = False
|
|
66
|
+
elif tf == "Auger L":
|
|
67
|
+
particle_vec[i_part] = "Atom_M"
|
|
68
|
+
particle_vec.append("Atom_M")
|
|
69
|
+
particle_vec.append(tf)
|
|
55
70
|
energy_vec.append(0)
|
|
71
|
+
energy_vec.append(ef)
|
|
56
72
|
relaxation = False
|
|
57
73
|
else:
|
|
58
|
-
if Display: print("\t\t untermined x or Auger")
|
|
74
|
+
if Display: print(f"\t\t untermined x or Auger = {tf}")
|
|
59
75
|
relaxation = False
|
|
60
76
|
return particle_vec, energy_vec
|
|
61
77
|
|
|
@@ -277,7 +293,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
277
293
|
if particle_branch=="Atom_O": print("\t\t Electron capture on O shell")
|
|
278
294
|
else:
|
|
279
295
|
print("\t\t Particle: ", particle_branch)
|
|
280
|
-
print("\t\t Energy of the
|
|
296
|
+
print("\t\t Energy of the branch transition = ", energy_branch, " keV")
|
|
281
297
|
print("\t\t Level of the daughter nucleus: ", levelOftheDaughter)
|
|
282
298
|
#========
|
|
283
299
|
# Scoring
|
|
@@ -313,6 +329,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
313
329
|
# test whether the decay occurs within the coincidence resolving time or not
|
|
314
330
|
if t1 > tau*1e-9:
|
|
315
331
|
evenement = evenement + 1
|
|
332
|
+
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
333
|
|
|
317
334
|
if transitionType[index_rad][iDaughter][i_level] != []:
|
|
318
335
|
#====================================================================
|
|
@@ -440,10 +457,9 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
440
457
|
i_level = levelNumber[index_rad][iDaughter].index([levelOftheDaughter])
|
|
441
458
|
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
459
|
levelOftheDaughter = 0 # set the next level
|
|
443
|
-
|
|
460
|
+
|
|
444
461
|
if Display:
|
|
445
|
-
print("\n\t NUCLEAR DECAY")
|
|
446
|
-
print("\t Summary of the prompt nuclear decay")
|
|
462
|
+
print("\n\t NUCLEAR DECAY--Prompt")
|
|
447
463
|
if "Atom" in particle_vec[0]:
|
|
448
464
|
print(f'\t\t capture of an electron from the {particle_vec[0][5:]} shell')
|
|
449
465
|
else:
|
|
@@ -456,30 +472,29 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
456
472
|
print(f'\t\t emitted {particle_vec[i]} of energy = {energy_vec[i]}, keV')
|
|
457
473
|
|
|
458
474
|
if evenement != 1:
|
|
459
|
-
print("\t
|
|
475
|
+
print("\n\t NUCLEAR DECAY--Delayed")
|
|
460
476
|
for i, p in enumerate(particle_vec2):
|
|
461
477
|
if p[:4] != "Atom":
|
|
462
|
-
print(f'\t\t {p} transition of energy = {energy_vec2[i]}, keV')
|
|
478
|
+
print(f'\t\t\t {p} transition of energy = {energy_vec2[i]}, keV')
|
|
463
479
|
else:
|
|
464
|
-
print(f'\t\t an electron of intern conversion from the {p[5:]} shell')
|
|
480
|
+
print(f'\t\t\t an electron of intern conversion from the {p[5:]} shell')
|
|
465
481
|
|
|
466
482
|
'''
|
|
467
483
|
==========================
|
|
468
484
|
II. LA RELAXATION ATOMIQUE
|
|
469
485
|
==========================
|
|
470
486
|
'''
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
if Display:
|
|
474
|
-
print("\n\t ATOMIC RECOMBINATION--Prompt\n\t Summary of the atomic relaxation")
|
|
487
|
+
|
|
475
488
|
daughter_relax = DaughterVec[index_rad][iDaughter]
|
|
476
489
|
particle_vec, energy_vec = relaxAtom(daughter_relax,particle_vec,energy_vec,Rad[index_rad],Display=Display,uncData=uncData)
|
|
490
|
+
|
|
477
491
|
# for i_part in range(len(particle_vec)):
|
|
478
492
|
# relaxation = False
|
|
479
493
|
# 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
494
|
# relaxation = True
|
|
481
495
|
# while relaxation:
|
|
482
496
|
# tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec[i_part],uncData=uncData)
|
|
497
|
+
|
|
483
498
|
# if tf == "XKA":
|
|
484
499
|
# particle_vec[i_part] = "Atom_L"
|
|
485
500
|
# particle_vec.append(tf)
|
|
@@ -495,26 +510,46 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
495
510
|
# particle_vec.append(tf)
|
|
496
511
|
# energy_vec.append(ef)
|
|
497
512
|
# relaxation = False
|
|
498
|
-
# elif tf == "Auger
|
|
513
|
+
# elif tf == "Auger KLL":
|
|
499
514
|
# particle_vec[i_part] = "Atom_L"
|
|
500
|
-
#
|
|
515
|
+
# tf1,ef1 = tl.relaxation_atom(daughter_relax,Rad[index_rad],'Atom_L',uncData=uncData)
|
|
501
516
|
# particle_vec.append(tf)
|
|
517
|
+
# particle_vec.append(tf1)
|
|
502
518
|
# energy_vec.append(ef)
|
|
503
|
-
# energy_vec.append(
|
|
519
|
+
# energy_vec.append(ef1)
|
|
504
520
|
# relaxation = True
|
|
505
|
-
# elif tf == "Auger
|
|
521
|
+
# elif tf == "Auger KLX":
|
|
522
|
+
# particle_vec[i_part] = "Atom_L"
|
|
523
|
+
# particle_vec.append("Atom_M")
|
|
524
|
+
# particle_vec.append(tf)
|
|
525
|
+
# energy_vec.append(0)
|
|
526
|
+
# energy_vec.append(ef)
|
|
527
|
+
# relaxation = True
|
|
528
|
+
# elif tf == "Auger KXY":
|
|
506
529
|
# particle_vec[i_part] = "Atom_M"
|
|
507
530
|
# particle_vec.append("Atom_M")
|
|
508
531
|
# particle_vec.append(tf)
|
|
532
|
+
# energy_vec.append(0)
|
|
509
533
|
# energy_vec.append(ef)
|
|
534
|
+
# relaxation = False
|
|
535
|
+
# elif tf == "Auger L":
|
|
536
|
+
# particle_vec[i_part] = "Atom_M"
|
|
537
|
+
# particle_vec.append("Atom_M")
|
|
538
|
+
# particle_vec.append(tf)
|
|
510
539
|
# energy_vec.append(0)
|
|
540
|
+
# energy_vec.append(ef)
|
|
511
541
|
# relaxation = False
|
|
512
542
|
# else:
|
|
513
543
|
# if Display: print("\t\t untermined x or Auger")
|
|
514
544
|
# relaxation = False
|
|
515
545
|
# e_sum += ef
|
|
516
546
|
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
## evenement normal
|
|
550
|
+
|
|
517
551
|
if Display:
|
|
552
|
+
print("\n\t ATOMIC RECOMBINATION--Prompt")
|
|
518
553
|
for i, p in enumerate(particle_vec):
|
|
519
554
|
if p[:4] != "Atom":
|
|
520
555
|
if p=="beta" or p=="beta+":
|
|
@@ -524,47 +559,73 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
524
559
|
else:
|
|
525
560
|
print(f'\t\t an electron left the {p[5:]} shell')
|
|
526
561
|
|
|
527
|
-
|
|
528
562
|
## evenement retardee
|
|
529
563
|
if evenement != 1:
|
|
564
|
+
|
|
530
565
|
if Display:print("\n\t ATOMIC RECOMBINATION--Delay\n\t Summary of the atomic relaxation")
|
|
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
566
|
|
|
567
|
+
particle_vec2, energy_vec2 = relaxAtom(daughter_relax,particle_vec2,energy_vec2,Rad[index_rad],Display=Display,uncData=uncData)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
# for i_part in range(len(particle_vec2)):
|
|
571
|
+
# relaxation = False
|
|
572
|
+
# if "Atom_K" in particle_vec2[i_part] or "Atom_L" in particle_vec2[i_part] or "Atom_M" in particle_vec2[i_part]:
|
|
573
|
+
# relaxation = True
|
|
574
|
+
# while relaxation:
|
|
575
|
+
# tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec2[i_part],uncData=uncData)
|
|
576
|
+
|
|
577
|
+
# if tf == "XKA":
|
|
578
|
+
# particle_vec2[i_part] = "Atom_L"
|
|
579
|
+
# particle_vec2.append(tf)
|
|
580
|
+
# energy_vec2.append(ef)
|
|
581
|
+
# relaxation = True
|
|
582
|
+
# elif tf == "XKB":
|
|
583
|
+
# particle_vec2[i_part] = "Atom_M"
|
|
584
|
+
# particle_vec2.append(tf)
|
|
585
|
+
# energy_vec2.append(ef)
|
|
586
|
+
# relaxation = False
|
|
587
|
+
# elif tf == "XL":
|
|
588
|
+
# particle_vec2[i_part] = "Atom_M"
|
|
589
|
+
# particle_vec2.append(tf)
|
|
590
|
+
# energy_vec2.append(ef)
|
|
591
|
+
# relaxation = False
|
|
592
|
+
# elif tf == "Auger KLL":
|
|
593
|
+
# particle_vec2[i_part] = "Atom_L"
|
|
594
|
+
# tf1,ef1 = tl.relaxation_atom(daughter_relax,Rad[index_rad],'Atom_L',uncData=uncData)
|
|
595
|
+
# particle_vec2.append(tf)
|
|
596
|
+
# particle_vec2.append(tf1)
|
|
597
|
+
# energy_vec2.append(ef)
|
|
598
|
+
# energy_vec2.append(ef1)
|
|
599
|
+
# relaxation = True
|
|
600
|
+
# elif tf == "Auger KLX":
|
|
601
|
+
# particle_vec2[i_part] = "Atom_L"
|
|
602
|
+
# particle_vec2.append("Atom_M")
|
|
603
|
+
# particle_vec2.append(tf)
|
|
604
|
+
# energy_vec2.append(0)
|
|
605
|
+
# energy_vec2.append(ef)
|
|
606
|
+
# relaxation = True
|
|
607
|
+
# elif tf == "Auger KXY":
|
|
608
|
+
# particle_vec2[i_part] = "Atom_M"
|
|
609
|
+
# particle_vec2.append("Atom_M")
|
|
610
|
+
# particle_vec2.append(tf)
|
|
611
|
+
# energy_vec2.append(0)
|
|
612
|
+
# energy_vec2.append(ef)
|
|
613
|
+
# relaxation = False
|
|
614
|
+
# elif tf == "Auger L":
|
|
615
|
+
# particle_vec2[i_part] = "Atom_M"
|
|
616
|
+
# particle_vec2.append(tf)
|
|
617
|
+
# energy_vec2.append(ef)
|
|
618
|
+
# relaxation = False
|
|
619
|
+
# else:
|
|
620
|
+
# if Display: print("\t\t x ray or Auger electron from X shell")
|
|
621
|
+
# relaxation = False
|
|
622
|
+
# e_sum2 += ef
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
567
627
|
if Display:
|
|
628
|
+
print("\n\t ATOMIC RECOMBINATION--Delay")
|
|
568
629
|
for i, p in enumerate(particle_vec2):
|
|
569
630
|
if p[:4] != "Atom":
|
|
570
631
|
if p=="beta" or p=="beta+":
|
|
@@ -616,9 +677,15 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
616
677
|
|
|
617
678
|
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
618
679
|
p0 = particle_vec[i]
|
|
619
|
-
|
|
680
|
+
Ei = energy_vec[i]
|
|
681
|
+
Ed = tl.energie_dep_gamma2(Ei,v=V) # sampling energy free from photon
|
|
682
|
+
if Ei == Ed: # effet photoelectrique
|
|
683
|
+
# particle_vec.append("Atom_K")
|
|
684
|
+
# particle_vec.append(0)
|
|
685
|
+
energy_vec[i]=Ed
|
|
686
|
+
else: # diffusion Compton
|
|
687
|
+
energy_vec[i]=Ed
|
|
620
688
|
particle_vec[i] = "electron"
|
|
621
|
-
if Display:print(f"\t\t {p0} give energy {energy_vec[i]} keV to electron")
|
|
622
689
|
|
|
623
690
|
if p == "Auger K" or p == "Auger L":
|
|
624
691
|
particle_vec[i] = "electron"
|
|
@@ -627,12 +694,13 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
627
694
|
if Display:
|
|
628
695
|
print("\n\t INTERACTION--Prompt \n\t Summary of the energy deposited by charged particles")
|
|
629
696
|
for i, p in enumerate(particle_vec):
|
|
630
|
-
if p[:4] != "Atom" and energy_vec[i]!=0:
|
|
697
|
+
if p[:4] != "Atom" and energy_vec[i]!=0:
|
|
698
|
+
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")
|
|
699
|
+
else: print(f"\t\t {p} of energy = {round(energy_vec[i],3)} keV")
|
|
700
|
+
|
|
631
701
|
|
|
632
702
|
if evenement!=1:
|
|
633
703
|
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
704
|
for i, p in enumerate(particle_vec2):
|
|
637
705
|
if p == "electron":
|
|
638
706
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
@@ -641,7 +709,8 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
641
709
|
p0 = particle_vec2[i]
|
|
642
710
|
energy_vec2[i] = tl.energie_dep_gamma2(energy_vec2[i],v=V) # sampling energy free from photon
|
|
643
711
|
particle_vec2[i] = "electron"
|
|
644
|
-
if Display:
|
|
712
|
+
if Display:
|
|
713
|
+
print(f"\t\t {p0} give energy {energy_vec2[i]} keV to electron")
|
|
645
714
|
|
|
646
715
|
|
|
647
716
|
if p == "Auger K" or p == "Auger L":
|
|
@@ -649,9 +718,12 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
649
718
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
650
719
|
|
|
651
720
|
if Display:
|
|
721
|
+
print("\n\t INTERACTION--Delay \n\t Summary of the energy deposited by charged particles")
|
|
652
722
|
for i, p in enumerate(particle_vec2):
|
|
653
|
-
if p[:4] != "Atom" and energy_vec2[i]!=0:
|
|
654
|
-
|
|
723
|
+
if p[:4] != "Atom" and energy_vec2[i]!=0:
|
|
724
|
+
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")
|
|
725
|
+
else: print(f"\t\t {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
726
|
+
|
|
655
727
|
'''
|
|
656
728
|
====================
|
|
657
729
|
IV. LA SCINTILLATION
|
|
@@ -676,7 +748,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
676
748
|
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", np.round(e_quenching[i],3), "keV")
|
|
677
749
|
|
|
678
750
|
if evenement!=1:
|
|
679
|
-
if Display: print(f"\n\t SCINTILLATION--
|
|
751
|
+
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
752
|
e_quenching2=[]
|
|
681
753
|
for i, p in enumerate(particle_vec2):
|
|
682
754
|
if p == "alpha":
|
|
@@ -690,137 +762,6 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
690
762
|
if Display:
|
|
691
763
|
for i, p in enumerate(particle_vec2):
|
|
692
764
|
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
765
|
|
|
825
766
|
'''
|
|
826
767
|
====================
|
|
@@ -914,9 +855,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
914
855
|
if Display: print("\t\t Efficiency of double events: ", round(efficiency_D[-1],5))
|
|
915
856
|
if Display: print("\t\t Efficiency of triple events: ", round(efficiency_T[-1],5))
|
|
916
857
|
|
|
917
|
-
|
|
918
858
|
|
|
919
|
-
|
|
920
859
|
'''
|
|
921
860
|
====================
|
|
922
861
|
VI. CALCULATION OF THE FINAL ESTIMATORS
|
|
@@ -945,27 +884,6 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
945
884
|
TABmodel = mean_efficiency_T/mean_efficiency_AB
|
|
946
885
|
TBCmodel = mean_efficiency_T/mean_efficiency_BC
|
|
947
886
|
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
887
|
|
|
970
888
|
if mode2=="sym":
|
|
971
889
|
res=(TDCR_calcul-TD)**2
|
|
@@ -982,7 +900,6 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
982
900
|
return mean_efficiency_S, std_efficiency_S, mean_efficiency_D, std_efficiency_D, mean_efficiency_T, std_efficiency_T
|
|
983
901
|
if mode =="dis":
|
|
984
902
|
return efficiency_S, efficiency_D, efficiency_T
|
|
985
|
-
|
|
986
903
|
# L = 1
|
|
987
904
|
# TD = 0.977667386529166
|
|
988
905
|
# TAB = 0.992232838598821
|
|
@@ -993,8 +910,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
993
910
|
# N = 10
|
|
994
911
|
# kB =1.0e-5
|
|
995
912
|
# V = 10
|
|
996
|
-
#
|
|
997
|
-
# mode ="eff"
|
|
913
|
+
# mode = "eff"
|
|
998
914
|
# mode2 = "sym"
|
|
999
915
|
|
|
1000
|
-
# TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=True, barp=False,uncData=False)
|
|
916
|
+
# out = TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=True, barp=False,uncData=False)
|