nucleardatapy 0.2.0__py3-none-any.whl → 1.0.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.
Files changed (165) hide show
  1. nucleardatapy/__init__.py +3 -1
  2. nucleardatapy/astro/setup_gw.py +18 -18
  3. nucleardatapy/astro/setup_mr.py +9 -1
  4. nucleardatapy/astro/setup_mup.py +10 -10
  5. nucleardatapy/corr/setup_EsymDen.py +0 -5
  6. nucleardatapy/corr/setup_EsymLsym.py +50 -17
  7. nucleardatapy/corr/setup_KsatQsat.py +170 -69
  8. nucleardatapy/crust/setup_crust.py +403 -120
  9. nucleardatapy/data/astro/NICER/J0740+6620.dat +1 -0
  10. nucleardatapy/data/crust/2018-PCPFDDG-BSK22.dat +83 -0
  11. nucleardatapy/data/crust/2018-PCPFDDG-BSK24.dat +74 -0
  12. nucleardatapy/data/crust/2018-PCPFDDG-BSK25.dat +130 -0
  13. nucleardatapy/data/crust/2018-PCPFDDG-BSK26.dat +81 -0
  14. nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-NM.dat → 2006-BHF-Av18-E2A-NM.dat} +8 -8
  15. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-SM.dat +11 -0
  16. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.2.dat +11 -0
  17. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.4.dat +11 -0
  18. nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
  19. nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
  20. nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
  21. nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
  22. nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
  23. nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
  24. nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
  25. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
  26. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
  27. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
  28. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
  29. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
  30. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
  31. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
  32. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
  33. nucleardatapy/data/nuclei/masses/Theory/2023-BSkG3.txt +0 -4
  34. nucleardatapy/data/nuclei/masses/Theory/2025-BSkG4.txt +0 -1
  35. nucleardatapy/env.py +1 -1
  36. nucleardatapy/eos/__init__.py +4 -3
  37. nucleardatapy/eos/setupCC.py +429 -0
  38. nucleardatapy/eos/setup_am.py +71 -34
  39. nucleardatapy/eos/setup_am_Beq.py +48 -17
  40. nucleardatapy/eos/setup_am_Leq.py +81 -50
  41. nucleardatapy/fig/__init__.py +29 -7
  42. nucleardatapy/fig/astro_setupGW_fig.py +5 -5
  43. nucleardatapy/fig/astro_setupMR_fig.py +12 -10
  44. nucleardatapy/fig/astro_setupMasses_fig.py +4 -4
  45. nucleardatapy/fig/astro_setupMtov_fig.py +4 -4
  46. nucleardatapy/fig/astro_setupMup_fig.py +5 -5
  47. nucleardatapy/fig/corr_setupEsymDen_fig.py +12 -5
  48. nucleardatapy/fig/corr_setupEsymLsym_fig.py +18 -5
  49. nucleardatapy/fig/corr_setupKsatQsat_fig.py +19 -15
  50. nucleardatapy/fig/crust_setupCrust_fig.py +7 -7
  51. nucleardatapy/fig/eos_setupAMBeq_fig.py +1338 -64
  52. nucleardatapy/fig/eos_setupAMLeq_fig.py +200 -68
  53. nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +364 -0
  54. nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +337 -0
  55. nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +343 -0
  56. nucleardatapy/fig/eos_setupAM_fig.py +470 -47
  57. nucleardatapy/fig/eos_setupCC_fig.py +240 -0
  58. nucleardatapy/fig/hnuc_setupChart_fig.py +2 -2
  59. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +4 -4
  60. nucleardatapy/fig/matter_all_fig.py +954 -0
  61. nucleardatapy/fig/matter_setupCheck_fig.py +103 -0
  62. nucleardatapy/fig/matter_setupFFGLep_fig.py +70 -0
  63. nucleardatapy/fig/matter_setupFFGNuc_fig.py +268 -104
  64. nucleardatapy/fig/matter_setupHIC_fig.py +98 -58
  65. nucleardatapy/fig/matter_setupMicroEsym_fig.py +267 -51
  66. nucleardatapy/fig/matter_setupMicro_LP_fig.py +175 -78
  67. nucleardatapy/fig/matter_setupMicro_band_fig.py +116 -47
  68. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +264 -34
  69. nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +41 -18
  70. nucleardatapy/fig/matter_setupMicro_fig.py +332 -98
  71. nucleardatapy/fig/matter_setupMicro_gap_fig.py +219 -92
  72. nucleardatapy/fig/matter_setupNEPStats_fig.py +96 -0
  73. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +201 -61
  74. nucleardatapy/fig/matter_setupPheno_fig.py +392 -85
  75. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +286 -0
  76. nucleardatapy/fig/nuc_setupBEExp_fig.py +232 -70
  77. nucleardatapy/fig/nuc_setupBETheo_fig.py +344 -0
  78. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +59 -0
  79. nucleardatapy/fig/nuc_setupRchExp_fig.py +139 -0
  80. nucleardatapy/fig/nuc_setupRchTheo_fig.py +143 -0
  81. nucleardatapy/fig/nuc_setupRnpExp_fig.py +88 -0
  82. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +133 -0
  83. nucleardatapy/hello.py +6 -0
  84. nucleardatapy/hnuc/__init__.py +3 -3
  85. nucleardatapy/hnuc/{setup_be1L_exp.py → setup_re1L_exp.py} +6 -6
  86. nucleardatapy/hnuc/{setup_be1Xi_exp.py → setup_re1Xi_exp.py} +5 -5
  87. nucleardatapy/hnuc/{setup_be2L_exp.py → setup_re2L_exp.py} +6 -6
  88. nucleardatapy/matter/__init__.py +14 -13
  89. nucleardatapy/matter/setup_check.py +97 -0
  90. nucleardatapy/matter/setup_ffg.py +72 -38
  91. nucleardatapy/matter/setup_hic.py +91 -74
  92. nucleardatapy/matter/setup_micro.py +1698 -1019
  93. nucleardatapy/matter/setup_micro_band.py +11 -6
  94. nucleardatapy/matter/setup_micro_effmass.py +55 -2
  95. nucleardatapy/matter/setup_micro_esym.py +39 -34
  96. nucleardatapy/matter/setup_micro_gap.py +26 -19
  97. nucleardatapy/matter/setup_micro_lp.py +20 -19
  98. nucleardatapy/matter/setup_nep.py +175 -92
  99. nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
  100. nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
  101. nucleardatapy/matter/setup_pheno.py +121 -45
  102. nucleardatapy/matter/setup_pheno_esym.py +14 -19
  103. nucleardatapy/nuc/__init__.py +2 -2
  104. nucleardatapy/nuc/setup_be_exp.py +345 -333
  105. nucleardatapy/nuc/setup_be_theo.py +366 -178
  106. nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
  107. nucleardatapy/nuc/setup_rch_exp.py +49 -6
  108. nucleardatapy/nuc/setup_rch_theo.py +72 -3
  109. nucleardatapy/nuc/{setup_nskin_exp.py → setup_rnp_exp.py} +59 -65
  110. nucleardatapy/nuc/{setup_nskin_theo.py → setup_rnp_theo.py} +35 -39
  111. nucleardatapy-1.0.0.dist-info/METADATA +553 -0
  112. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/RECORD +156 -128
  113. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/WHEEL +1 -1
  114. tests/test_corr_setupKsatQsat.py +3 -1
  115. tests/test_matter_setupMicro.py +37 -10
  116. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
  117. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
  118. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
  119. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
  120. nucleardatapy/fig/matter_ENM_fig.py +0 -119
  121. nucleardatapy/fig/matter_ESM_fig.py +0 -119
  122. nucleardatapy/fig/matter_Esym_fig.py +0 -122
  123. nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
  124. nucleardatapy-0.2.0.dist-info/METADATA +0 -115
  125. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
  126. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
  127. /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
  128. /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
  129. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
  130. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
  131. /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
  132. /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
  133. /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
  134. /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
  135. /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
  136. /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
  137. /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
  138. /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
  139. /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
  140. /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
  141. /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
  142. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-AM.dat → 2006-BHF-Av18-E2A-AM.dat} +0 -0
  143. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-SM.dat → 2006-BHF-Av18-E2A-SM.dat} +0 -0
  144. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-Esym2-SM.dat → 2006-BHF-Av18-Esym2-SM.dat} +0 -0
  145. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-NM-FreeSpectrum.dat} +0 -0
  146. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-SelfEnergy.dat → 2006-BHF-Av18-GAP-NM-SelfEnergy.dat} +0 -0
  147. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-SM-FreeSpectrum.dat} +0 -0
  148. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-SelfEnergy.dat → 2006-BHF-Av18-GAP-SM-SelfEnergy.dat} +0 -0
  149. /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
  150. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL59.dat → 2019-MBPT-NM-DHSL59.dat} +0 -0
  151. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL69.dat → 2019-MBPT-NM-DHSL69.dat} +0 -0
  152. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL59.dat → 2019-MBPT-SM-DHSL59.dat} +0 -0
  153. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL69.dat → 2019-MBPT-SM-DHSL69.dat} +0 -0
  154. /nucleardatapy/data/matter/micro/{2023-MBPT-NM.csv → 2020-MBPT-NM.csv} +0 -0
  155. /nucleardatapy/data/matter/micro/{2023-MBPT-SM.csv → 2020-MBPT-SM.csv} +0 -0
  156. /nucleardatapy/data/nuclei/{nskin → rnp}/208Pb.dat +0 -0
  157. /nucleardatapy/data/nuclei/{nskin → rnp}/48Ca.dat +0 -0
  158. /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
  159. /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
  160. /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
  161. /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
  162. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
  163. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
  164. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info/licenses}/LICENSE +0 -0
  165. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,6 @@ import sys
3
3
  import math
4
4
  import numpy as np # 1.15.0
5
5
 
6
- #nucleardatapy_tk = os.getenv('NUCLEARDATAPY_TK')
7
- #sys.path.insert(0, nucleardatapy_tk)
8
-
9
6
  import nucleardatapy as nuda
10
7
 
11
8
  CST_AtmMass = 931.494028
@@ -16,28 +13,33 @@ CST_mnc2 = 8.0713171
16
13
  CST_dmnc2= 0.0000005
17
14
  CST_mHc2 = 7.2889706
18
15
  CST_dmHc2= 0.0000001
19
- yearMin=1851
16
+ yearMin=1890
20
17
 
21
18
  # time conversion (using tropical year as in NUBASE2020):
22
19
  ns = 1e-9
23
- minutes = 60 # in s
24
- hours = 60 * minutes # (hours) in s
25
- days = 24 * hours # (day) in s
26
- days = 86400 # in s
27
- months = 30 * days # (month) (30 days) in s
28
- years = 365.2422 * days # (year) in s
20
+ minute = 60 # in s
21
+ hour = 60 * minute # (hours) in s
22
+ day = 24 * hour # (day) in s # days = 86400 # in s
23
+ month = 30 * day # (month) (30 days) in s
24
+ year = 365.2422 * day # (year) in s
29
25
  #print('years:',years)
30
26
  #print('type(years):',type(years))
31
- ILt = 1e30 * years # infinite Large time
27
+ ILt = 1e30 * year # infinite Large time
32
28
  ISt = 1.e-30 # infinite Short time
33
- HTvsl = 1e-3 # half-time for very short live nuclei
34
- HTsl = hours # half-time for short live nuclei
29
+ HTsl = day # half-time for short live nuclei
30
+ HTvsl = 1.0 # half-time for very short live nuclei
31
+ HThsl = 1.e-3 # half-time for hyper short live nuclei
35
32
 
36
- def stable_fit(Zmin = 1, Zmax = 120):
33
+ def stable_fit_Z(Zmin = 1, Zmax = 120):
37
34
  Z = np.linspace(start=Zmin, stop=Zmax, num=1+Zmax-Zmin, dtype = int )
38
35
  N = np.array( Z + 6.e-3*Z*Z, dtype = int )
39
36
  return N, Z
40
37
 
38
+ def stable_fit_N(Nmin = 1, Nmax = 170):
39
+ N = np.linspace(start=Nmin, stop=Nmax, num=1+Nmax-Nmin, dtype = int )
40
+ Z = np.array( N - 3.8e-3*N*N + 9.e-6*N*N*N, dtype = int )
41
+ return N, Z
42
+
41
43
  def be_exp_tables():
42
44
  """
43
45
  Return a list of the tables available in this toolkit for the experimental masses and
@@ -141,18 +143,18 @@ class setupBEExp():
141
143
  #
142
144
  tables, tables_lower = be_exp_tables()
143
145
  if table.lower() not in tables_lower:
144
- print('Table ',table,' is not in the list of tables.')
145
- print('list of tables:',tables)
146
- print('-- Exit the code --')
146
+ print('setup_be_exp.py: Table ',table,' is not in the list of tables.')
147
+ print('setup_be_exp.py: list of tables:',tables)
148
+ print('setup_be_exp.py: -- Exit the code --')
147
149
  exit()
148
150
  self.table = table
149
151
  if nuda.env.verb: print("table:",table)
150
152
  #
151
153
  versions, versions_lower = be_exp_versions( table = table )
152
154
  if version.lower() not in versions_lower:
153
- print('Version ',version,' is not in the list of versions.')
154
- print('list of versions:',versions)
155
- print('-- Exit the code --')
155
+ print('setup_be_exp.py: Version ',version,' is not in the list of versions.')
156
+ print('setup_be_exp.py: list of versions:',versions)
157
+ print('setup_be_exp.py: -- Exit the code --')
156
158
  exit()
157
159
  self.version = version
158
160
  if nuda.env.verb: print("version:",version)
@@ -165,6 +167,8 @@ class setupBEExp():
165
167
  self.nucSymb = []
166
168
  #: Attribute N (number of neutrons of the nucleus).
167
169
  self.nucN = []
170
+ #: Attribute I (isospin asymmetry):
171
+ self.nucI = []
168
172
  #: Attribute I.
169
173
  self.flagI = []
170
174
  #: Attribute Interp (interpolation). Interp='y' is the nucleus\
@@ -238,6 +242,7 @@ class setupBEExp():
238
242
  #if nucZ < int(Zmin): continue
239
243
  #if int(Z) != 0 and nucZ != int(Z): continue
240
244
  NN = AA - ZZ
245
+ II = ( NN - ZZ ) / AA
241
246
  if (nuda.env.verb): print(' nucleus:',AA,ZZ,NN)
242
247
  #if ZZ == 20: print(' nucleus:',AA,ZZ,NN)
243
248
  flagI=int(line[7:8]) # if nuci==0: ground-state (GS)
@@ -312,29 +317,29 @@ class setupBEExp():
312
317
  elif htu==' s':
313
318
  fac = 1.0 # print('second')
314
319
  elif htu==' h':
315
- fac = hours # print('hours')
320
+ fac = hour # print('hours')
316
321
  elif htu==' d':
317
- fac = days # print('day')
322
+ fac = day # print('day')
318
323
  elif htu==' m':
319
- fac = months # print('month')
324
+ fac = month # print('month')
320
325
  elif htu==' y':
321
- fac = years # print('year')
326
+ fac = year # print('year')
322
327
  elif htu=='ky':
323
- fac = 1e3 * years # print('Kiloyears (1e3)')
328
+ fac = 1e3 * year # print('Kiloyears (1e3)')
324
329
  elif htu=='My':
325
- fac = 1e6 * years # print('Megayears (1e6)')
330
+ fac = 1e6 * year # print('Megayears (1e6)')
326
331
  elif htu=='Gy':
327
- fac = 1e9 * years # print('Gigayears (1e9)')
332
+ fac = 1e9 * year # print('Gigayears (1e9)')
328
333
  elif htu=='Ty':
329
- fac = 1e12 * years # print('Terayears (1e12)')
334
+ fac = 1e12 * year # print('Terayears (1e12)')
330
335
  elif htu=='Py':
331
- fac = 1e15 * years # print('Petayears (1e15)')
336
+ fac = 1e15 * year # print('Petayears (1e15)')
332
337
  elif htu=='Ey':
333
- fac = 1e18 * years # print('Exayears (1e18)')
338
+ fac = 1e18 * year # print('Exayears (1e18)')
334
339
  elif htu=='Zy':
335
- fac = 1e21 * years # print('Zettayears (1e21)')
340
+ fac = 1e21 * year # print('Zettayears (1e21)')
336
341
  elif htu=='Yy':
337
- fac = 1e24 * years # print('Yottayears (1e24)')
342
+ fac = 1e24 * year # print('Yottayears (1e24)')
338
343
  else:
339
344
  print('unknown lifetime unit')
340
345
  print('ht:',ht,' unit:',htu)
@@ -403,6 +408,7 @@ class setupBEExp():
403
408
  self.nucZ.append( ZZ )
404
409
  if ZZ > self.Zmax: self.Zmax = ZZ
405
410
  self.nucN.append( NN )
411
+ self.nucI.append( II )
406
412
  self.nucSymb.append( symb )
407
413
  self.flagI.append( flagI )
408
414
  self.flagInterp.append( interp )
@@ -433,6 +439,18 @@ class setupBEExp():
433
439
  self.dist_nbNuc[i_year] += 1
434
440
  print( 'dist:',self.dist_nbNuc )
435
441
  #
442
+ # convert to numpy array:
443
+ #
444
+ self.nucA = np.array( self.nucA , dtype = int )
445
+ self.nucN = np.array( self.nucN , dtype = int )
446
+ self.nucZ = np.array( self.nucZ , dtype = int )
447
+ self.flagI = np.array( self.flagI , dtype = int )
448
+ self.nucYear = np.array( self.nucYear , dtype = int )
449
+ self.nucI = np.array( self.nucI , dtype = float )
450
+ self.nucHT = np.array( self.nucHT , dtype = float )
451
+ self.nucBE = np.array( self.nucBE , dtype = float )
452
+ self.nucBE_err = np.array( self.nucBE_err , dtype = float )
453
+ #
436
454
  if nuda.env.verb: print("Exit SetupNucBEExp()")
437
455
  #
438
456
  #
@@ -478,24 +496,24 @@ class setupBEExp():
478
496
  if nuda.env.verb: print("Enter select()")
479
497
  #
480
498
  if interp.lower() not in [ 'y', 'n' ]:
481
- print('Interp ',interp,' is not "y" or "n".')
482
- print('-- Exit the code --')
499
+ print('setup_be_exp.py: Interp ',interp,' is not "y" or "n".')
500
+ print('setup_be_exp.py: -- Exit the code --')
483
501
  exit()
484
502
  self.nucInterp = interp
485
503
  if nuda.env.verb: print("interp:",interp)
486
504
  #
487
505
  if state.lower() not in [ 'gs' ]:
488
- print('State ',state,' is not "gs".')
489
- print('-- Exit the code --')
506
+ print('setup_be_exp.py: State ',state,' is not "gs".')
507
+ print('setup_be_exp.py: -- Exit the code --')
490
508
  exit()
491
509
  self.state = state
492
510
  if nuda.env.verb: print("state:",state)
493
511
  #
494
- nuclei = [ 'stable', 'unstable', 'longlive', 'shortlive', 'veryshortlive' ]
512
+ nuclei = [ 'stable', 'unstable', 'longlive', 'shortlive', 'veryshortlive', 'hypershortlive' ]
495
513
  #
496
514
  if nucleus.lower() not in nuclei:
497
- print('Nucleus ',nucleus,' is not in the list: ',nuclei)
498
- print('-- Exit the code --')
515
+ print('setup_be_exp.py: Nucleus ',nucleus,' is not in the list: ',nuclei)
516
+ print('setup_be_exp.py: -- Exit the code --')
499
517
  exit()
500
518
  self.nucleus = nucleus
501
519
  if nuda.env.verb: print("nucleus:",nucleus)
@@ -511,6 +529,7 @@ class setupBEExp():
511
529
  #: Attribute sel_symb (symbol of the selected nuclei).
512
530
  self.sel_nucSymb = []
513
531
  self.sel_nucN = []
532
+ self.sel_nucI = []
514
533
  self.sel_flagI = []
515
534
  self.sel_flagInterp = []
516
535
  self.sel_nucHT = [] # half-time in s
@@ -525,6 +544,7 @@ class setupBEExp():
525
544
  nucA = self.nucA[ind]
526
545
  nucZ = self.nucZ[ind]
527
546
  nucN = self.nucN[ind]
547
+ nucI = self.nucI[ind]
528
548
  flagI = self.flagI[ind]
529
549
  nucSymb = self.nucSymb[ind]
530
550
  flagInterp = self.flagInterp[ind]
@@ -546,7 +566,9 @@ class setupBEExp():
546
566
  pass
547
567
  elif nucleus.lower() == 'shortlive' and nucStbl == 'n' and nucHT < HTsl and nucHT > HTvsl:
548
568
  pass
549
- elif nucleus.lower() == 'veryshortlive' and nucStbl == 'n' and nucHT < HTvsl:
569
+ elif nucleus.lower() == 'veryshortlive' and nucStbl == 'n' and nucHT < HTvsl and nucHT > HThsl:
570
+ pass
571
+ elif nucleus.lower() == 'hypershortlive' and nucStbl == 'n' and nucHT < HThsl:
550
572
  pass
551
573
  else:
552
574
  continue
@@ -567,6 +589,7 @@ class setupBEExp():
567
589
  self.sel_nucZ.append( nucZ )
568
590
  if nucZ > self.sel_Zmax: self.sel_Zmax = nucZ
569
591
  self.sel_nucN.append( nucN )
592
+ self.sel_nucI.append( nucI )
570
593
  self.sel_nucSymb.append( nucSymb )
571
594
  self.sel_flagI.append( flagI )
572
595
  self.sel_flagInterp.append( flagInterp )
@@ -580,74 +603,22 @@ class setupBEExp():
580
603
  print('number of nuclei(Tot):',self.sel_nbNucTot)
581
604
  print('number of nuclei(Sta):',self.sel_nbNucSta)
582
605
  print('number of nuclei(Sel):',self.sel_nbNucSel)
606
+ #print(' sel_nucA:',self.sel_nucA)
607
+ # convert to numpy array:
608
+ self.sel_nucA = np.array( self.sel_nucA , dtype = int )
609
+ self.sel_nucN = np.array( self.sel_nucN , dtype = int )
610
+ self.sel_nucZ = np.array( self.sel_nucZ , dtype = int )
611
+ self.sel_flagI = np.array( self.sel_flagI , dtype = int )
612
+ self.sel_nucYear = np.array( self.sel_nucYear , dtype = int )
613
+ self.sel_nucI = np.array( self.sel_nucI , dtype = float )
614
+ self.sel_nucHT = np.array( self.sel_nucHT , dtype = float )
615
+ self.sel_nucBE = np.array( self.sel_nucBE , dtype = float )
616
+ self.sel_nucBE_err = np.array( self.sel_nucBE_err , dtype = float )
583
617
  #
584
618
  if nuda.env.verb: print("Exit select()")
585
619
  #
586
620
  return self
587
621
  #
588
- def isotopes(self, Zmin = 1, Zmax = 95 ):
589
- """
590
- Method which find the first and last isotopes for each Zmin<Z<Zmax.
591
-
592
- :param Zmin: Fix the minimum charge for the search of isotopes.
593
- :type Zmin: int, optional. Default: 1.
594
- :param Zmax: Fix the maximum charge for the search of isotopes.
595
- :type Zmax: int, optional. Default: 95.
596
-
597
- **Attributes:**
598
- """
599
- #
600
- if nuda.env.verb: print("Enter drip()")
601
- #
602
- if Zmin > Zmax:
603
- print('In isotopes attribute function of setup_be_exp.py:')
604
- print('Bad definition of Zmin and Zmax')
605
- print('It is expected that Zmin<=Zmax')
606
- print('Zmin,Zmax:',Zmin,Zmax)
607
- print('exit')
608
- exit()
609
- #
610
- Nstable, Zstable = stable_fit( Zmin = Zmin, Zmax = Zmax )
611
- #
612
- self.isotopes_Z = []
613
- self.isotopes_Nmin = []
614
- self.isotopes_Nmax = []
615
- #
616
- for ind,Z in enumerate(Zstable):
617
- #
618
- #print('ind,Z, Nstable:',ind,Z,Nstable[ind])
619
- #
620
- if Z > Zmax :
621
- break
622
- if Z < Zmin :
623
- continue
624
- #
625
- Nmin = Nstable[ind]
626
- Nmax = Nstable[ind]
627
- #
628
- #print('sel_Z:',self.sel_Z)
629
- #exit()
630
- for ind2 in range(self.sel_nbNucSel):
631
- #if self.sel_Z[ind] == Z:
632
- # print('sel_Z:',self.sel_Z)
633
- # exit()
634
- #print('ind:',ind,Z,self.sel_Zmax,self.sel_Z[ind2],Nmin,Nmax)
635
- #print('sel_N:',self.sel_N[ind2])
636
- if self.sel_nucZ[ind2] == Z and self.sel_nucN[ind2] < Nmin:
637
- Nmin = self.sel_nucN[ind2]
638
- if self.sel_nucZ[ind2] == Z and self.sel_nucN[ind2] > Nmax:
639
- Nmax = self.sel_nucN[ind2]
640
- self.isotopes_Z.append( Z )
641
- self.isotopes_Nmin.append( Nmin )
642
- self.isotopes_Nmax.append( Nmax )
643
- #print('drip: Z',self.drip_Z)
644
- #print('drip: Nmin:',self.drip_Nmin)
645
- #print('drip: Nmax:',self.drip_Nmax)
646
- #
647
- if nuda.env.verb: print("Exit drip()")
648
- #
649
- return self
650
- #
651
622
  def select_year(self, year_min=1940, year_max=1960, state= 'gs'):
652
623
  """
653
624
  Method which select some nuclei from the table according to the discovery year.
@@ -662,24 +633,24 @@ class setupBEExp():
662
633
  **Attributes:**
663
634
  """
664
635
  #
665
- if self.year is None:
666
- print('There is no year in the experimental mass table')
667
- print('Table:',self.table)
668
- print('Version:',self.version)
669
- print('Exit()')
636
+ if self.nucYear is None:
637
+ print('setup_be_exp.py: There is no year in the experimental mass table')
638
+ print('setup_be_exp.py: Table:',self.table)
639
+ print('setup_be_exp.py: Version:',self.version)
640
+ print('setup_be_exp.py: Exit()')
670
641
  exit()
671
642
  if year_min > int(self.version) or year_max < yearMin:
672
- print('year_min or year_max is not well defined')
673
- print('year_min:',year_min,' >? ',int(self.version))
674
- print('year_max:',year_max,' <? ',yearMin)
675
- print('-- Exit the code --')
643
+ print('setup_be_exp.py: year_min or year_max is not well defined')
644
+ print('setup_be_exp.py: year_min:',year_min,' >? ',int(self.version))
645
+ print('setup_be_exp.py: year_max:',year_max,' <? ',yearMin)
646
+ print('setup_be_exp.py: -- Exit the code --')
676
647
  exit()
677
648
  self.year_min = year_min
678
649
  self.year_max = year_max
679
650
  #
680
651
  if state.lower() not in [ 'gs' ]:
681
- print('State ',state,' is not "gs".')
682
- print('-- Exit the code --')
652
+ print('setup_be_exp.py: State ',state,' is not "gs".')
653
+ print('setup_be_exp.py: -- Exit the code --')
683
654
  exit()
684
655
  self.state = state
685
656
  #
@@ -722,7 +693,7 @@ class setupBEExp():
722
693
  #print('discovery year:',nucYear)
723
694
  nbNucTot = nbNucTot + 1
724
695
  # skip nucleus if interpolated data
725
- if flagInterp == 'y':
696
+ if nucInterp == 'y':
726
697
  continue
727
698
  # skip nuclei not in GS
728
699
  if state == 'gs' and nucI != 0:
@@ -734,12 +705,12 @@ class setupBEExp():
734
705
  if nucZ > self.sel_Zmax: self.sel_Zmax = nucZ
735
706
  self.sel_N.append( nucN )
736
707
  self.sel_symb.append( nucSymb )
737
- self.sel_I.append( flagI )
738
- self.sel_Interp.append( flagInterp )
708
+ self.sel_I.append( nucI )
709
+ self.sel_Interp.append( nucInterp )
739
710
  self.sel_HT.append( nucHT )
740
711
  self.sel_year.append( nucYear )
741
712
  self.sel_BE.append( nucBE )
742
- self.sel_BE_err.append( nucBE_err )
713
+ self.sel_BE_err.append( nucdBE )
743
714
  self.sel_nbNucTot = nbNucTot
744
715
  self.sel_nbNucSta = nbNucSta
745
716
  self.sel_nbNucSel = nbNucSel
@@ -751,276 +722,317 @@ class setupBEExp():
751
722
  #
752
723
  return self
753
724
  #
754
- def S2n( self, Zmin = 1, Zmax = 95 ):
725
+ def isotopes(self, Zref = 50 ):
755
726
  """
756
- Compute the two-neutron separation energy (S2n)
757
- S2n = E(Z,N)-E(Z,N-2)
727
+ Method which find the first and last isotopes for Z=Zref.
728
+
729
+ :param Zref: Fix the charge for the search of isotopes.
730
+ :type Zref: int, optional. Default: 50.
731
+
732
+ **Attributes:**
758
733
  """
759
734
  #
760
- if nuda.env.verb: print("Enter S2n()")
735
+ if nuda.env.verb: print("Enter isotopes()")
761
736
  #
762
- if Zmin > Zmax:
763
- print('In S2n attribute function of setup_be_exp.py:')
764
- print('Bad definition of Zmin and Zmax')
765
- print('It is expected that Zmin<=Zmax')
766
- print('Zmin,Zmax:',Zmin,Zmax)
767
- print('exit')
737
+ if Zref < 0:
738
+ print('setup_be_exp.py: issue with the function isotopes.')
739
+ print('setup_be_exp.py: Bad definition for Zref')
740
+ print('setup_be_exp.py: It is expected that Zref>0')
741
+ print('setup_be_exp.py: Zref:',Zref)
742
+ print('setup_be_exp.py: exit')
768
743
  exit()
769
744
  #
770
- S2n_Z = []
771
- S2n_N = []
772
- S2n = []
745
+ Nstable, Zstable = stable_fit_Z( Zmin = Zref, Zmax = Zref )
746
+ #
747
+ nucNmin = Nstable[0]
748
+ nucNmax = Nstable[0]
773
749
  #
774
- for ind,Z in enumerate(self.nucZ):
750
+ for ind,A in enumerate(self.sel_nucA):
775
751
  #
776
- if Z > Zmax :
777
- continue
778
- if Z < Zmin :
779
- continue
752
+ if self.sel_nucZ[ind] == Zref and self.sel_nucN[ind] < nucNmin:
753
+ nucNmin = self.sel_nucN[ind]
754
+ if self.sel_nucZ[ind] == Zref and self.sel_nucN[ind] > nucNmax:
755
+ nucNmax = self.sel_nucN[ind]
780
756
  #
781
- if self.flagI[ind] != 0:
782
- continue
783
- if self.flagInterp[ind] == 'y':
784
- continue
785
- N = self.nucN[ind]
757
+ self.itp_nucZ = Zref
758
+ self.itp_nucNmin = nucNmin
759
+ self.itp_nucNmax = nucNmax
760
+ #
761
+ if nuda.env.verb: print("Exit isotopes()")
762
+ #
763
+ return self
764
+ #
765
+ def isotones(self, Nref = 50 ):
766
+ """
767
+ Method which find the first and last isotones for N=Nref.
768
+
769
+ :param Nref: Fix the neutron number for the search of isotones.
770
+ :type Nref: int, optional. Default: 50.
771
+
772
+ **Attributes:**
773
+ """
774
+ #
775
+ if nuda.env.verb: print("Enter isotones()")
776
+ #
777
+ if Nref < 0:
778
+ print('setup_be_exp.py: issue with the function isotones.')
779
+ print('setup_be_exp.py: Bad definition for Nref')
780
+ print('setup_be_exp.py: It is expected that Nref>0')
781
+ print('setup_be_exp.py: Nref:',Nref)
782
+ print('setup_be_exp.py: exit')
783
+ exit()
784
+ #
785
+ Nstable, Zstable = stable_fit_N( Nmin = Nref, Nmax = Nref )
786
+ #
787
+ nucZmin = Zstable[0]
788
+ nucZmax = Zstable[0]
789
+ #
790
+ for ind,A in enumerate(self.sel_nucA):
786
791
  #
787
- #print('For Z,N:',Z,N)
792
+ if self.sel_nucN[ind] == Nref and self.sel_nucZ[ind] < nucZmin:
793
+ nucZmin = self.sel_nucZ[ind]
794
+ if self.sel_nucN[ind] == Nref and self.sel_nucZ[ind] > nucZmax:
795
+ nucZmax = self.sel_nucZ[ind]
796
+ #
797
+ self.itn_nucN = Nref
798
+ self.itn_nucZmin = nucZmin
799
+ self.itn_nucZmax = nucZmax
800
+ #
801
+ if nuda.env.verb: print("Exit isotones()")
802
+ #
803
+ return self
804
+ #
805
+ def S2n( self, Zref = 50 ):
806
+ """
807
+ Compute the two-neutron separation energy (S2n)
808
+ S2n(Zref,N) = E(Zref,N)-E(Zref,N-2)
809
+ """
810
+ #
811
+ if nuda.env.verb: print("Enter S2n()")
812
+ #
813
+ if Zref < 0:
814
+ print('setup_be_exp.py: In S2n attribute function of setup_be_exp.py:')
815
+ print('setup_be_exp.py: Bad definition of Zref')
816
+ print('setup_be_exp.py: It is expected that Zref>=0')
817
+ print('setup_be_exp.py: Zref:',Zref)
818
+ print('setup_be_exp.py: exit')
819
+ exit()
820
+ #
821
+ S2n_N = []
822
+ S2n_E = []
823
+ S2n_E_err = []
824
+ #
825
+ Nmin=self.itp_nucNmin
826
+ Nmax=self.itp_nucNmax
827
+ print('Nmin,Nmax:',Nmin,Nmax)
828
+ #
829
+ for N in range(Nmin+2,Nmax+1):
788
830
  #
789
- # search index for Z,N+2
831
+ flagN = False; flagNm2 = False;
790
832
  #
791
- flag_find = 0
792
- for ind2,Z2 in enumerate(self.nucZ):
793
- if Z == Z2 and self.nucN[ind2] == N-2 and self.flagI[ind2] == 0 and self.flagInterp[ind2] == 'n':
794
- flag_find = 1
795
- break
796
- if flag_find == 1:
797
- N2 = self.nucN[ind2]
798
- #print('N,N2:',N,N2,'ind,ind2:',ind,ind2)
799
- S2n_Z.append( self.nucZ[ind] )
800
- S2n_N.append( self.nucN[ind] )
801
- S2n.append( self.nucBE[ind2] - self.nucBE[ind] )
833
+ for ind,Z in enumerate(self.sel_nucZ):
834
+ #
835
+ if Z == Zref and self.sel_nucN[ind] == N:
836
+ indN = ind
837
+ flagN = True
838
+ if Z == Zref and self.sel_nucN[ind] == N-2:
839
+ indNm2 = ind
840
+ flagNm2 = True
841
+ #
842
+ if flagN and flagNm2:
843
+ S2n_N.append( N )
844
+ S2n_E.append( self.sel_nucBE[indN] - self.sel_nucBE[indNm2] )
845
+ S2n_E_err.append( self.sel_nucBE_err[indN] + self.sel_nucBE_err[indNm2] )
802
846
  self.S2n_N = np.array( S2n_N, dtype = int )
803
- self.S2n_Z = np.array( S2n_Z, dtype = int )
804
- self.S2n = np.array( S2n, dtype = float )
805
- #print('Z:',self.S2n_Z)
806
- #print('N:',self.S2n_N)
807
- #print('S2n:',self.S2n)
808
- #print('Z:',self.S2n_Z)
847
+ self.S2n_E = np.array( S2n_E, dtype = float )
848
+ self.S2n_E_err = np.array( S2n_E_err, dtype = float )
809
849
  #
810
850
  if nuda.env.verb: print("Exit S2n()")
811
851
  #
812
852
  return self
813
- #
814
- def S2p( self, Nmin = 1, Nmax = 95 ):
853
+ #
854
+ def S2p( self, Nref = 50 ):
815
855
  """
816
- Compute the two-proton separation energy (S2n)
817
- S2p = E(Z,N)-E(Z-2,N)
856
+ Compute the two-proton separation energy (S2p)
857
+ S2p(Z,Nref) = E(Z,Nref)-E(Z-2,Nref)
818
858
  """
819
859
  #
820
860
  if nuda.env.verb: print("Enter S2p()")
821
861
  #
822
- if Nmin > Nmax:
823
- print('In S2p attribute function of setup_be_exp.py:')
824
- print('Bad definition of Nmin and Nmax')
825
- print('It is expected that Nmin<=Nmax')
826
- print('Nmin,Nmax:',Nmin,Nmax)
827
- print('exit')
862
+ if Nref < 0:
863
+ print('setup_be_exp.py: In S2p attribute function of setup_be_exp.py:')
864
+ print('setup_be_exp.py: Bad definition of Nref')
865
+ print('setup_be_exp.py: It is expected that Nref>=0')
866
+ print('setup_be_exp.py: Nref:',Nref)
867
+ print('setup_be_exp.py: exit')
828
868
  exit()
829
869
  #
830
870
  S2p_Z = []
831
- S2p_N = []
832
- S2p = []
871
+ S2p_E = []
872
+ S2p_E_err = []
833
873
  #
834
- for ind,N in enumerate(self.nucN):
835
- #
836
- if N > Nmax :
837
- continue
838
- if N < Nmin :
839
- continue
840
- #
841
- if self.flagI[ind] != 0:
842
- continue
843
- if self.flagInterp[ind] == 'y':
844
- continue
845
- Z = self.nucZ[ind]
846
- #
847
- #print('For Z,N:',Z,N)
874
+ Zmin=self.itn_nucZmin
875
+ Zmax=self.itn_nucZmax
876
+ print('Zmin,Zmax:',Zmin,Zmax)
877
+ #
878
+ for Z in range(Zmin+2,Zmax+1,2):
848
879
  #
849
- # search index for Z-2,N
880
+ flagZ = False; flagZm2 = False;
850
881
  #
851
- flag_find = 0
852
- for ind2,N2 in enumerate(self.nucN):
853
- if N == N2 and self.nucZ[ind2] == Z-2 and self.flagI[ind2] == 0 and self.flagInterp[ind2] == 'n':
854
- flag_find = 1
855
- break
856
- if flag_find == 1:
857
- Z2 = self.nucZ[ind2]
858
- #print('N,N2:',N,N2,'ind,ind2:',ind,ind2)
859
- S2p_Z.append( self.nucZ[ind] )
860
- S2p_N.append( self.nucN[ind] )
861
- S2p.append( self.nucBE[ind2] - self.nucBE[ind] )
862
- self.S2p_N = np.array( S2p_N, dtype = int )
882
+ for ind,N in enumerate(self.sel_nucN):
883
+ #
884
+ if N == Nref and self.sel_nucZ[ind] == Z:
885
+ indZ = ind
886
+ flagZ = True
887
+ if N == Nref and self.sel_nucZ[ind] == Z-2:
888
+ indZm2 = ind
889
+ flagZm2 = True
890
+ #
891
+ if flagZ and flagZm2:
892
+ S2p_Z.append( Z )
893
+ S2p_E.append( self.sel_nucBE[indZ] - self.sel_nucBE[indZm2] )
894
+ S2p_E_err.append( self.sel_nucBE_err[indZ] + self.sel_nucBE_err[indZm2] )
863
895
  self.S2p_Z = np.array( S2p_Z, dtype = int )
864
- self.S2p = np.array( S2p, dtype = float )
865
- #print('Z:',self.S2n_Z)
866
- #print('N:',self.S2n_N)
867
- #print('S2n:',self.S2n)
868
- #print('Z:',self.S2n_Z)
896
+ self.S2p_E = np.array( S2p_E, dtype = float )
897
+ self.S2p_E_err = np.array( S2p_E_err, dtype = float )
869
898
  #
870
899
  if nuda.env.verb: print("Exit S2p()")
871
900
  #
872
901
  return self
873
- #
874
- def D3p_n( self, Zmin = 1, Zmax = 95 ):
902
+ #
903
+ def D3n( self, Zref = 50 ):
875
904
  """
876
905
  Compute the three-points odd-even mass staggering (D3p_n)
877
- D_3p^N = (-)**N * ( 2*E(Z,N)-E(Z,N+1)-E(Z,N-1) ) / 2
906
+ D3n(Z,N) = (-)**N * ( 2*E(Z,N)-E(Z,N+1)-E(Z,N-1) ) / 2
878
907
  """
879
908
  #
880
- if nuda.env.verb: print("Enter D3p_n()")
909
+ if nuda.env.verb: print("Enter D3n()")
881
910
  #
882
- if Zmin > Zmax:
883
- print('In D3p_n attribute function of setup_be_exp.py:')
884
- print('Bad definition of Zmin and Zmax')
885
- print('It is expected that Zmin<=Zmax')
886
- print('Zmin,Zmax:',Zmin,Zmax)
887
- print('exit')
911
+ if Zref < 0:
912
+ print('setup_be_exp.py: In D3n attribute function of setup_be_exp.py:')
913
+ print('setup_be_exp.py: Bad definition of Zref')
914
+ print('setup_be_exp.py: It is expected that Zref>=0')
915
+ print('setup_be_exp.py: Zref:',Zref)
916
+ print('setup_be_exp.py: exit')
888
917
  exit()
889
918
  #
890
- D3p_n_Z_even = []
891
- D3p_n_Z_odd = []
892
- D3p_n_N_even = []
893
- D3p_n_N_odd = []
894
- D3p_n_even = []
895
- D3p_n_odd = []
919
+ D3n_N_even = []
920
+ D3n_N_odd = []
921
+ D3n_E_even = []
922
+ D3n_E_odd = []
923
+ D3n_E_err_even = []
924
+ D3n_E_err_odd = []
896
925
  #
897
- for ind,Z in enumerate(self.nucZ):
898
- #
899
- if Z > Zmax :
900
- continue
901
- if Z < Zmin :
902
- continue
903
- #
904
- if self.flagI[ind] != 0:
905
- continue
906
- if self.flagInterp[ind] == 'y':
907
- continue
908
- #
909
- N = self.nucN[ind]
910
- #
911
- if N % 2 == 0:
912
- sign = 1.0 #even
913
- else:
914
- sign = -1.0 # odd
915
- #
916
- #print('For Z,N:',Z,N)
926
+ Nmin=self.itp_nucNmin
927
+ Nmax=self.itp_nucNmax
928
+ print('Nmin,Nmax:',Nmin,Nmax)
929
+ #
930
+ for N in range(Nmin+1,Nmax):
917
931
  #
918
- # search index for Z,N+2
932
+ flagN = False; flagNm1 = False; flagNp1 = False;
919
933
  #
920
- flag_find1 = 0
921
- for ind1,Z1 in enumerate(self.nucZ):
922
- if Z == Z1 and self.nucN[ind1] == N+1 and self.flagI[ind1] == 0 and self.flagInterp[ind1] == 'n':
923
- flag_find1 = 1
924
- break
925
- flag_find2 = 0
926
- for ind2,Z2 in enumerate(self.nucZ):
927
- if Z == Z2 and self.nucN[ind2] == N-1 and self.flagI[ind2] == 0 and self.flagInterp[ind2] == 'n':
928
- flag_find2 = 1
929
- break
930
- if flag_find1*flag_find2 == 1:
931
- if sign > 0: #even
932
- D3p_n_Z_even.append( self.nucZ[ind] )
933
- D3p_n_N_even.append( self.nucN[ind] )
934
- D3p_n_even.append( sign/2.0*( -2*self.nucBE[ind] + self.nucBE[ind1] + self.nucBE[ind2] ) )
934
+ for ind,Z in enumerate(self.sel_nucZ):
935
+ #
936
+ if Z == Zref and self.sel_nucN[ind] == N:
937
+ indN = ind
938
+ flagN = True
939
+ if N % 2:
940
+ sign = -1.0 # odd
941
+ else:
942
+ sign = 1.0 # even
943
+ if Z == Zref and self.sel_nucN[ind] == N-1:
944
+ indNm1 = ind
945
+ flagNm1 = True
946
+ if Z == Zref and self.sel_nucN[ind] == N+1:
947
+ indNp1 = ind
948
+ flagNp1 = True
949
+ #
950
+ if flagN and flagNm1 and flagNp1:
951
+ if sign > 0.0: #even
952
+ D3n_N_even.append( N )
953
+ D3n_E_even.append( sign/2.0*( -2*self.sel_nucBE[indN] + self.sel_nucBE[indNm1] + self.sel_nucBE[indNp1] ) )
954
+ D3n_E_err_even.append( 0.5*( 2*self.sel_nucBE_err[indN] + self.sel_nucBE_err[indNm1] + self.sel_nucBE_err[indNp1] ) )
935
955
  else:
936
- D3p_n_Z_odd.append( self.nucZ[ind] )
937
- D3p_n_N_odd.append( self.nucN[ind] )
938
- D3p_n_odd.append( sign/2.0*( -2*self.nucBE[ind] + self.nucBE[ind1] + self.nucBE[ind2] ) )
939
- self.D3p_n_N_even = np.array( D3p_n_N_even, dtype = int )
940
- self.D3p_n_N_odd = np.array( D3p_n_N_odd, dtype = int )
941
- self.D3p_n_Z_even = np.array( D3p_n_Z_even, dtype = int )
942
- self.D3p_n_Z_odd = np.array( D3p_n_Z_odd, dtype = int )
943
- self.D3p_n_even = np.array( D3p_n_even, dtype = float )
944
- self.D3p_n_odd = np.array( D3p_n_odd, dtype = float )
945
- #
946
- if nuda.env.verb: print("Exit D3p_n()")
956
+ D3n_N_odd.append( N )
957
+ D3n_E_odd.append( sign/2.0*( -2*self.sel_nucBE[indN] + self.sel_nucBE[indNm1] + self.sel_nucBE[indNp1] ) )
958
+ D3n_E_err_odd.append( 0.5*( 2*self.sel_nucBE_err[indN] + self.sel_nucBE_err[indNm1] + self.sel_nucBE_err[indNp1] ) )
959
+ #
960
+ self.D3n_N_even = np.array( D3n_N_even, dtype = int )
961
+ self.D3n_E_even = np.array( D3n_E_even, dtype = float )
962
+ self.D3n_E_err_even = np.array( D3n_E_err_even, dtype = float )
963
+ self.D3n_N_odd = np.array( D3n_N_odd, dtype = int )
964
+ self.D3n_E_odd = np.array( D3n_E_odd, dtype = float )
965
+ self.D3n_E_err_odd = np.array( D3n_E_err_odd, dtype = float )
966
+ #
967
+ if nuda.env.verb: print("Exit D3n()")
947
968
  #
948
969
  return self
949
- #
950
- #
951
- def D3p_p( self, Nmin = 1, Nmax = 95 ):
970
+ #
971
+ def D3p( self, Nref = 50 ):
952
972
  """
953
- Compute the three-points odd-even mass staggering (D3p_p)
954
- D_3p^P = (-)**Z * ( 2*E(Z,N)-E(Z+1,N)-E(Z-1,N) ) / 2
973
+ Compute the three-points odd-even mass staggering (D3p_n)
974
+ D3p(Z,N) = (-)**Z * ( 2*E(Z,N)-E(Z+1,N)-E(Z-1,N) ) / 2
955
975
  """
956
976
  #
957
- if nuda.env.verb: print("Enter D3p_p()")
977
+ if nuda.env.verb: print("Enter D3p()")
958
978
  #
959
- if Nmin > Nmax:
960
- print('In D3p_p attribute function of setup_be_exp.py:')
961
- print('Bad definition of Nmin and Nmax')
962
- print('It is expected that Nmin<=Nmax')
963
- print('Nmin,Nmax:',Nmin,Nmax)
964
- print('exit')
979
+ if Nref < 0:
980
+ print('setup_be_exp.py: In D3p attribute function of setup_be_exp.py:')
981
+ print('setup_be_exp.py: Bad definition of Nref')
982
+ print('setup_be_exp.py: It is expected that Nref>=0')
983
+ print('setup_be_exp.py: Nref:',Nref)
984
+ print('setup_be_exp.py: exit')
965
985
  exit()
966
986
  #
967
- D3p_p_Z_even = []
968
- D3p_p_Z_odd = []
969
- D3p_p_N_even = []
970
- D3p_p_N_odd = []
971
- D3p_p_even = []
972
- D3p_p_odd = []
987
+ D3p_Z_even = []
988
+ D3p_Z_odd = []
989
+ D3p_E_even = []
990
+ D3p_E_odd = []
991
+ D3p_E_err_even = []
992
+ D3p_E_err_odd = []
973
993
  #
974
- for ind,N in enumerate(self.nucN):
975
- #
976
- if N > Nmax :
977
- continue
978
- if N < Nmin :
979
- continue
980
- #
981
- if self.flagI[ind] != 0:
982
- continue
983
- if self.flagInterp[ind] == 'y':
984
- continue
985
- #
986
- Z = self.nucZ[ind]
987
- #
988
- if Z % 2 == 0:
989
- sign = 1.0 #even
990
- else:
991
- sign = -1.0 # odd
992
- #
993
- #print('For Z,N:',Z,N)
994
+ Zmin=self.itn_nucZmin
995
+ Zmax=self.itn_nucZmax
996
+ print('Zmin,Zmax:',Zmin,Zmax)
997
+ #
998
+ for Z in range(Zmin+1,Zmax):
994
999
  #
995
- # search index for Z,N+2
1000
+ flagZ = False; flagZm1 = False; flagZp1 = False;
996
1001
  #
997
- flag_find1 = 0
998
- for ind1,N1 in enumerate(self.nucN):
999
- if N == N1 and self.nucZ[ind1] == Z+1 and self.flagI[ind1] == 0 and self.flagInterp[ind1] == 'n':
1000
- flag_find1 = 1
1001
- break
1002
- flag_find2 = 0
1003
- for ind2,N2 in enumerate(self.nucN):
1004
- if N == N2 and self.nucZ[ind2] == Z-1 and self.flagI[ind2] == 0 and self.flagInterp[ind2] == 'n':
1005
- flag_find2 = 1
1006
- break
1007
- if flag_find1*flag_find2 == 1:
1008
- if sign > 0: #even
1009
- D3p_p_Z_even.append( self.nucZ[ind] )
1010
- D3p_p_N_even.append( self.nucN[ind] )
1011
- D3p_p_even.append( sign/2.0*( -2*self.nucBE[ind] + self.nucBE[ind1] + self.nucBE[ind2] ) )
1002
+ for ind,N in enumerate(self.sel_nucN):
1003
+ #
1004
+ if N == Nref and self.sel_nucZ[ind] == Z:
1005
+ indZ = ind
1006
+ flagZ = True
1007
+ if Z % 2:
1008
+ sign = -1.0 # odd
1009
+ else:
1010
+ sign = 1.0 # even
1011
+ if N == Nref and self.sel_nucZ[ind] == Z-1:
1012
+ indZm1 = ind
1013
+ flagZm1 = True
1014
+ if N == Nref and self.sel_nucZ[ind] == Z+1:
1015
+ indZp1 = ind
1016
+ flagZp1 = True
1017
+ #
1018
+ if flagZ and flagZm1 and flagZp1:
1019
+ if sign > 0.0: #even
1020
+ D3p_Z_even.append( Z )
1021
+ D3p_E_even.append( sign/2.0*( -2*self.sel_nucBE[indZ] + self.sel_nucBE[indZm1] + self.sel_nucBE[indZp1] ) )
1022
+ D3p_E_err_even.append( 0.5*( 2*self.sel_nucBE_err[indZ] + self.sel_nucBE_err[indZm1] + self.sel_nucBE_err[indZp1] ) )
1012
1023
  else:
1013
- D3p_p_Z_odd.append( self.nucZ[ind] )
1014
- D3p_p_N_odd.append( self.nucN[ind] )
1015
- D3p_p_odd.append( sign/2.0*( -2*self.nucBE[ind] + self.nucBE[ind1] + self.nucBE[ind2] ) )
1016
- self.D3p_p_N_even = np.array( D3p_p_N_even, dtype = int )
1017
- self.D3p_p_N_odd = np.array( D3p_p_N_odd, dtype = int )
1018
- self.D3p_p_Z_even = np.array( D3p_p_Z_even, dtype = int )
1019
- self.D3p_p_Z_odd = np.array( D3p_p_Z_odd, dtype = int )
1020
- self.D3p_p_even = np.array( D3p_p_even, dtype = float )
1021
- self.D3p_p_odd = np.array( D3p_p_odd, dtype = float )
1022
- #
1023
- if nuda.env.verb: print("Exit D3p_p()")
1024
+ D3p_Z_odd.append( Z )
1025
+ D3p_E_odd.append( sign/2.0*( -2*self.sel_nucBE[indZ] + self.sel_nucBE[indZm1] + self.sel_nucBE[indZp1] ) )
1026
+ D3p_E_err_odd.append( 0.5*( 2*self.sel_nucBE_err[indZ] + self.sel_nucBE_err[indZm1] + self.sel_nucBE_err[indZp1] ) )
1027
+ #
1028
+ self.D3p_Z_even = np.array( D3p_Z_even, dtype = int )
1029
+ self.D3p_E_even = np.array( D3p_E_even, dtype = float )
1030
+ self.D3p_E_err_even = np.array( D3p_E_err_even, dtype = float )
1031
+ self.D3p_Z_odd = np.array( D3p_Z_odd, dtype = int )
1032
+ self.D3p_E_odd = np.array( D3p_E_odd, dtype = float )
1033
+ self.D3p_E_err_odd = np.array( D3p_E_err_odd, dtype = float )
1034
+ #
1035
+ if nuda.env.verb: print("Exit D3p()")
1024
1036
  #
1025
1037
  return self
1026
- #
1038
+ #