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,7 +3,7 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def eos_setupAMBeq_xp_fig( pname, models_micro, models_pheno ):
6
+ def eos_setupAMBeq_e2a_nuc_fig( pname, micro_mbs, pheno_models, band ):
7
7
  """
8
8
  Plot nuclear chart (N versus Z).\
9
9
  The plot is 1x2 with:\
@@ -24,58 +24,1237 @@ def eos_setupAMBeq_xp_fig( pname, models_micro, models_pheno ):
24
24
  #
25
25
  fig, axs = plt.subplots(1,2)
26
26
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.05, hspace=0.3 )
27
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
28
28
  #
29
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
- axs[0].set_ylabel(r'proton fraction $x_p$')
31
- axs[0].set_xlim([0, 0.28])
29
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
30
+ axs[0].set_ylabel(r'$e_\text{nuc}^\text{int}$ (MeV)',fontsize='14')
31
+ axs[0].set_xlim([0, 0.33])
32
+ axs[0].set_ylim([-2, 27])
33
+ #axs[0].set_tick_params('y', right=True)
34
+ #axs[0].set_tick_params('x', top=True)
35
+ #
36
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
37
+ axs[1].set_xlim([0, 0.33])
38
+ axs[1].set_ylim([-2, 27])
39
+ axs[1].tick_params('y', labelleft=False)
40
+ #
41
+ mb_check = []
42
+ #
43
+ for kmb,mb in enumerate(micro_mbs):
44
+ #
45
+ print('mb:',mb,kmb)
46
+ #
47
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
48
+ #
49
+ print('models:',models)
50
+ #
51
+ if mb == 'VAR':
52
+ models.remove('1998-VAR-AM-APR-fit')
53
+ models_lower.remove('1998-var-am-apr-fit')
54
+ #
55
+ for model in models:
56
+ #
57
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
58
+ if nuda.env.verb_output: micro.print_outputs( )
59
+ #
60
+ check = nuda.matter.setupCheck( eos = micro, band = band )
61
+ #
62
+ if check.isInside:
63
+ lstyle = 'solid'
64
+ else:
65
+ lstyle = 'dashed'
66
+ #continue
67
+ #
68
+ if micro.e2a_nuc is not None:
69
+ print('model:',model)
70
+ if mb in mb_check:
71
+ axs[0].plot( micro.den, micro.e2a_int_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
72
+ else:
73
+ mb_check.append(mb)
74
+ axs[0].plot( micro.den, micro.e2a_int_nuc, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
75
+ # end of model
76
+ # end of mb
77
+ #
78
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
79
+ #
80
+ model_check = []
81
+ #
82
+ for kmodel,model in enumerate(pheno_models):
83
+ #
84
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
85
+ #
86
+ for param in params:
87
+ #
88
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
89
+ if nuda.env.verb_output: pheno.print_outputs( )
90
+ #
91
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
92
+ #
93
+ if check.isInside:
94
+ lstyle = 'solid'
95
+ else:
96
+ lstyle = 'dashed'
97
+ #continue
98
+ #
99
+ if pheno.e2a_nuc is not None:
100
+ print('model:',model,' param:',param)
101
+ if model in model_check:
102
+ axs[1].plot( pheno.den, pheno.e2a_int_nuc, 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_int_nuc, 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,20,'phenomenological models',fontsize='10')
110
+ #
111
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
112
+ #
113
+ if pname is not None:
114
+ plt.savefig(pname, dpi=200)
115
+ plt.close()
116
+
117
+ def eos_setupAMBeq_pre_nuc_fig( pname, micro_mbs, pheno_models, band ):
118
+ """
119
+ Plot nuclear chart (N versus Z).\
120
+ The plot is 1x2 with:\
121
+ [0]: nuclear chart.
122
+
123
+ :param pname: name of the figure (*.png)
124
+ :type pname: str.
125
+ :param table: table.
126
+ :type table: str.
127
+ :param version: version of table to run on.
128
+ :type version: str.
129
+ :param theo_tables: object instantiated on the reference band.
130
+ :type theo_tables: object.
131
+
132
+ """
133
+ #
134
+ print(f'Plot name: {pname}')
135
+ #
136
+ fig, axs = plt.subplots(1,2)
137
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
138
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
139
+ #
140
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
141
+ axs[0].set_ylabel(r'$p_\text{nuc}$ (MeV fm$^{-3}$)',fontsize='14')
142
+ axs[0].set_xlim([0, 0.35])
143
+ axs[0].set_ylim([-2, 60])
144
+ #axs[0].set_tick_params('y', right=True)
145
+ #axs[0].set_tick_params('x', top=True)
146
+ #
147
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
148
+ axs[1].set_xlim([0, 0.35])
149
+ axs[1].set_ylim([-2, 60])
150
+ axs[1].tick_params('y', labelleft=False)
151
+ #
152
+ mb_check = []
153
+ #
154
+ for kmb,mb in enumerate(micro_mbs):
155
+ #
156
+ print('mb:',mb,kmb)
157
+ #
158
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
159
+ #
160
+ print('models:',models)
161
+ #
162
+ if mb == 'VAR':
163
+ models.remove('1998-VAR-AM-APR-fit')
164
+ models_lower.remove('1998-var-am-apr-fit')
165
+ #
166
+ for model in models:
167
+ #
168
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
169
+ if nuda.env.verb_output: micro.print_outputs( )
170
+ #
171
+ check = nuda.matter.setupCheck( eos = micro, band = band )
172
+ #
173
+ if check.isInside:
174
+ lstyle = 'solid'
175
+ else:
176
+ lstyle = 'dashed'
177
+ #continue
178
+ #
179
+ if micro.pre_nuc is not None:
180
+ print('model:',model)
181
+ if mb in mb_check:
182
+ axs[0].plot( micro.den, micro.pre_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
183
+ else:
184
+ mb_check.append(mb)
185
+ axs[0].plot( micro.den, micro.pre_nuc, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
186
+ # end of model
187
+ # end of mb
188
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
189
+ #
190
+ model_check = []
191
+ #
192
+ for kmodel,model in enumerate(pheno_models):
193
+ #
194
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
195
+ #
196
+ for param in params:
197
+ #
198
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
199
+ if nuda.env.verb_output: pheno.print_outputs( )
200
+ #
201
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
202
+ #
203
+ if check.isInside:
204
+ lstyle = 'solid'
205
+ else:
206
+ lstyle = 'dashed'
207
+ #continue
208
+ #
209
+ if pheno.pre_nuc is not None:
210
+ print('model:',model,' param:',param)
211
+ if model in model_check:
212
+ axs[1].plot( pheno.den, pheno.pre_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
213
+ else:
214
+ model_check.append(model)
215
+ axs[1].plot( pheno.den, pheno.pre_nuc, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
216
+ # end of param
217
+ # end of model
218
+ #
219
+ axs[1].text(0.02,20,'phenomenological models',fontsize='10')
220
+ #
221
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
222
+ #
223
+ if pname is not None:
224
+ plt.savefig(pname, dpi=200)
225
+ plt.close()
226
+
227
+ def eos_setupAMBeq_cs2_nuc_fig( pname, micro_mbs, pheno_models, band ):
228
+ """
229
+ Plot nuclear chart (N versus Z).\
230
+ The plot is 1x2 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
+ fig, axs = plt.subplots(1,2)
247
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
248
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
249
+ #
250
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
251
+ axs[0].set_ylabel(r'$c_\text{s,nuc}^2/c^2$',fontsize='14')
252
+ axs[0].set_xlim([0, 0.35])
253
+ axs[0].set_ylim([-0.05, 0.25])
254
+ #axs[0].set_tick_params('y', right=True)
255
+ #axs[0].set_tick_params('x', top=True)
256
+ #
257
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
258
+ axs[1].set_xlim([0, 0.35])
259
+ axs[1].set_ylim([-0.05, 0.25])
260
+ axs[1].tick_params('y', labelleft=False)
261
+ #
262
+ mb_check = []
263
+ #
264
+ for kmb,mb in enumerate(micro_mbs):
265
+ #
266
+ print('mb:',mb,kmb)
267
+ #
268
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
269
+ #
270
+ print('models:',models)
271
+ #
272
+ if mb == 'VAR':
273
+ models.remove('1998-VAR-AM-APR-fit')
274
+ models_lower.remove('1998-var-am-apr-fit')
275
+ #
276
+ for model in models:
277
+ #
278
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
279
+ if nuda.env.verb_output: micro.print_outputs( )
280
+ #
281
+ check = nuda.matter.setupCheck( eos = micro, band = band )
282
+ #
283
+ if check.isInside:
284
+ lstyle = 'solid'
285
+ else:
286
+ lstyle = 'dashed'
287
+ #continue
288
+ #
289
+ if micro.cs2_nuc is not None:
290
+ print('model:',model)
291
+ if mb in mb_check:
292
+ axs[0].plot( micro.den, micro.cs2_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
293
+ else:
294
+ mb_check.append(mb)
295
+ axs[0].plot( micro.den, micro.cs2_nuc, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
296
+ # end of model
297
+ # end of mb
298
+ axs[0].text(0.02,0.2,'microscopic models',fontsize='10')
299
+ #
300
+ model_check = []
301
+ #
302
+ for kmodel,model in enumerate(pheno_models):
303
+ #
304
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
305
+ #
306
+ for param in params:
307
+ #
308
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
309
+ if nuda.env.verb_output: pheno.print_outputs( )
310
+ #
311
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
312
+ #
313
+ if check.isInside:
314
+ lstyle = 'solid'
315
+ else:
316
+ lstyle = 'dashed'
317
+ #continue
318
+ #
319
+ if pheno.cs2_nuc is not None:
320
+ print('model:',model,' param:',param)
321
+ if model in model_check:
322
+ axs[1].plot( pheno.den, pheno.cs2_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
323
+ else:
324
+ model_check.append(model)
325
+ axs[1].plot( pheno.den, pheno.cs2_nuc, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
326
+ # end of param
327
+ # end of model
328
+ #
329
+ axs[1].text(0.02,0.2,'phenomenological models',fontsize='10')
330
+ #
331
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
332
+ #
333
+ if pname is not None:
334
+ plt.savefig(pname, dpi=200)
335
+ plt.close()
336
+
337
+ def eos_setupAMBeq_e2a_lep_fig( pname, micro_mbs, pheno_models, band ):
338
+ """
339
+ Plot nuclear chart (N versus Z).\
340
+ The plot is 1x2 with:\
341
+ [0]: nuclear chart.
342
+
343
+ :param pname: name of the figure (*.png)
344
+ :type pname: str.
345
+ :param table: table.
346
+ :type table: str.
347
+ :param version: version of table to run on.
348
+ :type version: str.
349
+ :param theo_tables: object instantiated on the reference band.
350
+ :type theo_tables: object.
351
+
352
+ """
353
+ #
354
+ print(f'Plot name: {pname}')
355
+ #
356
+ fig, axs = plt.subplots(1,2)
357
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
358
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
359
+ #
360
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
361
+ axs[0].set_ylabel(r'$_\text{lep}^\text{int}$ (MeV)',fontsize='14')
362
+ axs[0].set_xlim([0, 0.33])
363
+ axs[0].set_ylim([-2, 27])
364
+ #axs[0].set_tick_params('y', right=True)
365
+ #axs[0].set_tick_params('x', top=True)
366
+ #
367
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
368
+ axs[1].set_xlim([0, 0.33])
369
+ axs[1].set_ylim([-2, 27])
370
+ axs[1].tick_params('y', labelleft=False)
371
+ #
372
+ mb_check = []
373
+ #
374
+ for kmb,mb in enumerate(micro_mbs):
375
+ #
376
+ print('mb:',mb,kmb)
377
+ #
378
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
379
+ #
380
+ print('models:',models)
381
+ #
382
+ if mb == 'VAR':
383
+ models.remove('1998-VAR-AM-APR-fit')
384
+ models_lower.remove('1998-var-am-apr-fit')
385
+ #
386
+ for model in models:
387
+ #
388
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
389
+ if nuda.env.verb_output: micro.print_outputs( )
390
+ #
391
+ check = nuda.matter.setupCheck( eos = micro, band = band )
392
+ #
393
+ if check.isInside:
394
+ lstyle = 'solid'
395
+ else:
396
+ lstyle = 'dashed'
397
+ #continue
398
+ #
399
+ #
400
+ if micro.e2a_lep is not None:
401
+ print('model:',model)
402
+ if mb in mb_check:
403
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
404
+ else:
405
+ mb_check.append(mb)
406
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
407
+ # end of model
408
+ # end of mb
409
+ #
410
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
411
+ #
412
+ model_check = []
413
+ #
414
+ for kmodel,model in enumerate(pheno_models):
415
+ #
416
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
417
+ #
418
+ for param in params:
419
+ #
420
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
421
+ if nuda.env.verb_output: pheno.print_outputs( )
422
+ #
423
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
424
+ #
425
+ if check.isInside:
426
+ lstyle = 'solid'
427
+ else:
428
+ lstyle = 'dashed'
429
+ #continue
430
+ #
431
+ if pheno.e2a_lep is not None:
432
+ print('model:',model,' param:',param)
433
+ #micro.label=None
434
+ if model in model_check:
435
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
436
+ else:
437
+ model_check.append(model)
438
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
439
+ # end of param
440
+ # end of model
441
+ #
442
+ axs[1].text(0.02,20,'phenomenological models',fontsize='10')
443
+ #
444
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
445
+ #
446
+ if pname is not None:
447
+ plt.savefig(pname, dpi=200)
448
+ plt.close()
449
+
450
+ def eos_setupAMBeq_pre_lep_fig( pname, micro_mbs, pheno_models, band ):
451
+ """
452
+ Plot nuclear chart (N versus Z).\
453
+ The plot is 1x2 with:\
454
+ [0]: nuclear chart.
455
+
456
+ :param pname: name of the figure (*.png)
457
+ :type pname: str.
458
+ :param table: table.
459
+ :type table: str.
460
+ :param version: version of table to run on.
461
+ :type version: str.
462
+ :param theo_tables: object instantiated on the reference band.
463
+ :type theo_tables: object.
464
+
465
+ """
466
+ #
467
+ print(f'Plot name: {pname}')
468
+ #
469
+ fig, axs = plt.subplots(1,2)
470
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
471
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
472
+ #
473
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
474
+ axs[0].set_ylabel(r'$p_\text{lep}$ (MeV fm$^{-3}$)',fontsize='14')
475
+ axs[0].set_xlim([0, 0.35])
476
+ axs[0].set_ylim([-2, 60])
477
+ #axs[0].set_tick_params('y', right=True)
478
+ #axs[0].set_tick_params('x', top=True)
479
+ #
480
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
481
+ axs[1].set_xlim([0, 0.35])
482
+ axs[1].set_ylim([-2, 60])
483
+ axs[1].tick_params('y', labelleft=False)
484
+ #
485
+ mb_check = []
486
+ #
487
+ for kmb,mb in enumerate(micro_mbs):
488
+ #
489
+ print('mb:',mb,kmb)
490
+ #
491
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
492
+ #
493
+ print('models:',models)
494
+ #
495
+ if mb == 'VAR':
496
+ models.remove('1998-VAR-AM-APR-fit')
497
+ models_lower.remove('1998-var-am-apr-fit')
498
+ #
499
+ for model in models:
500
+ #
501
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
502
+ if nuda.env.verb_output: micro.print_outputs( )
503
+ #
504
+ check = nuda.matter.setupCheck( eos = micro, band = band )
505
+ #
506
+ if check.isInside:
507
+ lstyle = 'solid'
508
+ else:
509
+ lstyle = 'dashed'
510
+ #continue
511
+ #
512
+ #
513
+ if micro.pre_lep is not None:
514
+ print('model:',model)
515
+ if mb in mb_check:
516
+ axs[0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
517
+ else:
518
+ mb_check.append(mb)
519
+ axs[0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
520
+ # end of model
521
+ # end of mb
522
+ #
523
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
524
+ #
525
+ model_check = []
526
+ #
527
+ for kmodel,model in enumerate(pheno_models):
528
+ #
529
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
530
+ #
531
+ for param in params:
532
+ #
533
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
534
+ #
535
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
536
+ #
537
+ if check.isInside:
538
+ lstyle = 'solid'
539
+ else:
540
+ lstyle = 'dashed'
541
+ #continue
542
+ #
543
+ if micro.pre_lep is not None:
544
+ print('model:',model,' param:',param)
545
+ if model in model_check:
546
+ axs[1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
547
+ else:
548
+ model_check.append(model)
549
+ axs[1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
550
+ if nuda.env.verb_output: pheno.print_outputs( )
551
+ # end of param
552
+ # end of model
553
+ #
554
+ axs[1].text(0.02,20,'phenomenological models',fontsize='10')
555
+ #
556
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
557
+ #
558
+ if pname is not None:
559
+ plt.savefig(pname, dpi=200)
560
+ plt.close()
561
+
562
+ def eos_setupAMBeq_cs2_lep_fig( pname, micro_mbs, pheno_models, band ):
563
+ """
564
+ Plot nuclear chart (N versus Z).\
565
+ The plot is 1x2 with:\
566
+ [0]: nuclear chart.
567
+
568
+ :param pname: name of the figure (*.png)
569
+ :type pname: str.
570
+ :param table: table.
571
+ :type table: str.
572
+ :param version: version of table to run on.
573
+ :type version: str.
574
+ :param theo_tables: object instantiated on the reference band.
575
+ :type theo_tables: object.
576
+
577
+ """
578
+ #
579
+ print(f'Plot name: {pname}')
580
+ #
581
+ fig, axs = plt.subplots(1,2)
582
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
583
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
584
+ #
585
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
586
+ axs[0].set_ylabel(r'$c_\text{s,lep}^2/c^2$',fontsize='14')
587
+ axs[0].set_xlim([0, 0.35])
588
+ axs[0].set_ylim([0.2, 0.5])
589
+ #axs[0].set_tick_params('y', right=True)
590
+ #axs[0].set_tick_params('x', top=True)
591
+ #
592
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
593
+ axs[1].set_xlim([0, 0.35])
594
+ axs[1].set_ylim([0.2, 0.5])
595
+ axs[1].tick_params('y', labelleft=False)
596
+ #
597
+ mb_check = []
598
+ #
599
+ for kmb,mb in enumerate(micro_mbs):
600
+ #
601
+ print('mb:',mb,kmb)
602
+ #
603
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
604
+ #
605
+ print('models:',models)
606
+ #
607
+ if mb == 'VAR':
608
+ models.remove('1998-VAR-AM-APR-fit')
609
+ models_lower.remove('1998-var-am-apr-fit')
610
+ #
611
+ for model in models:
612
+ #
613
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
614
+ if nuda.env.verb_output: micro.print_outputs( )
615
+ #
616
+ check = nuda.matter.setupCheck( eos = micro, band = band )
617
+ #
618
+ if check.isInside:
619
+ lstyle = 'solid'
620
+ else:
621
+ lstyle = 'dashed'
622
+ #continue
623
+ #
624
+ #
625
+ if micro.cs2_lep is not None:
626
+ print('model:',model)
627
+ if mb in mb_check:
628
+ axs[0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
629
+ else:
630
+ mb_check.append(mb)
631
+ axs[0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
632
+ # end of model
633
+ # end of mb
634
+ #
635
+ axs[0].text(0.02,0.45,'microscopic models',fontsize='10')
636
+ #
637
+ model_check = []
638
+ #
639
+ for kmodel,model in enumerate(pheno_models):
640
+ #
641
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
642
+ #
643
+ for param in params:
644
+ #
645
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
646
+ #
647
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
648
+ #
649
+ if check.isInside:
650
+ lstyle = 'solid'
651
+ else:
652
+ lstyle = 'dashed'
653
+ #continue
654
+ #
655
+ if micro.cs2_lep is not None:
656
+ print('model:',model,' param:',param)
657
+ if model in model_check:
658
+ axs[1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
659
+ else:
660
+ model_check.append(model)
661
+ axs[1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
662
+ if nuda.env.verb_output: pheno.print_outputs( )
663
+ # end of param
664
+ # end of model
665
+ #
666
+ axs[1].text(0.02,0.45,'phenomenological models',fontsize='10')
667
+ #
668
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
669
+ #
670
+ if pname is not None:
671
+ plt.savefig(pname, dpi=200)
672
+ plt.close()
673
+
674
+
675
+ def eos_setupAMBeq_e2a_tot_fig( pname, micro_mbs, pheno_models, band ):
676
+ """
677
+ Plot nuclear chart (N versus Z).\
678
+ The plot is 1x2 with:\
679
+ [0]: nuclear chart.
680
+
681
+ :param pname: name of the figure (*.png)
682
+ :type pname: str.
683
+ :param table: table.
684
+ :type table: str.
685
+ :param version: version of table to run on.
686
+ :type version: str.
687
+ :param theo_tables: object instantiated on the reference band.
688
+ :type theo_tables: object.
689
+
690
+ """
691
+ #
692
+ print(f'Plot name: {pname}')
693
+ #
694
+ fig, axs = plt.subplots(1,2)
695
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
696
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
697
+ #
698
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
699
+ axs[0].set_ylabel(r'$e_\text{tot}^\text{int}$ (MeV)',fontsize='14')
700
+ axs[0].set_xlim([0, 0.33])
701
+ axs[0].set_ylim([-2, 27])
702
+ #axs[0].set_tick_params('y', right=True)
703
+ #axs[0].set_tick_params('x', top=True)
704
+ #
705
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
706
+ axs[1].set_xlim([0, 0.33])
707
+ axs[1].set_ylim([-2, 27])
708
+ axs[1].tick_params('y', labelleft=False)
709
+ #
710
+ mb_check = []
711
+ #
712
+ for kmb,mb in enumerate(micro_mbs):
713
+ #
714
+ print('mb:',mb,kmb)
715
+ #
716
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
717
+ #
718
+ print('models:',models)
719
+ #
720
+ if mb == 'VAR':
721
+ models.remove('1998-VAR-AM-APR-fit')
722
+ models_lower.remove('1998-var-am-apr-fit')
723
+ #
724
+ for model in models:
725
+ #
726
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
727
+ if nuda.env.verb_output: micro.print_outputs( )
728
+ #
729
+ check = nuda.matter.setupCheck( eos = micro, band = band )
730
+ #
731
+ if check.isInside:
732
+ lstyle = 'solid'
733
+ else:
734
+ lstyle = 'dashed'
735
+ #continue
736
+ #
737
+ if micro.e2a_tot is not None:
738
+ print('model:',model)
739
+ if mb in mb_check:
740
+ axs[0].plot( micro.den, micro.e2a_int_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
741
+ else:
742
+ mb_check.append(mb)
743
+ axs[0].plot( micro.den, micro.e2a_int_tot, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
744
+ # end of model
745
+ # end of mb
746
+ #
747
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
748
+ #
749
+ model_check = []
750
+ #
751
+ for kmodel,model in enumerate(pheno_models):
752
+ #
753
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
754
+ #
755
+ for param in params:
756
+ #
757
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
758
+ if nuda.env.verb_output: pheno.print_outputs( )
759
+ #
760
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
761
+ #
762
+ if check.isInside:
763
+ lstyle = 'solid'
764
+ else:
765
+ lstyle = 'dashed'
766
+ #continue
767
+ #
768
+ if pheno.e2a_tot is not None:
769
+ print('model:',model,' param:',param)
770
+ if model in model_check:
771
+ axs[1].plot( pheno.den, pheno.e2a_int_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
772
+ else:
773
+ model_check.append(model)
774
+ axs[1].plot( pheno.den, pheno.e2a_int_tot, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
775
+ # end of param
776
+ # end of model
777
+ #
778
+ axs[1].text(0.02,20,'phenomenological models',fontsize='10')
779
+ #
780
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
781
+ #
782
+ if pname is not None:
783
+ plt.savefig(pname, dpi=200)
784
+ plt.close()
785
+
786
+ def eos_setupAMBeq_pre_tot_fig( pname, micro_mbs, pheno_models, band ):
787
+ """
788
+ Plot nuclear chart (N versus Z).\
789
+ The plot is 1x2 with:\
790
+ [0]: nuclear chart.
791
+
792
+ :param pname: name of the figure (*.png)
793
+ :type pname: str.
794
+ :param table: table.
795
+ :type table: str.
796
+ :param version: version of table to run on.
797
+ :type version: str.
798
+ :param theo_tables: object instantiated on the reference band.
799
+ :type theo_tables: object.
800
+
801
+ """
802
+ #
803
+ print(f'Plot name: {pname}')
804
+ #
805
+ p_den = 0.32
806
+ p_cen = 23.0
807
+ p_std = 14.0
808
+ p_micro_cen = 16.3
809
+ p_micro_std = 3.0
810
+ p_pheno_cen = 23.0
811
+ p_pheno_std = 14.0
812
+ #
813
+ fig, axs = plt.subplots(1,2)
814
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
815
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
816
+ #
817
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
818
+ axs[0].set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
819
+ axs[0].set_xlim([0, 0.35])
820
+ axs[0].set_ylim([-2, 60])
821
+ #axs[0].set_tick_params('y', right=True)
822
+ #axs[0].set_tick_params('x', top=True)
823
+ #
824
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
825
+ axs[1].set_xlim([0, 0.35])
826
+ axs[1].set_ylim([-2, 60])
827
+ axs[1].tick_params('y', labelleft=False)
828
+ #
829
+ mb_check = []
830
+ #
831
+ for kmb,mb in enumerate(micro_mbs):
832
+ #
833
+ print('mb:',mb,kmb)
834
+ #
835
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
836
+ #
837
+ print('models:',models)
838
+ #
839
+ if mb == 'VAR':
840
+ models.remove('1998-VAR-AM-APR-fit')
841
+ models_lower.remove('1998-var-am-apr-fit')
842
+ #
843
+ for model in models:
844
+ #
845
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
846
+ if nuda.env.verb_output: micro.print_outputs( )
847
+ #
848
+ check = nuda.matter.setupCheck( eos = micro, band = band )
849
+ #
850
+ if check.isInside:
851
+ lstyle = 'solid'
852
+ else:
853
+ lstyle = 'dashed'
854
+ #continue
855
+ #
856
+ #
857
+ if micro.pre_tot is not None:
858
+ print('model:',model)
859
+ if mb in mb_check:
860
+ axs[0].plot( micro.den, micro.pre_tot, marker='o', linestyle=micro.linestyle, markevery=micro.every, color=nuda.param.col[kmb] )
861
+ else:
862
+ mb_check.append(mb)
863
+ axs[0].plot( micro.den, micro.pre_tot, marker='o', linestyle=micro.linestyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
864
+ # end of model
865
+ # end of mb
866
+ #
867
+ axs[0].errorbar( p_den, p_cen, yerr=p_std, color='k' )
868
+ axs[0].errorbar( p_den+0.005, p_micro_cen, yerr=p_micro_std, color='r' )
869
+ axs[0].text(0.02,20,'microscopic models',fontsize='10')
870
+ #
871
+ model_check = []
872
+ #
873
+ for kmodel,model in enumerate(pheno_models):
874
+ #
875
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
876
+ #
877
+ for param in params:
878
+ #
879
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
880
+ if nuda.env.verb_output: pheno.print_outputs( )
881
+ #
882
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
883
+ #
884
+ if check.isInside:
885
+ lstyle = 'solid'
886
+ else:
887
+ lstyle = 'dashed'
888
+ #continue
889
+ #
890
+ if pheno.pre_tot is not None:
891
+ print('model:',model,' param:',param)
892
+ if model in model_check:
893
+ axs[1].plot( pheno.den, pheno.pre_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
894
+ else:
895
+ model_check.append(model)
896
+ axs[1].plot( pheno.den, pheno.pre_tot, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
897
+ # end of param
898
+ # end of model
899
+ #
900
+ axs[1].errorbar( p_den, p_cen, yerr=p_std, color='k' )
901
+ axs[1].errorbar( p_den+0.005, p_pheno_cen, yerr=p_pheno_std, color='r' )
902
+ axs[1].text(0.02,20,'phenomenological models',fontsize='10')
903
+ #
904
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
905
+ #
906
+ if pname is not None:
907
+ plt.savefig(pname, dpi=200)
908
+ plt.close()
909
+
910
+ def eos_setupAMBeq_cs2_tot_fig( pname, micro_mbs, pheno_models, band ):
911
+ """
912
+ Plot nuclear chart (N versus Z).\
913
+ The plot is 1x2 with:\
914
+ [0]: nuclear chart.
915
+
916
+ :param pname: name of the figure (*.png)
917
+ :type pname: str.
918
+ :param table: table.
919
+ :type table: str.
920
+ :param version: version of table to run on.
921
+ :type version: str.
922
+ :param theo_tables: object instantiated on the reference band.
923
+ :type theo_tables: object.
924
+
925
+ """
926
+ #
927
+ print(f'Plot name: {pname}')
928
+ #
929
+ fig, axs = plt.subplots(1,2)
930
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
931
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
932
+ #
933
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
934
+ axs[0].set_ylabel(r'$c_\text{s,tot}^2/c^2$',fontsize='14')
935
+ axs[0].set_xlim([0, 0.35])
936
+ axs[0].set_ylim([-0.05, 0.25])
937
+ #axs[0].set_tick_params('y', right=True)
938
+ #axs[0].set_tick_params('x', top=True)
939
+ #
940
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
941
+ axs[1].set_xlim([0, 0.35])
942
+ axs[1].set_ylim([-0.05, 0.25])
943
+ axs[1].tick_params('y', labelleft=False)
944
+ #
945
+ mb_check = []
946
+ #
947
+ for kmb,mb in enumerate(micro_mbs):
948
+ #
949
+ print('mb:',mb,kmb)
950
+ #
951
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
952
+ #
953
+ print('models:',models)
954
+ #
955
+ if mb == 'VAR':
956
+ models.remove('1998-VAR-AM-APR-fit')
957
+ models_lower.remove('1998-var-am-apr-fit')
958
+ #
959
+ for model in models:
960
+ #
961
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
962
+ if nuda.env.verb_output: micro.print_outputs( )
963
+ #
964
+ check = nuda.matter.setupCheck( eos = micro, band = band )
965
+ #
966
+ if check.isInside:
967
+ lstyle = 'solid'
968
+ else:
969
+ lstyle = 'dashed'
970
+ #continue
971
+ #
972
+ #
973
+ if micro.cs2_tot is not None:
974
+ print('model:',model)
975
+ if mb in mb_check:
976
+ axs[0].plot( micro.den, micro.cs2_tot, marker='o', linestyle=micro.linestyle, markevery=micro.every, color=nuda.param.col[kmb] )
977
+ else:
978
+ mb_check.append(mb)
979
+ axs[0].plot( micro.den, micro.cs2_tot, marker='o', linestyle=micro.linestyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
980
+ # end of model
981
+ # end of mb
982
+ axs[0].text(0.02,0.2,'microscopic models',fontsize='10')
983
+ #
984
+ model_check = []
985
+ #
986
+ for kmodel,model in enumerate(pheno_models):
987
+ #
988
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
989
+ #
990
+ for param in params:
991
+ #
992
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
993
+ if nuda.env.verb_output: pheno.print_outputs( )
994
+ #
995
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
996
+ #
997
+ if check.isInside:
998
+ lstyle = 'solid'
999
+ else:
1000
+ lstyle = 'dashed'
1001
+ #continue
1002
+ #
1003
+ if pheno.cs2_tot is not None:
1004
+ print('model:',model,' param:',param)
1005
+ if model in model_check:
1006
+ axs[1].plot( pheno.den, pheno.cs2_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
1007
+ else:
1008
+ model_check.append(model)
1009
+ axs[1].plot( pheno.den, pheno.cs2_tot, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
1010
+ # end of param
1011
+ # end of model
1012
+ axs[1].text(0.02,0.2,'phenomenological models',fontsize='10')
1013
+ #
1014
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
1015
+ #
1016
+ if pname is not None:
1017
+ plt.savefig(pname, dpi=200)
1018
+ plt.close()
1019
+
1020
+ def eos_setupAMBeq_eos_fig( pname, micro_mbs, pheno_models, band ):
1021
+ """
1022
+ Plot nuclear chart (N versus Z).\
1023
+ The plot is 1x2 with:\
1024
+ [0]: nuclear chart.
1025
+
1026
+ :param pname: name of the figure (*.png)
1027
+ :type pname: str.
1028
+ :param table: table.
1029
+ :type table: str.
1030
+ :param version: version of table to run on.
1031
+ :type version: str.
1032
+ :param theo_tables: object instantiated on the reference band.
1033
+ :type theo_tables: object.
1034
+
1035
+ """
1036
+ #
1037
+ print(f'Plot name: {pname}')
1038
+ #
1039
+ p_den = 312.0
1040
+ p_cen = 12.5
1041
+ p_std = 11.0
1042
+ p_micro_cen = 14.0
1043
+ p_micro_std = 2.5
1044
+ p_pheno_cen = 12.5
1045
+ p_pheno_std = 11.0
1046
+ #
1047
+ fig, axs = plt.subplots(1,2)
1048
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
1049
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
1050
+ #
1051
+ axs[0].set_xlabel(r'$\epsilon_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
1052
+ axs[0].set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
1053
+ axs[0].set_xlim([0, 350])
1054
+ axs[0].set_ylim([-2, 30])
1055
+ #axs[0].set_tick_params('y', right=True)
1056
+ #axs[0].set_tick_params('x', top=True)
1057
+ #
1058
+ axs[1].set_xlabel(r'$\epsilon_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
1059
+ axs[1].set_xlim([0, 350])
1060
+ axs[1].set_ylim([-2, 30])
1061
+ axs[1].tick_params('y', labelleft=False)
1062
+ #
1063
+ mb_check = []
1064
+ #
1065
+ for kmb,mb in enumerate(micro_mbs):
1066
+ #
1067
+ print('mb:',mb,kmb)
1068
+ #
1069
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
1070
+ #
1071
+ print('models:',models)
1072
+ #
1073
+ if mb == 'VAR':
1074
+ models.remove('1998-VAR-AM-APR-fit')
1075
+ models_lower.remove('1998-var-am-apr-fit')
1076
+ #
1077
+ for model in models:
1078
+ #
1079
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
1080
+ if nuda.env.verb_output: micro.print_outputs( )
1081
+ #
1082
+ check = nuda.matter.setupCheck( eos = micro, band = band )
1083
+ #
1084
+ if check.isInside:
1085
+ lstyle = 'solid'
1086
+ else:
1087
+ lstyle = 'dashed'
1088
+ #continue
1089
+ #
1090
+ #
1091
+ if micro.pre_tot is not None:
1092
+ print('model:',model)
1093
+ if mb in mb_check:
1094
+ axs[0].plot( micro.eps_tot, micro.pre_tot, marker='o', linestyle=micro.linestyle, markevery=micro.every, color=nuda.param.col[kmb] )
1095
+ else:
1096
+ mb_check.append(mb)
1097
+ axs[0].plot( micro.eps_tot, micro.pre_tot, marker='o', linestyle=micro.linestyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
1098
+ # end of model
1099
+ # end of mb
1100
+ #
1101
+ axs[0].errorbar( p_den, p_cen, yerr=p_std, color='k', linewidth = 3 )
1102
+ axs[0].errorbar( p_den+5.0, p_micro_cen, yerr=p_micro_std, color='r', linewidth = 3 )
1103
+ axs[0].text(10,20,'microscopic models',fontsize='10')
1104
+ #
1105
+ model_check = []
1106
+ #
1107
+ for kmodel,model in enumerate(pheno_models):
1108
+ #
1109
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
1110
+ #
1111
+ for param in params:
1112
+ #
1113
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
1114
+ if nuda.env.verb_output: pheno.print_outputs( )
1115
+ #
1116
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
1117
+ #
1118
+ if check.isInside:
1119
+ lstyle = 'solid'
1120
+ else:
1121
+ lstyle = 'dashed'
1122
+ #continue
1123
+ #
1124
+ if pheno.pre_tot is not None:
1125
+ print('model:',model,' param:',param)
1126
+ if model in model_check:
1127
+ axs[1].plot( pheno.eps_tot, pheno.pre_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
1128
+ else:
1129
+ model_check.append(model)
1130
+ axs[1].plot( pheno.eps_tot, pheno.pre_tot, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
1131
+ # end of param
1132
+ # end of model
1133
+ #
1134
+ axs[1].errorbar( p_den, p_cen, yerr=p_std, color='k', linewidth = 3 )
1135
+ axs[1].errorbar( p_den+5.0, p_pheno_cen, yerr=p_pheno_std, color='r', linewidth = 3 )
1136
+ axs[1].text(10,20,'phenomenological models',fontsize='10')
1137
+ #
1138
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
1139
+ #
1140
+ if pname is not None:
1141
+ plt.savefig(pname, dpi=200)
1142
+ plt.close()
1143
+
1144
+ def eos_setupAMBeq_xp_fig( pname, micro_mbs, pheno_models, band ):
1145
+ """
1146
+ Plot nuclear chart (N versus Z).\
1147
+ The plot is 1x2 with:\
1148
+ [0]: nuclear chart.
1149
+
1150
+ :param pname: name of the figure (*.png)
1151
+ :type pname: str.
1152
+ :param table: table.
1153
+ :type table: str.
1154
+ :param version: version of table to run on.
1155
+ :type version: str.
1156
+ :param theo_tables: object instantiated on the reference band.
1157
+ :type theo_tables: object.
1158
+
1159
+ """
1160
+ #
1161
+ print(f'Plot name: {pname}')
1162
+ #
1163
+ fig, axs = plt.subplots(1,2)
1164
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
1165
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
1166
+ #
1167
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
1168
+ axs[0].set_ylabel(r'proton fraction $x_p$',fontsize='14')
1169
+ axs[0].set_xlim([0, 0.33])
32
1170
  axs[0].set_ylim([0, 0.2])
33
1171
  #axs[0].set_tick_params('y', right=True)
34
1172
  #axs[0].set_tick_params('x', top=True)
35
1173
  #
36
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
1174
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
37
1175
  #axs[1].set_ylabel(r'proton fraction $x_p$')
38
- axs[1].set_xlim([0, 0.28])
1176
+ axs[1].set_xlim([0, 0.33])
39
1177
  axs[1].set_ylim([0, 0.2])
40
1178
  #setp(axs[1].get_yticklabels(), visible=False)
41
1179
  axs[1].tick_params('y', labelleft=False)
42
1180
  #
43
- for model in models_micro:
1181
+ mb_check = []
1182
+ #
1183
+ for kmb,mb in enumerate(micro_mbs):
1184
+ #
1185
+ print('mb:',mb,kmb)
44
1186
  #
45
- beta = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
46
- if nuda.env.verb_output: beta.print_outputs( )
1187
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
47
1188
  #
48
- if beta.esym is not None:
49
- print('model:',model)
50
- axs[0].plot( beta.den, beta.x_p, marker='o', linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1189
+ print('models:',models)
1190
+ #
1191
+ if mb == 'VAR':
1192
+ models.remove('1998-VAR-AM-APR-fit')
1193
+ models_lower.remove('1998-var-am-apr-fit')
1194
+ #
1195
+ for model in models:
1196
+ #
1197
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
1198
+ if nuda.env.verb_output: micro.print_outputs( )
1199
+ #
1200
+ check = nuda.matter.setupCheck( eos = micro, band = band )
1201
+ #
1202
+ if check.isInside:
1203
+ lstyle = 'solid'
1204
+ else:
1205
+ lstyle = 'dashed'
1206
+ #continue
1207
+ #
1208
+ if micro.x_p is not None:
1209
+ print('model:',model)
1210
+ if mb in mb_check:
1211
+ axs[0].plot( micro.den, micro.x_p, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
1212
+ else:
1213
+ mb_check.append(mb)
1214
+ axs[0].plot( micro.den, micro.x_p, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
1215
+ # end of model
1216
+ # end of mb
1217
+ #
51
1218
  axs[0].text(0.02,0.18,'microscopic models',fontsize='10')
52
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
53
1219
  #
54
- for model in models_pheno:
1220
+ model_check = []
1221
+ #
1222
+ for kmodel,model in enumerate(pheno_models):
55
1223
  #
56
1224
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
57
1225
  #
58
1226
  for param in params:
59
1227
  #
60
- beta = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
61
- if beta.esym is not None:
1228
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
1229
+ #
1230
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
1231
+ #
1232
+ if check.isInside:
1233
+ lstyle = 'solid'
1234
+ else:
1235
+ lstyle = 'dashed'
1236
+ #continue
1237
+ #
1238
+ if pheno.x_p is not None:
62
1239
  print('model:',model,' param:',param)
63
- #beta.label=None
64
- axs[1].plot( beta.den, beta.x_p, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1240
+ if model in model_check:
1241
+ axs[1].plot( pheno.den, pheno.x_p, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
1242
+ else:
1243
+ model_check.append(model)
1244
+ axs[1].plot( pheno.den, pheno.x_p, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
65
1245
  if nuda.env.verb_output: pheno.print_outputs( )
1246
+ # end of param
1247
+ # end of model
66
1248
  #
67
- #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 )
68
- #axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
69
- #axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
70
1249
  axs[1].text(0.02,0.18,'phenomenological models',fontsize='10')
71
- #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
72
- #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
1250
+ #
1251
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
73
1252
  #
74
1253
  if pname is not None:
75
1254
  plt.savefig(pname, dpi=200)
76
1255
  plt.close()
77
1256
 
78
- def eos_setupAMBeq_xe_fig( pname, models_micro, models_pheno ):
1257
+ def eos_setupAMBeq_xe_fig( pname, micro_mbs, pheno_models, band ):
79
1258
  """
80
1259
  Plot nuclear chart (N versus Z).\
81
1260
  The plot is 1x2 with:\
@@ -96,50 +1275,98 @@ def eos_setupAMBeq_xe_fig( pname, models_micro, models_pheno ):
96
1275
  #
97
1276
  fig, axs = plt.subplots(1,2)
98
1277
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
99
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.05, hspace=0.3 )
1278
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
100
1279
  #
101
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
102
- axs[0].set_ylabel(r'electron fraction $x_e$')
103
- axs[0].set_xlim([0, 0.28])
1280
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
1281
+ axs[0].set_ylabel(r'electron fraction $x_e$',fontsize='14')
1282
+ axs[0].set_xlim([0, 0.33])
104
1283
  axs[0].set_ylim([0, 0.2])
105
1284
  #
106
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
1285
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
107
1286
  #axs[1].set_ylabel(r'electron fraction $x_e$')
108
- axs[1].set_xlim([0, 0.28])
1287
+ axs[1].set_xlim([0, 0.33])
109
1288
  axs[1].set_ylim([0, 0.2])
110
1289
  axs[1].tick_params('y', labelleft=False)
111
1290
  #
112
- for model in models_micro:
1291
+ mb_check = []
1292
+ #
1293
+ for kmb,mb in enumerate(micro_mbs):
1294
+ #
1295
+ print('mb:',mb,kmb)
1296
+ #
1297
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
1298
+ #
1299
+ print('models:',models)
113
1300
  #
114
- beta = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
115
- if nuda.env.verb_output: beta.print_outputs( )
1301
+ if mb == 'VAR':
1302
+ models.remove('1998-VAR-AM-APR-fit')
1303
+ models_lower.remove('1998-var-am-apr-fit')
116
1304
  #
117
- if beta.esym is not None:
118
- print('model:',model)
119
- axs[0].plot( beta.den, beta.x_el, marker='o', linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1305
+ for model in models:
1306
+ #
1307
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
1308
+ if nuda.env.verb_output: micro.print_outputs( )
1309
+ #
1310
+ check = nuda.matter.setupCheck( eos = micro, band = band )
1311
+ #
1312
+ if check.isInside:
1313
+ lstyle = 'solid'
1314
+ else:
1315
+ lstyle = 'dashed'
1316
+ #continue
1317
+ #
1318
+ #
1319
+ if micro.x_el is not None:
1320
+ print('model:',model)
1321
+ if mb in mb_check:
1322
+ axs[0].plot( micro.den, micro.x_el, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
1323
+ else:
1324
+ mb_check.append(mb)
1325
+ axs[0].plot( micro.den, micro.x_el, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
1326
+ # end of model
1327
+ # end of mb
1328
+ #
120
1329
  axs[0].text(0.02,0.18,'microscopic models',fontsize='10')
121
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
122
1330
  #
123
- for model in models_pheno:
1331
+ model_check = []
1332
+ #
1333
+ for kmodel,model in enumerate(pheno_models):
124
1334
  #
125
1335
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
126
1336
  #
127
1337
  for param in params:
128
1338
  #
129
- beta = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
130
- if beta.esym is not None:
131
- print('model:',model,' param:',param)
132
- #beta.label=None
133
- axs[1].plot( beta.den, beta.x_el, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1339
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
134
1340
  if nuda.env.verb_output: pheno.print_outputs( )
1341
+ #
1342
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
1343
+ #
1344
+ if check.isInside:
1345
+ lstyle = 'solid'
1346
+ else:
1347
+ lstyle = 'dashed'
1348
+ #continue
1349
+ #
1350
+ if pheno.x_el is not None:
1351
+ print('model:',model,' param:',param)
1352
+ #micro.label=None
1353
+ if model in model_check:
1354
+ axs[1].plot( pheno.den, pheno.x_el, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
1355
+ else:
1356
+ model_check.append(model)
1357
+ axs[1].plot( pheno.den, pheno.x_el, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
1358
+ # end of param
1359
+ # end of model
135
1360
  #
136
1361
  axs[1].text(0.02,0.18,'phenomenological models',fontsize='10')
137
1362
  #
1363
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
1364
+ #
138
1365
  if pname is not None:
139
1366
  plt.savefig(pname, dpi=200)
140
1367
  plt.close()
141
1368
 
142
- def eos_setupAMBeq_xmu_fig( pname, models_micro, models_pheno ):
1369
+ def eos_setupAMBeq_xmu_fig( pname, micro_mbs, pheno_models, band ):
143
1370
  """
144
1371
  Plot nuclear chart (N versus Z).\
145
1372
  The plot is 1x2 with:\
@@ -160,45 +1387,92 @@ def eos_setupAMBeq_xmu_fig( pname, models_micro, models_pheno ):
160
1387
  #
161
1388
  fig, axs = plt.subplots(1,2)
162
1389
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
163
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.05, hspace=0.3 )
1390
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
164
1391
  #
165
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
166
- axs[0].set_ylabel(r'muon fraction $x_\mu$')
167
- axs[0].set_xlim([0, 0.28])
1392
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
1393
+ axs[0].set_ylabel(r'muon fraction $x_\mu$',fontsize='14')
1394
+ axs[0].set_xlim([0, 0.33])
168
1395
  axs[0].set_ylim([0, 0.2])
169
1396
  #
170
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
1397
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
171
1398
  #axs[1].set_ylabel(r'muon fraction $x_\mu$')
172
- axs[1].set_xlim([0, 0.28])
1399
+ axs[1].set_xlim([0, 0.33])
173
1400
  axs[1].set_ylim([0, 0.2])
174
1401
  axs[1].tick_params('y', labelleft=False)
175
1402
  #
176
- for model in models_micro:
1403
+ mb_check = []
1404
+ #
1405
+ for kmb,mb in enumerate(micro_mbs):
1406
+ #
1407
+ print('mb:',mb,kmb)
1408
+ #
1409
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
177
1410
  #
178
- beta = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
179
- if nuda.env.verb_output: beta.print_outputs( )
1411
+ print('models:',models)
180
1412
  #
181
- if beta.esym is not None:
182
- print('model:',model)
183
- axs[0].plot( beta.den, beta.x_mu, marker='o', linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1413
+ if mb == 'VAR':
1414
+ models.remove('1998-VAR-AM-APR-fit')
1415
+ models_lower.remove('1998-var-am-apr-fit')
1416
+ #
1417
+ for model in models:
1418
+ #
1419
+ micro = nuda.eos.setupAMBeq( model = model, kind = 'micro' )
1420
+ if nuda.env.verb_output: micro.print_outputs( )
1421
+ #
1422
+ check = nuda.matter.setupCheck( eos = micro, band = band )
1423
+ #
1424
+ if check.isInside:
1425
+ lstyle = 'solid'
1426
+ else:
1427
+ lstyle = 'dashed'
1428
+ #continue
1429
+ #
1430
+ if micro.x_mu is not None:
1431
+ print('model:',model)
1432
+ if mb in mb_check:
1433
+ axs[0].plot( micro.den, micro.x_mu, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
1434
+ else:
1435
+ mb_check.append(mb)
1436
+ axs[0].plot( micro.den, micro.x_mu, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
1437
+ # end of model
1438
+ # end of mb
1439
+ #
184
1440
  axs[0].text(0.02,0.18,'microscopic models',fontsize='10')
185
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
186
1441
  #
187
- for model in models_pheno:
1442
+ model_check = []
1443
+ #
1444
+ for kmodel,model in enumerate(pheno_models):
188
1445
  #
189
1446
  params, params_lower = nuda.matter.pheno_esym_params( model = model )
190
1447
  #
191
1448
  for param in params:
192
1449
  #
193
- beta = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
194
- if beta.esym is not None:
1450
+ pheno = nuda.eos.setupAMBeq( model = model, param = param, kind = 'pheno' )
1451
+ #
1452
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
1453
+ #
1454
+ if check.isInside:
1455
+ lstyle = 'solid'
1456
+ else:
1457
+ lstyle = 'dashed'
1458
+ #continue
1459
+ #
1460
+ if pheno.x_mu is not None:
195
1461
  print('model:',model,' param:',param)
196
- #beta.label=None
197
- axs[1].plot( beta.den, beta.x_mu, linestyle=beta.linestyle, label=beta.label, markevery=beta.every )
1462
+ if model in model_check:
1463
+ axs[1].plot( pheno.den, pheno.x_mu, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
1464
+ else:
1465
+ model_check.append(model)
1466
+ axs[1].plot( pheno.den, pheno.x_mu, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
198
1467
  if nuda.env.verb_output: pheno.print_outputs( )
1468
+ # end of param
1469
+ # end of model
199
1470
  #
200
1471
  axs[1].text(0.02,0.18,'phenomenological models',fontsize='10')
201
1472
  #
1473
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
1474
+ #
202
1475
  if pname is not None:
203
1476
  plt.savefig(pname, dpi=200)
204
- plt.close()
1477
+ plt.close()
1478
+ #