TDCRPy 1.5.3__tar.gz → 1.5.5__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.
- {TDCRPy-1.5.3/TDCRPy.egg-info → TDCRPy-1.5.5}/PKG-INFO +1 -1
- {TDCRPy-1.5.3 → TDCRPy-1.5.5/TDCRPy.egg-info}/PKG-INFO +1 -1
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/setup.py +1 -1
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/TDCRPy.py +178 -271
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/TDCR_model_lib.py +58 -33
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/TDCRoptimize.py +11 -1
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/config.toml +1 -1
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/decayData/All-nuclides_Ensdf.zip +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/test2.py +8 -4
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/LICENCE.md +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/MANIFEST.in +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/README.md +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/TDCRPy.egg-info/SOURCES.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/TDCRPy.egg-info/dependency_links.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/TDCRPy.egg-info/requires.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/TDCRPy.egg-info/top_level.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/setup.cfg +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_C-14.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ca-45.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_H-3.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ni-63.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pm-147.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Pu-241.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_S-35.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-89.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-90.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Tc-99.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/E_depose.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_2000_10000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_2000_10000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_2000_10000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_0.015.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1.1e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1.2e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1.3e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1.4e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1.5e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_1e-05.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_6e-06.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_7e-06.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_8e-06.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyAlpha_9e-06.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.006.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.007.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.008.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.009.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.01.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.011.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.012.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.013.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.014.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/QuenchEnergyElectron_0.015.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/TandataUG.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/alpha_toulene.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/inputVecteurAlpha.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/Quenching/inputVecteurElectron.txt +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/TDCRPy1.py +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/__init__.py +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/decayData/All-nuclides_BetaShape.zip +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/decayData/All-nuclides_PenNuc.zip +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/docs/_build/html/genindex.html +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/docs/_build/html/index.html +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/docs/_build/html/search.html +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/docs/_build/html/source/modules.html +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/docs/_build/html/source/tdcrpy.html +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/test/__init__.py +0 -0
- {TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/test/test_tdcrpy.py +0 -0
|
@@ -9,6 +9,8 @@ Bureau International des Poids et Mesures
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
## IMPORT PYTHON MODULES
|
|
12
|
+
#import tdcrpy.TDCR_model_lib as tl
|
|
13
|
+
# import TDCR_model_lib as tl
|
|
12
14
|
import tdcrpy.TDCR_model_lib as tl
|
|
13
15
|
import importlib.resources
|
|
14
16
|
from importlib.resources import files
|
|
@@ -111,6 +113,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
111
113
|
if X and Y:
|
|
112
114
|
inE = radListPureBeta.index(Rad)
|
|
113
115
|
nE = nElist[inE]
|
|
116
|
+
print(f"Analytical model used for {Rad}")
|
|
114
117
|
out=tl.modelAnalytical(L,TD,TAB,TBC,TAC,Rad,kB,V,mode,mode2,nE)
|
|
115
118
|
if mode == "res":
|
|
116
119
|
return out
|
|
@@ -418,58 +421,174 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
418
421
|
==========================
|
|
419
422
|
'''
|
|
420
423
|
## evenement retarde
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
relaxation =
|
|
426
|
-
|
|
424
|
+
daughter_relax = DaughterVec[index_rad][iDaughter]
|
|
425
|
+
for i_part in range(len(particle_vec)):
|
|
426
|
+
relaxation = False
|
|
427
|
+
if "Atom_K" in particle_vec[i_part] or "Atom_L" in particle_vec[i_part] or "Atom_M" in particle_vec[i_part]:
|
|
428
|
+
relaxation = True
|
|
429
|
+
while relaxation:
|
|
430
|
+
tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec[i_part],uncData=uncData)
|
|
431
|
+
if tf == "XKA":
|
|
432
|
+
particle_vec[i_part] = "Atom_L"
|
|
433
|
+
particle_vec.append(tf)
|
|
434
|
+
energy_vec.append(ef)
|
|
427
435
|
relaxation = True
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
436
|
+
elif tf == "XKB":
|
|
437
|
+
particle_vec[i_part] = "Atom_M"
|
|
438
|
+
particle_vec.append(tf)
|
|
439
|
+
energy_vec.append(ef)
|
|
440
|
+
relaxation = False
|
|
441
|
+
elif tf == "XL":
|
|
442
|
+
particle_vec[i_part] = "Atom_M"
|
|
443
|
+
particle_vec.append(tf)
|
|
444
|
+
energy_vec.append(ef)
|
|
445
|
+
relaxation = False
|
|
446
|
+
elif tf == "Auger K":
|
|
447
|
+
particle_vec[i_part] = "Atom_L"
|
|
448
|
+
particle_vec.append(tf)
|
|
449
|
+
energy_vec.append(ef)
|
|
450
|
+
relaxation = True
|
|
451
|
+
elif tf == "Auger L":
|
|
452
|
+
particle_vec[i_part] = "Atom_M"
|
|
453
|
+
particle_vec.append(tf)
|
|
454
|
+
energy_vec.append(ef)
|
|
455
|
+
relaxation = False
|
|
456
|
+
else:
|
|
457
|
+
if Display: print("untermined x or Auger")
|
|
458
|
+
relaxation = False
|
|
459
|
+
e_sum += ef
|
|
460
|
+
if Display:
|
|
461
|
+
print("\n\t ATOMIC RECOMBINATION\n\t Summary of the atomic relaxation (promt)")
|
|
462
|
+
for i, p in enumerate(particle_vec):
|
|
463
|
+
if p[:4] != "Atom":
|
|
464
|
+
if p=="beta" or p=="beta+":
|
|
465
|
+
print(f'\t\t {p} transition of energy = {energy_vec[i]}, keV')
|
|
455
466
|
else:
|
|
456
|
-
if Display: print("\t\t x ray or Auger electron from X shell")
|
|
457
|
-
relaxation = False
|
|
458
|
-
e_sum += ef
|
|
459
|
-
if Display:
|
|
460
|
-
print("\n\t ATOMIC RECOMBINATION\n\t Summary of the prompt atomic relaxation")
|
|
461
|
-
for i, p in enumerate(particle_vec):
|
|
462
|
-
if p[:4] != "Atom":
|
|
463
467
|
print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
468
|
+
else:
|
|
469
|
+
print(f'\t\t an electron left the {p[5:]} shell')
|
|
470
|
+
|
|
471
|
+
'''
|
|
472
|
+
==========================================================
|
|
473
|
+
III.a SPECTRES D'EMISSION
|
|
474
|
+
==========================================================
|
|
475
|
+
'''
|
|
476
|
+
if ("beta" in particle_vec) or ("beta+" in particle_vec):
|
|
477
|
+
if Display: print("\n\t EMISSION OF BETA PARTICLES")
|
|
478
|
+
for i, p in enumerate(particle_vec):
|
|
479
|
+
if p == "beta":
|
|
480
|
+
e_b,p_b = tl.readBetaShape(rad_i,"beta-",level_before_trans) # read the data of BetaShape
|
|
481
|
+
index_beta_energy = tl.sampling(p_b) # sampling energy of beta
|
|
482
|
+
particle_vec[i] = "electron"
|
|
483
|
+
energy_vec[i] = e_b[index_beta_energy]
|
|
484
|
+
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
485
|
+
|
|
486
|
+
if p == "beta+":
|
|
487
|
+
e_b,p_b = tl.readBetaShape(rad_i,"beta+",level_before_trans)
|
|
488
|
+
index_beta_energy = tl.sampling(p_b)
|
|
489
|
+
particle_vec[i] = "positron"
|
|
490
|
+
energy_vec[i] = e_b[index_beta_energy]
|
|
491
|
+
particle_vec.append("gamma")
|
|
492
|
+
particle_vec.append("gamma")
|
|
493
|
+
energy_vec.append(511)
|
|
494
|
+
energy_vec.append(511)
|
|
495
|
+
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
496
|
+
energy_vec_initial = energy_vec
|
|
497
|
+
|
|
498
|
+
'''
|
|
499
|
+
==========================================================
|
|
500
|
+
III.b INTERACTION RAYONNEMENT/MATIERE
|
|
501
|
+
==========================================================
|
|
502
|
+
'''
|
|
503
|
+
|
|
504
|
+
for i, p in enumerate(particle_vec):
|
|
505
|
+
if p == "electron":
|
|
506
|
+
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
507
|
+
|
|
508
|
+
if p == "beta+":
|
|
509
|
+
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
510
|
+
|
|
511
|
+
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
512
|
+
energy_vec[i] = tl.energie_dep_gamma2(energy_vec[i],v=V) # sampling energy free from photon
|
|
513
|
+
particle_vec[i] = "electron"
|
|
514
|
+
|
|
515
|
+
if p == "Auger K" or p == "Auger L":
|
|
516
|
+
particle_vec[i] = "electron"
|
|
517
|
+
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
518
|
+
|
|
519
|
+
if Display:
|
|
520
|
+
print("\n\t INTERACTION \n\t Summary of the energy deposited by charged particles (promt)")
|
|
521
|
+
for i, p in enumerate(particle_vec):
|
|
522
|
+
if p[:4] != "Atom" and energy_vec[i]!=0: print(f"\t\t {p} of energy = {round(energy_vec[i],3)} keV")
|
|
523
|
+
|
|
524
|
+
'''
|
|
525
|
+
====================
|
|
526
|
+
IV. LA SCINTILLATION
|
|
527
|
+
Calculation of the scintillation quenching with the Birks Model
|
|
528
|
+
====================
|
|
529
|
+
'''
|
|
530
|
+
if Display: print(f"\n\t SCINTILLATION \n\t\t Birks constant = {kB} cm/keV\n\t Summary of the estimation of quenched energies (promt)")
|
|
531
|
+
e_quenching=[]
|
|
532
|
+
for i, p in enumerate(particle_vec):
|
|
533
|
+
if p == "alpha":
|
|
534
|
+
energy_vec[i] = tl.Em_a(energy_vec[i],kB,nE_alpha)
|
|
535
|
+
e_quenching.append(energy_vec[i])
|
|
536
|
+
elif p == "electron" or p == "positron":
|
|
537
|
+
energy_vec[i] = tl.Em_e(energy_vec_initial[i]*1e3,energy_vec[i]*1e3,kB*1e3,nE_electron)*1e-3
|
|
538
|
+
e_quenching.append(energy_vec[i])
|
|
539
|
+
else:
|
|
540
|
+
e_quenching.append(0)
|
|
541
|
+
if Display: print("\t\t Birks constant = ", kB, ' cm/keV')
|
|
542
|
+
if Display:
|
|
543
|
+
for i, p in enumerate(particle_vec):
|
|
544
|
+
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", round(e_quenching[i],3), "keV")
|
|
545
|
+
|
|
546
|
+
'''
|
|
547
|
+
====================
|
|
548
|
+
V. LE MESURE TDCR
|
|
549
|
+
====================
|
|
550
|
+
'''
|
|
551
|
+
if mode2=="sym":
|
|
552
|
+
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
553
|
+
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
554
|
+
efficiency_S.append(p_single)
|
|
555
|
+
efficiency_T.append(p_single**3)
|
|
556
|
+
efficiency_D.append(3*(p_single)**2-2*efficiency_T[-1])
|
|
557
|
+
if Display: print(f"\n\t COUNTING \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement (promt)")
|
|
558
|
+
if Display: print("\t\t Efficiency of single events = ", round(efficiency_S[-1],5))
|
|
559
|
+
if Display: print("\t\t Efficiency of double events = ", round(efficiency_D[-1],5))
|
|
560
|
+
if Display: print("\t\t Efficiency of triple events = ", round(efficiency_T[-1],5))
|
|
561
|
+
elif mode2=="asym":
|
|
562
|
+
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
563
|
+
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
564
|
+
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
565
|
+
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
566
|
+
pC_nosingle = np.exp(-L[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
567
|
+
pC_single = 1-pC_nosingle # probability to have at least 1 electrons in a PMT
|
|
568
|
+
|
|
569
|
+
efficiency_AB.append(pA_single*pB_single)
|
|
570
|
+
efficiency_BC.append(pB_single*pC_single)
|
|
571
|
+
efficiency_AC.append(pA_single*pC_single)
|
|
572
|
+
efficiency_T.append(pA_single*pB_single*pC_single)
|
|
573
|
+
efficiency_D.append(efficiency_AB[-1]+efficiency_BC[-1]+efficiency_AC[-1]-2*efficiency_T[-1])
|
|
574
|
+
efficiency_S.append(pA_single+pB_single+pC_single-efficiency_D[-1]-efficiency_T[-1])
|
|
575
|
+
if Display: print("\t Summary of TDCR measurement")
|
|
576
|
+
if Display: print("\t\t Free parameter PMT A: ", L[0], "keV-1")
|
|
577
|
+
if Display: print("\t\t Free parameter PMT B: ", L[1], "keV-1")
|
|
578
|
+
if Display: print("\t\t Free parameter PMT C: ", L[2], "keV-1")
|
|
579
|
+
if Display: print("\t\t Efficiency of single events: ", round(efficiency_S[-1],5))
|
|
580
|
+
if Display: print("\t\t Efficiency of double events: ", round(efficiency_D[-1],5))
|
|
581
|
+
if Display: print("\t\t Efficiency of triple events: ", round(efficiency_T[-1],5))
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
if evenement != 1:
|
|
585
|
+
print("\n\t Summary of the delayed emission")
|
|
467
586
|
for i_part in range(len(particle_vec2)):
|
|
468
587
|
relaxation = False
|
|
469
588
|
if "Atom_K" in particle_vec2[i_part] or "Atom_L" in particle_vec2[i_part] or "Atom_M" in particle_vec2[i_part]:
|
|
470
589
|
relaxation = True
|
|
471
590
|
while relaxation:
|
|
472
|
-
tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec2[i_part])
|
|
591
|
+
tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec2[i_part],uncData=uncData)
|
|
473
592
|
if tf == "XKA":
|
|
474
593
|
particle_vec2[i_part] = "Atom_L"
|
|
475
594
|
particle_vec2.append(tf)
|
|
@@ -501,12 +620,15 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
501
620
|
e_sum2 += ef
|
|
502
621
|
|
|
503
622
|
if Display:
|
|
504
|
-
print("\t Summary of the
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
623
|
+
print("\n\t ATOMIC RECOMBINATION\n\t Summary of the atomic relaxation (promt)")
|
|
624
|
+
for i, p in enumerate(particle_vec):
|
|
625
|
+
if p[:4] != "Atom":
|
|
626
|
+
if p=="beta" or p=="beta+":
|
|
627
|
+
print(f'\t\t {p} transition of energy = {energy_vec[i]}, keV')
|
|
508
628
|
else:
|
|
509
|
-
print(f
|
|
629
|
+
print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
630
|
+
else:
|
|
631
|
+
print(f'\t\t an electron left the {p[5:]} shell')
|
|
510
632
|
|
|
511
633
|
'''
|
|
512
634
|
==========================================================
|
|
@@ -537,54 +659,12 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
537
659
|
energy_vec_initial2 = energy_vec2
|
|
538
660
|
|
|
539
661
|
|
|
540
|
-
if ("beta" in particle_vec) or ("beta+" in particle_vec):
|
|
541
|
-
if Display: print("\t Summary of sampling of beta particles")
|
|
542
|
-
for i, p in enumerate(particle_vec):
|
|
543
|
-
if p == "beta":
|
|
544
|
-
e_b,p_b = tl.readBetaShape(rad_i,"beta-",level_before_trans) # read the data of BetaShape
|
|
545
|
-
index_beta_energy = tl.sampling(p_b) # sampling energy of beta
|
|
546
|
-
particle_vec[i] = "electron"
|
|
547
|
-
energy_vec[i] = e_b[index_beta_energy]
|
|
548
|
-
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
549
|
-
|
|
550
|
-
if p == "beta+":
|
|
551
|
-
e_b,p_b = tl.readBetaShape(rad_i,"beta+",level_before_trans)
|
|
552
|
-
index_beta_energy = tl.sampling(p_b)
|
|
553
|
-
particle_vec[i] = "positron"
|
|
554
|
-
energy_vec[i] = e_b[index_beta_energy]
|
|
555
|
-
particle_vec.append("gamma")
|
|
556
|
-
particle_vec.append("gamma")
|
|
557
|
-
energy_vec.append(511)
|
|
558
|
-
energy_vec.append(511)
|
|
559
|
-
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
560
|
-
energy_vec_initial = energy_vec
|
|
561
|
-
|
|
562
662
|
'''
|
|
563
663
|
==========================================================
|
|
564
664
|
III.b INTERACTION RAYONNEMENT/MATIERE
|
|
565
665
|
==========================================================
|
|
566
666
|
'''
|
|
567
667
|
|
|
568
|
-
for i, p in enumerate(particle_vec):
|
|
569
|
-
if p == "electron":
|
|
570
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
571
|
-
|
|
572
|
-
if p == "beta+":
|
|
573
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
574
|
-
|
|
575
|
-
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
576
|
-
energy_vec[i] = tl.energie_dep_gamma2(energy_vec[i],v=V) # sampling energy free from photon
|
|
577
|
-
particle_vec[i] = "electron"
|
|
578
|
-
|
|
579
|
-
if p == "Auger K" or p == "Auger L":
|
|
580
|
-
particle_vec[i] = "electron"
|
|
581
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
582
|
-
|
|
583
|
-
if Display:
|
|
584
|
-
print("\n\t INTERACTION \n\t Summary of the energy deposited by charged particles from the prompt transitions")
|
|
585
|
-
for i, p in enumerate(particle_vec):
|
|
586
|
-
if p[:4] != "Atom" and energy_vec[i]!=0: print(f"\t\t {p} of energy = {round(energy_vec[i],3)} keV")
|
|
587
|
-
|
|
588
668
|
for i, p in enumerate(particle_vec2):
|
|
589
669
|
if p == "electron":
|
|
590
670
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
@@ -601,7 +681,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
601
681
|
energy_vec2[i] = tl.energie_dep_beta2(energy_vec2[i],v=V)
|
|
602
682
|
|
|
603
683
|
if Display:
|
|
604
|
-
print("\t Summary of the energy deposited by charged particles
|
|
684
|
+
print("\n\t INTERACTION \n\t Summary of the energy deposited by charged particles (delay)")
|
|
605
685
|
for i, p in enumerate(particle_vec2):
|
|
606
686
|
if p[:4] != "Atom" and energy_vec2[i]!=0: print(f"\t\t {p} of energy = {round(energy_vec2[i],3)} keV")
|
|
607
687
|
|
|
@@ -616,22 +696,8 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
616
696
|
'''
|
|
617
697
|
|
|
618
698
|
# changer l'intégration E_i - E_d à E_i
|
|
619
|
-
if Display: print(f"\n\t SCINTILLATION \n\t\t Birks constant = {kB} cm/keV\n\t Summary of the estimation of quenched energies from the prompt transitions")
|
|
620
|
-
e_quenching=[]
|
|
621
|
-
for i, p in enumerate(particle_vec):
|
|
622
|
-
if p == "alpha":
|
|
623
|
-
energy_vec[i] = tl.Em_a(energy_vec[i],kB,nE_alpha)
|
|
624
|
-
e_quenching.append(energy_vec[i])
|
|
625
|
-
elif p == "electron" or p == "positron":
|
|
626
|
-
energy_vec[i] = tl.Em_e(energy_vec_initial[i]*1e3,energy_vec[i]*1e3,kB*1e3,nE_electron)*1e-3
|
|
627
|
-
e_quenching.append(energy_vec[i])
|
|
628
|
-
else:
|
|
629
|
-
e_quenching.append(0)
|
|
630
|
-
if Display:
|
|
631
|
-
for i, p in enumerate(particle_vec):
|
|
632
|
-
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", round(e_quenching[i],3), "keV")
|
|
633
699
|
|
|
634
|
-
if Display: print("\t Summary of the estimation of quenched energies
|
|
700
|
+
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)")
|
|
635
701
|
e_quenching2=[]
|
|
636
702
|
for i, p in enumerate(particle_vec2):
|
|
637
703
|
if p == "alpha":
|
|
@@ -661,7 +727,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
661
727
|
efficiency_S.append(p_single+p_single2)
|
|
662
728
|
efficiency_T.append(p_single**3+p_single2**3)
|
|
663
729
|
efficiency_D.append(3*(p_single)**2-2*p_single**3+(3*(p_single2)**2-2*p_single2**3))
|
|
664
|
-
if Display: print(f"\n\t COUNTING \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement (
|
|
730
|
+
if Display: print(f"\n\t COUNTING \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement (promt)")
|
|
665
731
|
if Display: print("\t\t Free parameter = ", L, "keV-1")
|
|
666
732
|
if Display: print("\t\t Efficiency of single events = ", round(p_single,5))
|
|
667
733
|
if Display: print("\t\t Efficiency of double events = ", round(p_single**3,5))
|
|
@@ -704,166 +770,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
704
770
|
if Display: print("\t\t Efficiency of triple events: ", round(pA_single2*pB_single2*pC_single2,5))
|
|
705
771
|
|
|
706
772
|
|
|
707
|
-
else: # One decay event into the resolving time
|
|
708
|
-
|
|
709
|
-
daughter_relax = DaughterVec[index_rad][iDaughter]
|
|
710
|
-
for i_part in range(len(particle_vec)):
|
|
711
|
-
relaxation = False
|
|
712
|
-
if "Atom_K" in particle_vec[i_part] or "Atom_L" in particle_vec[i_part] or "Atom_M" in particle_vec[i_part]:
|
|
713
|
-
relaxation = True
|
|
714
|
-
while relaxation:
|
|
715
|
-
tf,ef = tl.relaxation_atom(daughter_relax,Rad[index_rad],particle_vec[i_part])
|
|
716
|
-
if tf == "XKA":
|
|
717
|
-
particle_vec[i_part] = "Atom_L"
|
|
718
|
-
particle_vec.append(tf)
|
|
719
|
-
energy_vec.append(ef)
|
|
720
|
-
relaxation = True
|
|
721
|
-
elif tf == "XKB":
|
|
722
|
-
particle_vec[i_part] = "Atom_M"
|
|
723
|
-
particle_vec.append(tf)
|
|
724
|
-
energy_vec.append(ef)
|
|
725
|
-
relaxation = False
|
|
726
|
-
elif tf == "XL":
|
|
727
|
-
particle_vec[i_part] = "Atom_M"
|
|
728
|
-
particle_vec.append(tf)
|
|
729
|
-
energy_vec.append(ef)
|
|
730
|
-
relaxation = False
|
|
731
|
-
elif tf == "Auger K":
|
|
732
|
-
particle_vec[i_part] = "Atom_L"
|
|
733
|
-
particle_vec.append(tf)
|
|
734
|
-
energy_vec.append(ef)
|
|
735
|
-
relaxation = True
|
|
736
|
-
elif tf == "Auger L":
|
|
737
|
-
particle_vec[i_part] = "Atom_M"
|
|
738
|
-
particle_vec.append(tf)
|
|
739
|
-
energy_vec.append(ef)
|
|
740
|
-
relaxation = False
|
|
741
|
-
else:
|
|
742
|
-
if Display: print("untermined x or Auger")
|
|
743
|
-
relaxation = False
|
|
744
|
-
e_sum += ef
|
|
745
|
-
if Display:
|
|
746
|
-
print("\n\t ATOMIC RECOMBINATION\n\t Summary of the atomic relaxation")
|
|
747
|
-
for i, p in enumerate(particle_vec):
|
|
748
|
-
if p[:4] != "Atom":
|
|
749
|
-
if p=="beta" or p=="beta+":
|
|
750
|
-
print(f'\t\t {p} transition of energy = {energy_vec[i]}, keV')
|
|
751
|
-
else:
|
|
752
|
-
print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
753
|
-
else:
|
|
754
|
-
print(f'\t\t an electron left the {p[5:]} shell')
|
|
755
|
-
|
|
756
|
-
'''
|
|
757
|
-
==========================================================
|
|
758
|
-
III.a SPECTRES D'EMISSION
|
|
759
|
-
==========================================================
|
|
760
|
-
'''
|
|
761
|
-
if ("beta" in particle_vec) or ("beta+" in particle_vec):
|
|
762
|
-
if Display: print("\n\t EMISSION OF BETA PARTICLES")
|
|
763
|
-
for i, p in enumerate(particle_vec):
|
|
764
|
-
if p == "beta":
|
|
765
|
-
e_b,p_b = tl.readBetaShape(rad_i,"beta-",level_before_trans) # read the data of BetaShape
|
|
766
|
-
index_beta_energy = tl.sampling(p_b) # sampling energy of beta
|
|
767
|
-
particle_vec[i] = "electron"
|
|
768
|
-
energy_vec[i] = e_b[index_beta_energy]
|
|
769
|
-
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
770
|
-
|
|
771
|
-
if p == "beta+":
|
|
772
|
-
e_b,p_b = tl.readBetaShape(rad_i,"beta+",level_before_trans)
|
|
773
|
-
index_beta_energy = tl.sampling(p_b)
|
|
774
|
-
particle_vec[i] = "positron"
|
|
775
|
-
energy_vec[i] = e_b[index_beta_energy]
|
|
776
|
-
particle_vec.append("gamma")
|
|
777
|
-
particle_vec.append("gamma")
|
|
778
|
-
energy_vec.append(511)
|
|
779
|
-
energy_vec.append(511)
|
|
780
|
-
if Display: print(f"\t\t emitted {p} of energy = {round(energy_vec[i],3)} keV")
|
|
781
|
-
energy_vec_initial = energy_vec
|
|
782
|
-
|
|
783
|
-
'''
|
|
784
|
-
==========================================================
|
|
785
|
-
III.b INTERACTION RAYONNEMENT/MATIERE
|
|
786
|
-
==========================================================
|
|
787
|
-
'''
|
|
788
773
|
|
|
789
|
-
for i, p in enumerate(particle_vec):
|
|
790
|
-
if p == "electron":
|
|
791
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
792
|
-
|
|
793
|
-
if p == "beta+":
|
|
794
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
795
|
-
|
|
796
|
-
if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
|
|
797
|
-
energy_vec[i] = tl.energie_dep_gamma2(energy_vec[i],v=V) # sampling energy free from photon
|
|
798
|
-
particle_vec[i] = "electron"
|
|
799
|
-
|
|
800
|
-
if p == "Auger K" or p == "Auger L":
|
|
801
|
-
particle_vec[i] = "electron"
|
|
802
|
-
energy_vec[i] = tl.energie_dep_beta2(energy_vec[i],v=V)
|
|
803
|
-
|
|
804
|
-
if Display:
|
|
805
|
-
print("\n\t INTERACTION \n\t Summary of the energy deposited by charged particles")
|
|
806
|
-
for i, p in enumerate(particle_vec):
|
|
807
|
-
if p[:4] != "Atom" and energy_vec[i]!=0: print(f"\t\t {p} of energy = {round(energy_vec[i],3)} keV")
|
|
808
|
-
|
|
809
|
-
'''
|
|
810
|
-
====================
|
|
811
|
-
IV. LA SCINTILLATION
|
|
812
|
-
Calculation of the scintillation quenching with the Birks Model
|
|
813
|
-
====================
|
|
814
|
-
'''
|
|
815
|
-
if Display: print(f"\n\t SCINTILLATION \n\t\t Birks constant = {kB} cm/keV\n\t Summary of the estimation of quenched energies")
|
|
816
|
-
e_quenching=[]
|
|
817
|
-
for i, p in enumerate(particle_vec):
|
|
818
|
-
if p == "alpha":
|
|
819
|
-
energy_vec[i] = tl.Em_a(energy_vec[i],kB,nE_alpha)
|
|
820
|
-
e_quenching.append(energy_vec[i])
|
|
821
|
-
elif p == "electron" or p == "positron":
|
|
822
|
-
energy_vec[i] = tl.Em_e(energy_vec_initial[i]*1e3,energy_vec[i]*1e3,kB*1e3,nE_electron)*1e-3
|
|
823
|
-
e_quenching.append(energy_vec[i])
|
|
824
|
-
else:
|
|
825
|
-
e_quenching.append(0)
|
|
826
|
-
if Display: print("\t\t Birks constant = ", kB, ' cm/keV')
|
|
827
|
-
if Display:
|
|
828
|
-
for i, p in enumerate(particle_vec):
|
|
829
|
-
if p[:4] != "Atom": print(f"\t\t quenched energy of {p} = ", round(e_quenching[i],3), "keV")
|
|
830
|
-
|
|
831
|
-
'''
|
|
832
|
-
====================
|
|
833
|
-
V. LE MESURE TDCR
|
|
834
|
-
====================
|
|
835
|
-
'''
|
|
836
|
-
if mode2=="sym":
|
|
837
|
-
p_nosingle = np.exp(-L*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
838
|
-
p_single = 1-p_nosingle # probability to have at least 1 electrons in a PMT
|
|
839
|
-
efficiency_S.append(p_single)
|
|
840
|
-
efficiency_T.append(p_single**3)
|
|
841
|
-
efficiency_D.append(3*(p_single)**2-2*efficiency_T[-1])
|
|
842
|
-
if Display: print(f"\n\t COUNTING \n\t\t Free parameter = {L} keV-1 \n\t Summary of TDCR measurement")
|
|
843
|
-
if Display: print("\t\t Efficiency of single events = ", round(efficiency_S[-1],5))
|
|
844
|
-
if Display: print("\t\t Efficiency of double events = ", round(efficiency_D[-1],5))
|
|
845
|
-
if Display: print("\t\t Efficiency of triple events = ", round(efficiency_T[-1],5))
|
|
846
|
-
elif mode2=="asym":
|
|
847
|
-
pA_nosingle = np.exp(-L[0]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
848
|
-
pA_single = 1-pA_nosingle # probability to have at least 1 electrons in a PMT
|
|
849
|
-
pB_nosingle = np.exp(-L[1]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
850
|
-
pB_single = 1-pB_nosingle # probability to have at least 1 electrons in a PMT
|
|
851
|
-
pC_nosingle = np.exp(-L[2]*np.sum(np.asarray(e_quenching))/3) # probability to have 0 electrons in a PMT
|
|
852
|
-
pC_single = 1-pC_nosingle # probability to have at least 1 electrons in a PMT
|
|
853
|
-
|
|
854
|
-
efficiency_AB.append(pA_single*pB_single)
|
|
855
|
-
efficiency_BC.append(pB_single*pC_single)
|
|
856
|
-
efficiency_AC.append(pA_single*pC_single)
|
|
857
|
-
efficiency_T.append(pA_single*pB_single*pC_single)
|
|
858
|
-
efficiency_D.append(efficiency_AB[-1]+efficiency_BC[-1]+efficiency_AC[-1]-2*efficiency_T[-1])
|
|
859
|
-
efficiency_S.append(pA_single+pB_single+pC_single-efficiency_D[-1]-efficiency_T[-1])
|
|
860
|
-
if Display: print("\t Summary of TDCR measurement")
|
|
861
|
-
if Display: print("\t\t Free parameter PMT A: ", L[0], "keV-1")
|
|
862
|
-
if Display: print("\t\t Free parameter PMT B: ", L[1], "keV-1")
|
|
863
|
-
if Display: print("\t\t Free parameter PMT C: ", L[2], "keV-1")
|
|
864
|
-
if Display: print("\t\t Efficiency of single events: ", round(efficiency_S[-1],5))
|
|
865
|
-
if Display: print("\t\t Efficiency of double events: ", round(efficiency_D[-1],5))
|
|
866
|
-
if Display: print("\t\t Efficiency of triple events: ", round(efficiency_T[-1],5))
|
|
867
774
|
|
|
868
775
|
'''
|
|
869
776
|
====================
|
|
@@ -931,12 +838,13 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
931
838
|
if mode =="dis":
|
|
932
839
|
return efficiency_S, efficiency_D, efficiency_T
|
|
933
840
|
|
|
934
|
-
|
|
841
|
+
|
|
842
|
+
# L = 0.8
|
|
935
843
|
# TD = 0.977667386529166
|
|
936
844
|
# TAB = 0.992232838598821
|
|
937
845
|
# TBC = 0.992343419459002
|
|
938
846
|
# TAC = 0.99275350064608
|
|
939
|
-
# Rad="
|
|
847
|
+
# Rad="Sr-89"
|
|
940
848
|
# pmf_1="1"
|
|
941
849
|
# N = 10000
|
|
942
850
|
# kB =1.0e-5
|
|
@@ -946,5 +854,4 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=Fals
|
|
|
946
854
|
|
|
947
855
|
|
|
948
856
|
# out = TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, mode, mode2, Display=False, barp=True, uncData=False)
|
|
949
|
-
#
|
|
950
|
-
# print(out)
|
|
857
|
+
# tl.display_distrib(out)
|
|
@@ -1310,6 +1310,8 @@ def transf_name(rad):
|
|
|
1310
1310
|
RAD = name_lis[2]+name_lis[1]
|
|
1311
1311
|
return RAD
|
|
1312
1312
|
|
|
1313
|
+
|
|
1314
|
+
|
|
1313
1315
|
def readEShape(rad, *, z=z_ensdf):
|
|
1314
1316
|
""" This function reads the ENSDF zip files and format the data to be processed by TDCRPy.
|
|
1315
1317
|
|
|
@@ -1400,6 +1402,7 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1400
1402
|
e.append(p1[2])
|
|
1401
1403
|
type_b.append(p1[-2])
|
|
1402
1404
|
incertitude_b.append(int(p1[-3]))
|
|
1405
|
+
#incertitude_b.append(p1[-3])
|
|
1403
1406
|
prob_str_b.append(p1[3])
|
|
1404
1407
|
continue
|
|
1405
1408
|
elif '|]' in p1: # traiter un bloc qui comprend |]
|
|
@@ -1407,6 +1410,7 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1407
1410
|
prob_str_b.append(p1[4])
|
|
1408
1411
|
prob_b.append(float(p1[4]))
|
|
1409
1412
|
incertitude_b.append(int(p1[5]))
|
|
1413
|
+
#incertitude_b.append(p1[5])
|
|
1410
1414
|
e.append(float(p1[2])) # enregistrer les valeurs d'énergie
|
|
1411
1415
|
if 'AUGER' in p1: # traiter le cas d'auger et |]
|
|
1412
1416
|
if 'K' in p1[-2]: # Auger K
|
|
@@ -1425,6 +1429,7 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1425
1429
|
prob_b.append(float(p1[3])) # enregistrer proba
|
|
1426
1430
|
prob_str_b.append(p1[3])
|
|
1427
1431
|
incertitude_b.append(int(p1[4]))
|
|
1432
|
+
#incertitude_b.append(p1[4])
|
|
1428
1433
|
if 'L' in p1:
|
|
1429
1434
|
type_b.append('Auger L') # enregistrer type Auger L
|
|
1430
1435
|
else:
|
|
@@ -1458,31 +1463,52 @@ def readEShape(rad, *, z=z_ensdf):
|
|
|
1458
1463
|
|
|
1459
1464
|
|
|
1460
1465
|
def incer(prob,incer):
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1466
|
+
'''
|
|
1467
|
+
|
|
1468
|
+
Parameters
|
|
1469
|
+
----------
|
|
1470
|
+
prob : list of str
|
|
1471
|
+
probability (str) of rayon X and Auger electron.
|
|
1472
|
+
incer : list of int
|
|
1473
|
+
uncertainty of the probability.
|
|
1474
|
+
|
|
1475
|
+
Returns
|
|
1476
|
+
-------
|
|
1477
|
+
incertitude : list of float
|
|
1478
|
+
DESCRIPTION.
|
|
1479
|
+
|
|
1480
|
+
'''
|
|
1481
|
+
incertitude = []
|
|
1465
1482
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1483
|
+
for i in range(len(incer)):
|
|
1484
|
+
incertitude_b = []
|
|
1485
|
+
#if type(p) == float or type(p) == int:
|
|
1486
|
+
for n in range(len(incer[i])):
|
|
1487
|
+
p = prob[i][n]
|
|
1488
|
+
u = incer[i][n]
|
|
1489
|
+
incer_str = str(u)
|
|
1490
|
+
len_prob = len(p)
|
|
1491
|
+
len_incer = len(incer_str)
|
|
1492
|
+
|
|
1493
|
+
if '.' in p:
|
|
1494
|
+
index_pt = p.index('.')
|
|
1495
|
+
len_rest = len_prob - index_pt - 1
|
|
1496
|
+
#print(len_rest,incer_str)
|
|
1497
|
+
if len_rest >= len_incer:
|
|
1498
|
+
#print('1')
|
|
1499
|
+
incertitude_b.append(round(u*(10**-len_rest),len_rest))
|
|
1500
|
+
else:
|
|
1501
|
+
incertitude_b.append(round(u*(10**(len_rest-len_incer)),len_rest))
|
|
1502
|
+
else:
|
|
1503
|
+
incertitude_b.append(float(u))
|
|
1504
|
+
incertitude.append(incertitude_b)
|
|
1477
1505
|
|
|
1478
1506
|
return incertitude
|
|
1479
1507
|
|
|
1480
1508
|
|
|
1481
1509
|
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
1510
|
#============ traiter la relaxation ===============
|
|
1485
|
-
def relaxation_atom(daugther,rad,lacune='defaut'):
|
|
1511
|
+
def relaxation_atom(daugther,rad,lacune='defaut',uncData=False):
|
|
1486
1512
|
""" This function simulates the atomic rearangement following a missing electron an inner shell of the daughter atom.
|
|
1487
1513
|
|
|
1488
1514
|
Parameters
|
|
@@ -1493,7 +1519,9 @@ def relaxation_atom(daugther,rad,lacune='defaut'):
|
|
|
1493
1519
|
The mother nucleus (for exemple Am-241, C-11 etc.)
|
|
1494
1520
|
lacune : string
|
|
1495
1521
|
The shell where the electron is missing (for example 'Atom_K','Atom_L' etc.)
|
|
1496
|
-
|
|
1522
|
+
uncData : True/False
|
|
1523
|
+
|
|
1524
|
+
|
|
1497
1525
|
Returns
|
|
1498
1526
|
-------
|
|
1499
1527
|
Type : type of transition Auger L or K, or X Ray.
|
|
@@ -1501,6 +1529,7 @@ def relaxation_atom(daugther,rad,lacune='defaut'):
|
|
|
1501
1529
|
|
|
1502
1530
|
"""
|
|
1503
1531
|
daug_name,Energy,Prob,Type,Incertitude,f = readEShape(rad) # tirer les vecteurs de rad d'Ensdf
|
|
1532
|
+
incertitude = incer(f,Incertitude)
|
|
1504
1533
|
|
|
1505
1534
|
index_daug = daug_name.index(daugther) # repérer l'indice de fille correspondante
|
|
1506
1535
|
|
|
@@ -1508,26 +1537,19 @@ def relaxation_atom(daugther,rad,lacune='defaut'):
|
|
|
1508
1537
|
probability = np.array(Prob[index_daug]) # tirer le vecteur de proba
|
|
1509
1538
|
type_transi = Type[index_daug] # tirer le vecteur de type
|
|
1510
1539
|
|
|
1511
|
-
|
|
1540
|
+
u_probability = np.array(incertitude[index_daug])
|
|
1541
|
+
|
|
1512
1542
|
if len(probability) > 0: # le cas où le vecteur de proba/energie/type n'est pas vide
|
|
1513
|
-
'''
|
|
1514
|
-
posi_L = []
|
|
1515
|
-
posi_K = []
|
|
1516
|
-
|
|
1517
|
-
for i, p in enumerate(type_transi): # repérer les indices de transition L ou K
|
|
1518
|
-
if 'L' in p:
|
|
1519
|
-
posi_L.append(i) # enregistrer la posotion de transition L
|
|
1520
|
-
|
|
1521
|
-
elif 'K' in p:
|
|
1522
|
-
posi_K.append(i) # enregistrer la posotion de transition L
|
|
1523
|
-
'''
|
|
1524
1543
|
if 'L' in lacune: # traiter le transition de couche L
|
|
1525
1544
|
prob_2 = []
|
|
1526
1545
|
energy_2 = []
|
|
1527
1546
|
type_2 = []
|
|
1528
1547
|
for il, pl in enumerate(type_transi):
|
|
1529
1548
|
if 'L' in pl:
|
|
1530
|
-
|
|
1549
|
+
if uncData:
|
|
1550
|
+
prob_2.append(np.random.normal(probability[il],u_probability[il],1)[0]) # enregistrer les proba de transition L
|
|
1551
|
+
else:
|
|
1552
|
+
prob_2.append(probability[il]) # enregistrer les proba de transition L
|
|
1531
1553
|
energy_2.append(Energie[il]) # enregistrer les energies de transition L
|
|
1532
1554
|
type_2.append(type_transi[il]) # enregistrer les types de transition L
|
|
1533
1555
|
|
|
@@ -1537,7 +1559,10 @@ def relaxation_atom(daugther,rad,lacune='defaut'):
|
|
|
1537
1559
|
type_2 = []
|
|
1538
1560
|
for ik, pk in enumerate(type_transi):
|
|
1539
1561
|
if 'K' in pk:
|
|
1540
|
-
|
|
1562
|
+
if uncData:
|
|
1563
|
+
prob_2.append(np.random.normal(probability[ik],u_probability[ik],1)[0])
|
|
1564
|
+
else:
|
|
1565
|
+
prob_2.append(probability[ik]) # enregistrer les proba de transition K
|
|
1541
1566
|
energy_2.append(Energie[ik]) # enregistrer les energie de transition K
|
|
1542
1567
|
type_2.append(type_transi[ik]) # enregistrer les type de transition K
|
|
1543
1568
|
|
|
@@ -84,4 +84,14 @@ def eff(TD, TAB, TBC, TAC, Rad, pmf_1, kB, V, mode2, N=10000, L=1):
|
|
|
84
84
|
u_eff_T = out[5]
|
|
85
85
|
|
|
86
86
|
return L0, L, eff_S, u_eff_S, eff_D, u_eff_D, eff_T, u_eff_T
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
def effCurves(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V):
|
|
89
|
+
effD = []; ueffD = []; tdcr = []; uTdcr = []
|
|
90
|
+
for l in L:
|
|
91
|
+
out=td.TDCRPy(l, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, V, "eff", "sym", Display=False, barp=True, uncData=False)
|
|
92
|
+
effD.append(out[2])
|
|
93
|
+
ueffD.append(out[3])
|
|
94
|
+
tdcr.append(out[4]/out[2])
|
|
95
|
+
uTdcr.append(1/out[2]*np.sqrt(out[5]**2+out[4]**2*out[3]**2/out[2]**2))
|
|
96
|
+
return effD, ueffD, tdcr, uTdcr
|
|
97
|
+
|
|
@@ -8,7 +8,7 @@ Y = True
|
|
|
8
8
|
radListPureBeta = H-3, C-14, S-35, Ca-45, Ni-63, Sr-89, Sr-90, Tc-99, Pm-147, Pu-241
|
|
9
9
|
# Number of bins to discretize the linear energy space for quenching calculation
|
|
10
10
|
# and achieve a relative standard uncertainty below 1e-4.
|
|
11
|
-
nE = 7000, 1000, 1000, 500, 2000,
|
|
11
|
+
nE = 7000, 1000, 1000, 500, 2000, 500, 200, 500, 1000, 7000
|
|
12
12
|
|
|
13
13
|
## OTHER CASES
|
|
14
14
|
# Number of bins to discretize the linear energy space for quenching calculation
|
|
Binary file
|
|
@@ -8,15 +8,18 @@ Created on Fri Oct 6 14:49:40 2023
|
|
|
8
8
|
import TDCR_model_lib as tl
|
|
9
9
|
#import numpy as np
|
|
10
10
|
|
|
11
|
-
a,b,c,d,e,f = tl.readEShape('
|
|
12
|
-
print(
|
|
13
|
-
|
|
11
|
+
a,b,c,d,e,f = tl.readEShape('Mn-52m')
|
|
12
|
+
#print(f,e)
|
|
13
|
+
|
|
14
|
+
#print(tl.incer(f,e))
|
|
15
|
+
|
|
16
|
+
'''
|
|
14
17
|
if len(f[0]) == len(f[0]):
|
|
15
18
|
for i in range(len(f[0])):
|
|
16
19
|
print(tl.incer(f[0][i],e[0][i]))
|
|
17
20
|
else:
|
|
18
21
|
print('len pas bon')
|
|
19
|
-
|
|
22
|
+
|
|
20
23
|
|
|
21
24
|
if len(f) == 2:
|
|
22
25
|
print('### 2 fil')
|
|
@@ -26,3 +29,4 @@ if len(f) == 2:
|
|
|
26
29
|
else:
|
|
27
30
|
print('len pas bon')
|
|
28
31
|
|
|
32
|
+
'''
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_C-14.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ca-45.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_H-3.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Ni-63.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_S-35.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-89.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Sr-90.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/Spectra_for_analytical_model/dep_spectrum_Tc-99.txt
RENAMED
|
File without changes
|
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_1_200k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_2000_10000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-beta-_200_2000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_1_200k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_2000_10000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-beta-_200_2000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_2000_10000k.txt
RENAMED
|
File without changes
|
{TDCRPy-1.5.3 → TDCRPy-1.5.5}/tdcrpy/MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt
RENAMED
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|