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,117 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e_asy_tot_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.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
27
+ #
28
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
29
+ axs[0].set_ylabel(r'$E_\text{tot}/A$')
30
+ axs[0].set_xlim([0, 0.28])
31
+ axs[0].set_ylim([-10, 35])
32
+ #
33
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
34
+ #axs[1].set_ylabel(r'$E/A$')
35
+ axs[1].set_xlim([0, 0.28])
36
+ axs[1].set_ylim([-10, 35])
37
+ axs[1].tick_params('y', labelleft=False)
38
+ #
39
+ mb_check = []
40
+ #
41
+ for kmb,mb in enumerate(micro_mbs):
42
+ #
43
+ print('mb:',mb,kmb)
44
+ #
45
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
46
+ #
47
+ print('models:',models)
48
+ #
49
+ if mb == 'VAR':
50
+ models.remove('1998-VAR-AM-APR-fit')
51
+ models_lower.remove('1998-var-am-apr-fit')
52
+ #
53
+ for model in models:
54
+ #
55
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
56
+ if nuda.env.verb_output: micro.print_outputs( )
57
+ #
58
+ check = nuda.matter.setupCheck( eos = micro, band = band )
59
+ #
60
+ if check.isInside:
61
+ lstyle = 'solid'
62
+ else:
63
+ lstyle = 'dashed'
64
+ #continue
65
+ #
66
+ if micro.esym is not None:
67
+ print('model:',model)
68
+ if mb in mb_check:
69
+ axs[0].plot( micro.den, micro.e2a_tot, 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_tot, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
73
+ # end of model
74
+ # end of mb
75
+ #
76
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
77
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
78
+ #
79
+ model_check = []
80
+ #
81
+ for kmodel,model in enumerate(pheno_models):
82
+ #
83
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
84
+ #
85
+ for param in params:
86
+ #
87
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
88
+ if nuda.env.verb_output: pheno.print_outputs( )
89
+ #
90
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
91
+ #
92
+ if check.isInside:
93
+ lstyle = 'solid'
94
+ else:
95
+ lstyle = 'dashed'
96
+ #continue
97
+ #
98
+ if pheno.e2a_tot is not None:
99
+ print('model:',model,' param:',param)
100
+ #beta.label=None
101
+ if model in model_check:
102
+ axs[1].plot( pheno.den, pheno.e2a_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
103
+ else:
104
+ model_check.append(model)
105
+ axs[1].plot( pheno.den, pheno.e2a_tot, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
106
+ # end of param
107
+ # end of model
108
+ #
109
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
110
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
111
+ #
112
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
113
+ #
114
+ if pname is not None:
115
+ plt.savefig(pname, dpi=200)
116
+ plt.close()
117
+ #
@@ -0,0 +1,173 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e_fig( pname, micro_mbs, pheno_models, 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(3,2)
26
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.05 )
27
+ #
28
+ #axs[0,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
29
+ axs[0,0].set_ylabel(r'$E_\text{lep}/A$')
30
+ axs[0,0].set_xlim([0, 0.28])
31
+ axs[0,0].set_ylim([-2, 38])
32
+ axs[0,0].tick_params('x', labelbottom=False)
33
+ #
34
+ #axs[0,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
+ axs[0,1].set_xlim([0, 0.28])
36
+ axs[0,1].set_ylim([-2, 38])
37
+ axs[0,1].tick_params('y', labelleft=False)
38
+ axs[0,1].tick_params('x', labelbottom=False)
39
+ #
40
+ #axs[1,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
41
+ axs[1,0].set_ylabel(r'$E_\text{nuc}/A$')
42
+ axs[1,0].set_xlim([0, 0.28])
43
+ axs[1,0].set_ylim([-10, 30])
44
+ axs[1,0].tick_params('x', labelbottom=False)
45
+ #
46
+ #axs[1,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
47
+ axs[1,1].set_xlim([0, 0.28])
48
+ axs[1,1].set_ylim([-10, 30])
49
+ axs[1,1].tick_params('y', labelleft=False)
50
+ axs[1,1].tick_params('x', labelbottom=False)
51
+ #
52
+ axs[2,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
53
+ axs[2,0].set_ylabel(r'$E_\text{tot}/A$')
54
+ axs[2,0].set_xlim([0, 0.28])
55
+ axs[2,0].set_ylim([-2, 38])
56
+ #
57
+ axs[2,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
58
+ axs[2,1].set_xlim([0, 0.28])
59
+ axs[2,1].set_ylim([-2, 38])
60
+ axs[2,1].tick_params('y', labelleft=False)
61
+ #
62
+ # fix the asymmetry parameters
63
+ #
64
+ asys = [ 0.6, 0.8 ]
65
+ #
66
+ mb_check = []
67
+ model_check = []
68
+ #
69
+ for asy in asys:
70
+ #
71
+ print('asy:',asy)
72
+ #
73
+ for kmb,mb in enumerate(micro_mbs):
74
+ #
75
+ print('mb:',mb,kmb)
76
+ #
77
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
78
+ #models, models_lower = nuda.matter.micro_models_mb( mb )
79
+ #
80
+ print('models:',models)
81
+ #
82
+ if mb == 'VAR':
83
+ models.remove('1998-VAR-AM-APR-fit')
84
+ models_lower.remove('1998-var-am-apr-fit')
85
+ #
86
+ for model in models:
87
+ #
88
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
89
+ if nuda.env.verb_output: micro.print_outputs( )
90
+ #
91
+ check = nuda.matter.setupCheck( eos = micro, band = band )
92
+ #
93
+ if check.isInside:
94
+ lstyle = 'solid'
95
+ else:
96
+ lstyle = 'dashed'
97
+ continue
98
+ #
99
+ if micro.e2a_lep is not None:
100
+ if mb in mb_check:
101
+ print('model:',model)
102
+ print('den:',micro.den)
103
+ print('e2a_lep:',micro.e2a_lep)
104
+ axs[0,0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
105
+ axs[1,0].plot( micro.den, micro.e2a_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
106
+ axs[2,0].plot( micro.den, micro.e2a_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
107
+ else:
108
+ mb_check.append(mb)
109
+ print('mb:',mb)
110
+ print('model:',model)
111
+ print('den:',micro.den)
112
+ print('e2a_lep:',micro.e2a_lep)
113
+ axs[0,0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
114
+ axs[1,0].plot( micro.den, micro.e2a_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
115
+ axs[2,0].plot( micro.den, micro.e2a_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
116
+ # end of model
117
+ # end of mb
118
+ #
119
+ for kmodel,model in enumerate(pheno_models):
120
+ #
121
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
122
+ #
123
+ for param in params:
124
+ #
125
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
126
+ if nuda.env.verb_output: pheno.print_outputs( )
127
+ #
128
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
129
+ #
130
+ if check.isInside:
131
+ lstyle = 'solid'
132
+ else:
133
+ lstyle = 'dashed'
134
+ continue
135
+ #
136
+ if pheno.e2a_lep is not None:
137
+ print('model:',model,' param:',param)
138
+ if model in model_check:
139
+ axs[0,1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
140
+ axs[1,1].plot( pheno.den, pheno.e2a_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
141
+ axs[2,1].plot( pheno.den, pheno.e2a_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
142
+ else:
143
+ model_check.append(model)
144
+ axs[0,1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
145
+ axs[1,1].plot( pheno.den, pheno.e2a_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
146
+ axs[2,1].plot( pheno.den, pheno.e2a_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
147
+ # end of param
148
+ # end of model
149
+ #
150
+ axs[0,0].text(0.02,0,'microscopic models',fontsize='10')
151
+ axs[0,1].text(0.02,0,'phenomenological models',fontsize='10')
152
+ #
153
+ axs[0,0].text(0.1,30,r'$\delta=0.6$',fontsize='10')
154
+ axs[0,1].text(0.1,30,r'$\delta=0.6$',fontsize='10')
155
+ axs[0,0].text(0.1,13,r'$\delta=0.8$',fontsize='10')
156
+ axs[0,1].text(0.1,13,r'$\delta=0.8$',fontsize='10')
157
+ #
158
+ axs[1,0].text(0.1,-2,r'$\delta=0.6$',fontsize='10')
159
+ axs[1,1].text(0.1,-2,r'$\delta=0.6$',fontsize='10')
160
+ axs[1,0].text(0.1,7,r'$\delta=0.8$',fontsize='10')
161
+ axs[1,1].text(0.1,7,r'$\delta=0.8$',fontsize='10')
162
+ #
163
+ axs[2,0].text(0.1,27,r'$\delta=0.6$',fontsize='10')
164
+ axs[2,1].text(0.1,27,r'$\delta=0.6$',fontsize='10')
165
+ axs[2,0].text(0.1,15,r'$\delta=0.8$',fontsize='10')
166
+ axs[2,1].text(0.1,15,r'$\delta=0.8$',fontsize='10')
167
+ #
168
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
169
+ #
170
+ if pname is not None:
171
+ plt.savefig(pname, dpi=200)
172
+ plt.close()
173
+ #
@@ -3,7 +3,7 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def hnuc_setupRE1LExp_plot( pname, tables ):
6
+ def hnuc_setupRE1LExp_fig( pname, tables ):
7
7
  #
8
8
  # plot
9
9
  #
@@ -23,96 +23,105 @@ def matter_ENM_fig( pname, micro_mbs, pheno_models, band ):
23
23
  print(f'Plot name: {pname}')
24
24
  #
25
25
  fig, axs = plt.subplots(1,2)
26
- #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
26
  fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
28
27
  #
29
28
  axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
- axs[0].set_ylabel(r'$e_\text{NM}(n)$')
31
- axs[0].set_xlim([0, 0.33])
32
- axs[0].set_ylim([0, 30])
29
+ axs[0].set_ylabel(r'$e_\text{NM}(n_\text{nuc})$')
30
+ axs[0].set_xlim([0, 0.34])
31
+ axs[0].set_ylim([0, 35])
33
32
  #
34
33
  axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
34
  #axs[1].set_ylabel(r'$e_{sym}(n)$')
36
- axs[1].set_xlim([0, 0.33])
37
- axs[1].set_ylim([0, 30])
35
+ axs[1].set_xlim([0, 0.34])
36
+ axs[1].set_ylim([0, 35])
38
37
  axs[1].tick_params('y', labelleft=False)
39
38
  #
40
39
  mb_check = []
41
- k = 0
42
40
  #
43
- for mb in micro_mbs:
41
+ for kmb,mb in enumerate(micro_mbs):
44
42
  #
45
43
  models, models_lower = nuda.matter.micro_models_mb( mb )
46
44
  #
47
45
  for model in models:
48
46
  #
49
- enm = nuda.matter.setupMicro( model = model )
47
+ micro = nuda.matter.setupMicro( model = model )
48
+ if nuda.env.verb: micro.print_outputs( )
50
49
  #
51
- if enm.nm_e2a is not None:
50
+ check = nuda.matter.setupCheck( eos = micro, band = band )
51
+ #
52
+ if check.isInside:
53
+ lstyle = 'solid'
54
+ else:
55
+ lstyle = 'dashed'
56
+ #
57
+ if micro.nm_e2a is not None:
52
58
  print('mb:',mb,'model:',model)
53
59
  if mb in mb_check:
54
- if enm.marker:
55
- if enm.err:
56
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=None, errorevery=enm.every, color=nuda.param.col[k] )
60
+ if micro.marker:
61
+ if micro.e_err:
62
+ axs[0].errorbar( micro.nm_den, micro.nm_e2a, yerr=micro.nm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
57
63
  else:
58
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=None, markevery=enm.every, color=nuda.param.col[k] )
64
+ axs[0].plot( micro.nm_den, micro.nm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, color=nuda.param.col[kmb] )
59
65
  else:
60
- if enm.err:
61
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=enm.linestyle, errorevery=enm.every, color=nuda.param.col[k] )
66
+ if micro.e_err:
67
+ axs[0].errorbar( micro.nm_den, micro.nm_e2a, yerr=micro.nm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
62
68
  else:
63
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=enm.linestyle, markevery=enm.every, color=nuda.param.col[k] )
69
+ axs[0].plot( micro.nm_den, micro.nm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, color=nuda.param.col[kmb] )
64
70
  else:
65
71
  mb_check.append(mb)
66
- k += 1
67
- if enm.marker:
68
- if enm.err:
69
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=None, label=mb, errorevery=enm.every, color=nuda.param.col[k] )
72
+ if micro.marker:
73
+ if micro.e_err:
74
+ axs[0].errorbar( micro.nm_den, micro.nm_e2a, yerr=micro.nm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
70
75
  else:
71
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=None, label=mb, markevery=enm.every, color=nuda.param.col[k] )
76
+ axs[0].plot( micro.nm_den, micro.nm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, color=nuda.param.col[kmb] )
72
77
  else:
73
- if enm.err:
74
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=enm.linestyle, label=mb, errorevery=enm.every, color=nuda.param.col[k] )
78
+ if micro.e_err:
79
+ axs[0].errorbar( micro.nm_den, micro.nm_e2a, yerr=micro.nm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
75
80
  else:
76
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=enm.linestyle, label=mb, markevery=enm.every, color=nuda.param.col[k] )
77
- #axs[0].plot( esym.den, esym.esym, color=nuda.param.col[k], label=mb )
78
- if nuda.env.verb: esm.print_outputs( )
81
+ axs[0].plot( micro.nm_den, micro.nm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, color=nuda.param.col[kmb] )
82
+ # end model
83
+ # end mb
79
84
  axs[0].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
80
85
  axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
81
86
  axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
82
- axs[0].text(0.03,2,'microscopic models',fontsize='10')
83
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
87
+ axs[0].text(0.06,2,'microscopic models',fontsize='10')
84
88
  #
85
89
  model_check = []
86
- k = 0
87
90
  #
88
- for model in pheno_models:
91
+ for kmodel,model in enumerate(pheno_models):
89
92
  #
90
93
  params, params_lower = nuda.matter.pheno_params( model = model )
91
94
  #
92
95
  for param in params:
93
96
  #
94
- enm = nuda.matter.setupPheno( model = model, param = param )
97
+ pheno = nuda.matter.setupPheno( model = model, param = param )
98
+ if nuda.env.verb: pheno.print_outputs( )
99
+ #
100
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
95
101
  #
96
- if enm.nm_e2a is not None:
102
+ if check.isInside:
103
+ lstyle = 'solid'
104
+ else:
105
+ lstyle = 'dashed'
106
+ #
107
+ if pheno.nm_e2a is not None:
97
108
  print('model:',model,' param:',param)
98
109
  if model in model_check:
99
- axs[1].plot( enm.nm_den, enm.nm_e2a, color=nuda.param.col[k] )
110
+ axs[1].plot( pheno.nm_den, pheno.nm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel] )
100
111
  else:
101
112
  model_check.append(model)
102
- k += 1
103
- axs[1].plot( enm.nm_den, enm.nm_e2a, color=nuda.param.col[k], label=model )
104
- #pheno.label=None
105
- #axs[1].plot( esym.den, esym.esym, label=esym.label )
106
- if nuda.env.verb: esym.print_outputs( )
113
+ axs[1].plot( pheno.nm_den, pheno.nm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
114
+ # end param
115
+ # end model
107
116
  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 )
108
117
  axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
109
118
  axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
110
- axs[1].text(0.03,2,'phenomenological models',fontsize='10')
119
+ axs[1].text(0.06,2,'phenomenological models',fontsize='10')
120
+ #
111
121
  #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
112
122
  #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
113
123
  fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
114
124
  #
115
- #plt.tight_layout()
116
125
  if pname is not None:
117
126
  plt.savefig(pname, dpi=200)
118
127
  plt.close()
@@ -23,96 +23,117 @@ def matter_ESM_fig( pname, micro_mbs, pheno_models, band ):
23
23
  print(f'Plot name: {pname}')
24
24
  #
25
25
  fig, axs = plt.subplots(1,2)
26
- #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
26
  fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
28
27
  #
29
28
  axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
- axs[0].set_ylabel(r'$e_\text{SM}(n)$')
31
- axs[0].set_xlim([0, 0.33])
32
- axs[0].set_ylim([-25, 5])
29
+ axs[0].set_ylabel(r'$e_\text{SM}(n_\text{nuc})$')
30
+ axs[0].set_xlim([0, 0.34])
31
+ axs[0].set_ylim([-22, 5])
33
32
  #
34
33
  axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
34
  #axs[1].set_ylabel(r'$e_{sym}(n)$')
36
- axs[1].set_xlim([0, 0.33])
37
- axs[1].set_ylim([-25, 5])
35
+ axs[1].set_xlim([0, 0.34])
36
+ axs[1].set_ylim([-22, 5])
38
37
  axs[1].tick_params('y', labelleft=False)
39
38
  #
40
39
  mb_check = []
41
- k = 0
42
40
  #
43
- for mb in micro_mbs:
41
+ for kmb,mb in enumerate(micro_mbs):
44
42
  #
45
43
  models, models_lower = nuda.matter.micro_models_mb( mb )
46
44
  #
47
45
  for model in models:
48
46
  #
49
- esm = nuda.matter.setupMicro( model = model )
47
+ micro = nuda.matter.setupMicro( model = model )
48
+ if nuda.env.verb: micro.print_outputs( )
50
49
  #
51
- if esm.sm_e2a is not None:
50
+ check = nuda.matter.setupCheck( eos = micro, band = band )
51
+ #
52
+ if check.isInside:
53
+ lstyle = 'solid'
54
+ else:
55
+ lstyle = 'dashed'
56
+ #
57
+ if micro.sm_e2a is not None:
52
58
  print('mb:',mb,'model:',model)
53
59
  if mb in mb_check:
54
- if esm.marker:
55
- if esm.err:
56
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=None, errorevery=esm.every, color=nuda.param.col[k] )
60
+ if micro.marker:
61
+ print('with marker 1:',micro.marker)
62
+ if micro.e_err:
63
+ print('with error',micro.e_err)
64
+ axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
57
65
  else:
58
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=None, markevery=esm.every, color=nuda.param.col[k] )
66
+ print('with no error',micro.e_err)
67
+ axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, color=nuda.param.col[kmb] )
59
68
  else:
60
- if esm.err:
61
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=esm.linestyle, errorevery=esm.every, color=nuda.param.col[k] )
69
+ print('with no marker',micro.marker)
70
+ if micro.e_err:
71
+ print('with error',micro.e_err)
72
+ axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
62
73
  else:
63
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=esm.linestyle, markevery=esm.every, color=nuda.param.col[k] )
74
+ print('with no error',micro.e_err)
75
+ axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
64
76
  else:
65
77
  mb_check.append(mb)
66
- k += 1
67
- if esm.marker:
68
- if esm.err:
69
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=None, label=mb, errorevery=esm.every, color=nuda.param.col[k] )
78
+ if micro.marker:
79
+ print('with marker 2:',micro.marker)
80
+ if micro.e_err:
81
+ print('with error',micro.e_err)
82
+ axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
70
83
  else:
71
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=None, label=mb, markevery=esm.every, color=nuda.param.col[k] )
84
+ print('with no error',micro.e_err)
85
+ axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, color=nuda.param.col[kmb] )
72
86
  else:
73
- if esm.err:
74
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=esm.linestyle, label=mb, errorevery=esm.every, color=nuda.param.col[k] )
87
+ print('with no marker',micro.marker)
88
+ if micro.e_err:
89
+ print('with error',micro.e_err)
90
+ axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
75
91
  else:
76
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=esm.linestyle, label=mb, markevery=esm.every, color=nuda.param.col[k] )
77
- #axs[0].plot( esym.den, esym.esym, color=nuda.param.col[k], label=mb )
78
- if nuda.env.verb: esm.print_outputs( )
92
+ print('with no error',micro.e_err)
93
+ axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
94
+ # end of model
95
+ # end of mb
79
96
  axs[0].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
80
97
  axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
81
98
  axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
82
99
  axs[0].text(0.03,2,'microscopic models',fontsize='10')
83
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
84
100
  #
85
101
  model_check = []
86
- k = 0
87
102
  #
88
- for model in pheno_models:
103
+ for kmodel,model in enumerate(pheno_models):
89
104
  #
90
105
  params, params_lower = nuda.matter.pheno_params( model = model )
91
106
  #
92
107
  for param in params:
93
108
  #
94
- esm = nuda.matter.setupPheno( model = model, param = param )
109
+ pheno = nuda.matter.setupPheno( model = model, param = param )
110
+ if nuda.env.verb: pheno.print_outputs( )
111
+ #
112
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
95
113
  #
96
- if esm.sm_e2a is not None:
114
+ if check.isInside:
115
+ lstyle = 'solid'
116
+ else:
117
+ lstyle = 'dashed'
118
+ #
119
+ if pheno.sm_e2a is not None:
97
120
  print('model:',model,' param:',param)
98
121
  if model in model_check:
99
- axs[1].plot( esm.sm_den, esm.sm_e2a, color=nuda.param.col[k] )
122
+ axs[1].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel] )
100
123
  else:
101
124
  model_check.append(model)
102
- k += 1
103
- axs[1].plot( esm.sm_den, esm.sm_e2a, color=nuda.param.col[k], label=model )
104
- #pheno.label=None
105
- #axs[1].plot( esym.den, esym.esym, label=esym.label )
106
- if nuda.env.verb: esym.print_outputs( )
125
+ axs[1].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
126
+ # end of param
127
+ # end of model
107
128
  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 )
108
129
  axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
109
130
  axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
110
131
  axs[1].text(0.03,2,'phenomenological models',fontsize='10')
132
+ #
111
133
  #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
112
134
  #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
113
135
  fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
114
136
  #
115
- #plt.tight_layout()
116
137
  if pname is not None:
117
138
  plt.savefig(pname, dpi=200)
118
139
  plt.close()