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,14 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def matter_setupMicro_effmass_fig( pname, models, matter = 'NM' ):
6
+
7
+ def matter_setupMicro_effmass_fig(pname, models, matter="NM"):
7
8
  """
8
- Plot the effective mass as function of the density and Fermi momentum.\
9
- The plot is 1x2 with:\
10
- [0]: effmass(den)
11
- [1]: effmass(kF)
9
+ Plot the effective mass as function of the density and Fermi momentum.
10
+
11
+ The plot is 1x2 with:
12
+
13
+ [0]: effmass(den). [1]: effmass(kF).
12
14
 
13
15
  :param pname: name of the figure (*.png)
14
16
  :type pname: str.
@@ -18,108 +20,282 @@ def matter_setupMicro_effmass_fig( pname, models, matter = 'NM' ):
18
20
  :type matter: str.
19
21
  """
20
22
  #
21
- print(f'Plot name: {pname}')
22
- print('models:',models)
23
- print('matter:',matter)
23
+ print(f"Plot name: {pname}")
24
+ print("models:", models)
25
+ print("matter:", matter)
24
26
  #
25
- fig, axs = plt.subplots(1,2)
26
- fig.tight_layout() # Or equivalently, "plt.tight_layout()"
27
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.8, wspace=0.05, hspace=0.05 )
27
+ fig, axs = plt.subplots(1, 2)
28
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
29
+ fig.subplots_adjust( left=0.12, bottom=0.12, right=0.95, top=0.85, wspace=0.05, hspace=0.05 )
28
30
  #
29
- axs[0].set_ylabel(r'Landau effective mass $m^*/m$')
30
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
31
- #axs[0].tick_params('x', labelbottom=False)
31
+ axs[0].set_ylabel(r"Landau effective mass $m^*/m$", fontsize='14')
32
+ axs[0].set_xlabel(r"$n_\text{nuc}$ (fm$^{-3}$)", fontsize='14')
33
+ # axs[0].tick_params('x', labelbottom=False)
32
34
  #
33
- #axs[1].tick_params('x', labelbottom=False)
34
- axs[1].tick_params('y', labelleft=False)
35
- axs[1].set_xlabel(r'$k_{F_n}$ (fm$^{-1}$)')
35
+ # axs[1].tick_params('x', labelbottom=False)
36
+ axs[1].tick_params("y", labelleft=False)
37
+ axs[1].set_xlabel(r"$k_{F}$ (fm$^{-1}$)", fontsize='14')
36
38
  #
37
- if matter.lower() == 'nm':
39
+ if matter.lower() == "nm":
38
40
  axs[0].set_xlim([0, 0.34])
39
41
  axs[0].set_ylim([0.6, 1.1])
40
42
  axs[1].set_xlim([0, 2.0])
41
43
  axs[1].set_ylim([0.6, 1.1])
42
- elif matter.lower() == 'sm':
44
+ elif matter.lower() == "sm":
43
45
  axs[0].set_xlim([0, 0.34])
44
46
  axs[0].set_ylim([0.6, 1.1])
45
47
  axs[1].set_xlim([0, 2.0])
46
48
  axs[1].set_ylim([0.6, 1.1])
47
- elif matter.lower() == 'am':
49
+ elif matter.lower() == "am":
48
50
  axs[0].set_xlim([0.05, 0.27])
49
51
  axs[0].set_ylim([0.7, 1.0])
50
52
  axs[1].set_xlim([0.7, 1.8])
51
53
  axs[1].set_ylim([0.7, 1.0])
52
54
  #
53
- #axs[1,0].set_ylabel(r'$\Delta_{1S0}/E_F$')
55
+ # axs[1,0].set_ylabel(r'$\Delta_{1S0}/E_F$')
54
56
  #
55
57
  for model in models:
56
58
  #
57
- ms = nuda.matter.setupMicroEffmass( model = model, matter = matter )
59
+ ms = nuda.matter.setupMicroEffmass(model=model, matter=matter)
60
+ #
61
+ lstyle = None
58
62
  #
59
- axs[0].text(0.08,0.75,'in '+matter)
60
- axs[1].text(0.90,0.75,'in '+matter)
61
- if matter.lower() == 'nm':
63
+ axs[0].text(0.08, 0.75, "in " + matter)
64
+ axs[1].text(0.90, 0.75, "in " + matter)
65
+ if matter.lower() == "nm":
62
66
  if ms.nm_effmass is not None:
63
67
  if ms.nm_effmass_err is not None:
64
- axs[0].errorbar( ms.nm_den, ms.nm_effmass, yerr=ms.nm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none', label=ms.label )
65
- axs[1].errorbar( ms.nm_kfn, ms.nm_effmass, yerr=ms.nm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none' )
68
+ axs[0].errorbar(
69
+ ms.nm_den,
70
+ ms.nm_effmass,
71
+ yerr=ms.nm_effmass_err,
72
+ marker=ms.marker,
73
+ markevery=ms.every,
74
+ linestyle=lstyle,
75
+ label=ms.label,
76
+ )
77
+ axs[1].errorbar(
78
+ ms.nm_kfn,
79
+ ms.nm_effmass,
80
+ yerr=ms.nm_effmass_err,
81
+ marker=ms.marker,
82
+ markevery=ms.every,
83
+ linestyle=lstyle,
84
+ )
66
85
  else:
67
- axs[0].plot( ms.nm_den, ms.nm_effmass, marker=ms.marker, markevery=ms.every, linestyle='none', label=ms.label )
68
- axs[1].plot( ms.nm_kfn, ms.nm_effmass, marker=ms.marker, markevery=ms.every, linestyle='none' )
69
- elif matter.lower() == 'sm':
86
+ axs[0].plot(
87
+ ms.nm_den,
88
+ ms.nm_effmass,
89
+ marker=ms.marker,
90
+ markevery=ms.every,
91
+ linestyle=lstyle,
92
+ label=ms.label,
93
+ )
94
+ axs[1].plot(
95
+ ms.nm_kfn,
96
+ ms.nm_effmass,
97
+ marker=ms.marker,
98
+ markevery=ms.every,
99
+ linestyle=lstyle,
100
+ )
101
+ elif matter.lower() == "sm":
70
102
  if ms.sm_effmass is not None:
71
103
  if ms.sm_effmass_err is not None:
72
- axs[0].errorbar( ms.sm_den, ms.sm_effmass, yerr=ms.sm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none', label=ms.label )
73
- axs[1].errorbar( ms.sm_kfn, ms.sm_effmass, yerr=ms.sm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none' )
104
+ axs[0].errorbar(
105
+ ms.sm_den,
106
+ ms.sm_effmass,
107
+ yerr=ms.sm_effmass_err,
108
+ marker=ms.marker,
109
+ markevery=ms.every,
110
+ linestyle=lstyle,
111
+ label=ms.label,
112
+ )
113
+ axs[1].errorbar(
114
+ ms.sm_kfn,
115
+ ms.sm_effmass,
116
+ yerr=ms.sm_effmass_err,
117
+ marker=ms.marker,
118
+ markevery=ms.every,
119
+ linestyle=lstyle,
120
+ )
74
121
  else:
75
- axs[0].plot( ms.sm_den, ms.sm_effmass, marker=ms.marker, markevery=ms.every, linestyle='none', label=ms.label )
76
- axs[1].plot( ms.sm_kfn, ms.sm_effmass, marker=ms.marker, markevery=ms.every, linestyle='none' )
77
- elif matter.lower() == 'am':
122
+ axs[0].plot(
123
+ ms.sm_den,
124
+ ms.sm_effmass,
125
+ marker=ms.marker,
126
+ markevery=ms.every,
127
+ linestyle=lstyle,
128
+ label=ms.label,
129
+ )
130
+ axs[1].plot(
131
+ ms.sm_kfn,
132
+ ms.sm_effmass,
133
+ marker=ms.marker,
134
+ markevery=ms.every,
135
+ linestyle=lstyle,
136
+ )
137
+ elif matter.lower() == "am":
78
138
  if ms.sm_effmass_n is not None:
79
139
  if ms.sm_effmass_err is not None:
80
- axs[0].errorbar( ms.sm_den, ms.sm_effmass, yerr=ms.sm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none', label=ms.label )
81
- axs[1].errorbar( ms.sm_kfn, ms.sm_effmass, yerr=ms.sm_effmass_err, marker=ms.marker, markevery=ms.every, linestyle='none' )
140
+ axs[0].errorbar(
141
+ ms.sm_den,
142
+ ms.sm_effmass,
143
+ yerr=ms.sm_effmass_err,
144
+ marker=ms.marker,
145
+ markevery=ms.every,
146
+ linestyle=lstyle,
147
+ label=ms.label,
148
+ )
149
+ axs[1].errorbar(
150
+ ms.sm_kfn,
151
+ ms.sm_effmass,
152
+ yerr=ms.sm_effmass_err,
153
+ marker=ms.marker,
154
+ markevery=ms.every,
155
+ linestyle=lstyle,
156
+ )
82
157
  else:
83
- ms_n_00, ms_p_00 = nuda.matter.effmass_emp( ms.sm_den , 0.0, mb = 'BHF' )
84
- ms_n_02, ms_p_02 = nuda.matter.effmass_emp( ms.am02_den , 0.2, mb = 'BHF' )
85
- ms_n_04, ms_p_04 = nuda.matter.effmass_emp( ms.am04_den , 0.4, mb = 'BHF' )
86
- axs[0].plot( ms.sm_den, ms.sm_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none', label=ms.label+'(neutrons)' )
87
- axs[0].plot( ms.am02_den, ms.am02_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none' )
88
- axs[0].plot( ms.am04_den, ms.am04_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none' )
89
- axs[0].plot( ms.sm_den, ms.sm_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none', label=ms.label+'(protons)' )
90
- axs[0].plot( ms.am02_den, ms.am02_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none' )
91
- axs[0].plot( ms.am04_den, ms.am04_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none' )
92
- axs[0].plot( ms.sm_den, ms_n_00, color=nuda.param.col[1], linestyle='solid', label='Fit(neutrons)' )
93
- axs[0].plot( ms.am02_den, ms_n_02, color=nuda.param.col[1], linestyle='solid' )
94
- axs[0].plot( ms.am04_den, ms_n_04, color=nuda.param.col[1], linestyle='solid' )
95
- axs[0].plot( ms.sm_den, ms_p_00, color=nuda.param.col[2], linestyle='solid', label='Fit(protons)' )
96
- axs[0].plot( ms.am02_den, ms_p_02, color=nuda.param.col[2], linestyle='solid' )
97
- axs[0].plot( ms.am04_den, ms_p_04, color=nuda.param.col[2], linestyle='solid' )
98
- axs[1].plot( ms.sm_kfn, ms.sm_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none' )
99
- axs[1].plot( ms.am02_kfn, ms.am02_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none' )
100
- axs[1].plot( ms.am04_kfn, ms.am04_effmass_n, marker='^', color=nuda.param.col[1], markevery=ms.every, linestyle='none' )
101
- axs[1].plot( ms.sm_kfn, ms.sm_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none' )
102
- axs[1].plot( ms.am02_kfn, ms.am02_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none' )
103
- axs[1].plot( ms.am04_kfn, ms.am04_effmass_p, marker='v', color=nuda.param.col[2], markevery=ms.every, linestyle='none' )
104
- axs[1].plot( ms.sm_kfn, ms_n_00, color=nuda.param.col[1], linestyle='solid' )
105
- axs[1].plot( ms.am02_kfn, ms_n_02, color=nuda.param.col[1], linestyle='solid' )
106
- axs[1].plot( ms.am04_kfn, ms_n_04, color=nuda.param.col[1], linestyle='solid' )
107
- axs[1].plot( ms.sm_kfn, ms_p_00, color=nuda.param.col[2], linestyle='solid' )
108
- axs[1].plot( ms.am02_kfn, ms_p_02, color=nuda.param.col[2], linestyle='solid' )
109
- axs[1].plot( ms.am04_kfn, ms_p_04, color=nuda.param.col[2], linestyle='solid' )
110
- axs[0].text(0.23,0.84,r'$\delta=0.4$',rotation=0)
111
- axs[0].text(0.23,0.81,r'$\delta=0.2$',rotation=0)
112
- axs[0].text(0.23,0.785,'SM',rotation=0)
113
- axs[0].text(0.23,0.76,r'$\delta=0.2$',rotation=0)
114
- axs[0].text(0.23,0.74,r'$\delta=0.4$',rotation=0)
115
- axs[1].text(0.90,0.92,'SM',rotation=0)
116
- axs[1].text(0.90,0.94,r'$\delta=0.2$',rotation=0)
117
- axs[1].text(0.95,0.96,r'$\delta=0.4$',rotation=0)
118
- if nuda.env.verb_output: ms.print_outputs( )
158
+ ms_n_00, ms_p_00 = nuda.matter.effmass_emp( ms.sm_den, 0.0, mb="BHF" )
159
+ ms_n_02, ms_p_02 = nuda.matter.effmass_emp( ms.am02_den, 0.2, mb="BHF" )
160
+ ms_n_04, ms_p_04 = nuda.matter.effmass_emp( ms.am04_den, 0.4, mb="BHF" )
161
+ axs[0].plot(
162
+ ms.sm_den,
163
+ ms.sm_effmass_n,
164
+ marker="^",
165
+ color=nuda.param.col[1],
166
+ markevery=ms.every,
167
+ linestyle=lstyle,
168
+ label=ms.label + "(neutrons)",
169
+ )
170
+ axs[0].plot(
171
+ ms.am02_den,
172
+ ms.am02_effmass_n,
173
+ marker="^",
174
+ color=nuda.param.col[1],
175
+ markevery=ms.every,
176
+ linestyle=lstyle,
177
+ )
178
+ axs[0].plot(
179
+ ms.am04_den,
180
+ ms.am04_effmass_n,
181
+ marker="^",
182
+ color=nuda.param.col[1],
183
+ markevery=ms.every,
184
+ linestyle=lstyle,
185
+ )
186
+ axs[0].plot(
187
+ ms.sm_den,
188
+ ms.sm_effmass_p,
189
+ marker="v",
190
+ color=nuda.param.col[2],
191
+ markevery=ms.every,
192
+ linestyle=lstyle,
193
+ label=ms.label + "(protons)",
194
+ )
195
+ axs[0].plot(
196
+ ms.am02_den,
197
+ ms.am02_effmass_p,
198
+ marker="v",
199
+ color=nuda.param.col[2],
200
+ markevery=ms.every,
201
+ linestyle=lstyle,
202
+ )
203
+ axs[0].plot(
204
+ ms.am04_den,
205
+ ms.am04_effmass_p,
206
+ marker="v",
207
+ color=nuda.param.col[2],
208
+ markevery=ms.every,
209
+ linestyle=lstyle,
210
+ )
211
+ axs[0].plot(
212
+ ms.sm_den,
213
+ ms_n_00,
214
+ color=nuda.param.col[1],
215
+ linestyle="dotted",
216
+ label="Fit(neutrons)",
217
+ )
218
+ axs[0].plot( ms.am02_den, ms_n_02, color=nuda.param.col[1], linestyle="dotted" )
219
+ axs[0].plot( ms.am04_den, ms_n_04, color=nuda.param.col[1], linestyle="dotted" )
220
+ axs[0].plot( ms.sm_den, ms_p_00, color=nuda.param.col[2], linestyle="dotted", label="Fit(protons)" )
221
+ axs[0].plot( ms.am02_den, ms_p_02, color=nuda.param.col[2], linestyle="dotted" )
222
+ axs[0].plot( ms.am04_den, ms_p_04, color=nuda.param.col[2], linestyle="dotted" )
223
+ axs[1].plot(
224
+ ms.sm_kfn,
225
+ ms.sm_effmass_n,
226
+ marker="^",
227
+ color=nuda.param.col[1],
228
+ markevery=ms.every,
229
+ linestyle=lstyle,
230
+ )
231
+ axs[1].plot(
232
+ ms.am02_kfn,
233
+ ms.am02_effmass_n,
234
+ marker="^",
235
+ color=nuda.param.col[1],
236
+ markevery=ms.every,
237
+ linestyle=lstyle,
238
+ )
239
+ axs[1].plot(
240
+ ms.am04_kfn,
241
+ ms.am04_effmass_n,
242
+ marker="^",
243
+ color=nuda.param.col[1],
244
+ markevery=ms.every,
245
+ linestyle=lstyle,
246
+ )
247
+ axs[1].plot(
248
+ ms.sm_kfn,
249
+ ms.sm_effmass_p,
250
+ marker="v",
251
+ color=nuda.param.col[2],
252
+ markevery=ms.every,
253
+ linestyle=lstyle,
254
+ )
255
+ axs[1].plot(
256
+ ms.am02_kfn,
257
+ ms.am02_effmass_p,
258
+ marker="v",
259
+ color=nuda.param.col[2],
260
+ markevery=ms.every,
261
+ linestyle=lstyle,
262
+ )
263
+ axs[1].plot(
264
+ ms.am04_kfn,
265
+ ms.am04_effmass_p,
266
+ marker="v",
267
+ color=nuda.param.col[2],
268
+ markevery=ms.every,
269
+ linestyle=lstyle,
270
+ )
271
+ axs[1].plot( ms.sm_kfn, ms_n_00, color=nuda.param.col[1], linestyle="dotted" )
272
+ axs[1].plot( ms.am02_kfn, ms_n_02, color=nuda.param.col[1], linestyle="dotted" )
273
+ axs[1].plot( ms.am04_kfn, ms_n_04, color=nuda.param.col[1], linestyle="dotted" )
274
+ axs[1].plot( ms.sm_kfn, ms_p_00, color=nuda.param.col[2], linestyle="dotted" )
275
+ axs[1].plot( ms.am02_kfn, ms_p_02, color=nuda.param.col[2], linestyle="dotted" )
276
+ axs[1].plot( ms.am04_kfn, ms_p_04, color=nuda.param.col[2], linestyle="dotted" )
277
+ axs[0].text(0.23, 0.84, r"$\delta=0.4$", rotation=0)
278
+ axs[0].text(0.23, 0.81, r"$\delta=0.2$", rotation=0)
279
+ axs[0].text(0.23, 0.785, "SM", rotation=0)
280
+ axs[0].text(0.23, 0.76, r"$\delta=0.2$", rotation=0)
281
+ axs[0].text(0.23, 0.74, r"$\delta=0.4$", rotation=0)
282
+ axs[1].text(0.90, 0.92, "SM", rotation=0)
283
+ axs[1].text(0.90, 0.94, r"$\delta=0.2$", rotation=0)
284
+ axs[1].text(0.95, 0.96, r"$\delta=0.4$", rotation=0)
285
+ if nuda.env.verb_output:
286
+ ms.print_outputs()
119
287
  #
120
- #axs[1,0].legend(loc='upper right',fontsize='8')
121
- fig.legend(loc='upper left',bbox_to_anchor=(0.08,1.0),columnspacing=2,fontsize='8',ncol=3,frameon=False)
288
+ # axs[1,0].legend(loc='upper right',fontsize='8')
289
+ fig.legend(
290
+ loc="upper left",
291
+ bbox_to_anchor=(0.08, 1.0),
292
+ columnspacing=2,
293
+ fontsize="8",
294
+ ncol=3,
295
+ frameon=False,
296
+ )
122
297
  #
123
298
  if pname is not None:
124
- plt.savefig(pname, dpi=300)
125
- plt.close()
299
+ plt.savefig(pname, dpi=300)
300
+ plt.close()
301
+ #
@@ -3,10 +3,13 @@ import matplotlib.pyplot as plt
3
3
 
4
4
  import nucleardatapy as nuda
5
5
 
6
- def matter_setupMicro_err_NM_fig( pname, models ):
6
+
7
+ def matter_setupMicro_err_NM_fig(pname, models):
7
8
  """
8
- Plot uncertainties (err) estimated by different authors in NM.\
9
- The plot is 1x1 with:\
9
+ Plot uncertainties (err) estimated by different authors in NM.
10
+
11
+ The plot is 1x1 with:
12
+
10
13
  [0]: uncertainty for E/A versus den.
11
14
 
12
15
  :param pname: name of the figure (*.png)
@@ -16,31 +19,53 @@ def matter_setupMicro_err_NM_fig( pname, models ):
16
19
 
17
20
  """
18
21
  #
19
- print(f'Plot name: {pname}')
22
+ print(f"Plot name: {pname}")
20
23
  #
21
- den = 0.03*np.arange(13)
24
+ den = 0.03 * np.arange(13)
22
25
  #
23
- fig, axs = plt.subplots(1,1)
24
- fig.tight_layout() # Or equivalently, "plt.tight_layout()"
25
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.2, hspace=0.2 )
26
+ fig, axs = plt.subplots(1, 1)
27
+ fig.tight_layout() # Or equivalently, "plt.tight_layout()"
28
+ fig.subplots_adjust(
29
+ left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.2, hspace=0.2
30
+ )
26
31
  #
27
- axs.set_xlabel(r'n (fm$^{-3}$)',fontsize='12')
28
- axs.set_ylabel(r'$\Delta E_{NM}/E_{NM}$',fontsize='12')
29
- axs.set_xlim([0, 0.4])
30
- axs.set_ylim([0, 0.3])
32
+ axs.set_xlabel(r"$n_\text{nuc}$ (fm$^{-3}$)", fontsize="14")
33
+ axs.set_ylabel(r"$\Delta E_{int,NM}/E_{int,NM}$", fontsize="14")
34
+ axs.set_xlim([0, 0.37])
35
+ axs.set_ylim([0, 0.5])
31
36
  #
32
37
  for model in models:
33
38
  #
34
- mic = nuda.matter.setupMicro( model = model )
35
- if nuda.env.verb_output: mic.print_outputs( )
39
+ mic = nuda.matter.setupMicro(model=model)
40
+ if nuda.env.verb_output:
41
+ mic.print_outputs()
36
42
  if mic.nm_e2a is not None:
37
- print('model:',model)
38
- axs.plot( mic.nm_den, mic.nm_e2a_err/mic.nm_e2a, marker=mic.marker, markevery=mic.every, linestyle=mic.linestyle, label=mic.label )
39
- #axs.plot( den, nuda.matter.uncertainty_stat(den), linestyle='dashed', linewidth=3, label='fit (MBPT)' )
40
- axs.plot( den, nuda.matter.uncertainty_stat(den,err='MBPT'), linestyle='dashed', linewidth=3, label='fit (MBPT)' )
41
- axs.plot( den, nuda.matter.uncertainty_stat(den,err='QMC'), linestyle='dashed', linewidth=3, label='fit (QMC)' )
43
+ print("model:", model)
44
+ axs.plot(
45
+ mic.nm_den,
46
+ mic.nm_e2a_err / mic.nm_e2a_int,
47
+ marker=mic.marker,
48
+ markevery=mic.every,
49
+ linestyle=mic.linestyle,
50
+ label=mic.label,
51
+ )
52
+ # axs.plot( den, nuda.matter.uncertainty_stat(den), linestyle='dashed', linewidth=3, label='fit (MBPT)' )
53
+ axs.plot(
54
+ den,
55
+ nuda.matter.uncertainty_stat(den, err="MBPT"),
56
+ linestyle="dashed",
57
+ linewidth=3,
58
+ label="fit (MBPT)",
59
+ )
60
+ axs.plot(
61
+ den,
62
+ nuda.matter.uncertainty_stat(den, err="QMC"),
63
+ linestyle="dashed",
64
+ linewidth=3,
65
+ label="fit (QMC)",
66
+ )
42
67
  #
43
- axs.legend(loc='upper left',fontsize='12', ncol=3)
68
+ axs.legend(loc="upper left", fontsize="12", ncol=3)
44
69
  #
45
70
  if pname is not None:
46
71
  plt.savefig(pname, dpi=200)