nucleardatapy 0.2.0__py3-none-any.whl → 0.2.1__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 (88) hide show
  1. nucleardatapy/crust/setup_crust.py +46 -1
  2. nucleardatapy/data/crust/2018-PCPFDDG-BSK22.dat +83 -0
  3. nucleardatapy/data/crust/2018-PCPFDDG-BSK24.dat +74 -0
  4. nucleardatapy/data/crust/2018-PCPFDDG-BSK25.dat +130 -0
  5. nucleardatapy/data/crust/2018-PCPFDDG-BSK26.dat +81 -0
  6. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-SM.dat +11 -0
  7. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.2.dat +11 -0
  8. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.4.dat +11 -0
  9. nucleardatapy/data/nuclei/masses/Theory/2023-BSkG3.txt +0 -4
  10. nucleardatapy/data/nuclei/masses/Theory/2025-BSkG4.txt +0 -1
  11. nucleardatapy/eos/setup_am.py +43 -31
  12. nucleardatapy/eos/setup_am_Beq.py +18 -12
  13. nucleardatapy/eos/setup_am_Leq.py +53 -47
  14. nucleardatapy/fig/__init__.py +15 -2
  15. nucleardatapy/fig/crust_setupCrust_fig.py +3 -3
  16. nucleardatapy/fig/eos_setupAMBeq_fig.py +866 -49
  17. nucleardatapy/fig/eos_setupAMLeq_fig.py +185 -53
  18. nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +125 -0
  19. nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +115 -0
  20. nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +117 -0
  21. nucleardatapy/fig/eos_setupAM_e_fig.py +173 -0
  22. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +1 -1
  23. nucleardatapy/fig/matter_ENM_fig.py +50 -41
  24. nucleardatapy/fig/matter_ESM_fig.py +60 -39
  25. nucleardatapy/fig/matter_Esym_fig.py +48 -36
  26. nucleardatapy/fig/matter_cs2_fig.py +83 -0
  27. nucleardatapy/fig/matter_preNM_fig.py +146 -0
  28. nucleardatapy/fig/matter_preSM_fig.py +144 -0
  29. nucleardatapy/fig/matter_setupFFGNuc_fig.py +2 -1
  30. nucleardatapy/fig/matter_setupMicroEsym_fig.py +50 -19
  31. nucleardatapy/fig/matter_setupMicro_band_fig.py +1 -0
  32. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +59 -4
  33. nucleardatapy/fig/matter_setupMicro_fig.py +81 -79
  34. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +28 -26
  35. nucleardatapy/fig/matter_setupPheno_fig.py +34 -24
  36. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +275 -0
  37. nucleardatapy/fig/nuc_setupBEExp_fig.py +225 -70
  38. nucleardatapy/fig/nuc_setupBETheo_fig.py +316 -0
  39. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +59 -0
  40. nucleardatapy/fig/nuc_setupRchExp_fig.py +139 -0
  41. nucleardatapy/fig/nuc_setupRchTheo_fig.py +142 -0
  42. nucleardatapy/fig/nuc_setupRnpExp_fig.py +120 -0
  43. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +134 -0
  44. nucleardatapy/hnuc/__init__.py +3 -3
  45. nucleardatapy/matter/__init__.py +1 -0
  46. nucleardatapy/matter/setup_check.py +97 -0
  47. nucleardatapy/matter/setup_ffg.py +15 -8
  48. nucleardatapy/matter/setup_micro.py +144 -79
  49. nucleardatapy/matter/setup_micro_band.py +6 -1
  50. nucleardatapy/matter/setup_micro_effmass.py +55 -2
  51. nucleardatapy/matter/setup_micro_esym.py +37 -30
  52. nucleardatapy/matter/setup_micro_gap.py +3 -3
  53. nucleardatapy/matter/setup_micro_lp.py +18 -17
  54. nucleardatapy/matter/setup_pheno.py +2 -2
  55. nucleardatapy/matter/setup_pheno_esym.py +13 -13
  56. nucleardatapy/nuc/__init__.py +2 -2
  57. nucleardatapy/nuc/setup_be_exp.py +90 -90
  58. nucleardatapy/nuc/setup_be_theo.py +112 -100
  59. nucleardatapy/nuc/setup_rch_exp.py +49 -6
  60. nucleardatapy/nuc/setup_rch_theo.py +72 -3
  61. nucleardatapy/nuc/{setup_nskin_exp.py → setup_rnp_exp.py} +58 -65
  62. nucleardatapy/nuc/{setup_nskin_theo.py → setup_rnp_theo.py} +34 -39
  63. nucleardatapy-0.2.1.dist-info/METADATA +521 -0
  64. {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/RECORD +86 -65
  65. {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/WHEEL +1 -1
  66. nucleardatapy/fig/eos_setupAM_fig.py +0 -81
  67. nucleardatapy-0.2.0.dist-info/METADATA +0 -115
  68. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-AM.dat → 2006-BHF-Av18-E2A-AM.dat} +0 -0
  69. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-NM.dat → 2006-BHF-Av18-E2A-NM.dat} +0 -0
  70. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-SM.dat → 2006-BHF-Av18-E2A-SM.dat} +0 -0
  71. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-Esym2-SM.dat → 2006-BHF-Av18-Esym2-SM.dat} +0 -0
  72. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-NM-FreeSpectrum.dat} +0 -0
  73. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-SelfEnergy.dat → 2006-BHF-Av18-GAP-NM-SelfEnergy.dat} +0 -0
  74. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-SM-FreeSpectrum.dat} +0 -0
  75. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-SelfEnergy.dat → 2006-BHF-Av18-GAP-SM-SelfEnergy.dat} +0 -0
  76. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL59.dat → 2019-MBPT-NM-DHSL59.dat} +0 -0
  77. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL69.dat → 2019-MBPT-NM-DHSL69.dat} +0 -0
  78. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL59.dat → 2019-MBPT-SM-DHSL59.dat} +0 -0
  79. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL69.dat → 2019-MBPT-SM-DHSL69.dat} +0 -0
  80. /nucleardatapy/data/matter/micro/{2023-MBPT-NM.csv → 2020-MBPT-NM.csv} +0 -0
  81. /nucleardatapy/data/matter/micro/{2023-MBPT-SM.csv → 2020-MBPT-SM.csv} +0 -0
  82. /nucleardatapy/data/nuclei/{nskin → rnp}/208Pb.dat +0 -0
  83. /nucleardatapy/data/nuclei/{nskin → rnp}/48Ca.dat +0 -0
  84. /nucleardatapy/hnuc/{setup_be1L_exp.py → setup_re1L_exp.py} +0 -0
  85. /nucleardatapy/hnuc/{setup_be1Xi_exp.py → setup_re1Xi_exp.py} +0 -0
  86. /nucleardatapy/hnuc/{setup_be2L_exp.py → setup_re2L_exp.py} +0 -0
  87. {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info/licenses}/LICENSE +0 -0
  88. {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,275 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def nuc_setupBEExp_chart_lt_fig( pname, table, version, theo_tables ):
7
+ """
8
+ Plot nuclear chart (N versus Z).\
9
+ The plot is 1x1 with:\
10
+ [0]: nuclear chart.
11
+
12
+ :param pname: name of the figure (*.png)
13
+ :type pname: str.
14
+ :param table: table.
15
+ :type table: str.
16
+ :param version: version of table to run on.
17
+ :type version: str.
18
+ :param theo_tables: object instantiated on the reference band.
19
+ :type theo_tables: object.
20
+
21
+ """
22
+ #
23
+ print(f'Plot name: {pname}')
24
+ #
25
+ print('Table:',table)
26
+ #
27
+ # plot
28
+ #
29
+ fig, axs = plt.subplots(1,1)
30
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
+ fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
32
+ #
33
+ axs.set_title(r''+table+' mass table version '+version)
34
+ axs.set_ylabel(r'Z')
35
+ axs.set_xlabel(r'N')
36
+ axs.set_xlim([0, 200])
37
+ axs.set_ylim([0, 132])
38
+ axs.text(10,120,'Number of nuclei:')
39
+ #
40
+ # longlive nuclei
41
+ #
42
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
43
+ ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'longlive' )
44
+ axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'grey', label='longlive ('+str(ustbl.sel_nbNucSel)+')' )
45
+ #axs.text(10,96,'long live: '+str(ustbl.sel_nbNucSel))
46
+ #
47
+ # shortlive nuclei
48
+ #
49
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
50
+ ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'shortlive' )
51
+ axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'r', label='shortlive ('+str(ustbl.sel_nbNucSel)+')' )
52
+ #axs.text(10,88,'short live: '+str(ustbl.sel_nbNucSel))
53
+ #
54
+ # veryshortlive nuclei
55
+ #
56
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
57
+ ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'veryshortlive' )
58
+ axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'b', label='veryshortlive ('+str(ustbl.sel_nbNucSel)+')' )
59
+ #axs.text(10,80,'very short live: '+str(ustbl.sel_nbNucSel))
60
+ #
61
+ # unstable nuclei:
62
+ #
63
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
64
+ ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'unstable' )
65
+ #axs.scatter( ustbl.sel_nucN, ustbl.sel_Z, marker='.', s = 1, linewidth=0, color = 'b' )
66
+ axs.text(10,104,'unstable: '+str(ustbl.sel_nbNucSel))
67
+ #
68
+ # drip line nuclei
69
+ #
70
+ legend = 0
71
+ for i,theo_table in enumerate( theo_tables ):
72
+ theo = nuda.nuc.setupBETheo( table = theo_table )
73
+ s2n = theo.S2n( Zmin=1, Zmax = 95 )
74
+ drip_S2n = s2n.drip_S2n( Zmin = 1, Zmax = 95 )
75
+ if legend == 0:
76
+ axs.scatter( drip_S2n.drip_S2n_N, drip_S2n.drip_S2n_Z, marker='o', s = 3, linewidth=0, color = 'green', label='Drip Lines' )
77
+ legend = 1
78
+ else:
79
+ axs.scatter( drip_S2n.drip_S2n_N, drip_S2n.drip_S2n_Z, marker='o', s = 3, linewidth=0, color = 'green' )
80
+ s2p = theo.S2p( Nmin=1, Nmax = 150 )
81
+ drip_S2p = s2p.drip_S2p( Nmin = 1, Nmax = 150 )
82
+ axs.scatter( drip_S2p.drip_S2p_N, drip_S2p.drip_S2p_Z, marker='o', s = 3, linewidth=0, color = 'green' )
83
+ #
84
+ # First and last isotopes
85
+ #
86
+ #iso = ustbl.isotopes( Zmin=1, Zmax = 95 )
87
+ #axs.scatter( iso.isotopes_Nmin, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green', label='Isotope bounds' )
88
+ #axs.scatter( iso.isotopes_Nmax, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green' )
89
+ #
90
+ # stable nuclei:
91
+ #
92
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
93
+ stbl = mas.select( state= 'gs', interp = 'n', nucleus = 'stable' )
94
+ axs.scatter( stbl.sel_nucN, stbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'k' )
95
+ axs.text(10,112,'stable: '+str(stbl.sel_nbNucSel))
96
+ #
97
+ axs.text(60,120,str(ustbl.sel_nbNucSel+stbl.sel_nbNucSel))
98
+ #
99
+ # plot N=Z dotted line
100
+ #
101
+ axs.plot( [0, 130], [0, 130], linestyle='dotted', linewidth=1, color='k')
102
+ axs.text(105,120,'N=Z')
103
+ #
104
+ # plot stable_fit
105
+ #
106
+ N, Z = nuda.stable_fit( Zmin = 1, Zmax = 120 )
107
+ axs.plot( N, Z, linestyle='dashed', linewidth=1, color='k')
108
+ #
109
+ # plot shells for isotopes and isotones
110
+ #
111
+ axs = nuda.nuc.plot_shells(axs)
112
+ #
113
+ # set legend
114
+ #
115
+ axs.legend(loc='lower right',fontsize='10')
116
+ #
117
+ # set plot name and close
118
+ #
119
+ if pname is not None:
120
+ plt.savefig(pname, dpi=300)
121
+ plt.close()
122
+ #
123
+
124
+ def nuc_setupBEExp_chart_Rch_fig( pname, table, version, Rch_table ):
125
+ """
126
+ Plot nuclear chart (N versus Z).\
127
+ The plot is 1x1 with:\
128
+ [0]: nuclear chart.
129
+
130
+ :param pname: name of the figure (*.png)
131
+ :type pname: str.
132
+ :param table: table.
133
+ :type table: str.
134
+ :param version: version of table to run on.
135
+ :type version: str.
136
+ :param theo_tables: object instantiated on the reference band.
137
+ :type theo_tables: object.
138
+
139
+ """
140
+ #
141
+ print(f'Plot name: {pname}')
142
+ #
143
+ print('Table:',table)
144
+ #
145
+ # plot
146
+ #
147
+ fig, axs = plt.subplots(1,1)
148
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
149
+ fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
150
+ #
151
+ axs.set_title(r''+table+' mass table version '+version+' + '+Rch_table+' charge radius table')
152
+ axs.set_ylabel(r'Z')
153
+ axs.set_xlabel(r'N')
154
+ axs.set_xlim([0, 200])
155
+ axs.set_xticks([0,25,50,75,100,125,150,175,200])
156
+ axs.set_ylim([0, 132])
157
+ axs.set_yticks([0,20,40,60,80,100,120])
158
+ axs.text(10,120,'Number of nuclei:')
159
+ #
160
+ # First and last isotopes
161
+ #
162
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
163
+ ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'unstable' )
164
+ iso = ustbl.isotopes( Zmin=1, Zmax = 95 )
165
+ axs.scatter( iso.isotopes_Nmin, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green', label='AME boundaries' )
166
+ axs.scatter( iso.isotopes_Nmax, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green' )
167
+ #
168
+ # stable nuclei:
169
+ #
170
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
171
+ stbl = mas.select( state= 'gs', interp = 'n', nucleus = 'stable' )
172
+ axs.scatter( stbl.sel_nucN, stbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'k' )
173
+ axs.text(10,112,'stable: '+str(stbl.sel_nbNucSel))
174
+ axs.text(60,120,str(ustbl.sel_nbNucSel+stbl.sel_nbNucSel))
175
+ #
176
+ # Charge radii:
177
+ #
178
+ rch = nuda.nuc.setupRchExp( table = Rch_table )
179
+ axs.scatter( rch.nucN, rch.nucZ, marker='s', s = 3, linewidth=0, color = 'blue', label = 'charge radii' )
180
+ #
181
+ # plot N=Z dotted line
182
+ #
183
+ axs.plot( [0, 130], [0, 130], linestyle='dotted', linewidth=1, color='k')
184
+ axs.text(105,120,'N=Z')
185
+ #
186
+ # plot stable_fit
187
+ #
188
+ N, Z = nuda.stable_fit( Zmin = 1, Zmax = 120 )
189
+ axs.plot( N, Z, linestyle='dashed', linewidth=1, color='k')
190
+ #
191
+ # plot shells for isotopes and isotones
192
+ #
193
+ axs = nuda.nuc.plot_shells(axs)
194
+ #
195
+ # set legend
196
+ #
197
+ axs.legend(loc='lower right',fontsize='10')
198
+ #
199
+ # set plot name and close
200
+ #
201
+ if pname is not None:
202
+ plt.savefig(pname, dpi=300)
203
+ plt.close()
204
+ #
205
+
206
+
207
+ def nuc_setupBEExp_chart_year_fig( pname, sYear, year_min, year_max ):
208
+ """
209
+ Plot nuclear chart (N versus Z).\
210
+ The plot is 1x1 with:\
211
+ [0]: nuclear chart.
212
+
213
+ :param pname: name of the figure (*.png)
214
+ :type pname: str.
215
+ :param table: table.
216
+ :type table: str.
217
+ :param version: version of table to run on.
218
+ :type version: str.
219
+ :param theo_tables: object instantiated on the reference band.
220
+ :type theo_tables: object.
221
+
222
+ """
223
+ #
224
+ print(f'Plot name: {pname}')
225
+ #
226
+ #print('Table:',table)
227
+ #
228
+ # plot
229
+ #
230
+ fig, axs = plt.subplots(1,1)
231
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
232
+ fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
233
+ #
234
+ #axs.set_title(r''+table+' mass table version '+version)
235
+ axs.set_ylabel(r'Z')
236
+ axs.set_xlabel(r'N')
237
+ axs.set_xlim([0, 200])
238
+ axs.set_ylim([0, 132])
239
+ #axs.text(10,120,'Number of nuclei:')
240
+ axs.text(10,100,'Year: '+str(year_min)+' to '+str(year_max))
241
+ #
242
+ # nuclei given in argument: sYear
243
+ #
244
+ axs.scatter( sYear.sel_N, sYear.sel_Z, marker='s', s = 3, linewidth=0, color = 'grey' )
245
+ #
246
+ # First and last isotopes
247
+ #
248
+ #iso = ustbl.isotopes( Zmin=1, Zmax = 95 )
249
+ #axs.scatter( iso.isotopes_Nmin, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green', label='Isotope bounds' )
250
+ #axs.scatter( iso.isotopes_Nmax, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green' )
251
+ #
252
+ # plot N=Z dotted line
253
+ #
254
+ axs.plot( [0, 130], [0, 130], linestyle='dotted', linewidth=1, color='k')
255
+ axs.text(105,120,'N=Z')
256
+ #
257
+ # plot stable_fit
258
+ #
259
+ N, Z = nuda.stable_fit( Zmin = 1, Zmax = 120 )
260
+ axs.plot( N, Z, linestyle='dashed', linewidth=1, color='k')
261
+ #
262
+ # plot shells for isotopes and isotones
263
+ #
264
+ axs = nuda.nuc.plot_shells(axs)
265
+ #
266
+ # set legend
267
+ #
268
+ #axs.legend(loc='lower right',fontsize='10')
269
+ #
270
+ # set plot name and close
271
+ #
272
+ if pname is not None:
273
+ plt.savefig(pname, dpi=300)
274
+ plt.close()
275
+ #
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def nuc_setupBEExp_chart_lt_fig( pname, table, version, theo_tables ):
6
+ def nuc_setupBEExp_year_fig( pname, table, version ):
7
7
  """
8
8
  Plot nuclear chart (N versus Z).\
9
9
  The plot is 1x1 with:\
@@ -20,103 +20,258 @@ def nuc_setupBEExp_chart_lt_fig( pname, table, version, theo_tables ):
20
20
 
21
21
  """
22
22
  #
23
+ print(50*'-')
24
+ print("Enter nuc_setupBEExp_year_fig.py:")
25
+ print(50*'-')
26
+ #
23
27
  print(f'Plot name: {pname}')
24
28
  #
25
29
  print('Table:',table)
26
30
  #
27
- # plot
31
+ # read all the mass table:
32
+ #
33
+ mas = nuda.nuc.setupBEExp( table = table, version = version )
34
+ #
35
+ fig, axs = plt.subplots(1,2)
36
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
37
+ fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.85, wspace=0.2, hspace=0.2)
38
+ #
39
+ axs[0].set_title(r''+table+' mass table version '+version)
40
+ axs[0].set_ylabel(r'number of discovered nuclei')
41
+ axs[0].set_xlabel(r'year')
42
+ axs[0].set_xlim([1890, 2020])
43
+ #axs.set_yscale('log')
44
+ axs[0].set_ylim([0, 250])
45
+ #axs.text(10,120,'Number of nuclei:')
46
+ #
47
+ axs[0].hist( mas.nucYear, bins=100 )
48
+ #axs.hist( mas.year, bins=100, linestyle='solid', linewidth=1, color='k')
49
+ #axs.plot( mas.dist_year*10, mas.dist_nbNuc, linestyle='solid', linewidth=1, color='k')
50
+ #
51
+ axs[1].set_title(r''+table+' mass table version '+version)
52
+ axs[1].set_xlabel(r'year')
53
+ axs[1].set_xlim([2000, 2020])
54
+ axs[1].set_ylim([0, 100])
55
+ axs[1].hist( mas.nucYear, bins=100 )
56
+ #
57
+ #axs.legend(loc='lower right',fontsize='10')
58
+ #
59
+ if pname is not None:
60
+ plt.savefig(pname, dpi=200)
61
+ plt.close()
62
+ #
63
+ print(50*'-')
64
+ print("Exit nuc_setupBEExp_year_fig.py:")
65
+ print(50*'-')
66
+ #
67
+
68
+ def nuc_setupBEExp_S2n_fig( pname, tables, versions, Zref = 50 ):
69
+ """
70
+ Plot nuclear chart (N versus Z).\
71
+ The plot is 1x1 with:\
72
+ [0]: nuclear chart.
73
+
74
+ :param pname: name of the figure (*.png)
75
+ :type pname: str.
76
+ :param table: table.
77
+ :type table: str.
78
+ :param version: version of table to run on.
79
+ :type version: str.
80
+ :param theo_tables: object instantiated on the reference band.
81
+ :type theo_tables: object.
82
+
83
+ """
84
+ #
85
+ print(f'Plot name: {pname}')
86
+ #
87
+ print('Tables:',tables)
88
+ print('Zref:',Zref)
28
89
  #
29
90
  fig, axs = plt.subplots(1,1)
30
91
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
- fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
92
+ fig.subplots_adjust(left=0.14, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
32
93
  #
33
- axs.set_title(r''+table+' mass table version '+version)
34
- axs.set_ylabel(r'Z')
35
- axs.set_xlabel(r'N')
36
- axs.set_xlim([0, 200])
37
- axs.set_ylim([0, 132])
38
- axs.text(10,120,'Number of nuclei:')
94
+ axs.set_title(r'Experimental mass tables',fontsize='12')
95
+ axs.set_ylabel(r'$S_{2n}$ (MeV)',fontsize='12')
96
+ axs.set_xlabel(r'N',fontsize='12')
97
+ axs.set_xlim([Zref-5, int(1.85*Zref)])
98
+ axs.set_xticks(np.arange(start=Zref-5,stop=2*Zref,step=5))
99
+ #axs.set_ylim([-10, 10])
100
+ axs.text(int(Zref),10,'For Z='+str(Zref),fontsize='12')
39
101
  #
40
- # longlive nuclei
102
+ # loop over the tables
41
103
  #
42
- mas = nuda.nuc.setupBEExp( table = table, version = version )
43
- ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'longlive' )
44
- axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'grey', label='longlive ('+str(ustbl.sel_nbNucSel)+')' )
45
- #axs.text(10,96,'long live: '+str(ustbl.sel_nbNucSel))
104
+ for i,table in enumerate( tables ):
105
+ #
106
+ version = versions[i]
107
+ # plot nuclear chart:
108
+ mas_exp = nuda.nuc.setupBEExp( table = table, version = version )
109
+ s2n_exp = mas_exp.S2n( Zmin = Zref, Zmax = Zref )
110
+ axs.scatter( s2n_exp.S2n_N, s2n_exp.S2n, label=table+' '+version )
111
+ #axs.plot( s2n_exp.S2n_N, s2n_exp.S2n, linestyle='solid', linewidth=1, label=exp_table+' '+exp_version )
46
112
  #
47
- # shortlive nuclei
113
+ axs.legend(loc='upper right',fontsize='10', ncol=1)
48
114
  #
49
- mas = nuda.nuc.setupBEExp( table = table, version = version )
50
- ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'shortlive' )
51
- axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'r', label='shortlive ('+str(ustbl.sel_nbNucSel)+')' )
52
- #axs.text(10,88,'short live: '+str(ustbl.sel_nbNucSel))
115
+ if pname is not None:
116
+ plt.savefig(pname, dpi=200)
117
+ plt.close()
53
118
  #
54
- # veryshortlive nuclei
119
+
120
+ def nuc_setupBEExp_S2p_fig( pname, tables, versions, Nref = 50 ):
121
+ """
122
+ Plot nuclear chart (N versus Z).\
123
+ The plot is 1x1 with:\
124
+ [0]: nuclear chart.
125
+
126
+ :param pname: name of the figure (*.png)
127
+ :type pname: str.
128
+ :param table: table.
129
+ :type table: str.
130
+ :param version: version of table to run on.
131
+ :type version: str.
132
+ :param theo_tables: object instantiated on the reference band.
133
+ :type theo_tables: object.
134
+
135
+ """
55
136
  #
56
- mas = nuda.nuc.setupBEExp( table = table, version = version )
57
- ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'veryshortlive' )
58
- axs.scatter( ustbl.sel_nucN, ustbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'b', label='veryshortlive ('+str(ustbl.sel_nbNucSel)+')' )
59
- #axs.text(10,80,'very short live: '+str(ustbl.sel_nbNucSel))
137
+ print(f'Plot name: {pname}')
60
138
  #
61
- # unstable nuclei:
139
+ print('Tables:',tables)
140
+ print('Nref:',Nref)
62
141
  #
63
- mas = nuda.nuc.setupBEExp( table = table, version = version )
64
- ustbl = mas.select( state= 'gs', interp = 'n', nucleus = 'unstable' )
65
- #axs.scatter( ustbl.sel_nucN, ustbl.sel_Z, marker='.', s = 1, linewidth=0, color = 'b' )
66
- axs.text(10,104,'unstable: '+str(ustbl.sel_nbNucSel))
67
- #
68
- # drip line nuclei
69
- #
70
- legend = 0
71
- for i,theo_table in enumerate( theo_tables ):
72
- theo = nuda.nuc.setupBETheo( table = theo_table )
73
- s2n = theo.S2n( Zmin=1, Zmax = 95 )
74
- drip_S2n = s2n.drip_S2n( Zmin = 1, Zmax = 95 )
75
- if legend == 0:
76
- axs.scatter( drip_S2n.drip_S2n_N, drip_S2n.drip_S2n_Z, marker='o', s = 3, linewidth=0, color = 'green', label='Drip Lines' )
77
- legend = 1
78
- else:
79
- axs.scatter( drip_S2n.drip_S2n_N, drip_S2n.drip_S2n_Z, marker='o', s = 3, linewidth=0, color = 'green' )
80
- s2p = theo.S2p( Nmin=1, Nmax = 150 )
81
- drip_S2p = s2p.drip_S2p( Nmin = 1, Nmax = 150 )
82
- axs.scatter( drip_S2p.drip_S2p_N, drip_S2p.drip_S2p_Z, marker='o', s = 3, linewidth=0, color = 'green' )
83
- #
84
- # First and last isotopes
85
- #
86
- #iso = ustbl.isotopes( Zmin=1, Zmax = 95 )
87
- #axs.scatter( iso.isotopes_Nmin, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green', label='Isotope bounds' )
88
- #axs.scatter( iso.isotopes_Nmax, iso.isotopes_Z, marker='s', s = 3, linewidth=0, color = 'green' )
89
- #
90
- # stable nuclei:
142
+ print(f'Plot name: {pname}')
91
143
  #
92
- mas = nuda.nuc.setupBEExp( table = table, version = version )
93
- stbl = mas.select( state= 'gs', interp = 'n', nucleus = 'stable' )
94
- axs.scatter( stbl.sel_nucN, stbl.sel_nucZ, marker='s', s = 3, linewidth=0, color = 'k' )
95
- axs.text(10,112,'stable: '+str(stbl.sel_nbNucSel))
144
+ # plot
145
+ #
146
+ fig, axs = plt.subplots(1,1)
147
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
148
+ fig.subplots_adjust(left=0.14, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
96
149
  #
97
- axs.text(60,120,str(ustbl.sel_nbNucSel+stbl.sel_nbNucSel))
150
+ axs.set_title(r'Experimental mass tables',fontsize='12')
151
+ axs.set_ylabel(r'$S_{2p}$ (MeV)',fontsize='12')
152
+ axs.set_xlabel(r'Z',fontsize='12')
153
+ axs.set_xlim([0.4*Nref, 1.2*Nref])
154
+ axs.set_xticks(np.arange(start=int(0.4*Nref),stop=1.2*Nref,step=5))
155
+ #axs.set_ylim([-10, 10])
156
+ axs.text(int(0.7*Nref),10,'For N='+str(Nref),fontsize='12')
98
157
  #
99
- # plot N=Z dotted line
158
+ # loop over the tables
100
159
  #
101
- axs.plot( [0, 130], [0, 130], linestyle='dotted', linewidth=1, color='k')
102
- axs.text(105,120,'N=Z')
160
+ for i,table in enumerate( tables ):
161
+ #
162
+ version = versions[i]
163
+ # plot nuclear chart:
164
+ mas_exp = nuda.nuc.setupBEExp( table = table, version = version )
165
+ s2p_exp = mas_exp.S2p( Nmin = Nref, Nmax = Nref )
166
+ axs.scatter( s2p_exp.S2p_Z, s2p_exp.S2p, label=table+' '+version )
103
167
  #
104
- # plot stable_fit
168
+ axs.legend(loc='upper right',fontsize='10', ncol=1)
105
169
  #
106
- N, Z = nuda.stable_fit( Zmin = 1, Zmax = 120 )
107
- axs.plot( N, Z, linestyle='dashed', linewidth=1, color='k')
170
+ if pname is not None:
171
+ plt.savefig(pname, dpi=200)
172
+ plt.close()
108
173
  #
109
- # plot shells for isotopes and isotones
174
+
175
+ def nuc_setupBEExp_D3n_fig( pname, tables, versions, Zref = 50 ):
176
+ """
177
+ Plot nuclear chart (N versus Z).\
178
+ The plot is 1x1 with:\
179
+ [0]: nuclear chart.
180
+
181
+ :param pname: name of the figure (*.png)
182
+ :type pname: str.
183
+ :param table: table.
184
+ :type table: str.
185
+ :param version: version of table to run on.
186
+ :type version: str.
187
+ :param theo_tables: object instantiated on the reference band.
188
+ :type theo_tables: object.
189
+
190
+ """
191
+ #
192
+ print(f'Plot name: {pname}')
193
+ #
194
+ print('Tables:',tables)
195
+ print('Zref:',Zref)
196
+ #
197
+ fig, axs = plt.subplots(1,1)
198
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
199
+ fig.subplots_adjust(left=0.14, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
110
200
  #
111
- axs = nuda.nuc.plot_shells(axs)
201
+ axs.set_title(r'Experimental mass tables',fontsize='12')
202
+ axs.set_ylabel(r'$\Delta_{3p}$ (MeV)',fontsize='12')
203
+ axs.set_xlabel(r'N',fontsize='12')
204
+ axs.set_xlim([Zref-5, int(1.85*Zref)])
205
+ axs.set_xticks(np.arange(start=Zref-5,stop=2*Zref,step=5))
206
+ #axs.set_ylim([-10, 10])
207
+ axs.text(int(Zref),1.0,'For Z='+str(Zref),fontsize='12')
112
208
  #
113
- # set legend
209
+ # loop over the tables
114
210
  #
115
- axs.legend(loc='lower right',fontsize='10')
211
+ for i,table in enumerate( tables ):
212
+ #
213
+ version = versions[i]
214
+ # plot nuclear chart:
215
+ mas_exp = nuda.nuc.setupBEExp( table = table, version = version )
216
+ d3n_exp = mas_exp.D3n( Zmin = Zref, Zmax = Zref )
217
+ axs.scatter( d3n_exp.D3n_N_even, d3n_exp.D3n_even, label=table+' '+version+'(even)' )
218
+ axs.scatter( d3n_exp.D3n_N_odd, d3n_exp.D3n_odd, label=table+' '+version+'(odd)' )
116
219
  #
117
- # set plot name and close
220
+ axs.legend(loc='upper right',fontsize='10', ncol=1)
118
221
  #
119
222
  if pname is not None:
120
- plt.savefig(pname, dpi=300)
223
+ plt.savefig(pname, dpi=200)
121
224
  plt.close()
122
225
  #
226
+
227
+ def nuc_setupBEExp_D3p_fig( pname, tables, versions, Nref = 50 ):
228
+ """
229
+ Plot nuclear chart (N versus Z).\
230
+ The plot is 1x1 with:\
231
+ [0]: nuclear chart.
232
+
233
+ :param pname: name of the figure (*.png)
234
+ :type pname: str.
235
+ :param table: table.
236
+ :type table: str.
237
+ :param version: version of table to run on.
238
+ :type version: str.
239
+ :param theo_tables: object instantiated on the reference band.
240
+ :type theo_tables: object.
241
+
242
+ """
243
+ #
244
+ print(f'Plot name: {pname}')
245
+ #
246
+ print('Tables:',tables)
247
+ print('Nref:',Nref)
248
+ #
249
+ fig, axs = plt.subplots(1,1)
250
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
251
+ fig.subplots_adjust(left=0.14, bottom=0.15, right=None, top=0.85, wspace=0.3, hspace=0.3)
252
+ #
253
+ axs.set_title(r'Experimental mass tables',fontsize='12')
254
+ axs.set_ylabel(r'$\Delta_{3p}$ (MeV)',fontsize='12')
255
+ axs.set_xlabel(r'Z',fontsize='12')
256
+ axs.set_xlim([0.4*Nref, 1.2*Nref])
257
+ axs.set_xticks(np.arange(start=int(0.4*Nref),stop=1.2*Nref,step=5))
258
+ #axs.set_ylim([-10, 10])
259
+ axs.text(int(0.7*Nref),1.4,'For N='+str(Nref),fontsize='12')
260
+ #
261
+ # loop over the tables
262
+ #
263
+ for i,table in enumerate( tables ):
264
+ #
265
+ version = versions[i]
266
+ # plot nuclear chart:
267
+ mas_exp = nuda.nuc.setupBEExp( table = table, version = version )
268
+ d3p_exp = mas_exp.D3p( Nmin = Nref, Nmax = Nref )
269
+ axs.scatter( d3p_exp.D3p_Z_even, d3p_exp.D3p_even, label=table+' '+version+'(even)' )
270
+ axs.scatter( d3p_exp.D3p_Z_odd, d3p_exp.D3p_odd, label=table+' '+version+'(odd)' )
271
+ #
272
+ axs.legend(loc='upper right',fontsize='10', ncol=1)
273
+ #
274
+ if pname is not None:
275
+ plt.savefig(pname, dpi=200)
276
+ plt.close()
277
+ #