TDCRPy 0.0.7__py3-none-any.whl → 0.0.8__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.
Code/TDCRPy.py CHANGED
@@ -9,7 +9,7 @@ Bureau International des Poids et Mesures
9
9
  """
10
10
 
11
11
  ## IMPORT PYTHON MODULES
12
- import TDCR_model_lib as tl
12
+ import TDCRPy.TDCR_model_lib as tl
13
13
  import numpy as np
14
14
 
15
15
  def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, RHO, nE, mode, mode2, Display=False):
@@ -296,7 +296,7 @@ def TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, RHO, nE, mode, mode2, Displa
296
296
  energy_vec.append(511)
297
297
 
298
298
  if p == "gamma" or p == "XKA" or p == "XKB" or p == "XL":
299
- energy_vec[i] = tl.energie_dep_gamma(energy_vec[i]) # sampling energy free from photon
299
+ energy_vec[i] = tl.energie_dep_gamma(energy_vec[i],v=10) # sampling energy free from photon
300
300
  particle_vec[i] = "electron"
301
301
  if p == "Auger K" or p == "Auger L":
302
302
  particle_vec[i] = "electron"
Code/TDCR_model_lib.py CHANGED
@@ -1266,14 +1266,18 @@ def E_quench_a(e,kB,nE):
1266
1266
  #========================= énergie gamma ===================================================
1267
1267
  #'''
1268
1268
  if absolutePath:
1269
- fp1 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_p_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1270
- fp2 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_p_200_2000k.txt' #gamma-10ml-200-2000keV-niveau 0
1271
- fp3 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_p_2000_10000k.txt' #gamma-10ml-2000-10000keV-niveau 0
1269
+ fp1 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1270
+ fp2 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt' #gamma-10ml-200-2000keV-niveau 0
1271
+ fp3 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt' #gamma-10ml-2000-10000keV-niveau 0
1272
+ fp4 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1273
+ fp5 = 'G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt' #gamma-10ml-1-200keV-niveau 0
1272
1274
  fe = "G:\Python_modules\Jialin\Code\\MCNP-MATRIX/matrice/fichier/E_depose.txt"
1273
1275
  else:
1274
- fp1 = 'MCNP-MATRIX/matrice/fichier/matrice_p_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1275
- fp2 = 'MCNP-MATRIX/matrice/fichier/matrice_p_200_2000k.txt' #gamma-10ml-200-2000keV-niveau 0
1276
- fp3 = 'MCNP-MATRIX/matrice/fichier/matrice_p_2000_10000k.txt' #gamma-10ml-2000-10000keV-niveau 0
1276
+ fp1 = 'MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1277
+ fp2 = 'MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_200_2000k.txt' #gamma-10ml-200-2000keV-niveau 0
1278
+ fp3 = 'MCNP-MATRIX/matrice/fichier/matrice_10ml-photon_2000_10000k.txt' #gamma-10ml-2000-10000keV-niveau 0
1279
+ fp4 = 'MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_1_200k.txt' #gamma-10ml-1-200keV-niveau 0
1280
+ fp5 = 'MCNP-MATRIX/matrice/fichier/matrice_16ml-photon_200_2000k.txt' #gamma-10ml-1-200keV-niveau 0
1277
1281
  fe = "MCNP-MATRIX/matrice/fichier/E_depose.txt"
1278
1282
  '''
1279
1283
  data1 = f1.readlines()
@@ -1329,9 +1333,11 @@ def read_matrice(path,niveau):
1329
1333
  Matrice10_p_1 = read_matrice(fp1,0)
1330
1334
  Matrice10_p_2 = read_matrice(fp2,1)
1331
1335
  Matrice10_p_3 = read_matrice(fp3,2)
1336
+ Matrice16_p_1 = read_matrice(fp4,0)
1337
+ Matrice16_p_2 = read_matrice(fp5,1)
1332
1338
  Matrice_e = read_matrice(fe,'e')
1333
1339
 
1334
- def energie_dep_gamma(e_inci,*,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p_2,matrice10_3=Matrice10_p_3,ed=Matrice_e):
1340
+ 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,ed=Matrice_e):
1335
1341
  """
1336
1342
  ----------
1337
1343
  Parameters
@@ -1357,16 +1363,19 @@ def energie_dep_gamma(e_inci,*,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p
1357
1363
  """
1358
1364
  ## sort keV / entrée : keV
1359
1365
  if e_inci <= 200:
1360
- index = int(e_inci) # index de colonne de la matrice de l'énergie incidente la plus proche
1361
- #doc = 'MCNP-MATRIX/matrice/matrice_p_1_200k.txt'
1362
- matrice = matrice1
1363
- #taille_x = 200
1366
+ index = int(e_inci) # index de colonne de la matrice de l'énergie incidente la plus proche
1367
+ if v == 10:
1368
+ matrice = matrice10_1
1369
+ elif v == 16:
1370
+ matrice = matrice16_1
1364
1371
  e = ed[:,0]
1365
1372
 
1366
1373
  elif e_inci <= 2000:
1367
1374
  index = int((e_inci-200)/2)
1368
- #doc = 'MCNP-MATRIX/matrice/matrice_p_200_2000k.txt'
1369
- matrice = matrice2
1375
+ if v == 10:
1376
+ matrice = matrice10_2
1377
+ elif v == 16:
1378
+ matrice = matrice16_2
1370
1379
  #taille_x = 901
1371
1380
  e = ed[:,1]
1372
1381
 
@@ -1395,8 +1404,8 @@ def energie_dep_gamma(e_inci,*,matrice10_1=Matrice10_p_1,matrice10_2=Matrice10_p
1395
1404
  if result > e_inci: result = e_inci
1396
1405
  return result
1397
1406
 
1398
- #for i in range(50):
1399
- #print(energie_dep_gamma(511))
1407
+ #for i in range(10):
1408
+ # print(energie_dep_gamma(511,16))
1400
1409
 
1401
1410
 
1402
1411
  if absolutePath:
Code/test.py CHANGED
@@ -7,3 +7,6 @@ Created on Thu Jul 13 19:15:23 2023
7
7
  import TDCRPy
8
8
 
9
9
  TDCRPy.TDCRPy(1, 0.5, 0.5, 0.5, 0.5, "H-3", "1", 10, 0.00001, 1,10, "eff", "sym", Display=True)
10
+
11
+
12
+ TDCRPy.TDCRPy(L, TD, TAB, TBC, TAC, Rad, pmf_1, N, kB, RHO, nE, mode, mode2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TDCRPy
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: TDCR model
5
5
  Home-page: https://github.com/RomainCoulon/TDCRPy
6
6
  Author: RomainCoulon (Romain Coulon)
@@ -1,11 +1,11 @@
1
1
  Code/Activity_TDCR.py,sha256=wcllEOJbeEOexAYzcFGQx2luIBhxSU3LtpEalRmNziw,11530
2
2
  Code/EfficiencyProfils.py,sha256=-ZUPva1dU7lMRcKbQAewX9QyiTDwCiNQDoaQiw7dOI4,4829
3
- Code/TDCRPy.py,sha256=ffOfmaqWdk5PWoVDep8zs_VoQLUhUCQePC0oAbPOYVs,23202
4
- Code/TDCR_model_lib.py,sha256=vl0pMsGG3FKAmfpnHfjUX8mokay1dvlH99GHYd9BnsI,79115
3
+ Code/TDCRPy.py,sha256=igN-xE3ixC27R0aaZHQ832wp8w5UV0iDjx_1cEc8Kvk,23214
4
+ Code/TDCR_model_lib.py,sha256=bF2S2L3L5c4y2Bg6G1tG1PVR7mJJ1L6UU7G0IEHNsTY,79829
5
5
  Code/TDCRoptimize.py,sha256=2CssmP_SZSe6C_Bkgei3hon21RPytH4DetMbXi-e6wk,3171
6
6
  Code/__init__.py,sha256=IQBC9crikuuGlHfxIdP65CrgSHgl9U8z2jSYduNpWB0,93
7
7
  Code/decay.py,sha256=Lnq-kj-6Xs2Rw9w3Y3LlK_ffFip1QzemHdesiug0Wko,817
8
- Code/test.py,sha256=rbvsRbDGzSifUU1dSUA7CHkU58Qt8z8U42A9hGdIMOQ,212
8
+ Code/test.py,sha256=3r8LxXmQwlHNIefMswwUCy3OoHHKDVK8A3izerGT15U,292
9
9
  Code/test1.py,sha256=rGA9d1cgArhAfxRAAdtiz-vPGQ0Ns3HEdN8sCwydHYM,3250
10
10
  TDCRPy/Activity_TDCR.py,sha256=wcllEOJbeEOexAYzcFGQx2luIBhxSU3LtpEalRmNziw,11530
11
11
  TDCRPy/EfficiencyProfils.py,sha256=-ZUPva1dU7lMRcKbQAewX9QyiTDwCiNQDoaQiw7dOI4,4829
@@ -16,8 +16,8 @@ TDCRPy/__init__.py,sha256=IQBC9crikuuGlHfxIdP65CrgSHgl9U8z2jSYduNpWB0,93
16
16
  TDCRPy/decay.py,sha256=Lnq-kj-6Xs2Rw9w3Y3LlK_ffFip1QzemHdesiug0Wko,817
17
17
  TDCRPy/test.py,sha256=3r8LxXmQwlHNIefMswwUCy3OoHHKDVK8A3izerGT15U,292
18
18
  TDCRPy/test1.py,sha256=rGA9d1cgArhAfxRAAdtiz-vPGQ0Ns3HEdN8sCwydHYM,3250
19
- TDCRPy-0.0.7.dist-info/LICENCE.md,sha256=fuYzrZRiOAjJBzA1tsGQwojCgGROArb2Ec48GDTjlWM,1086
20
- TDCRPy-0.0.7.dist-info/METADATA,sha256=iLHz8VjV1XAd0EyezUA5qWhY5eOn1tRgmMUt4Vuq92A,5761
21
- TDCRPy-0.0.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
22
- TDCRPy-0.0.7.dist-info/top_level.txt,sha256=krQD4Yq8J1g9w4cXfUXJ3zwlHC5cKxXYk6-CJg5tUps,7
23
- TDCRPy-0.0.7.dist-info/RECORD,,
19
+ TDCRPy-0.0.8.dist-info/LICENCE.md,sha256=fuYzrZRiOAjJBzA1tsGQwojCgGROArb2Ec48GDTjlWM,1086
20
+ TDCRPy-0.0.8.dist-info/METADATA,sha256=CU_LjClcOCPImFHxekh2IA_RxqPwuLem6ek03GO7j-I,5761
21
+ TDCRPy-0.0.8.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
22
+ TDCRPy-0.0.8.dist-info/top_level.txt,sha256=5dSMF0KOskVmT0QGz9KnqcD9Ccc2Dkq0Sa8FOZk-7Ck,5
23
+ TDCRPy-0.0.8.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ Code
@@ -1 +0,0 @@
1
- TDCRPy
File without changes