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
@@ -3,12 +3,15 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def matter_setupPheno_E_fig( pname, model, band ):
6
+ def matter_setupPheno_e2a_fig(pname, model, band, matter):
7
7
  """
8
- Plot nucleonic energy per particle E/A in matter.\
9
- The plot is 2x2 with:\
10
- [0,0]: E/A versus den. [0,1]: E/A versus kfn.\
11
- [1,0]: E/E_NRFFG versus den. [1,1]: E/E_NRFFG versus kfn.\
8
+ Plot nucleonic internal energy per particle E/A in `matter`.
9
+
10
+ The plot is 2x2 with:
11
+
12
+ [0,0]: E/A versus den. [0,1]: E/A versus kfn.
13
+
14
+ [1,0]: E/E_NRFFG versus den. [1,1]: E/E_NRFFG versus kfn.
12
15
 
13
16
  :param pname: name of the figure (*.png)
14
17
  :type pname: str.
@@ -18,114 +21,413 @@ def matter_setupPheno_E_fig( pname, model, band ):
18
21
  :type band: object.
19
22
  :param matter: can be 'SM' or 'NM'.
20
23
  :type matter: str.
21
-
22
24
  """
23
25
  #
24
- print(f'Plot name: {pname}')
26
+ print(f"Plot name: {pname}")
25
27
  matter = band.matter
26
28
  #
27
29
  # plot
28
30
  #
29
- fig, axs = plt.subplots(2,2)
30
- fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
- fig.subplots_adjust(left=0.15, bottom=0.12, right=None, top=0.88, wspace=0.05, hspace=0.05)
32
- #
33
- axs[1,0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='12')
34
- axs[1,1].set_xlabel(r'$k_{F_n}$ (fm$^{-1}$)',fontsize='12')
35
- axs[0,0].set_xlim([0, 0.33])
36
- axs[1,0].set_xlim([0, 0.33])
37
- axs[0,1].set_xlim([0.5, 1.9])
38
- axs[1,1].set_xlim([0.5, 1.9])
39
- #
40
- axs[0,0].tick_params('x', labelbottom=False)
41
- axs[0,1].tick_params('x', labelbottom=False)
42
- axs[0,1].tick_params('y', labelleft=False)
43
- axs[1,1].tick_params('y', labelleft=False)
44
- #
45
- if matter.lower() == 'nm':
46
- axs[0,0].set_ylabel(r'$E_\text{NM}/A$ (MeV)',fontsize='12')
47
- axs[1,0].set_ylabel(r'$E_\text{NM}/E_\text{NRFFG,NM}$',fontsize='12')
48
- axs[0,0].set_ylim([0, 30])
49
- axs[0,1].set_ylim([0, 30])
50
- axs[1,0].set_ylim([0.2, 0.84])
51
- axs[1,1].set_ylim([0.2, 0.84])
52
- elif matter.lower() == 'sm':
53
- axs[0,0].set_ylabel(r'$E_\text{SM}/A$ (MeV)',fontsize='12')
54
- axs[1,0].set_ylabel(r'$E_\text{SM}/E_\text{NRFFG,SM}$',fontsize='12')
55
- axs[0,0].set_ylim([-20, 10])
56
- axs[0,1].set_ylim([-20, 10])
57
- axs[1,0].set_ylim([-2.0, 0.1])
58
- axs[1,1].set_ylim([-2.0, 0.1])
59
- #
60
- params, params_lower = nuda.matter.pheno_params( model = model )
31
+ fig, axs = plt.subplots(2, 2)
32
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
33
+ fig.subplots_adjust( left=0.15, bottom=0.12, right=0.95, top=0.85, wspace=0.05, hspace=0.05 )
34
+ #
35
+ axs[1, 0].set_xlabel(r"$n_\text{nuc}$ (fm$^{-3}$)", fontsize="14")
36
+ axs[1, 1].set_xlabel(r"$k_{F}$ (fm$^{-1}$)", fontsize="14")
37
+ axs[0, 0].set_xlim([0, 0.33])
38
+ axs[1, 0].set_xlim([0, 0.33])
39
+ axs[0, 1].set_xlim([0.5, 1.9])
40
+ axs[1, 1].set_xlim([0.5, 1.9])
41
+ #
42
+ axs[0, 0].tick_params("x", labelbottom=False)
43
+ axs[0, 1].tick_params("x", labelbottom=False)
44
+ axs[0, 1].tick_params("y", labelleft=False)
45
+ axs[1, 1].tick_params("y", labelleft=False)
46
+ #
47
+ if matter.lower() == "nm":
48
+ axs[0, 0].set_ylabel(r"$E_\text{int,NM}/A$ (MeV)", fontsize="14")
49
+ axs[1, 0].set_ylabel(r"$E_\text{int,NM}/E_\text{int,NM}^\text{NR FFG}$", fontsize="14")
50
+ axs[0, 0].set_ylim([0, 30])
51
+ axs[0, 1].set_ylim([0, 30])
52
+ axs[1, 0].set_ylim([0.2, 0.84])
53
+ axs[1, 1].set_ylim([0.2, 0.84])
54
+ elif matter.lower() == "sm":
55
+ axs[0, 0].set_ylabel(r"$E_\text{int,SM}/A$ (MeV)", fontsize="14")
56
+ axs[1, 0].set_ylabel(r"$E_\text{int,SM}/E_\text{int,SM}^\text{NR FFG}$", fontsize="14")
57
+ axs[0, 0].set_ylim([-20, 10])
58
+ axs[0, 1].set_ylim([-20, 10])
59
+ axs[1, 0].set_ylim([-2.0, 0.1])
60
+ axs[1, 1].set_ylim([-2.0, 0.1])
61
+ #
62
+ params, params_lower = nuda.matter.pheno_params(model=model)
61
63
  #
62
64
  for param in params:
63
65
  #
64
- pheno = nuda.matter.setupPheno( model = model, param = param )
66
+ pheno = nuda.matter.setupPheno(model=model, param=param)
65
67
  #
66
- check = nuda.matter.setupCheck( eos = pheno, band = band )
68
+ check = nuda.matter.setupCheck(eos=pheno, band=band)
67
69
  #
68
70
  if check.isInside:
69
- lstyle = 'solid'
71
+ lstyle = "solid"
70
72
  else:
71
- lstyle = 'dashed'
73
+ lstyle = "dashed"
72
74
  #
73
- if matter.lower() == 'nm':
75
+ if matter.lower() == "nm":
76
+ #
74
77
  if any(pheno.nm_e2a):
75
- if model == 'Skyrme' and check.isInside:
76
- axs[0,0].plot( pheno.nm_den, pheno.nm_e2a, linestyle=lstyle, label=pheno.label )
77
- elif model == 'Skyrme' and check.isOutside:
78
- axs[0,0].plot( pheno.nm_den, pheno.nm_e2a, linestyle=lstyle )
78
+ if model == "Skyrme" and check.isInside:
79
+ axs[0, 0].plot( pheno.nm_den, pheno.nm_e2a_int, linestyle=lstyle, label=pheno.label )
80
+ elif model == "Skyrme" and check.isOutside:
81
+ axs[0, 0].plot(pheno.nm_den, pheno.nm_e2a_int, linestyle=lstyle)
79
82
  else:
80
- axs[0,0].plot( pheno.nm_den, pheno.nm_e2a, linestyle=lstyle, label=pheno.label )
81
- axs[0,1].plot( pheno.nm_kfn, pheno.nm_e2a, linestyle=lstyle )
82
- axs[1,0].plot( pheno.nm_den, pheno.nm_e2a/nuda.effg_nr(pheno.nm_kfn), linestyle=lstyle )
83
- axs[1,1].plot( pheno.nm_kfn, pheno.nm_e2a/nuda.effg_nr(pheno.nm_kfn), linestyle=lstyle )
84
- elif matter.lower() == 'sm':
85
- if any(pheno.sm_e2a):
86
- if model == 'Skyrme' and check.isInside:
87
- axs[0,0].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, label=pheno.label )
88
- elif model == 'Skyrme' and check.isOutside:
89
- axs[0,0].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle )
83
+ axs[0, 0].plot( pheno.nm_den, pheno.nm_e2a_int, linestyle=lstyle, label=pheno.label )
84
+ axs[0, 1].plot(pheno.nm_kfn, pheno.nm_e2a_int, linestyle=lstyle)
85
+ axs[1, 0].plot(
86
+ pheno.nm_den,
87
+ pheno.nm_e2a_int / nuda.effg_nr(pheno.nm_kfn),
88
+ linestyle=lstyle,
89
+ )
90
+ axs[1, 1].plot(
91
+ pheno.nm_kfn,
92
+ pheno.nm_e2a_int / nuda.effg_nr(pheno.nm_kfn),
93
+ linestyle=lstyle,
94
+ )
95
+ #
96
+ elif matter.lower() == "sm":
97
+ #
98
+ if any(pheno.sm_e2a):
99
+ if model == "Skyrme" and check.isInside:
100
+ axs[0, 0].plot( pheno.sm_den, pheno.sm_e2a_int, linestyle=lstyle, label=pheno.label )
101
+ elif model == "Skyrme" and check.isOutside:
102
+ axs[0, 0].plot( pheno.sm_den, pheno.sm_e2a_int, linestyle=lstyle)
90
103
  else:
91
- axs[0,0].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, label=pheno.label )
92
- axs[0,1].plot( pheno.sm_kf, pheno.sm_e2a, linestyle=lstyle )
93
- axs[1,0].plot( pheno.sm_den, pheno.sm_e2a/nuda.effg_nr(pheno.sm_kf), linestyle=lstyle )
94
- axs[1,1].plot( pheno.sm_kf, pheno.sm_e2a/nuda.effg_nr(pheno.sm_kf), linestyle=lstyle )
95
- if nuda.env.verb_output: pheno.print_outputs( )
96
- if matter.lower() == 'nm':
97
- axs[0,0].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha )
98
- axs[0,0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
99
- axs[0,0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
100
- axs[0,1].fill_between( band.kfn, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha )
101
- axs[0,1].plot( band.kfn, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
102
- axs[0,1].plot( band.kfn, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
103
- axs[1,0].fill_between( band.den, y1=(band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), y2=(band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color=band.color, alpha=band.alpha )
104
- axs[1,0].plot( band.den, (band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
105
- axs[1,0].plot( band.den, (band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
106
- axs[1,1].fill_between( band.kfn, y1=(band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), y2=(band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color=band.color, alpha=band.alpha )
107
- axs[1,1].plot( band.kfn, (band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
108
- axs[1,1].plot( band.kfn, (band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
109
- elif matter.lower() == 'sm':
110
- axs[0,0].fill_between( band.den, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
111
- axs[0,0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
112
- axs[0,0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
113
- axs[0,1].fill_between( band.kfn, y1=(band.e2a-band.e2a_std), y2=(band.e2a+band.e2a_std), color=band.color, alpha=band.alpha, visible=True )
114
- axs[0,1].plot( band.kfn, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
115
- axs[0,1].plot( band.kfn, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
116
- axs[1,0].fill_between( band.den, y1=(band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), y2=(band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color=band.color, alpha=band.alpha, visible=True )
117
- axs[1,0].plot( band.den, (band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
118
- axs[1,0].plot( band.den, (band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
119
- axs[1,1].fill_between( band.kfn, y1=(band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), y2=(band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color=band.color, alpha=band.alpha, visible=True )
120
- axs[1,1].plot( band.kfn, (band.e2a-band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
121
- axs[1,1].plot( band.kfn, (band.e2a+band.e2a_std)/nuda.effg_nr(band.kfn), color='k', linestyle='dashed' )
122
- #
123
- #if model != 'Skyrme':
104
+ axs[0, 0].plot( pheno.sm_den, pheno.sm_e2a_int, linestyle=lstyle, label=pheno.label )
105
+ axs[0, 1].plot(pheno.sm_kf, pheno.sm_e2a_int, linestyle=lstyle)
106
+ axs[1, 0].plot(
107
+ pheno.sm_den,
108
+ pheno.sm_e2a_int / nuda.effg_nr(pheno.sm_kf),
109
+ linestyle=lstyle,
110
+ )
111
+ axs[1, 1].plot(
112
+ pheno.sm_kf,
113
+ pheno.sm_e2a_int / nuda.effg_nr(pheno.sm_kf),
114
+ linestyle=lstyle,
115
+ )
116
+ if nuda.env.verb_output:
117
+ pheno.print_outputs()
118
+ if matter.lower() == "nm":
119
+ axs[0, 0].fill_between(
120
+ band.den,
121
+ y1=(band.e2a_int - band.e2a_std),
122
+ y2=(band.e2a_int + band.e2a_std),
123
+ color=band.color,
124
+ alpha=band.alpha,
125
+ )
126
+ axs[0, 0].plot( band.den, (band.e2a_int - band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
127
+ axs[0, 0].plot( band.den, (band.e2a_int + band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
128
+ axs[0, 1].fill_between(
129
+ band.kfn,
130
+ y1=(band.e2a_int - band.e2a_std),
131
+ y2=(band.e2a_int + band.e2a_std),
132
+ color=band.color,
133
+ alpha=band.alpha,
134
+ )
135
+ axs[0, 1].plot( band.kfn, (band.e2a_int - band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
136
+ axs[0, 1].plot( band.kfn, (band.e2a_int + band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
137
+ axs[1, 0].fill_between(
138
+ band.den,
139
+ y1=(band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn),
140
+ y2=(band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn),
141
+ color=band.color,
142
+ alpha=band.alpha,
143
+ )
144
+ axs[1, 0].plot( band.den, (band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
145
+ axs[1, 0].plot( band.den, (band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
146
+ axs[1, 1].fill_between(
147
+ band.kfn,
148
+ y1=(band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn),
149
+ y2=(band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn),
150
+ color=band.color,
151
+ alpha=band.alpha,
152
+ )
153
+ axs[1, 1].plot( band.kfn, (band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
154
+ axs[1, 1].plot( band.kfn, (band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
155
+ elif matter.lower() == "sm":
156
+ axs[0, 0].fill_between(
157
+ band.den,
158
+ y1=(band.e2a_int - band.e2a_std),
159
+ y2=(band.e2a_int + band.e2a_std),
160
+ color=band.color,
161
+ alpha=band.alpha,
162
+ visible=True,
163
+ )
164
+ axs[0, 0].plot( band.den, (band.e2a_int - band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
165
+ axs[0, 0].plot( band.den, (band.e2a_int + band.e2a_std), color="k", linestyle="dashed", zorder = 100 )
166
+ axs[0, 1].fill_between(
167
+ band.kfn,
168
+ y1=(band.e2a_int - band.e2a_std),
169
+ y2=(band.e2a_int + band.e2a_std),
170
+ color=band.color,
171
+ alpha=band.alpha,
172
+ visible=True,
173
+ )
174
+ axs[0, 1].plot(
175
+ band.kfn, (band.e2a_int - band.e2a_std), color="k", linestyle="dashed", zorder = 100
176
+ )
177
+ axs[0, 1].plot(
178
+ band.kfn, (band.e2a_int + band.e2a_std), color="k", linestyle="dashed", zorder = 100
179
+ )
180
+ axs[1, 0].fill_between(
181
+ band.den,
182
+ y1=(band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn),
183
+ y2=(band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn),
184
+ color=band.color,
185
+ alpha=band.alpha,
186
+ visible=True,
187
+ )
188
+ axs[1, 0].plot(
189
+ band.den, (band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100
190
+ )
191
+ axs[1, 0].plot(
192
+ band.den, (band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100
193
+ )
194
+ axs[1, 1].fill_between(
195
+ band.kfn,
196
+ y1=(band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn),
197
+ y2=(band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn),
198
+ color=band.color,
199
+ alpha=band.alpha,
200
+ visible=True,
201
+ )
202
+ axs[1, 1].plot( band.kfn, (band.e2a_int - band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
203
+ axs[1, 1].plot( band.kfn, (band.e2a_int + band.e2a_std) / nuda.effg_nr(band.kfn), color="k", linestyle="dashed", zorder = 100 )
204
+ #
205
+ # if model != 'Skyrme':
124
206
  # axs[0,0].legend(loc='upper right',fontsize='8', ncol=2)
125
- fig.legend(loc='upper left',bbox_to_anchor=(0.1,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
207
+ fig.legend(
208
+ loc="upper left",
209
+ bbox_to_anchor=(0.03, 1.0),
210
+ columnspacing=2,
211
+ fontsize="8",
212
+ ncol=5,
213
+ frameon=False,
214
+ )
126
215
  #
127
216
  #
128
217
  if pname is not None:
129
218
  plt.savefig(pname, dpi=300)
130
219
  plt.close()
131
- #
220
+ #
221
+
222
+ def matter_setupPheno_pre_fig(pname, model, band, matter):
223
+ """
224
+ Plot nucleonic pressure in matter.
225
+
226
+ The plot is 2x2 with:
227
+
228
+ [0,0]: pre versus den. [0,1]: pre versus kfn.
229
+
230
+ [1,0]: pre/pre_NRFFG versus den. [1,1]: pre/pre_NRFFG versus kfn.
231
+
232
+ :param pname: name of the figure (*.png)
233
+ :type pname: str.
234
+ :param model: class of model considered.
235
+ :type model: str.
236
+ :param band: object instantiated on the reference band.
237
+ :type band: object.
238
+ :param matter: can be 'SM' or 'NM'.
239
+ :type matter: str.
240
+
241
+ """
242
+ #
243
+ print(f"Plot name: {pname}")
244
+ matter = band.matter
245
+ #
246
+ # plot
247
+ #
248
+ fig, axs = plt.subplots(2, 2)
249
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
250
+ fig.subplots_adjust(
251
+ left=0.15, bottom=0.12, right=0.95, top=0.88, wspace=0.05, hspace=0.05
252
+ )
253
+ #
254
+ axs[1, 0].set_xlabel(r"$n_\text{nuc}$ (fm$^{-3}$)", fontsize="14")
255
+ axs[1, 1].set_xlabel(r"$k_{F_n}$ (fm$^{-1}$)", fontsize="14")
256
+ axs[0, 0].set_xlim([0, 0.33])
257
+ axs[1, 0].set_xlim([0, 0.33])
258
+ axs[0, 1].set_xlim([0.5, 1.9])
259
+ axs[1, 1].set_xlim([0.5, 1.9])
260
+ #
261
+ axs[0, 0].tick_params("x", labelbottom=False)
262
+ axs[0, 1].tick_params("x", labelbottom=False)
263
+ axs[0, 1].tick_params("y", labelleft=False)
264
+ axs[1, 1].tick_params("y", labelleft=False)
265
+ #
266
+ if matter.lower() == "nm":
267
+ axs[0, 0].set_ylabel(r"$p_\text{NM}$ (MeV fm$^{-3}$)", fontsize="14")
268
+ axs[1, 0].set_ylabel(r"$p_\text{NM}/p_\text{NRFFG,NM}$", fontsize="14")
269
+ axs[0, 0].set_ylim([-2, 30])
270
+ axs[0, 1].set_ylim([-2, 30])
271
+ axs[1, 0].set_ylim([-0.2, 0.84])
272
+ axs[1, 1].set_ylim([-0.2, 0.84])
273
+ elif matter.lower() == "sm":
274
+ axs[0, 0].set_ylabel(r"$p_\text{SM}$ (MeV fm$^{-3})", fontsize="14")
275
+ axs[1, 0].set_ylabel(r"$p_\text{SM}/p_\text{NRFFG,SM}$", fontsize="14")
276
+ axs[0, 0].set_ylim([-5, 10])
277
+ axs[0, 1].set_ylim([-5, 10])
278
+ axs[1, 0].set_ylim([-1.5, 0.5])
279
+ axs[1, 1].set_ylim([-1.5, 0.5])
280
+ #
281
+ params, params_lower = nuda.matter.pheno_params(model=model)
282
+ #
283
+ for param in params:
284
+ #
285
+ pheno = nuda.matter.setupPheno(model=model, param=param)
286
+ #
287
+ check = nuda.matter.setupCheck(eos=pheno, band=band)
288
+ #
289
+ if check.isInside:
290
+ lstyle = "solid"
291
+ else:
292
+ lstyle = "dashed"
293
+ #
294
+ if matter.lower() == "nm":
295
+ if any(pheno.nm_pre):
296
+ if model == "Skyrme" and check.isInside:
297
+ axs[0, 0].plot( pheno.nm_den, pheno.nm_pre, linestyle=lstyle, label=pheno.label )
298
+ elif model == "Skyrme" and check.isOutside:
299
+ axs[0, 0].plot( pheno.nm_den, pheno.nm_pre, linestyle=lstyle )
300
+ else:
301
+ axs[0, 0].plot( pheno.nm_den, pheno.nm_pre, linestyle=lstyle, label=pheno.label )
302
+ axs[0, 1].plot(pheno.nm_kfn, pheno.nm_pre, linestyle=lstyle)
303
+ axs[1, 0].plot( pheno.nm_den, pheno.nm_pre / nuda.pre_nr(pheno.nm_kfn), linestyle=lstyle )
304
+ axs[1, 1].plot( pheno.nm_kfn, pheno.nm_pre / nuda.pre_nr(pheno.nm_kfn), linestyle=lstyle )
305
+ elif matter.lower() == "sm":
306
+ if any(pheno.sm_pre):
307
+ if model == "Skyrme" and check.isInside:
308
+ axs[0, 0].plot( pheno.sm_den, pheno.sm_pre, linestyle=lstyle, label=pheno.label )
309
+ elif model == "Skyrme" and check.isOutside:
310
+ axs[0, 0].plot(pheno.sm_den, pheno.sm_pre, linestyle=lstyle)
311
+ else:
312
+ axs[0, 0].plot( pheno.sm_den, pheno.sm_pre, linestyle=lstyle, label=pheno.label )
313
+ axs[0, 1].plot( pheno.sm_kf, pheno.sm_pre, linestyle=lstyle )
314
+ axs[1, 0].plot( pheno.sm_den, pheno.sm_pre / nuda.pre_nr(pheno.sm_kf), linestyle=lstyle )
315
+ axs[1, 1].plot( pheno.sm_kf, pheno.sm_pre / nuda.pre_nr(pheno.sm_kf), linestyle=lstyle )
316
+ if nuda.env.verb_output: pheno.print_outputs()
317
+ #
318
+ #
319
+ # if model != 'Skyrme':
320
+ # axs[0,0].legend(loc='upper right',fontsize='8', ncol=2)
321
+ fig.legend(
322
+ loc="upper left",
323
+ bbox_to_anchor=(0.1, 1.0),
324
+ columnspacing=2,
325
+ fontsize="8",
326
+ ncol=4,
327
+ frameon=False,
328
+ )
329
+ #
330
+ #
331
+ if pname is not None:
332
+ plt.savefig(pname, dpi=300)
333
+ plt.close()
334
+ #
335
+
336
+ def matter_setupPheno_cs2_fig(pname, model, band, matter):
337
+ """
338
+ Plot nucleonic sound speed in matter.
339
+
340
+ The plot is 1x2 with:
341
+
342
+ [0]: cs2 versus den. [1]: cs2 versus kfn.
343
+
344
+ :param pname: name of the figure (*.png)
345
+ :type pname: str.
346
+ :param model: class of model considered.
347
+ :type model: str.
348
+ :param band: object instantiated on the reference band.
349
+ :type band: object.
350
+ :param matter: can be 'SM' or 'NM'.
351
+ :type matter: str.
352
+ """
353
+ #
354
+ print(f"Plot name: {pname}")
355
+ matter = band.matter
356
+ #
357
+ # plot
358
+ #
359
+ fig, axs = plt.subplots(1, 2)
360
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
361
+ fig.subplots_adjust(
362
+ left=0.15, bottom=0.12, right=0.95, top=0.88, wspace=0.05, hspace=0.05
363
+ )
364
+ #
365
+ axs[0].set_xlabel(r"$n_\text{nuc}$ (fm$^{-3}$)", fontsize="14")
366
+ axs[1].set_xlabel(r"$k_{F_n}$ (fm$^{-1}$)", fontsize="14")
367
+ axs[0].set_xlim([0, 0.33])
368
+ axs[1].set_xlim([0.5, 1.9])
369
+ #
370
+ axs[1].tick_params("y", labelleft=False)
371
+ #
372
+ if matter.lower() == "nm":
373
+ axs[0].set_ylabel(r"$c_\text{s,NM}^2/c^2$", fontsize="14")
374
+ axs[0].set_ylim([-0.05, 0.3])
375
+ axs[1].set_ylim([-0.05, 0.3])
376
+ elif matter.lower() == "sm":
377
+ axs[0].set_ylabel(r"$c_\text{s,SM}^2/c^2$", fontsize="14")
378
+ axs[0].set_ylim([-0.05, 0.2])
379
+ axs[1].set_ylim([-0.05, 0.2])
380
+ #
381
+ params, params_lower = nuda.matter.pheno_params(model=model)
382
+ #
383
+ for param in params:
384
+ #
385
+ pheno = nuda.matter.setupPheno(model=model, param=param)
386
+ #
387
+ check = nuda.matter.setupCheck(eos=pheno, band=band)
388
+ #
389
+ if check.isInside:
390
+ lstyle = "solid"
391
+ else:
392
+ lstyle = "dashed"
393
+ #
394
+ if matter.lower() == "nm":
395
+ #
396
+ if any(pheno.nm_cs2):
397
+ #
398
+ if model == "Skyrme" and check.isInside:
399
+ axs[0].plot( pheno.nm_den[:-1], pheno.nm_cs2[:-1], linestyle=lstyle, label=pheno.label )
400
+ elif model == "Skyrme" and check.isOutside:
401
+ axs[0].plot( pheno.nm_den[:-1], pheno.nm_cs2[:-1], linestyle=lstyle )
402
+ else:
403
+ axs[0].plot( pheno.nm_den[:-1], pheno.nm_cs2[:-1], linestyle=lstyle, label=pheno.label )
404
+ axs[1].plot( pheno.nm_kfn[:-1], pheno.nm_cs2[:-1], linestyle=lstyle )
405
+ #
406
+ #
407
+ elif matter.lower() == "sm":
408
+ #
409
+ if any(pheno.sm_pre):
410
+ if model == "Skyrme" and check.isInside:
411
+ axs[0].plot( pheno.sm_den[:-1], pheno.sm_cs2[:-1], linestyle=lstyle, label=pheno.label )
412
+ elif model == "Skyrme" and check.isOutside:
413
+ axs[0].plot( pheno.sm_den[:-1], pheno.sm_cs2[:-1], linestyle=lstyle )
414
+ else:
415
+ axs[0].plot( pheno.sm_den[:-1], pheno.sm_cs2[:-1], linestyle=lstyle, label=pheno.label )
416
+ axs[1].plot( pheno.sm_kf[:-1], pheno.sm_cs2[:-1], linestyle=lstyle )
417
+ if nuda.env.verb_output: pheno.print_outputs()
418
+ #
419
+ #
420
+ fig.legend(
421
+ loc="upper left",
422
+ bbox_to_anchor=(0.1, 1.0),
423
+ columnspacing=2,
424
+ fontsize="8",
425
+ ncol=4,
426
+ frameon=False,
427
+ )
428
+ #
429
+ #
430
+ if pname is not None:
431
+ plt.savefig(pname, dpi=300)
432
+ plt.close()
433
+ #