nucleardatapy 0.2.1__py3-none-any.whl → 1.0.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 (172) hide show
  1. nucleardatapy/__init__.py +3 -1
  2. nucleardatapy/astro/setup_gw.py +18 -18
  3. nucleardatapy/astro/setup_mr.py +123 -33
  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/create_folder.py +2 -2
  9. nucleardatapy/crust/setup_crust.py +364 -126
  10. nucleardatapy/data/astro/HESS/J1731-347.dat +4 -0
  11. nucleardatapy/data/astro/NICER/J0030+0451.dat +6 -6
  12. nucleardatapy/data/astro/NICER/J0437-4715.dat +4 -3
  13. nucleardatapy/data/astro/NICER/J0614-3329.dat +4 -0
  14. nucleardatapy/data/astro/NICER/J0740+6620.dat +5 -4
  15. nucleardatapy/data/hnuclei/1991-2L-Yamamoto.csv +6 -0
  16. nucleardatapy/data/hnuclei/2013-2L-Ahn.csv +1 -1
  17. nucleardatapy/data/hnuclei/2019-2L-Ekawa.csv +7 -0
  18. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-E2A-NM.dat +8 -8
  19. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-414-E2A.dat +21 -0
  20. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-414-TD.dat +22 -0
  21. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-450-E2A.dat +20 -0
  22. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-450-TD.dat +22 -0
  23. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-500-E2A.dat +23 -0
  24. nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-500-TD.dat +22 -0
  25. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-414-E2A.dat +15 -0
  26. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-414-TD.dat +21 -0
  27. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-450-E2A.dat +15 -0
  28. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-450-TD.dat +21 -0
  29. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-500-E2A.dat +20 -0
  30. nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-500-TD.dat +20 -0
  31. nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLO450.dat +28 -0
  32. nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLO500.dat +28 -0
  33. nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLOgo394.dat +28 -0
  34. nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLOgo450.dat +28 -0
  35. nucleardatapy/data/matter/micro/2024-ABI-NM-NNLOsat.dat +28 -0
  36. nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLO450.dat +28 -0
  37. nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLO500.dat +28 -0
  38. nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLOgo394.dat +28 -0
  39. nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLOgo450.dat +28 -0
  40. nucleardatapy/data/matter/micro/2024-ABI-SM-NNLOsat.dat +28 -0
  41. nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
  42. nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
  43. nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
  44. nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
  45. nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
  46. nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
  47. nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
  48. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
  49. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
  50. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
  51. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
  52. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
  53. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
  54. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
  55. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
  56. nucleardatapy/env.py +1 -1
  57. nucleardatapy/eos/__init__.py +4 -3
  58. nucleardatapy/eos/setupCC.py +429 -0
  59. nucleardatapy/eos/setup_am.py +39 -14
  60. nucleardatapy/eos/setup_am_Beq.py +40 -15
  61. nucleardatapy/eos/setup_am_Leq.py +40 -15
  62. nucleardatapy/fig/__init__.py +24 -15
  63. nucleardatapy/fig/astro_setupGW_fig.py +9 -7
  64. nucleardatapy/fig/astro_setupMR_fig.py +26 -18
  65. nucleardatapy/fig/astro_setupMasses_fig.py +8 -6
  66. nucleardatapy/fig/astro_setupMtov_fig.py +10 -6
  67. nucleardatapy/fig/astro_setupMup_fig.py +9 -7
  68. nucleardatapy/fig/corr_setupEsymDen_fig.py +22 -9
  69. nucleardatapy/fig/corr_setupEsymLsym_fig.py +25 -8
  70. nucleardatapy/fig/corr_setupKsatQsat_fig.py +23 -17
  71. nucleardatapy/fig/crust_setupCrust_fig.py +11 -9
  72. nucleardatapy/fig/eos_setupAMBeq_fig.py +641 -156
  73. nucleardatapy/fig/eos_setupAMLeq_fig.py +53 -50
  74. nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +373 -0
  75. nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +346 -0
  76. nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +352 -0
  77. nucleardatapy/fig/eos_setupAM_fig.py +519 -0
  78. nucleardatapy/fig/eos_setupCC_fig.py +270 -0
  79. nucleardatapy/fig/hnuc_setupChart_fig.py +19 -16
  80. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +15 -5
  81. nucleardatapy/fig/matter_all_fig.py +971 -0
  82. nucleardatapy/fig/matter_setupCheck_fig.py +106 -0
  83. nucleardatapy/fig/matter_setupFFGLep_fig.py +74 -0
  84. nucleardatapy/fig/matter_setupFFGNuc_fig.py +286 -115
  85. nucleardatapy/fig/matter_setupHIC_fig.py +107 -67
  86. nucleardatapy/fig/matter_setupMicroEsym_fig.py +259 -73
  87. nucleardatapy/fig/matter_setupMicro_LP_fig.py +185 -82
  88. nucleardatapy/fig/matter_setupMicro_band_fig.py +126 -53
  89. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +253 -77
  90. nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +45 -20
  91. nucleardatapy/fig/matter_setupMicro_fig.py +317 -77
  92. nucleardatapy/fig/matter_setupMicro_gap_fig.py +237 -100
  93. nucleardatapy/fig/matter_setupNEPStats_fig.py +106 -0
  94. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +204 -65
  95. nucleardatapy/fig/matter_setupPheno_fig.py +395 -93
  96. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +93 -73
  97. nucleardatapy/fig/nuc_setupBEExp_fig.py +97 -87
  98. nucleardatapy/fig/nuc_setupBETheo_fig.py +114 -81
  99. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +12 -15
  100. nucleardatapy/fig/nuc_setupRchExp_fig.py +14 -22
  101. nucleardatapy/fig/nuc_setupRchTheo_fig.py +37 -40
  102. nucleardatapy/fig/nuc_setupRnpExp_fig.py +86 -106
  103. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +105 -94
  104. nucleardatapy/hello.py +6 -0
  105. nucleardatapy/hnuc/setup_re1L_exp.py +6 -6
  106. nucleardatapy/hnuc/setup_re1Xi_exp.py +5 -5
  107. nucleardatapy/hnuc/setup_re2L_exp.py +36 -13
  108. nucleardatapy/matter/__init__.py +14 -14
  109. nucleardatapy/matter/setup_check.py +6 -6
  110. nucleardatapy/matter/setup_ffg.py +66 -39
  111. nucleardatapy/matter/setup_hic.py +91 -74
  112. nucleardatapy/matter/setup_micro.py +2033 -1007
  113. nucleardatapy/matter/setup_micro_band.py +6 -6
  114. nucleardatapy/matter/setup_micro_esym.py +56 -54
  115. nucleardatapy/matter/setup_micro_gap.py +24 -17
  116. nucleardatapy/matter/setup_micro_lp.py +2 -2
  117. nucleardatapy/matter/setup_nep.py +175 -92
  118. nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
  119. nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
  120. nucleardatapy/matter/setup_pheno.py +129 -49
  121. nucleardatapy/matter/setup_pheno_esym.py +22 -19
  122. nucleardatapy/nuc/setup_be_exp.py +306 -292
  123. nucleardatapy/nuc/setup_be_theo.py +288 -105
  124. nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
  125. nucleardatapy/nuc/setup_rnp_exp.py +1 -0
  126. nucleardatapy/nuc/setup_rnp_theo.py +2 -1
  127. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/METADATA +48 -16
  128. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/RECORD +157 -124
  129. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/WHEEL +1 -1
  130. tests/test_corr_setupKsatQsat.py +3 -1
  131. tests/test_matter_setupMicro.py +37 -10
  132. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
  133. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
  134. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
  135. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
  136. nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +0 -125
  137. nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +0 -115
  138. nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +0 -117
  139. nucleardatapy/fig/eos_setupAM_e_fig.py +0 -173
  140. nucleardatapy/fig/matter_ENM_fig.py +0 -128
  141. nucleardatapy/fig/matter_ESM_fig.py +0 -140
  142. nucleardatapy/fig/matter_Esym_fig.py +0 -134
  143. nucleardatapy/fig/matter_cs2_fig.py +0 -83
  144. nucleardatapy/fig/matter_preNM_fig.py +0 -146
  145. nucleardatapy/fig/matter_preSM_fig.py +0 -144
  146. nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
  147. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
  148. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
  149. /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
  150. /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
  151. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
  152. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
  153. /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
  154. /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
  155. /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
  156. /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
  157. /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
  158. /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
  159. /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
  160. /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
  161. /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
  162. /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
  163. /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
  164. /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
  165. /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
  166. /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
  167. /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
  168. /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
  169. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
  170. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
  171. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/licenses/LICENSE +0 -0
  172. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,519 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e2a_fig( pname, micro_mbs, pheno_models, band ):
7
+ """
8
+ Plot the nucleon, lepton and total (nucleon+leptonic) contribution to the energy per nucleon in asymmetric matter.
9
+
10
+ The plot is 2x3 with:
11
+
12
+ [0,0]: microscopic models (nucleon). [0,1]: phenomenologic models (nucleon).
13
+
14
+ [1,0]: microscopic models (lepton). [1,1]: phenomenologic models (lepton).
15
+
16
+ [2,0]: microscopic models (total). [2,1]: phenomenologic models (total).
17
+
18
+ :param pname: name of the figure (*.png)
19
+ :type pname: str.
20
+ :param micro_mbs: array with names of many-body framework for microscopic interactions.
21
+ :type micro_mbs: array of str.
22
+ :param pheno_models: array of interaction names for phenomenologic interactions.
23
+ :type pheno_models: array of str.
24
+ :param band: object instantiated on the reference band.
25
+ :type band: object.
26
+ """
27
+ #
28
+ print(f'Plot name: {pname}')
29
+ #
30
+ fig, axs = plt.subplots(3,2)
31
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.9, wspace=0.05, hspace=0.05 )
32
+ #
33
+ #axs[0,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
34
+ axs[0,0].set_ylabel(r'$e_\text{lep}^\text{int}$ (MeV)',fontsize='14')
35
+ axs[0,0].set_xlim([0, 0.33])
36
+ axs[0,0].set_ylim([-2, 38])
37
+ axs[0,0].tick_params('x', labelbottom=False)
38
+ #
39
+ #axs[0,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
40
+ axs[0,1].set_xlim([0, 0.33])
41
+ axs[0,1].set_ylim([-2, 38])
42
+ axs[0,1].tick_params('y', labelleft=False)
43
+ axs[0,1].tick_params('x', labelbottom=False)
44
+ #
45
+ #axs[1,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
46
+ axs[1,0].set_ylabel(r'$e_\text{nuc}^\text{int}$ (MeV)',fontsize='14')
47
+ axs[1,0].set_xlim([0, 0.33])
48
+ axs[1,0].set_ylim([-10, 30])
49
+ axs[1,0].tick_params('x', labelbottom=False)
50
+ #
51
+ #axs[1,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
52
+ axs[1,1].set_xlim([0, 0.33])
53
+ axs[1,1].set_ylim([-10, 30])
54
+ axs[1,1].tick_params('y', labelleft=False)
55
+ axs[1,1].tick_params('x', labelbottom=False)
56
+ #
57
+ axs[2,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
58
+ axs[2,0].set_ylabel(r'$e_\text{tot}^\text{int}$ (MeV)',fontsize='14')
59
+ axs[2,0].set_xlim([0, 0.33])
60
+ axs[2,0].set_ylim([-2, 38])
61
+ #
62
+ axs[2,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
63
+ axs[2,1].set_xlim([0, 0.33])
64
+ axs[2,1].set_ylim([-2, 38])
65
+ axs[2,1].tick_params('y', labelleft=False)
66
+ #
67
+ # fix the asymmetry parameters
68
+ #
69
+ asys = [ 0.6, 0.8 ]
70
+ #
71
+ mb_check = []
72
+ model_check = []
73
+ #
74
+ for asy in asys:
75
+ #
76
+ print('asy:',asy)
77
+ #
78
+ for kmb,mb in enumerate(micro_mbs):
79
+ #
80
+ print('mb:',mb,kmb)
81
+ #
82
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
83
+ #models, models_lower = nuda.matter.micro_models_mb( mb )
84
+ #
85
+ print('models:',models)
86
+ #
87
+ if mb == 'VAR':
88
+ models.remove('1998-VAR-AM-APR-fit')
89
+ models_lower.remove('1998-var-am-apr-fit')
90
+ #
91
+ for model in models:
92
+ #
93
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
94
+ if nuda.env.verb_output: micro.print_outputs( )
95
+ #
96
+ check = nuda.matter.setupCheck( eos = micro, band = band )
97
+ #
98
+ if check.isInside:
99
+ lstyle = 'solid'
100
+ else:
101
+ lstyle = 'dashed'
102
+ continue
103
+ #
104
+ if micro.e2a_lep is not None:
105
+ if mb in mb_check:
106
+ print('model:',model)
107
+ print('den:',micro.den)
108
+ print('e2a_lep:',micro.e2a_lep)
109
+ axs[0,0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
110
+ axs[1,0].plot( micro.den, micro.e2a_int_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
111
+ axs[2,0].plot( micro.den, micro.e2a_int_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
112
+ else:
113
+ mb_check.append(mb)
114
+ print('mb:',mb)
115
+ print('model:',model)
116
+ print('den:',micro.den)
117
+ print('e2a_lep:',micro.e2a_lep)
118
+ axs[0,0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
119
+ axs[1,0].plot( micro.den, micro.e2a_int_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
120
+ axs[2,0].plot( micro.den, micro.e2a_int_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
121
+ # end of model
122
+ # end of mb
123
+ #
124
+ for kmodel,model in enumerate(pheno_models):
125
+ #
126
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
127
+ #
128
+ for param in params:
129
+ #
130
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
131
+ if nuda.env.verb_output: pheno.print_outputs( )
132
+ #
133
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
134
+ #
135
+ if check.isInside:
136
+ lstyle = 'solid'
137
+ else:
138
+ lstyle = 'dashed'
139
+ continue
140
+ #
141
+ if pheno.e2a_lep is not None:
142
+ print('model:',model,' param:',param)
143
+ if model in model_check:
144
+ axs[0,1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
145
+ axs[1,1].plot( pheno.den, pheno.e2a_int_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
146
+ axs[2,1].plot( pheno.den, pheno.e2a_int_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
147
+ else:
148
+ model_check.append(model)
149
+ axs[0,1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
150
+ axs[1,1].plot( pheno.den, pheno.e2a_int_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
151
+ axs[2,1].plot( pheno.den, pheno.e2a_int_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
152
+ # end of param
153
+ # end of model
154
+ #
155
+ axs[0,0].text(0.02,0,'microscopic models',fontsize='10')
156
+ axs[0,1].text(0.02,0,'phenomenological models',fontsize='10')
157
+ #
158
+ axs[0,0].text(0.1,30,r'$\delta=0.6$',fontsize='10')
159
+ axs[0,1].text(0.1,30,r'$\delta=0.6$',fontsize='10')
160
+ axs[0,0].text(0.1,13,r'$\delta=0.8$',fontsize='10')
161
+ axs[0,1].text(0.1,13,r'$\delta=0.8$',fontsize='10')
162
+ #
163
+ axs[1,0].text(0.1,-2,r'$\delta=0.6$',fontsize='10')
164
+ axs[1,1].text(0.1,-2,r'$\delta=0.6$',fontsize='10')
165
+ axs[1,0].text(0.1,7,r'$\delta=0.8$',fontsize='10')
166
+ axs[1,1].text(0.1,7,r'$\delta=0.8$',fontsize='10')
167
+ #
168
+ axs[2,0].text(0.1,27,r'$\delta=0.6$',fontsize='10')
169
+ axs[2,1].text(0.1,27,r'$\delta=0.6$',fontsize='10')
170
+ axs[2,0].text(0.1,15,r'$\delta=0.8$',fontsize='10')
171
+ axs[2,1].text(0.1,15,r'$\delta=0.8$',fontsize='10')
172
+ #
173
+ fig.legend(loc='upper left',bbox_to_anchor=(0.1,1.0),columnspacing=2,fontsize='8',ncol=6,frameon=False)
174
+ #
175
+ if pname is not None:
176
+ plt.savefig(pname, dpi=200)
177
+ plt.close()
178
+ #
179
+
180
+ def eos_setupAM_pre_fig( pname, micro_mbs, pheno_models, band ):
181
+ """
182
+ Plot the nucleon, lepton and total (nucleon+leptonic) contribution to the pressure in asymmetric matter.
183
+
184
+ The plot is 2x3 with:
185
+
186
+ [0,0]: microscopic models (nucleon). [0,1]: phenomenologic models (nucleon).
187
+
188
+ [1,0]: microscopic models (lepton). [1,1]: phenomenologic models (lepton).
189
+
190
+ [2,0]: microscopic models (total). [2,1]: phenomenologic models (total).
191
+
192
+ :param pname: name of the figure (*.png)
193
+ :type pname: str.
194
+ :param micro_mbs: array with names of many-body framework for microscopic interactions.
195
+ :type micro_mbs: array of str.
196
+ :param pheno_models: array of interaction names for phenomenologic interactions.
197
+ :type pheno_models: array of str.
198
+ :param band: object instantiated on the reference band.
199
+ :type band: object.
200
+ """
201
+ #
202
+ print(f'Plot name: {pname}')
203
+ #
204
+ fig, axs = plt.subplots(3,2)
205
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.9, wspace=0.05, hspace=0.05 )
206
+ #
207
+ #axs[0,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
208
+ axs[0,0].set_ylabel(r'$p_\text{lep}$ (MeV fm$^{-3}$)',fontsize='14')
209
+ axs[0,0].set_xlim([0, 0.33])
210
+ axs[0,0].set_ylim([-1, 4])
211
+ axs[0,0].tick_params('x', labelbottom=False)
212
+ #
213
+ #axs[0,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
214
+ axs[0,1].set_xlim([0, 0.33])
215
+ axs[0,1].set_ylim([-1, 4])
216
+ axs[0,1].tick_params('y', labelleft=False)
217
+ axs[0,1].tick_params('x', labelbottom=False)
218
+ #
219
+ #axs[1,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
220
+ axs[1,0].set_ylabel(r'$p_\text{nuc}$ (MeV fm$^{-3}$)',fontsize='14')
221
+ axs[1,0].set_xlim([0, 0.33])
222
+ axs[1,0].set_ylim([-2, 15])
223
+ axs[1,0].tick_params('x', labelbottom=False)
224
+ #
225
+ #axs[1,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
226
+ axs[1,1].set_xlim([0, 0.33])
227
+ axs[1,1].set_ylim([-2, 15])
228
+ axs[1,1].tick_params('y', labelleft=False)
229
+ axs[1,1].tick_params('x', labelbottom=False)
230
+ #
231
+ axs[2,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
232
+ axs[2,0].set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
233
+ axs[2,0].set_xlim([0, 0.33])
234
+ axs[2,0].set_ylim([-2, 15])
235
+ #
236
+ axs[2,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
237
+ axs[2,1].set_xlim([0, 0.33])
238
+ axs[2,1].set_ylim([-2, 15])
239
+ axs[2,1].tick_params('y', labelleft=False)
240
+ #
241
+ # fix the asymmetry parameters
242
+ #
243
+ asys = [ 0.6, 0.8 ]
244
+ #
245
+ mb_check = []
246
+ model_check = []
247
+ #
248
+ for asy in asys:
249
+ #
250
+ print('asy:',asy)
251
+ #
252
+ for kmb,mb in enumerate(micro_mbs):
253
+ #
254
+ print('mb:',mb,kmb)
255
+ #
256
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
257
+ #models, models_lower = nuda.matter.micro_models_mb( mb )
258
+ #
259
+ print('models:',models)
260
+ #
261
+ if mb == 'VAR':
262
+ models.remove('1998-VAR-AM-APR-fit')
263
+ models_lower.remove('1998-var-am-apr-fit')
264
+ #
265
+ for model in models:
266
+ #
267
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
268
+ if nuda.env.verb_output: micro.print_outputs( )
269
+ #
270
+ check = nuda.matter.setupCheck( eos = micro, band = band )
271
+ #
272
+ if check.isInside:
273
+ lstyle = 'solid'
274
+ else:
275
+ lstyle = 'dashed'
276
+ continue
277
+ #
278
+ if micro.pre_lep is not None:
279
+ if mb in mb_check:
280
+ print('model:',model)
281
+ print('den:',micro.den)
282
+ print('pre_lep:',micro.pre_lep)
283
+ axs[0,0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
284
+ axs[1,0].plot( micro.den, micro.pre_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
285
+ axs[2,0].plot( micro.den, micro.pre_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
286
+ else:
287
+ mb_check.append(mb)
288
+ print('mb:',mb)
289
+ print('model:',model)
290
+ print('den:',micro.den)
291
+ print('e2a_lep:',micro.e2a_lep)
292
+ axs[0,0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
293
+ axs[1,0].plot( micro.den, micro.pre_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
294
+ axs[2,0].plot( micro.den, micro.pre_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
295
+ # end of model
296
+ # end of mb
297
+ #
298
+ for kmodel,model in enumerate(pheno_models):
299
+ #
300
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
301
+ #
302
+ for param in params:
303
+ #
304
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
305
+ if nuda.env.verb_output: pheno.print_outputs( )
306
+ #
307
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
308
+ #
309
+ if check.isInside:
310
+ lstyle = 'solid'
311
+ else:
312
+ lstyle = 'dashed'
313
+ continue
314
+ #
315
+ if pheno.pre_lep is not None:
316
+ print('model:',model,' param:',param)
317
+ if model in model_check:
318
+ axs[0,1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
319
+ axs[1,1].plot( pheno.den, pheno.pre_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
320
+ axs[2,1].plot( pheno.den, pheno.pre_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
321
+ else:
322
+ model_check.append(model)
323
+ axs[0,1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
324
+ axs[1,1].plot( pheno.den, pheno.pre_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
325
+ axs[2,1].plot( pheno.den, pheno.pre_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
326
+ # end of param
327
+ # end of model
328
+ #
329
+ axs[0,0].text(0.02,3.5,'microscopic models',fontsize='10')
330
+ axs[0,1].text(0.02,3.5,'phenomenological models',fontsize='10')
331
+ #
332
+ axs[0,0].text(0.1,2,r'$\delta=0.6$',fontsize='10')
333
+ axs[0,1].text(0.1,2,r'$\delta=0.6$',fontsize='10')
334
+ axs[0,0].text(0.1,-0.5,r'$\delta=0.8$',fontsize='10')
335
+ axs[0,1].text(0.1,-0.5,r'$\delta=0.8$',fontsize='10')
336
+ #
337
+ axs[1,0].text(0.1,-1.5,r'$\delta=0.6$',fontsize='10')
338
+ axs[1,1].text(0.1,-1.5,r'$\delta=0.6$',fontsize='10')
339
+ axs[1,0].text(0.1,3,r'$\delta=0.8$',fontsize='10')
340
+ axs[1,1].text(0.1,3,r'$\delta=0.8$',fontsize='10')
341
+ #
342
+ axs[2,0].text(0.1,3,r'$\delta=0.6$',fontsize='10')
343
+ axs[2,1].text(0.1,3,r'$\delta=0.6$',fontsize='10')
344
+ axs[2,0].text(0.1,-1,r'$\delta=0.8$',fontsize='10')
345
+ axs[2,1].text(0.1,-1,r'$\delta=0.8$',fontsize='10')
346
+ #
347
+ fig.legend(loc='upper left',bbox_to_anchor=(0.1,1.0),columnspacing=2,fontsize='8',ncol=6,frameon=False)
348
+ #
349
+ if pname is not None:
350
+ plt.savefig(pname, dpi=200)
351
+ plt.close()
352
+ #
353
+
354
+ def eos_setupAM_cs2_fig( pname, micro_mbs, pheno_models, band ):
355
+ """
356
+ Plot the nucleon, lepton and total (nucleon+leptonic) contribution to the square of the sound speed in asymmetric matter.
357
+
358
+ The plot is 2x3 with:
359
+
360
+ [0,0]: microscopic models (nucleon). [0,1]: phenomenologic models (nucleon).
361
+
362
+ [1,0]: microscopic models (lepton). [1,1]: phenomenologic models (lepton).
363
+
364
+ [2,0]: microscopic models (total). [2,1]: phenomenologic models (total).
365
+
366
+ :param pname: name of the figure (*.png)
367
+ :type pname: str.
368
+ :param micro_mbs: array with names of many-body framework for microscopic interactions.
369
+ :type micro_mbs: array of str.
370
+ :param pheno_models: array of interaction names for phenomenologic interactions.
371
+ :type pheno_models: array of str.
372
+ :param band: object instantiated on the reference band.
373
+ :type band: object.
374
+ """
375
+ #
376
+ print(f'Plot name: {pname}')
377
+ #
378
+ fig, axs = plt.subplots(3,2)
379
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.9, wspace=0.05, hspace=0.05 )
380
+ #
381
+ #axs[0,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
382
+ axs[0,0].set_ylabel(r'$c_\text{s,lep}^2/c^2$',fontsize='14')
383
+ axs[0,0].set_xlim([0, 0.33])
384
+ axs[0,0].set_ylim([0.2, 0.5])
385
+ axs[0,0].tick_params('x', labelbottom=False)
386
+ #
387
+ #axs[0,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
388
+ axs[0,1].set_xlim([0, 0.33])
389
+ axs[0,1].set_ylim([0.2, 0.5])
390
+ axs[0,1].tick_params('y', labelleft=False)
391
+ axs[0,1].tick_params('x', labelbottom=False)
392
+ #
393
+ #axs[1,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
394
+ axs[1,0].set_ylabel(r'$c_\text{s,nuc}^2/c^2$',fontsize='14')
395
+ axs[1,0].set_xlim([0, 0.33])
396
+ axs[1,0].set_ylim([-0.05, 0.25])
397
+ axs[1,0].tick_params('x', labelbottom=False)
398
+ #
399
+ #axs[1,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
400
+ axs[1,1].set_xlim([0, 0.33])
401
+ axs[1,1].set_ylim([-0.05, 0.25])
402
+ axs[1,1].tick_params('y', labelleft=False)
403
+ axs[1,1].tick_params('x', labelbottom=False)
404
+ #
405
+ axs[2,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
406
+ axs[2,0].set_ylabel(r'$c_\text{s,tot}^2/c^2$',fontsize='14')
407
+ axs[2,0].set_xlim([0, 0.33])
408
+ axs[2,0].set_ylim([-0.05, 0.25])
409
+ #
410
+ axs[2,1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
411
+ axs[2,1].set_xlim([0, 0.33])
412
+ axs[2,1].set_ylim([-0.05, 0.25])
413
+ axs[2,1].tick_params('y', labelleft=False)
414
+ #
415
+ # fix the asymmetry parameters
416
+ #
417
+ asys = [ 0.6, 0.8 ]
418
+ #
419
+ mb_check = []
420
+ model_check = []
421
+ #
422
+ for asy in asys:
423
+ #
424
+ print('asy:',asy)
425
+ #
426
+ for kmb,mb in enumerate(micro_mbs):
427
+ #
428
+ print('mb:',mb,kmb)
429
+ #
430
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
431
+ #models, models_lower = nuda.matter.micro_models_mb( mb )
432
+ #
433
+ print('models:',models)
434
+ #
435
+ if mb == 'VAR':
436
+ models.remove('1998-VAR-AM-APR-fit')
437
+ models_lower.remove('1998-var-am-apr-fit')
438
+ #
439
+ for model in models:
440
+ #
441
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
442
+ if nuda.env.verb_output: micro.print_outputs( )
443
+ #
444
+ check = nuda.matter.setupCheck( eos = micro, band = band )
445
+ #
446
+ if check.isInside:
447
+ lstyle = 'solid'
448
+ else:
449
+ lstyle = 'dashed'
450
+ continue
451
+ #
452
+ if micro.cs2_lep is not None:
453
+ if mb in mb_check:
454
+ axs[0,0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
455
+ axs[1,0].plot( micro.den, micro.cs2_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
456
+ axs[2,0].plot( micro.den, micro.cs2_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
457
+ else:
458
+ mb_check.append(mb)
459
+ axs[0,0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
460
+ axs[1,0].plot( micro.den, micro.cs2_nuc, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
461
+ axs[2,0].plot( micro.den, micro.cs2_tot, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
462
+ # end of model
463
+ # end of mb
464
+ #
465
+ for kmodel,model in enumerate(pheno_models):
466
+ #
467
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
468
+ #
469
+ for param in params:
470
+ #
471
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
472
+ if nuda.env.verb_output: pheno.print_outputs( )
473
+ #
474
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
475
+ #
476
+ if check.isInside:
477
+ lstyle = 'solid'
478
+ else:
479
+ lstyle = 'dashed'
480
+ continue
481
+ #
482
+ if pheno.cs2_lep is not None:
483
+ print('model:',model,' param:',param)
484
+ if model in model_check:
485
+ axs[0,1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
486
+ axs[1,1].plot( pheno.den, pheno.cs2_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
487
+ axs[2,1].plot( pheno.den, pheno.cs2_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
488
+ else:
489
+ model_check.append(model)
490
+ axs[0,1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
491
+ axs[1,1].plot( pheno.den, pheno.cs2_nuc, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
492
+ axs[2,1].plot( pheno.den, pheno.cs2_tot, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
493
+ # end of param
494
+ # end of model
495
+ #
496
+ axs[0,0].text(0.02,0.45,'microscopic models',fontsize='10')
497
+ axs[0,1].text(0.02,0.45,'phenomenological models',fontsize='10')
498
+ #
499
+ axs[0,0].text(0.1,0.4,r'$\delta=0.6$',fontsize='10')
500
+ axs[0,1].text(0.1,0.4,r'$\delta=0.6$',fontsize='10')
501
+ axs[0,0].text(0.1,0.3,r'$\delta=0.8$',fontsize='10')
502
+ axs[0,1].text(0.1,0.3,r'$\delta=0.8$',fontsize='10')
503
+ #
504
+ axs[1,0].text(0.1,0.2,r'$\delta=0.6$',fontsize='10')
505
+ axs[1,1].text(0.1,0.2,r'$\delta=0.6$',fontsize='10')
506
+ axs[1,0].text(0.1,0.15,r'$\delta=0.8$',fontsize='10')
507
+ axs[1,1].text(0.1,0.15,r'$\delta=0.8$',fontsize='10')
508
+ #
509
+ axs[2,0].text(0.1,0.2,r'$\delta=0.6$',fontsize='10')
510
+ axs[2,1].text(0.1,0.2,r'$\delta=0.6$',fontsize='10')
511
+ axs[2,0].text(0.1,0.15,r'$\delta=0.8$',fontsize='10')
512
+ axs[2,1].text(0.1,0.15,r'$\delta=0.8$',fontsize='10')
513
+ #
514
+ fig.legend(loc='upper left',bbox_to_anchor=(0.1,1.0),columnspacing=2,fontsize='8',ncol=6,frameon=False)
515
+ #
516
+ if pname is not None:
517
+ plt.savefig(pname, dpi=200)
518
+ plt.close()
519
+ #