nucleardatapy 0.2.1__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 (142) 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 +363 -125
  9. nucleardatapy/data/astro/NICER/J0740+6620.dat +1 -0
  10. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-E2A-NM.dat +8 -8
  11. nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
  12. nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
  13. nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
  14. nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
  15. nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
  16. nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
  17. nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
  18. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
  19. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
  20. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
  21. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
  22. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
  23. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
  24. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
  25. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
  26. nucleardatapy/env.py +1 -1
  27. nucleardatapy/eos/__init__.py +4 -3
  28. nucleardatapy/eos/setupCC.py +429 -0
  29. nucleardatapy/eos/setup_am.py +39 -14
  30. nucleardatapy/eos/setup_am_Beq.py +40 -15
  31. nucleardatapy/eos/setup_am_Leq.py +40 -15
  32. nucleardatapy/fig/__init__.py +24 -15
  33. nucleardatapy/fig/astro_setupGW_fig.py +5 -5
  34. nucleardatapy/fig/astro_setupMR_fig.py +12 -10
  35. nucleardatapy/fig/astro_setupMasses_fig.py +4 -4
  36. nucleardatapy/fig/astro_setupMtov_fig.py +4 -4
  37. nucleardatapy/fig/astro_setupMup_fig.py +5 -5
  38. nucleardatapy/fig/corr_setupEsymDen_fig.py +12 -5
  39. nucleardatapy/fig/corr_setupEsymLsym_fig.py +18 -5
  40. nucleardatapy/fig/corr_setupKsatQsat_fig.py +19 -15
  41. nucleardatapy/fig/crust_setupCrust_fig.py +5 -5
  42. nucleardatapy/fig/eos_setupAMBeq_fig.py +523 -66
  43. nucleardatapy/fig/eos_setupAMLeq_fig.py +18 -18
  44. nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +364 -0
  45. nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +337 -0
  46. nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +343 -0
  47. nucleardatapy/fig/eos_setupAM_fig.py +504 -0
  48. nucleardatapy/fig/eos_setupCC_fig.py +240 -0
  49. nucleardatapy/fig/hnuc_setupChart_fig.py +2 -2
  50. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +3 -3
  51. nucleardatapy/fig/matter_all_fig.py +954 -0
  52. nucleardatapy/fig/matter_setupCheck_fig.py +103 -0
  53. nucleardatapy/fig/matter_setupFFGLep_fig.py +70 -0
  54. nucleardatapy/fig/matter_setupFFGNuc_fig.py +267 -104
  55. nucleardatapy/fig/matter_setupHIC_fig.py +98 -58
  56. nucleardatapy/fig/matter_setupMicroEsym_fig.py +248 -63
  57. nucleardatapy/fig/matter_setupMicro_LP_fig.py +175 -78
  58. nucleardatapy/fig/matter_setupMicro_band_fig.py +115 -47
  59. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +248 -73
  60. nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +41 -18
  61. nucleardatapy/fig/matter_setupMicro_fig.py +299 -67
  62. nucleardatapy/fig/matter_setupMicro_gap_fig.py +219 -92
  63. nucleardatapy/fig/matter_setupNEPStats_fig.py +96 -0
  64. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +193 -55
  65. nucleardatapy/fig/matter_setupPheno_fig.py +385 -88
  66. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +59 -48
  67. nucleardatapy/fig/nuc_setupBEExp_fig.py +48 -41
  68. nucleardatapy/fig/nuc_setupBETheo_fig.py +59 -31
  69. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +5 -5
  70. nucleardatapy/fig/nuc_setupRchExp_fig.py +2 -2
  71. nucleardatapy/fig/nuc_setupRchTheo_fig.py +21 -20
  72. nucleardatapy/fig/nuc_setupRnpExp_fig.py +77 -109
  73. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +92 -93
  74. nucleardatapy/hello.py +6 -0
  75. nucleardatapy/hnuc/setup_re1L_exp.py +6 -6
  76. nucleardatapy/hnuc/setup_re1Xi_exp.py +5 -5
  77. nucleardatapy/hnuc/setup_re2L_exp.py +6 -6
  78. nucleardatapy/matter/__init__.py +14 -14
  79. nucleardatapy/matter/setup_check.py +6 -6
  80. nucleardatapy/matter/setup_ffg.py +66 -39
  81. nucleardatapy/matter/setup_hic.py +91 -74
  82. nucleardatapy/matter/setup_micro.py +1623 -1009
  83. nucleardatapy/matter/setup_micro_band.py +6 -6
  84. nucleardatapy/matter/setup_micro_esym.py +11 -13
  85. nucleardatapy/matter/setup_micro_gap.py +24 -17
  86. nucleardatapy/matter/setup_micro_lp.py +2 -2
  87. nucleardatapy/matter/setup_nep.py +175 -92
  88. nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
  89. nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
  90. nucleardatapy/matter/setup_pheno.py +121 -45
  91. nucleardatapy/matter/setup_pheno_esym.py +8 -13
  92. nucleardatapy/nuc/setup_be_exp.py +304 -292
  93. nucleardatapy/nuc/setup_be_theo.py +273 -97
  94. nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
  95. nucleardatapy/nuc/setup_rnp_exp.py +1 -0
  96. nucleardatapy/nuc/setup_rnp_theo.py +2 -1
  97. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/METADATA +48 -16
  98. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/RECORD +127 -120
  99. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/WHEEL +1 -1
  100. tests/test_corr_setupKsatQsat.py +3 -1
  101. tests/test_matter_setupMicro.py +37 -10
  102. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
  103. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
  104. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
  105. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
  106. nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +0 -125
  107. nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +0 -115
  108. nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +0 -117
  109. nucleardatapy/fig/eos_setupAM_e_fig.py +0 -173
  110. nucleardatapy/fig/matter_ENM_fig.py +0 -128
  111. nucleardatapy/fig/matter_ESM_fig.py +0 -140
  112. nucleardatapy/fig/matter_Esym_fig.py +0 -134
  113. nucleardatapy/fig/matter_cs2_fig.py +0 -83
  114. nucleardatapy/fig/matter_preNM_fig.py +0 -146
  115. nucleardatapy/fig/matter_preSM_fig.py +0 -144
  116. nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
  117. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
  118. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
  119. /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
  120. /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
  121. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
  122. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
  123. /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
  124. /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
  125. /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
  126. /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
  127. /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
  128. /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
  129. /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
  130. /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
  131. /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
  132. /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
  133. /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
  134. /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
  135. /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
  136. /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
  137. /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
  138. /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
  139. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
  140. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
  141. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/licenses/LICENSE +0 -0
  142. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/top_level.txt +0 -0
@@ -28,16 +28,16 @@ def eos_setupAMLeq_xe_fig( pname, micro_mbs, pheno_models, band ):
28
28
  #
29
29
  fig, axs = plt.subplots(1,2)
30
30
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
31
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
32
32
  #
33
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
34
- axs[0].set_ylabel(r'electron fraction $x_e$')
35
- axs[0].set_xlim([0, 0.28])
33
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
34
+ axs[0].set_ylabel(r'electron fraction $x_e$',fontsize='14')
35
+ axs[0].set_xlim([0, 0.33])
36
36
  axs[0].set_ylim([0.1, 0.3])
37
37
  #
38
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
39
- #axs[1].set_ylabel(r'electron fraction $x_e$')
40
- axs[1].set_xlim([0, 0.28])
38
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
39
+ #axs[1].set_ylabel(r'electron fraction $x_e$',fontsize='14')
40
+ axs[1].set_xlim([0, 0.33])
41
41
  axs[1].set_ylim([0.1, 0.3])
42
42
  axs[1].tick_params('y', labelleft=False)
43
43
  #
@@ -141,16 +141,16 @@ def eos_setupAMLeq_xmu_fig( pname, micro_mbs, pheno_models, band ):
141
141
  #
142
142
  fig, axs = plt.subplots(1,2)
143
143
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
144
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.05, hspace=0.3 )
144
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
145
145
  #
146
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
147
- axs[0].set_ylabel(r'muon fraction $x_\mu$')
148
- axs[0].set_xlim([0, 0.28])
146
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
147
+ axs[0].set_ylabel(r'muon fraction $x_\mu$',fontsize='14')
148
+ axs[0].set_xlim([0, 0.33])
149
149
  axs[0].set_ylim([0, 0.15])
150
150
  #
151
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
152
- #axs[1].set_ylabel(r'muon fraction $x_\mu$')
153
- axs[1].set_xlim([0, 0.28])
151
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
152
+ #axs[1].set_ylabel(r'muon fraction $x_\mu$',fontsize='14')
153
+ axs[1].set_xlim([0, 0.33])
154
154
  axs[1].set_ylim([0, 0.15])
155
155
  axs[1].tick_params('y', labelleft=False)
156
156
  #
@@ -252,11 +252,11 @@ def eos_setupAMLeq_xexmu_fig( pname, micro_mbs, pheno_models, band ):
252
252
  #
253
253
  fig, axs = plt.subplots(1,1)
254
254
  #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
255
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.90, wspace=0.3, hspace=0.3 )
255
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.3, hspace=0.3 )
256
256
  #
257
- axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='10')
258
- axs.set_ylabel(r'$x_e$, $x_\mu$',fontsize='10')
259
- axs.set_xlim([0, 0.28])
257
+ axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
258
+ axs.set_ylabel(r'$x_e$, $x_\mu$',fontsize='14')
259
+ axs.set_xlim([0, 0.33])
260
260
  axs.set_ylim([0, 0.5])
261
261
  #
262
262
  asys = [ 0.1, 0.3, 0.5, 0.7, 0.9 ]
@@ -0,0 +1,364 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+
4
+ import nucleardatapy as nuda
5
+
6
+ def eos_setupAM_e2a_asy_lep_fig( pname, micro_mbs, pheno_models, asy, band ):
7
+ """
8
+ Plot nuclear chart (N versus Z).\
9
+ The plot is 1x2 with:\
10
+ [0]: nuclear chart.
11
+
12
+ :param pname: name of the figure (*.png)
13
+ :type pname: str.
14
+ :param table: table.
15
+ :type table: str.
16
+ :param version: version of table to run on.
17
+ :type version: str.
18
+ :param theo_tables: object instantiated on the reference band.
19
+ :type theo_tables: object.
20
+
21
+ """
22
+ #
23
+ print(f'Plot name: {pname}')
24
+ #
25
+ fig, axs = plt.subplots(1,2)
26
+ #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
28
+ #
29
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
30
+ axs[0].set_ylabel(r'$e_\text{lep}^\text{int}$ (MeV)',fontsize='14')
31
+ axs[0].set_xlim([0, 0.33])
32
+ axs[0].set_ylim([-10, 35])
33
+ #
34
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
35
+ #axs[1].set_ylabel(r'$E/A$')
36
+ axs[1].set_xlim([0, 0.33])
37
+ axs[1].set_ylim([-10, 35])
38
+ axs[1].tick_params('y', labelleft=False)
39
+ #
40
+ mb_check = []
41
+ #
42
+ for kmb,mb in enumerate(micro_mbs):
43
+ #
44
+ print('mb:',mb,kmb)
45
+ #
46
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
47
+ #
48
+ print('models:',models)
49
+ #
50
+ if mb == 'VAR':
51
+ models.remove('1998-VAR-AM-APR-fit')
52
+ models_lower.remove('1998-var-am-apr-fit')
53
+ #
54
+ for model in models:
55
+ #
56
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
57
+ if nuda.env.verb_output: micro.print_outputs( )
58
+ #
59
+ check = nuda.matter.setupCheck( eos = micro, band = band )
60
+ #
61
+ if check.isInside:
62
+ lstyle = 'solid'
63
+ else:
64
+ lstyle = 'dashed'
65
+ #continue
66
+ #
67
+ if micro.e2a_lep is not None:
68
+ print('model:',model)
69
+ print('den:',micro.den)
70
+ print('e2a_lep:',micro.e2a_lep)
71
+ if mb in mb_check:
72
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
73
+ else:
74
+ mb_check.append(mb)
75
+ axs[0].plot( micro.den, micro.e2a_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
76
+ # end of model
77
+ # end of mb
78
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
79
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
80
+ #
81
+ model_check = []
82
+ #
83
+ for kmodel,model in enumerate(pheno_models):
84
+ #
85
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
86
+ #
87
+ for param in params:
88
+ #
89
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
90
+ if nuda.env.verb_output: pheno.print_outputs( )
91
+ #
92
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
93
+ #
94
+ if check.isInside:
95
+ lstyle = 'solid'
96
+ else:
97
+ lstyle = 'dashed'
98
+ #continue
99
+ #
100
+ if pheno.e2a_lep is not None:
101
+ print('model:',model,' param:',param)
102
+ if model in model_check:
103
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
104
+ else:
105
+ model_check.append(model)
106
+ axs[1].plot( pheno.den, pheno.e2a_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
107
+ # end of param
108
+ # end of model
109
+ #
110
+ #axs[1].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
111
+ #axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
112
+ #axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
113
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
114
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
115
+ #
116
+ #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
117
+ #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
118
+ #axs[1].legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
119
+ #fig.legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
120
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
121
+ #
122
+ if pname is not None:
123
+ plt.savefig(pname, dpi=200)
124
+ plt.close()
125
+ #
126
+
127
+ def eos_setupAM_pre_asy_lep_fig( pname, micro_mbs, pheno_models, asy, band ):
128
+ """
129
+ Plot nuclear chart (N versus Z).\
130
+ The plot is 1x2 with:\
131
+ [0]: nuclear chart.
132
+
133
+ :param pname: name of the figure (*.png)
134
+ :type pname: str.
135
+ :param table: table.
136
+ :type table: str.
137
+ :param version: version of table to run on.
138
+ :type version: str.
139
+ :param theo_tables: object instantiated on the reference band.
140
+ :type theo_tables: object.
141
+
142
+ """
143
+ #
144
+ print(f'Plot name: {pname}')
145
+ #
146
+ fig, axs = plt.subplots(1,2)
147
+ #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
148
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
149
+ #
150
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
151
+ axs[0].set_ylabel(r'$p_\text{lep}$ (MeV fm$^{-3}$)',fontsize='14')
152
+ axs[0].set_xlim([0, 0.33])
153
+ axs[0].set_ylim([-10, 35])
154
+ #
155
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
156
+ #axs[1].set_ylabel(r'$E/A$')
157
+ axs[1].set_xlim([0, 0.33])
158
+ axs[1].set_ylim([-10, 35])
159
+ axs[1].tick_params('y', labelleft=False)
160
+ #
161
+ mb_check = []
162
+ #
163
+ for kmb,mb in enumerate(micro_mbs):
164
+ #
165
+ print('mb:',mb,kmb)
166
+ #
167
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
168
+ #
169
+ print('models:',models)
170
+ #
171
+ if mb == 'VAR':
172
+ models.remove('1998-VAR-AM-APR-fit')
173
+ models_lower.remove('1998-var-am-apr-fit')
174
+ #
175
+ for model in models:
176
+ #
177
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
178
+ if nuda.env.verb_output: micro.print_outputs( )
179
+ #
180
+ check = nuda.matter.setupCheck( eos = micro, band = band )
181
+ #
182
+ if check.isInside:
183
+ lstyle = 'solid'
184
+ else:
185
+ lstyle = 'dashed'
186
+ #continue
187
+ #
188
+ if micro.pre_lep is not None:
189
+ print('model:',model)
190
+ print('den:',micro.den)
191
+ print('e2a_lep:',micro.e2a_lep)
192
+ if mb in mb_check:
193
+ axs[0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
194
+ else:
195
+ mb_check.append(mb)
196
+ axs[0].plot( micro.den, micro.pre_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
197
+ # end of model
198
+ # end of mb
199
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
200
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
201
+ #
202
+ model_check = []
203
+ #
204
+ for kmodel,model in enumerate(pheno_models):
205
+ #
206
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
207
+ #
208
+ for param in params:
209
+ #
210
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
211
+ if nuda.env.verb_output: pheno.print_outputs( )
212
+ #
213
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
214
+ #
215
+ if check.isInside:
216
+ lstyle = 'solid'
217
+ else:
218
+ lstyle = 'dashed'
219
+ #continue
220
+ #
221
+ if pheno.pre_lep is not None:
222
+ print('model:',model,' param:',param)
223
+ if model in model_check:
224
+ axs[1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
225
+ else:
226
+ model_check.append(model)
227
+ axs[1].plot( pheno.den, pheno.pre_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
228
+ # end of param
229
+ # end of model
230
+ #
231
+ #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 )
232
+ #axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
233
+ #axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
234
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
235
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
236
+ #
237
+ #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
238
+ #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
239
+ #axs[1].legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
240
+ #fig.legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
241
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
242
+ #
243
+ if pname is not None:
244
+ plt.savefig(pname, dpi=200)
245
+ plt.close()
246
+ #
247
+
248
+ def eos_setupAM_cs2_asy_lep_fig( pname, micro_mbs, pheno_models, asy, band ):
249
+ """
250
+ Plot nuclear chart (N versus Z).\
251
+ The plot is 1x2 with:\
252
+ [0]: nuclear chart.
253
+
254
+ :param pname: name of the figure (*.png)
255
+ :type pname: str.
256
+ :param table: table.
257
+ :type table: str.
258
+ :param version: version of table to run on.
259
+ :type version: str.
260
+ :param theo_tables: object instantiated on the reference band.
261
+ :type theo_tables: object.
262
+
263
+ """
264
+ #
265
+ print(f'Plot name: {pname}')
266
+ #
267
+ fig, axs = plt.subplots(1,2)
268
+ #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
269
+ fig.subplots_adjust(left=0.10, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.3 )
270
+ #
271
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
272
+ axs[0].set_ylabel(r'$c_\text{s,lep}^2/c^2$',fontsize='14')
273
+ axs[0].set_xlim([0, 0.33])
274
+ axs[0].set_ylim([0.2, 0.4])
275
+ #
276
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
277
+ #axs[1].set_ylabel(r'$E/A$')
278
+ axs[1].set_xlim([0, 0.33])
279
+ axs[1].set_ylim([0.2, 0.4])
280
+ axs[1].tick_params('y', labelleft=False)
281
+ #
282
+ mb_check = []
283
+ #
284
+ for kmb,mb in enumerate(micro_mbs):
285
+ #
286
+ print('mb:',mb,kmb)
287
+ #
288
+ models, models_lower = nuda.matter.micro_esym_models_mb( mb )
289
+ #
290
+ print('models:',models)
291
+ #
292
+ if mb == 'VAR':
293
+ models.remove('1998-VAR-AM-APR-fit')
294
+ models_lower.remove('1998-var-am-apr-fit')
295
+ #
296
+ for model in models:
297
+ #
298
+ micro = nuda.eos.setupAM( model = model, kind = 'micro', asy = asy )
299
+ if nuda.env.verb_output: micro.print_outputs( )
300
+ #
301
+ check = nuda.matter.setupCheck( eos = micro, band = band )
302
+ #
303
+ if check.isInside:
304
+ lstyle = 'solid'
305
+ else:
306
+ lstyle = 'dashed'
307
+ #continue
308
+ #
309
+ if micro.cs2_lep is not None:
310
+ if mb in mb_check:
311
+ axs[0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
312
+ else:
313
+ mb_check.append(mb)
314
+ axs[0].plot( micro.den, micro.cs2_lep, marker='o', linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
315
+ # end of model
316
+ # end of mb
317
+ axs[0].text(0.02,-8,'microscopic models',fontsize='10')
318
+ axs[0].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
319
+ #
320
+ model_check = []
321
+ #
322
+ for kmodel,model in enumerate(pheno_models):
323
+ #
324
+ params, params_lower = nuda.matter.pheno_esym_params( model = model )
325
+ #
326
+ for param in params:
327
+ #
328
+ pheno = nuda.eos.setupAM( model = model, param = param, kind = 'pheno', asy = asy )
329
+ if nuda.env.verb_output: pheno.print_outputs( )
330
+ #
331
+ check = nuda.matter.setupCheck( eos = pheno, band = band )
332
+ #
333
+ if check.isInside:
334
+ lstyle = 'solid'
335
+ else:
336
+ lstyle = 'dashed'
337
+ #continue
338
+ #
339
+ if pheno.cs2_lep is not None:
340
+ print('model:',model,' param:',param)
341
+ if model in model_check:
342
+ axs[1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, markevery=pheno.every, color=nuda.param.col[kmodel] )
343
+ else:
344
+ model_check.append(model)
345
+ axs[1].plot( pheno.den, pheno.cs2_lep, linestyle=lstyle, label=model, markevery=pheno.every, color=nuda.param.col[kmodel] )
346
+ # end of param
347
+ # end of model
348
+ #
349
+ #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 )
350
+ #axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
351
+ #axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
352
+ axs[1].text(0.02,-8,'phenomenological models',fontsize='10')
353
+ axs[1].text(0.02,-9.5,r'for $\delta=$'+str(asy),fontsize='10')
354
+ #
355
+ #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
356
+ #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
357
+ #axs[1].legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
358
+ #fig.legend(loc='lower center',bbox_to_anchor=(0.5,1.02),mode='expand',columnspacing=0,fontsize='8', ncol=2,frameon=False)
359
+ fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
360
+ #
361
+ if pname is not None:
362
+ plt.savefig(pname, dpi=200)
363
+ plt.close()
364
+ #