TDCRPy 1.5.14__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.14.dist-info → TDCRPy-1.6.0.dist-info}/METADATA +1 -1
- {TDCRPy-1.5.14.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 +157 -5
- tdcrpy/TDCR_model_lib.py +82 -38
- tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
- {TDCRPy-1.5.14.dist-info → TDCRPy-1.6.0.dist-info}/LICENCE.md +0 -0
- {TDCRPy-1.5.14.dist-info → TDCRPy-1.6.0.dist-info}/WHEEL +0 -0
- {TDCRPy-1.5.14.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"
|
|
46
|
+
tf1,ef1 = tl.relaxation_atom(daughter_relax,rad,'Atom_L',uncData=uncData)
|
|
45
47
|
particle_vec.append(tf)
|
|
48
|
+
particle_vec.append(tf1)
|
|
46
49
|
energy_vec.append(ef)
|
|
47
|
-
|
|
48
|
-
energy_vec.append(0)
|
|
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"
|
|
61
|
+
particle_vec.append("Atom_M")
|
|
52
62
|
particle_vec.append(tf)
|
|
63
|
+
energy_vec.append(0)
|
|
53
64
|
energy_vec.append(ef)
|
|
65
|
+
relaxation = False
|
|
66
|
+
elif tf == "Auger L":
|
|
67
|
+
particle_vec[i_part] = "Atom_M"
|
|
54
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
|
|
|
@@ -471,7 +487,67 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
471
487
|
|
|
472
488
|
daughter_relax = DaughterVec[index_rad][iDaughter]
|
|
473
489
|
particle_vec, energy_vec = relaxAtom(daughter_relax,particle_vec,energy_vec,Rad[index_rad],Display=Display,uncData=uncData)
|
|
490
|
+
|
|
491
|
+
# for i_part in range(len(particle_vec)):
|
|
492
|
+
# relaxation = False
|
|
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]:
|
|
494
|
+
# relaxation = True
|
|
495
|
+
# while relaxation:
|
|
496
|
+
# tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec[i_part],uncData=uncData)
|
|
497
|
+
|
|
498
|
+
# if tf == "XKA":
|
|
499
|
+
# particle_vec[i_part] = "Atom_L"
|
|
500
|
+
# particle_vec.append(tf)
|
|
501
|
+
# energy_vec.append(ef)
|
|
502
|
+
# relaxation = True
|
|
503
|
+
# elif tf == "XKB":
|
|
504
|
+
# particle_vec[i_part] = "Atom_M"
|
|
505
|
+
# particle_vec.append(tf)
|
|
506
|
+
# energy_vec.append(ef)
|
|
507
|
+
# relaxation = False
|
|
508
|
+
# elif tf == "XL":
|
|
509
|
+
# particle_vec[i_part] = "Atom_M"
|
|
510
|
+
# particle_vec.append(tf)
|
|
511
|
+
# energy_vec.append(ef)
|
|
512
|
+
# relaxation = False
|
|
513
|
+
# elif tf == "Auger KLL":
|
|
514
|
+
# particle_vec[i_part] = "Atom_L"
|
|
515
|
+
# tf1,ef1 = tl.relaxation_atom(daughter_relax,Rad[index_rad],'Atom_L',uncData=uncData)
|
|
516
|
+
# particle_vec.append(tf)
|
|
517
|
+
# particle_vec.append(tf1)
|
|
518
|
+
# energy_vec.append(ef)
|
|
519
|
+
# energy_vec.append(ef1)
|
|
520
|
+
# relaxation = True
|
|
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":
|
|
529
|
+
# particle_vec[i_part] = "Atom_M"
|
|
530
|
+
# particle_vec.append("Atom_M")
|
|
531
|
+
# particle_vec.append(tf)
|
|
532
|
+
# energy_vec.append(0)
|
|
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)
|
|
539
|
+
# energy_vec.append(0)
|
|
540
|
+
# energy_vec.append(ef)
|
|
541
|
+
# relaxation = False
|
|
542
|
+
# else:
|
|
543
|
+
# if Display: print("\t\t untermined x or Auger")
|
|
544
|
+
# relaxation = False
|
|
545
|
+
# e_sum += ef
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
474
549
|
## evenement normal
|
|
550
|
+
|
|
475
551
|
if Display:
|
|
476
552
|
print("\n\t ATOMIC RECOMBINATION--Prompt")
|
|
477
553
|
for i, p in enumerate(particle_vec):
|
|
@@ -485,7 +561,69 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
485
561
|
|
|
486
562
|
## evenement retardee
|
|
487
563
|
if evenement != 1:
|
|
564
|
+
|
|
565
|
+
if Display:print("\n\t ATOMIC RECOMBINATION--Delay\n\t Summary of the atomic relaxation")
|
|
566
|
+
|
|
488
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
|
+
|
|
489
627
|
if Display:
|
|
490
628
|
print("\n\t ATOMIC RECOMBINATION--Delay")
|
|
491
629
|
for i, p in enumerate(particle_vec2):
|
|
@@ -762,3 +900,17 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
762
900
|
return mean_efficiency_S, std_efficiency_S, mean_efficiency_D, std_efficiency_D, mean_efficiency_T, std_efficiency_T
|
|
763
901
|
if mode =="dis":
|
|
764
902
|
return efficiency_S, efficiency_D, efficiency_T
|
|
903
|
+
# L = 1
|
|
904
|
+
# TD = 0.977667386529166
|
|
905
|
+
# TAB = 0.992232838598821
|
|
906
|
+
# TBC = 0.992343419459002
|
|
907
|
+
# TAC = 0.99275350064608
|
|
908
|
+
# Rad="Fe-55"
|
|
909
|
+
# pmf_1="1"
|
|
910
|
+
# N = 10
|
|
911
|
+
# kB =1.0e-5
|
|
912
|
+
# V = 10
|
|
913
|
+
# mode = "eff"
|
|
914
|
+
# mode2 = "sym"
|
|
915
|
+
|
|
916
|
+
# out = 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
|
@@ -81,6 +81,8 @@ with importlib.resources.as_file(files('tdcrpy').joinpath('MCNP-MATRIX')) as dat
|
|
|
81
81
|
fe4 = data_path / 'matrice/fichier/matrice_16ml-beta-_1_200k.txt' # electron-16ml-1-200keV-niveau 0
|
|
82
82
|
fe5 = data_path / 'matrice/fichier/matrice_16ml-beta-_200_2000k.txt' # electron-16ml-200-2000keV-niveau 1
|
|
83
83
|
fe6 = data_path / 'matrice/fichier/matrice_16ml-beta-_2000_10000k.txt' # electron-16ml-2000-10000keV-niveau 2
|
|
84
|
+
fe7 = data_path / 'matrice/fichier/matrice_13ml-beta-_1_200k.txt' # electron-13ml-1-200keV-niveau 0
|
|
85
|
+
fe8 = data_path / 'matrice/fichier/matrice_13ml-beta-_200_2000k.txt' # electron-13ml-200-2000keV-niveau 1
|
|
84
86
|
fe = data_path / 'matrice/fichier/E_depose.txt' # electron-10ml-énergie-niveau 'e'
|
|
85
87
|
|
|
86
88
|
# import beta spectra calculated for the analytical model (BetaShape + MCNP6 calculation)
|
|
@@ -996,9 +998,15 @@ Matrice10_p_3 = read_matrice(fp3,2)
|
|
|
996
998
|
Matrice16_p_1 = read_matrice(fp4,0)
|
|
997
999
|
Matrice16_p_2 = read_matrice(fp5,1)
|
|
998
1000
|
Matrice16_p_3 = read_matrice(fp6,2)
|
|
1001
|
+
|
|
1002
|
+
#Matrice13_p_1 = read_matrice(fp7,0)
|
|
1003
|
+
|
|
999
1004
|
Matrice13_p_1 = read_matrice(fp7,0)
|
|
1000
1005
|
Matrice13_p_2 = read_matrice(fp8,1)
|
|
1001
1006
|
Matrice13_p_3 = read_matrice(fp9,2)
|
|
1007
|
+
Matrice13_e_1 = read_matrice(fe7,0)
|
|
1008
|
+
Matrice13_e_2 = read_matrice(fe8,1)
|
|
1009
|
+
|
|
1002
1010
|
Matrice_e = read_matrice(fe,'e')
|
|
1003
1011
|
|
|
1004
1012
|
Matrice10_e_1 = read_matrice(fe1,0)
|
|
@@ -1009,7 +1017,7 @@ Matrice16_e_2 = read_matrice(fe5,1)
|
|
|
1009
1017
|
Matrice16_e_3 = read_matrice(fe6,2)
|
|
1010
1018
|
#Matrice_e = read_matrice(fe,'e')
|
|
1011
1019
|
|
|
1012
|
-
def energie_dep_gamma(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p_2,matrice10_3=Matrice10_p_3,matrice16_1=Matrice16_p_1,matrice16_2=Matrice16_p_2,matrice16_3=Matrice16_p_3,matrice13_1=Matrice13_p_1,ed=Matrice_e):
|
|
1020
|
+
def energie_dep_gamma(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p_2,matrice10_3=Matrice10_p_3,matrice16_1=Matrice16_p_1,matrice16_2=Matrice16_p_2,matrice16_3=Matrice16_p_3,matrice13_1=Matrice13_p_1,matrice13_2=Matrice13_p_2,matrice13_3=Matrice13_p_3,ed=Matrice_e):
|
|
1013
1021
|
""" This function samples the energy deposited by a x or gamma rays in the scintillator using response calculated by the Monte-Carlo code MCNP6.
|
|
1014
1022
|
|
|
1015
1023
|
Parameters
|
|
@@ -1053,6 +1061,8 @@ def energie_dep_gamma(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p
|
|
|
1053
1061
|
index = int((e_inci-200)/2)
|
|
1054
1062
|
if v == 10:
|
|
1055
1063
|
matrice = matrice10_2
|
|
1064
|
+
elif v ==13:
|
|
1065
|
+
matrice = matrice13_2
|
|
1056
1066
|
elif v == 16:
|
|
1057
1067
|
matrice = matrice16_2
|
|
1058
1068
|
e = ed[:,1]
|
|
@@ -1061,6 +1071,8 @@ def energie_dep_gamma(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p
|
|
|
1061
1071
|
index = (int(e_inci)-2000)//10
|
|
1062
1072
|
if v == 10:
|
|
1063
1073
|
matrice = matrice10_3
|
|
1074
|
+
elif v ==13:
|
|
1075
|
+
matrice = matrice13_3
|
|
1064
1076
|
elif v == 16:
|
|
1065
1077
|
matrice = matrice16_3
|
|
1066
1078
|
e = ed[:,2]
|
|
@@ -1072,7 +1084,7 @@ def energie_dep_gamma(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p
|
|
|
1072
1084
|
if result > e_inci: result = e_inci
|
|
1073
1085
|
return result
|
|
1074
1086
|
|
|
1075
|
-
def energie_dep_gamma2(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p_2,matrice10_3=Matrice10_p_3,matrice16_1=Matrice16_p_1,matrice16_2=Matrice16_p_2,matrice16_3=Matrice16_p_3,matrice13_1=Matrice13_p_1,
|
|
1087
|
+
def energie_dep_gamma2(e_inci,v,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p_2,matrice10_3=Matrice10_p_3,matrice16_1=Matrice16_p_1,matrice16_2=Matrice16_p_2,matrice16_3=Matrice16_p_3,matrice13_1=Matrice13_p_1,matrice13_2=Matrice13_p_2,matrice13_3=Matrice13_p_3,ed=Matrice_e):
|
|
1076
1088
|
""" This function samples the energy deposited by a x or gamma rays in the scintillator using response calculated by the Monte-Carlo code MCNP6.
|
|
1077
1089
|
|
|
1078
1090
|
Parameters
|
|
@@ -1328,7 +1340,7 @@ def transf_name(rad):
|
|
|
1328
1340
|
|
|
1329
1341
|
|
|
1330
1342
|
|
|
1331
|
-
def
|
|
1343
|
+
def read_ENSDF(rad, *, z=z_ensdf):
|
|
1332
1344
|
""" This function reads the ENSDF zip files and format the data to be processed by TDCRPy.
|
|
1333
1345
|
|
|
1334
1346
|
Parameters
|
|
@@ -1348,7 +1360,10 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1348
1360
|
comprise all transtion probabilities of the daughter nucleus.
|
|
1349
1361
|
Type : list
|
|
1350
1362
|
comprise all type of transition of the daughter nucleus.
|
|
1351
|
-
|
|
1363
|
+
Prob_augerK :list
|
|
1364
|
+
comprise all probabilities of electron Auger KLL, KLM, KXY.
|
|
1365
|
+
Type_augerK : list
|
|
1366
|
+
comprise all types of electron Auger KLL, KLM, KXY.
|
|
1352
1367
|
"""
|
|
1353
1368
|
|
|
1354
1369
|
name = rad + '.txt'
|
|
@@ -1380,17 +1395,21 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1380
1395
|
if 'P' in p:
|
|
1381
1396
|
index_end.append(i)
|
|
1382
1397
|
posi.append(i)
|
|
1383
|
-
|
|
1398
|
+
|
|
1384
1399
|
Energy = [] # enregistrer les résultats (énergie) complètes
|
|
1385
1400
|
energy = [] # enregistrer les résultats (énergie) d'une fille
|
|
1386
1401
|
Type = [] # enregistrer les résultats (type de transition) complètes
|
|
1387
1402
|
type_ = [] # enregistrer les résultats (type de transition) d'une fille
|
|
1388
1403
|
Prob = [] # enregistrer les résultats (proba de transition) complètes
|
|
1389
1404
|
prob = [] # enregistrer les résultats (proba de transition) d'une fille
|
|
1390
|
-
incertitude = []
|
|
1391
|
-
Incertitude = []
|
|
1392
|
-
prob_str = []
|
|
1393
|
-
Prob_str = []
|
|
1405
|
+
incertitude = [] # enregistrer les résultats (incertitude) d'une fille
|
|
1406
|
+
Incertitude = [] # enregistrer les résultats (incertitude) complètes
|
|
1407
|
+
prob_str = [] # enregistrer les résultats (proba en str) d'une fille
|
|
1408
|
+
Prob_str = [] # enregistrer les résultats (proba en str) complètes
|
|
1409
|
+
Prob_augerK= [] # enregistrer les résultats (prob d'électron auger K) complètes
|
|
1410
|
+
prob_augerK = [] # enregistrer les résultats (prob d'électron auger K) d'une fille
|
|
1411
|
+
Type_augerK = []
|
|
1412
|
+
type_augerK = []
|
|
1394
1413
|
|
|
1395
1414
|
for i in range(len(posi)-1):
|
|
1396
1415
|
start = posi[i]+1
|
|
@@ -1399,8 +1418,10 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1399
1418
|
e = [] # enregistrer les résultats (énergie) d'un bloc
|
|
1400
1419
|
prob_b = [] # enregistrer les résultats (proba) d'un bloc
|
|
1401
1420
|
type_b = [] # enregistrer les résultats (type) d'un bloc
|
|
1402
|
-
incertitude_b = []
|
|
1403
|
-
prob_str_b = []
|
|
1421
|
+
incertitude_b = [] # enregistrer les résultats (incertitude) d'un bloc
|
|
1422
|
+
prob_str_b = [] # enregistrer les résultats (proba en str) d'un bloc
|
|
1423
|
+
prob_augerK_b = [] # enregistrer les résultats (prob d'électron auger K) d'un bloc
|
|
1424
|
+
type_augerK_b = []
|
|
1404
1425
|
|
|
1405
1426
|
if start==end: # sauter les lignes blaches et continues
|
|
1406
1427
|
continue
|
|
@@ -1418,45 +1439,52 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1418
1439
|
e.append(p1[2])
|
|
1419
1440
|
type_b.append(p1[-2])
|
|
1420
1441
|
incertitude_b.append(int(p1[-3]))
|
|
1421
|
-
#incertitude_b.append(p1[-3])
|
|
1422
1442
|
prob_str_b.append(p1[3])
|
|
1423
1443
|
continue
|
|
1424
|
-
elif '|]' in p1:
|
|
1425
|
-
if
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
elif 'X' in p1[-1]:
|
|
1437
|
-
|
|
1444
|
+
elif '|]' in p1: # traiter un bloc qui comprend |]
|
|
1445
|
+
if 'AUGER' in p1: # block of electron Auger
|
|
1446
|
+
type_b.append('Auger K') # for electron Auger, only the block of electron Auger K has |]
|
|
1447
|
+
if len(p1)>7: # repérer la ligne qui comprend la proba totale et l'incertitude
|
|
1448
|
+
prob_str_b.append(p1[5])
|
|
1449
|
+
prob_b.append(float(p1[5])) # enregistrer la proba totale du bloc
|
|
1450
|
+
incertitude_b.append(int(p1[6])) # enregistrer l'incertitude pour la proba totale
|
|
1451
|
+
prob_augerK_b.append(float(p1[4])) # enregistrer la proba d'un type d'électron auger associé cette ligne
|
|
1452
|
+
type_augerK_b.append(p1[-2])
|
|
1453
|
+
elif len(p1)>6 and 'K' in p1[-2]: # la ligne sans proba totale mais ayant une proba pour un type d'électron Auger K (KLL,KLM ou KXY)
|
|
1454
|
+
prob_augerK_b.append(float(p1[4]))
|
|
1455
|
+
type_augerK_b.append(p1[-2])
|
|
1456
|
+
elif 'X' in p1[-1]: # le bloc pour rayon X
|
|
1457
|
+
if len(p1)>6: # la ligne avec la proba totale
|
|
1458
|
+
prob_str_b.append(p1[4])
|
|
1459
|
+
prob_b.append(float(p1[4])) # enregistrer la proba totale
|
|
1460
|
+
incertitude_b.append(int(p1[5])) # enregistrer l'incetitude pour la proba totale
|
|
1461
|
+
type_b.append(p1[-1][0:3]) # enregistrer le type de rayon X
|
|
1462
|
+
else:print('erreur')
|
|
1463
|
+
e.append(float(p1[2])) # enregistrer les valeurs d'énergie
|
|
1438
1464
|
else: # traiter le cas sans |] ni (total)
|
|
1439
1465
|
if len(p1)==4 and 'X' in p1[-1]: # le cas de rayon X sans |] ni (total) ni proba
|
|
1440
1466
|
continue # sauter cette ligne
|
|
1441
1467
|
elif len(p1)==5 and 'L' in p1: # le cas de Auger L sans |] ni (total) ni proba
|
|
1442
1468
|
continue # sauter cette ligne
|
|
1443
|
-
else:
|
|
1469
|
+
else: # traiter le cas sans |] ni (total) mais complet
|
|
1444
1470
|
e.append(float(p1[2])) # enregistrer énergie
|
|
1445
1471
|
prob_b.append(float(p1[3])) # enregistrer proba
|
|
1446
1472
|
prob_str_b.append(p1[3])
|
|
1447
|
-
incertitude_b.append(int(p1[4]))
|
|
1448
|
-
#incertitude_b.append(p1[4])
|
|
1473
|
+
incertitude_b.append(int(p1[4])) # enregistrer l'incertitude
|
|
1449
1474
|
if 'L' in p1:
|
|
1450
1475
|
type_b.append('Auger L') # enregistrer type Auger L
|
|
1451
1476
|
else:
|
|
1452
1477
|
type_b.append(p1[-1][0:3]) # enregistrer type Rayon X
|
|
1453
|
-
|
|
1478
|
+
|
|
1454
1479
|
if len(prob_b)==1 and len(e)>1: # calculer la valeur moyenne et l'enregistrer au cas où |] compris et valeurs complètes
|
|
1455
1480
|
energy.append(np.mean(e))
|
|
1456
1481
|
prob.append(prob_b[0])
|
|
1457
1482
|
type_.append(type_b[0])
|
|
1458
1483
|
incertitude.append(incertitude_b[0])
|
|
1459
1484
|
prob_str.append(prob_str_b[0])
|
|
1485
|
+
if len(prob_augerK_b)!=0: # si l'électron Auger K, enregistrer les proba dans la liste pour un noyau fils
|
|
1486
|
+
prob_augerK = prob_augerK_b
|
|
1487
|
+
type_augerK = type_augerK_b
|
|
1460
1488
|
elif len(e)==len(prob_b) and len(e)>=1: # enregistrer les valeurs au cas où sans |] et valeurs complètes
|
|
1461
1489
|
for i in range(len(e)):
|
|
1462
1490
|
energy.append(e[i])
|
|
@@ -1464,18 +1492,27 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1464
1492
|
prob_str.append(prob_str_b[i])
|
|
1465
1493
|
type_.append(type_b[i])
|
|
1466
1494
|
incertitude.append(incertitude_b[i])
|
|
1467
|
-
|
|
1495
|
+
if len(prob_augerK_b)!=0: # si l'électron Auger, enregistrer les proba dans la liste pour un noyau fils
|
|
1496
|
+
prob_augerK = prob_augerK_b # pour certains cas spécifiques qui n'ont qu'un seul type d'électron Auger
|
|
1497
|
+
type_augerK = type_augerK_b
|
|
1498
|
+
if end in index_end or end+1 in index_end: # enregistrer les résultats à la fin d'une fille
|
|
1468
1499
|
Energy.append(energy)
|
|
1469
1500
|
Prob.append(prob)
|
|
1470
1501
|
Type.append(type_)
|
|
1471
|
-
Incertitude.append(incertitude)
|
|
1502
|
+
Incertitude.append(incertitude)
|
|
1472
1503
|
Prob_str.append(prob_str)
|
|
1504
|
+
Prob_augerK.append(prob_augerK)
|
|
1505
|
+
Type_augerK.append(type_augerK)
|
|
1473
1506
|
energy = []
|
|
1474
1507
|
prob = []
|
|
1475
1508
|
type_ = []
|
|
1476
1509
|
incertitude = []
|
|
1477
1510
|
prob_str = []
|
|
1478
|
-
|
|
1511
|
+
prob_augerK = []
|
|
1512
|
+
type_augerK = []
|
|
1513
|
+
|
|
1514
|
+
return daug_name,Energy,Prob,Type,Incertitude,Prob_str,Prob_augerK,Type_augerK
|
|
1515
|
+
|
|
1479
1516
|
|
|
1480
1517
|
|
|
1481
1518
|
def incer(prob,incer):
|
|
@@ -1486,12 +1523,12 @@ def incer(prob,incer):
|
|
|
1486
1523
|
prob : list of str
|
|
1487
1524
|
probability (str) of rayon X and Auger electron.
|
|
1488
1525
|
incer : list of int
|
|
1489
|
-
uncertainty of the probability.
|
|
1526
|
+
standard uncertainty of the probability.
|
|
1490
1527
|
|
|
1491
1528
|
Returns
|
|
1492
1529
|
-------
|
|
1493
1530
|
incertitude : list of float
|
|
1494
|
-
|
|
1531
|
+
absolute uncertainty of proba
|
|
1495
1532
|
|
|
1496
1533
|
'''
|
|
1497
1534
|
incertitude = []
|
|
@@ -1544,15 +1581,16 @@ def relaxation_atom(daugther,rad,lacune='defaut',uncData=False):
|
|
|
1544
1581
|
Energy : corresponding energy in keV.
|
|
1545
1582
|
|
|
1546
1583
|
"""
|
|
1547
|
-
daug_name,Energy,Prob,Type,Incertitude,
|
|
1548
|
-
incertitude = incer(
|
|
1584
|
+
daug_name,Energy,Prob,Type,Incertitude,prob_str,Prob_K,Type_K = read_ENSDF(rad) # tirer les vecteurs de rad d'Ensdf
|
|
1585
|
+
incertitude = incer(prob_str,Incertitude)
|
|
1549
1586
|
|
|
1550
1587
|
index_daug = daug_name.index(daugther) # repérer l'indice de fille correspondante
|
|
1551
1588
|
|
|
1552
1589
|
Energie = np.array(Energy[index_daug]) # tirer le vecteur d'énergie
|
|
1553
1590
|
probability = np.array(Prob[index_daug]) # tirer le vecteur de proba
|
|
1554
1591
|
type_transi = Type[index_daug] # tirer le vecteur de type
|
|
1555
|
-
|
|
1592
|
+
prob_augerK = Prob_K[index_daug] # tirer le vecteur de prob 'électron auger K
|
|
1593
|
+
type_augerK = Type_K[index_daug]
|
|
1556
1594
|
u_probability = np.array(incertitude[index_daug])
|
|
1557
1595
|
|
|
1558
1596
|
if len(probability) > 0: # le cas où le vecteur de proba/energie/type n'est pas vide
|
|
@@ -1610,6 +1648,12 @@ def relaxation_atom(daugther,rad,lacune='defaut',uncData=False):
|
|
|
1610
1648
|
index_fin = sampling(prob_2) # sample in probability of transition
|
|
1611
1649
|
type_fin = type_2[index_fin] # type of transition
|
|
1612
1650
|
energie_fin = energy_2[index_fin] # energy of the transition
|
|
1651
|
+
if 'Auger K' == type_fin:
|
|
1652
|
+
prob_AugerK = normalise(prob_augerK)
|
|
1653
|
+
index_K = sampling(prob_AugerK)
|
|
1654
|
+
type_K = type_augerK[index_K]
|
|
1655
|
+
type_fin = 'Auger K' + type_K[1:]
|
|
1656
|
+
|
|
1613
1657
|
else:
|
|
1614
1658
|
# print("pas de transition de rayon X ni d'électron Auger pour cette lacune: ",lacune)
|
|
1615
1659
|
type_fin = 'NON'
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|