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
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def eos_setupAMLeq_xe_fig( pname, models_micro, models_pheno ):
6
+ def eos_setupAMLeq_xe_fig( pname, micro_mbs, pheno_models, band ):
7
7
  """
8
8
  Plot nuclear chart (N versus Z).\
9
9
  The plot is 1x2 with:\
@@ -22,13 +22,13 @@ def eos_setupAMLeq_xe_fig( pname, models_micro, models_pheno ):
22
22
  #
23
23
  print(f'Plot name: {pname}')
24
24
  #
25
- # xe at beta-equilibrium
25
+ # xe at micro-equilibrium
26
26
  #
27
27
  asy = 0.5
28
28
  #
29
29
  fig, axs = plt.subplots(1,2)
30
30
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.05, hspace=0.3 )
31
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
32
32
  #
33
33
  axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
34
34
  axs[0].set_ylabel(r'electron fraction $x_e$')
@@ -41,38 +41,82 @@ def eos_setupAMLeq_xe_fig( pname, models_micro, models_pheno ):
41
41
  axs[1].set_ylim([0.1, 0.3])
42
42
  axs[1].tick_params('y', labelleft=False)
43
43
  #
44
- for model in models_micro:
44
+ mb_check = []
45
+ #
46
+ for kmb,mb in enumerate(micro_mbs):
47
+ #
48
+ print('mb:',mb,kmb)
49
+ #
50
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
51
+ #
52
+ print('models:',models)
45
53
  #
46
- beta = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
47
- if nuda.env.verb_output: beta.print_outputs( )
54
+ if mb == 'VAR':
55
+ models.remove('1998-VAR-AM-APR-fit')
56
+ models_lower.remove('1998-var-am-apr-fit')
48
57
  #
49
- if beta.esym is not None:
50
- print('model:',model)
51
- axs[0].plot( beta.den, beta.x_el, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
52
- #axs[0].plot( beta.den, beta.x_el, marker='o', linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
58
+ for model in models:
59
+ #
60
+ micro = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
61
+ if nuda.env.verb_output: micro.print_outputs( )
62
+ #
63
+ check = nuda.matter.setupCheck( eos = micro, band = band )
64
+ #
65
+ if check.isInside:
66
+ lstyle = 'solid'
67
+ else:
68
+ lstyle = 'dashed'
69
+ #continue
70
+ #
71
+ if micro.x_el is not None:
72
+ print('model:',model)
73
+ if mb in mb_check:
74
+ axs[0].plot( micro.den, micro.x_el, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
75
+ else:
76
+ mb_check.append(mb)
77
+ axs[0].plot( micro.den, micro.x_el, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
78
+ # end of model
79
+ # end of mb
53
80
  axs[0].text(0.08,0.22,'microscopic models',fontsize='10')
54
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
55
81
  #
56
- for model in models_pheno:
82
+ model_check = []
83
+ #
84
+ for kmodel,model in enumerate(pheno_models):
57
85
  #
58
86
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
59
87
  #
60
88
  for param in params:
61
89
  #
62
- beta = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
63
- if beta.esym is not None:
64
- print('model:',model,' param:',param)
65
- #beta.label=None
66
- axs[1].plot( beta.den, beta.x_el, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
90
+ pheno = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
67
91
  if nuda.env.verb_output: pheno.print_outputs( )
92
+ #
93
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
94
+ #
95
+ if check.isInside:
96
+ lstyle = 'solid'
97
+ else:
98
+ lstyle = 'dashed'
99
+ #continue
100
+ #
101
+ if pheno.x_el is not None:
102
+ print('model:',model,' param:',param)
103
+ if model in model_check:
104
+ axs[1].plot( pheno.den, pheno.x_el, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
105
+ else:
106
+ model_check.append(model)
107
+ axs[1].plot( pheno.den, pheno.x_el, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
108
+ # end of param
109
+ # end of model
68
110
  #
69
111
  axs[1].text(0.08,0.22,'phenomenological models',fontsize='10')
70
112
  #
113
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
114
+ #
71
115
  if pname is not None:
72
116
  plt.savefig(pname, dpi=200)
73
117
  plt.close()
74
118
 
75
- def eos_setupAMLeq_xmu_fig( pname, models_micro, models_pheno ):
119
+ def eos_setupAMLeq_xmu_fig( pname, micro_mbs, pheno_models, band ):
76
120
  """
77
121
  Plot nuclear chart (N versus Z).\
78
122
  The plot is 1x2 with:\
@@ -91,13 +135,13 @@ def eos_setupAMLeq_xmu_fig( pname, models_micro, models_pheno ):
91
135
  #
92
136
  print(f'Plot name: {pname}')
93
137
  #
94
- # xmu at beta-equilibrium
138
+ # xmu at micro-equilibrium
95
139
  #
96
140
  asy = 0.5
97
141
  #
98
142
  fig, axs = plt.subplots(1,2)
99
143
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
100
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.05, hspace=0.3 )
144
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
101
145
  #
102
146
  axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
103
147
  axs[0].set_ylabel(r'muon fraction $x_\mu$')
@@ -110,37 +154,84 @@ def eos_setupAMLeq_xmu_fig( pname, models_micro, models_pheno ):
110
154
  axs[1].set_ylim([0, 0.15])
111
155
  axs[1].tick_params('y', labelleft=False)
112
156
  #
113
- for model in models_micro:
157
+ mb_check = []
158
+ #
159
+ for kmb,mb in enumerate(micro_mbs):
160
+ #
161
+ print('mb:',mb,kmb)
162
+ #
163
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
114
164
  #
115
- beta = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
116
- if nuda.env.verb_output: beta.print_outputs( )
165
+ print('models:',models)
117
166
  #
118
- if beta.esym is not None:
119
- print('model:',model)
120
- axs[0].plot( beta.den, beta.x_mu, marker='o', linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
167
+ if mb == 'VAR':
168
+ models.remove('1998-VAR-AM-APR-fit')
169
+ models_lower.remove('1998-var-am-apr-fit')
170
+ #
171
+ for model in models:
172
+ #
173
+ micro = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
174
+ if nuda.env.verb_output: micro.print_outputs( )
175
+ #
176
+ check = nuda.matter.setupCheck( eos = micro, band = band )
177
+ #
178
+ if check.isInside:
179
+ lstyle = 'solid'
180
+ else:
181
+ lstyle = 'dashed'
182
+ #continue
183
+ #
184
+ if micro.x_mu is not None:
185
+ print('model:',model)
186
+ if mb in mb_check:
187
+ axs[0].plot( micro.den, micro.x_mu, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
188
+ else:
189
+ mb_check.append(mb)
190
+ axs[0].plot( micro.den, micro.x_mu, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
191
+ # end of model
192
+ # end of mb
193
+ #
121
194
  axs[0].text(0.08,0.12,'microscopic models',fontsize='10')
122
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
123
195
  #
124
- for model in models_pheno:
196
+ model_check = []
197
+ #
198
+ for kmodel,model in enumerate(pheno_models):
125
199
  #
126
200
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
127
201
  #
128
202
  for param in params:
129
203
  #
130
- beta = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
131
- if beta.esym is not None:
132
- print('model:',model,' param:',param)
133
- #beta.label=None
134
- axs[1].plot( beta.den, beta.x_mu, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
204
+ pheno = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
135
205
  if nuda.env.verb_output: pheno.print_outputs( )
206
+ #
207
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
208
+ #
209
+ if check.isInside:
210
+ lstyle = 'solid'
211
+ else:
212
+ lstyle = 'dashed'
213
+ #continue
214
+ #
215
+ if pheno.x_mu is not None:
216
+ print('model:',model,' param:',param)
217
+ #micro.label=None
218
+ if model in model_check:
219
+ axs[1].plot( pheno.den, pheno.x_mu, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
220
+ else:
221
+ model_check.append(model)
222
+ axs[1].plot( pheno.den, pheno.x_mu, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
223
+ # end of param
224
+ # end of model
136
225
  #
137
226
  axs[1].text(0.08,0.12,'phenomenological models',fontsize='10')
138
227
  #
228
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
229
+ #
139
230
  if pname is not None:
140
231
  plt.savefig(pname, dpi=200)
141
232
  plt.close()
142
233
 
143
- def eos_setupAMLeq_xexmu_fig( pname, models_micro, models_pheno ):
234
+ def eos_setupAMLeq_xexmu_fig( pname, micro_mbs, pheno_models, band ):
144
235
  """
145
236
  Plot nuclear chart (N versus Z).\
146
237
  The plot is 1x2 with:\
@@ -161,7 +252,7 @@ def eos_setupAMLeq_xexmu_fig( pname, models_micro, models_pheno ):
161
252
  #
162
253
  fig, axs = plt.subplots(1,1)
163
254
  #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
164
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.95, wspace=0.3, hspace=0.3 )
255
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.3, hspace=0.3 )
165
256
  #
166
257
  axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='10')
167
258
  axs.set_ylabel(r'$x_e$, $x_\mu$',fontsize='10')
@@ -171,34 +262,74 @@ def eos_setupAMLeq_xexmu_fig( pname, models_micro, models_pheno ):
171
262
  asys = [ 0.1, 0.3, 0.5, 0.7, 0.9 ]
172
263
  #asys = [ 0.5 ]
173
264
  #
174
- for inda,asy in enumerate(asys):
265
+ for iasy,asy in enumerate(asys):
266
+ #
267
+ mb_check = []
175
268
  #
176
- for model in models_micro:
269
+ for kmb,mb in enumerate(micro_mbs):
177
270
  #
178
- continue
179
- am = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
180
- if nuda.env.verb_output: am.print_outputs( )
271
+ print('mb:',mb,kmb)
181
272
  #
182
- if am.esym is not None:
183
- print('model:',model)
184
- axs.plot( am.den, am.x_mu, marker='o', linestyle=am.linestyle, label=am.label, markevery=am.every )
185
- #axs[0].text(0.02,12,'microscopic models',fontsize='10')
186
- #axs[0].text(0.02,10,'for $\delta=$'+str(asy),fontsize='10')
273
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
274
+ #
275
+ print('models:',models)
276
+ #
277
+ if mb == 'VAR':
278
+ models.remove('1998-VAR-AM-APR-fit')
279
+ models_lower.remove('1998-var-am-apr-fit')
280
+ #
281
+ for model in models:
282
+ #
283
+ continue
284
+ micro = nuda.eos.setupAMLeq( model = model, kind = 'micro', asy = asy )
285
+ if nuda.env.verb_output: micro.print_outputs( )
286
+ #
287
+ check = nuda.matter.setupCheck( eos = micro, band = band )
288
+ #
289
+ if check.isInside:
290
+ lstyle = 'solid'
291
+ else:
292
+ lstyle = 'dashed'
293
+ #continue
294
+ #
295
+ if micro.esym is not None:
296
+ print('model:',model)
297
+ axs.plot( micro.den, micro.x_mu, marker='o', linestyle=lstyle, label=micro.label, markevery=micro.every )
298
+ # end of model
299
+ # end of mb
300
+ #
301
+ model_check = []
187
302
  #
188
- for model in models_pheno:
303
+ for kmodel,model in enumerate(pheno_models):
189
304
  #
190
305
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
191
306
  #
192
307
  for param in params:
193
308
  #
194
- am = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
195
- if am.esym is not None:
196
- print('model:',model,' param:',param)
197
- #beta.label=None
198
- axs.plot( am.den, am.x_el, linestyle='solid', label=r'$\delta=$'+str(asy), color=nuda.param.col[inda] )
199
- axs.plot( am.den, am.x_mu, linestyle='dashed', color=nuda.param.col[inda] )
309
+ pheno = nuda.eos.setupAMLeq( model = model, param = param, kind = 'pheno', asy = asy )
200
310
  if nuda.env.verb_output: pheno.print_outputs( )
311
+ #
312
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
313
+ #
314
+ if check.isInside:
315
+ lstyle = 'solid'
316
+ else:
317
+ lstyle = 'dashed'
318
+ #continue
319
+ #
320
+ if pheno.esym is not None:
321
+ print('model:',model,' param:',param)
322
+ if model in model_check:
323
+ axs.plot( pheno.den, pheno.x_el, linestyle='solid', color=nuda.param.col[iasy] )
324
+ axs.plot( pheno.den, pheno.x_mu, linestyle='dashed', color=nuda.param.col[iasy] )
325
+ else:
326
+ model_check.append(model)
327
+ axs.plot( pheno.den, pheno.x_el, linestyle='solid', label=r'$\delta=$'+str(asy), color=nuda.param.col[iasy] )
328
+ axs.plot( pheno.den, pheno.x_mu, linestyle='dashed', color=nuda.param.col[iasy] )
329
+ #
201
330
  break
331
+ # end of param
332
+ # end of model
202
333
  #
203
334
  axs.legend(loc='upper right',fontsize='10',ncol=3)
204
335
  axs.text(0.05,0.35,r'$x_e$',fontsize='14')
@@ -206,4 +337,5 @@ def eos_setupAMLeq_xexmu_fig( pname, models_micro, models_pheno ):
206
337
  #
207
338
  if pname is not None:
208
339
  plt.savefig(pname, dpi=200)
209
- plt.close()
340
+ plt.close()
341
+ #
@@ -0,0 +1,125 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e_asy_lep_fig( pname, micro_mbs, pheno_models, asy, band ):
7
+ """
8
+ Plot nuclear chart (N versus Z).\
9
+ The plot is 1x2 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
+ fig, axs = plt.subplots(1,2)
26
+ #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
28
+ #
29
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
+ axs[0].set_ylabel(r'$E_\text{lep}/A$')
31
+ axs[0].set_xlim([0, 0.28])
32
+ axs[0].set_ylim([-10, 35])
33
+ #
34
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
+ #axs[1].set_ylabel(r'$E/A$')
36
+ axs[1].set_xlim([0, 0.28])
37
+ axs[1].set_ylim([-10, 35])
38
+ axs[1].tick_params('y', labelleft=False)
39
+ #
40
+ mb_check = []
41
+ #
42
+ for kmb,mb in enumerate(micro_mbs):
43
+ #
44
+ print('mb:',mb,kmb)
45
+ #
46
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
47
+ #
48
+ print('models:',models)
49
+ #
50
+ if mb == 'VAR':
51
+ models.remove('1998-VAR-AM-APR-fit')
52
+ models_lower.remove('1998-var-am-apr-fit')
53
+ #
54
+ for model in models:
55
+ #
56
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
57
+ if nuda.env.verb_output: micro.print_outputs( )
58
+ #
59
+ check = nuda.matter.setupCheck( eos = micro, band = band )
60
+ #
61
+ if check.isInside:
62
+ lstyle = 'solid'
63
+ else:
64
+ lstyle = 'dashed'
65
+ #continue
66
+ #
67
+ if micro.esym is not None:
68
+ print('model:',model)
69
+ print('den:',micro.den)
70
+ print('e2a_lep:',micro.e2a_lep)
71
+ if mb in mb_check:
72
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
73
+ else:
74
+ mb_check.append(mb)
75
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
76
+ # end of model
77
+ # end of mb
78
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
79
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
80
+ #
81
+ model_check = []
82
+ #
83
+ for kmodel,model in enumerate(pheno_models):
84
+ #
85
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
86
+ #
87
+ for param in params:
88
+ #
89
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
90
+ if nuda.env.verb_output: pheno.print_outputs( )
91
+ #
92
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
93
+ #
94
+ if check.isInside:
95
+ lstyle = 'solid'
96
+ else:
97
+ lstyle = 'dashed'
98
+ #continue
99
+ #
100
+ if pheno.e2a_lep is not None:
101
+ print('model:',model,' param:',param)
102
+ if model in model_check:
103
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
104
+ else:
105
+ model_check.append(model)
106
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
107
+ # end of param
108
+ # end of model
109
+ #
110
+ #axs[1].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
111
+ #axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
112
+ #axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
113
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
114
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
115
+ #
116
+ #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
117
+ #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
118
+ #axs[1].legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
119
+ #fig.legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
120
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
121
+ #
122
+ if pname is not None:
123
+ plt.savefig(pname, dpi=200)
124
+ plt.close()
125
+ #
@@ -0,0 +1,115 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e_asy_nuc_fig( pname, micro_mbs, pheno_models, asy, band ):
7
+ """
8
+ Plot nuclear chart (N versus Z).\
9
+ The plot is 1x2 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
+ fig, axs = plt.subplots(1,2)
26
+ #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
28
+ #
29
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
+ axs[0].set_ylabel(r'$E_\text{nuc}/A$')
31
+ axs[0].set_xlim([0, 0.28])
32
+ axs[0].set_ylim([-10, 35])
33
+ #
34
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
+ #axs[1].set_ylabel(r'$E/A$')
36
+ axs[1].set_xlim([0, 0.28])
37
+ axs[1].set_ylim([-10, 35])
38
+ axs[1].tick_params('y', labelleft=False)
39
+ #
40
+ mb_check = []
41
+ #
42
+ for kmb,mb in enumerate(micro_mbs):
43
+ #
44
+ print('mb:',mb,kmb)
45
+ #
46
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
47
+ #
48
+ print('models:',models)
49
+ #
50
+ if mb == 'VAR':
51
+ models.remove('1998-VAR-AM-APR-fit')
52
+ models_lower.remove('1998-var-am-apr-fit')
53
+ #
54
+ for model in models:
55
+ #
56
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
57
+ if nuda.env.verb_output: micro.print_outputs( )
58
+ #
59
+ check = nuda.matter.setupCheck( eos = micro, band = band )
60
+ #
61
+ if check.isInside:
62
+ lstyle = 'solid'
63
+ else:
64
+ lstyle = 'dashed'
65
+ #continue
66
+ #
67
+ if micro.e2a_nuc is not None:
68
+ if mb in mb_check:
69
+ axs[0].plot( micro.den, micro.e2a_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
70
+ else:
71
+ mb_check.append(mb)
72
+ axs[0].plot( micro.den, micro.e2a_nuc, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
73
+ # end of model
74
+ # end of mb
75
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
76
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
77
+ #
78
+ model_check = []
79
+ #
80
+ for kmodel,model in enumerate(pheno_models):
81
+ #
82
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
83
+ #
84
+ for param in params:
85
+ #
86
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
87
+ if nuda.env.verb_output: pheno.print_outputs( )
88
+ #
89
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
90
+ #
91
+ if check.isInside:
92
+ lstyle = 'solid'
93
+ else:
94
+ lstyle = 'dashed'
95
+ #continue
96
+ #
97
+ if pheno.e2a_nuc is not None:
98
+ print('model:',model,' param:',param)
99
+ if model in model_check:
100
+ axs[1].plot( pheno.den, pheno.e2a_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
101
+ else:
102
+ model_check.append(model)
103
+ axs[1].plot( pheno.den, pheno.e2a_nuc, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
104
+ # end of param
105
+ # end of model
106
+ #
107
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
108
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
109
+ #
110
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
111
+ #
112
+ if pname is not None:
113
+ plt.savefig(pname, dpi=200)
114
+ plt.close()
115
+ #