nucleardatapy 0.2.0__py3-none-any.whl → 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. nucleardatapy/__init__.py +3 -1
  2. nucleardatapy/astro/setup_gw.py +18 -18
  3. nucleardatapy/astro/setup_mr.py +9 -1
  4. nucleardatapy/astro/setup_mup.py +10 -10
  5. nucleardatapy/corr/setup_EsymDen.py +0 -5
  6. nucleardatapy/corr/setup_EsymLsym.py +50 -17
  7. nucleardatapy/corr/setup_KsatQsat.py +170 -69
  8. nucleardatapy/crust/setup_crust.py +403 -120
  9. nucleardatapy/data/astro/NICER/J0740+6620.dat +1 -0
  10. nucleardatapy/data/crust/2018-PCPFDDG-BSK22.dat +83 -0
  11. nucleardatapy/data/crust/2018-PCPFDDG-BSK24.dat +74 -0
  12. nucleardatapy/data/crust/2018-PCPFDDG-BSK25.dat +130 -0
  13. nucleardatapy/data/crust/2018-PCPFDDG-BSK26.dat +81 -0
  14. nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-NM.dat → 2006-BHF-Av18-E2A-NM.dat} +8 -8
  15. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-SM.dat +11 -0
  16. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.2.dat +11 -0
  17. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.4.dat +11 -0
  18. nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
  19. nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
  20. nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
  21. nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
  22. nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
  23. nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
  24. nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
  25. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
  26. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
  27. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
  28. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
  29. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
  30. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
  31. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
  32. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
  33. nucleardatapy/data/nuclei/masses/Theory/2023-BSkG3.txt +0 -4
  34. nucleardatapy/data/nuclei/masses/Theory/2025-BSkG4.txt +0 -1
  35. nucleardatapy/env.py +1 -1
  36. nucleardatapy/eos/__init__.py +4 -3
  37. nucleardatapy/eos/setupCC.py +429 -0
  38. nucleardatapy/eos/setup_am.py +71 -34
  39. nucleardatapy/eos/setup_am_Beq.py +48 -17
  40. nucleardatapy/eos/setup_am_Leq.py +81 -50
  41. nucleardatapy/fig/__init__.py +29 -7
  42. nucleardatapy/fig/astro_setupGW_fig.py +5 -5
  43. nucleardatapy/fig/astro_setupMR_fig.py +12 -10
  44. nucleardatapy/fig/astro_setupMasses_fig.py +4 -4
  45. nucleardatapy/fig/astro_setupMtov_fig.py +4 -4
  46. nucleardatapy/fig/astro_setupMup_fig.py +5 -5
  47. nucleardatapy/fig/corr_setupEsymDen_fig.py +12 -5
  48. nucleardatapy/fig/corr_setupEsymLsym_fig.py +18 -5
  49. nucleardatapy/fig/corr_setupKsatQsat_fig.py +19 -15
  50. nucleardatapy/fig/crust_setupCrust_fig.py +7 -7
  51. nucleardatapy/fig/eos_setupAMBeq_fig.py +1338 -64
  52. nucleardatapy/fig/eos_setupAMLeq_fig.py +200 -68
  53. nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +364 -0
  54. nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +337 -0
  55. nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +343 -0
  56. nucleardatapy/fig/eos_setupAM_fig.py +470 -47
  57. nucleardatapy/fig/eos_setupCC_fig.py +240 -0
  58. nucleardatapy/fig/hnuc_setupChart_fig.py +2 -2
  59. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +4 -4
  60. nucleardatapy/fig/matter_all_fig.py +954 -0
  61. nucleardatapy/fig/matter_setupCheck_fig.py +103 -0
  62. nucleardatapy/fig/matter_setupFFGLep_fig.py +70 -0
  63. nucleardatapy/fig/matter_setupFFGNuc_fig.py +268 -104
  64. nucleardatapy/fig/matter_setupHIC_fig.py +98 -58
  65. nucleardatapy/fig/matter_setupMicroEsym_fig.py +267 -51
  66. nucleardatapy/fig/matter_setupMicro_LP_fig.py +175 -78
  67. nucleardatapy/fig/matter_setupMicro_band_fig.py +116 -47
  68. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +264 -34
  69. nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +41 -18
  70. nucleardatapy/fig/matter_setupMicro_fig.py +332 -98
  71. nucleardatapy/fig/matter_setupMicro_gap_fig.py +219 -92
  72. nucleardatapy/fig/matter_setupNEPStats_fig.py +96 -0
  73. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +201 -61
  74. nucleardatapy/fig/matter_setupPheno_fig.py +392 -85
  75. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +286 -0
  76. nucleardatapy/fig/nuc_setupBEExp_fig.py +232 -70
  77. nucleardatapy/fig/nuc_setupBETheo_fig.py +344 -0
  78. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +59 -0
  79. nucleardatapy/fig/nuc_setupRchExp_fig.py +139 -0
  80. nucleardatapy/fig/nuc_setupRchTheo_fig.py +143 -0
  81. nucleardatapy/fig/nuc_setupRnpExp_fig.py +88 -0
  82. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +133 -0
  83. nucleardatapy/hello.py +6 -0
  84. nucleardatapy/hnuc/__init__.py +3 -3
  85. nucleardatapy/hnuc/{setup_be1L_exp.py → setup_re1L_exp.py} +6 -6
  86. nucleardatapy/hnuc/{setup_be1Xi_exp.py → setup_re1Xi_exp.py} +5 -5
  87. nucleardatapy/hnuc/{setup_be2L_exp.py → setup_re2L_exp.py} +6 -6
  88. nucleardatapy/matter/__init__.py +14 -13
  89. nucleardatapy/matter/setup_check.py +97 -0
  90. nucleardatapy/matter/setup_ffg.py +72 -38
  91. nucleardatapy/matter/setup_hic.py +91 -74
  92. nucleardatapy/matter/setup_micro.py +1698 -1019
  93. nucleardatapy/matter/setup_micro_band.py +11 -6
  94. nucleardatapy/matter/setup_micro_effmass.py +55 -2
  95. nucleardatapy/matter/setup_micro_esym.py +39 -34
  96. nucleardatapy/matter/setup_micro_gap.py +26 -19
  97. nucleardatapy/matter/setup_micro_lp.py +20 -19
  98. nucleardatapy/matter/setup_nep.py +175 -92
  99. nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
  100. nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
  101. nucleardatapy/matter/setup_pheno.py +121 -45
  102. nucleardatapy/matter/setup_pheno_esym.py +14 -19
  103. nucleardatapy/nuc/__init__.py +2 -2
  104. nucleardatapy/nuc/setup_be_exp.py +345 -333
  105. nucleardatapy/nuc/setup_be_theo.py +366 -178
  106. nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
  107. nucleardatapy/nuc/setup_rch_exp.py +49 -6
  108. nucleardatapy/nuc/setup_rch_theo.py +72 -3
  109. nucleardatapy/nuc/{setup_nskin_exp.py → setup_rnp_exp.py} +59 -65
  110. nucleardatapy/nuc/{setup_nskin_theo.py → setup_rnp_theo.py} +35 -39
  111. nucleardatapy-1.0.0.dist-info/METADATA +553 -0
  112. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/RECORD +156 -128
  113. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/WHEEL +1 -1
  114. tests/test_corr_setupKsatQsat.py +3 -1
  115. tests/test_matter_setupMicro.py +37 -10
  116. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
  117. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
  118. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
  119. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
  120. nucleardatapy/fig/matter_ENM_fig.py +0 -119
  121. nucleardatapy/fig/matter_ESM_fig.py +0 -119
  122. nucleardatapy/fig/matter_Esym_fig.py +0 -122
  123. nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
  124. nucleardatapy-0.2.0.dist-info/METADATA +0 -115
  125. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
  126. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
  127. /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
  128. /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
  129. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
  130. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
  131. /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
  132. /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
  133. /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
  134. /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
  135. /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
  136. /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
  137. /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
  138. /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
  139. /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
  140. /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
  141. /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
  142. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-AM.dat → 2006-BHF-Av18-E2A-AM.dat} +0 -0
  143. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-SM.dat → 2006-BHF-Av18-E2A-SM.dat} +0 -0
  144. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-Esym2-SM.dat → 2006-BHF-Av18-Esym2-SM.dat} +0 -0
  145. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-NM-FreeSpectrum.dat} +0 -0
  146. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-SelfEnergy.dat → 2006-BHF-Av18-GAP-NM-SelfEnergy.dat} +0 -0
  147. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-SM-FreeSpectrum.dat} +0 -0
  148. /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-SelfEnergy.dat → 2006-BHF-Av18-GAP-SM-SelfEnergy.dat} +0 -0
  149. /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
  150. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL59.dat → 2019-MBPT-NM-DHSL59.dat} +0 -0
  151. /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL69.dat → 2019-MBPT-NM-DHSL69.dat} +0 -0
  152. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL59.dat → 2019-MBPT-SM-DHSL59.dat} +0 -0
  153. /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL69.dat → 2019-MBPT-SM-DHSL69.dat} +0 -0
  154. /nucleardatapy/data/matter/micro/{2023-MBPT-NM.csv → 2020-MBPT-NM.csv} +0 -0
  155. /nucleardatapy/data/matter/micro/{2023-MBPT-SM.csv → 2020-MBPT-SM.csv} +0 -0
  156. /nucleardatapy/data/nuclei/{nskin → rnp}/208Pb.dat +0 -0
  157. /nucleardatapy/data/nuclei/{nskin → rnp}/48Ca.dat +0 -0
  158. /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
  159. /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
  160. /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
  161. /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
  162. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
  163. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
  164. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info/licenses}/LICENSE +0 -0
  165. {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,119 +0,0 @@
1
- import numpy as np
2
- import matplotlib.pyplot as plt
3
-
4
- import nucleardatapy as nuda
5
-
6
- def matter_ENM_fig( pname, micro_mbs, pheno_models, band ):
7
- """
8
- Plot nucleonic energy per particle E/A in NM.\
9
- The plot is 1x2 with:\
10
- [0,0]: E/A versus den (micro). [0,1]: E/A versus den (pheno).\
11
-
12
- :param pname: name of the figure (*.png)
13
- :type pname: str.
14
- :param micro_mbs: many-body (mb) approach considered.
15
- :type micro_mbs: str.
16
- :param pheno_models: models to run on.
17
- :type pheno_models: array of str.
18
- :param band: object instantiated on the reference band.
19
- :type band: 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=None, top=0.9, wspace=0.05, hspace=0.3 )
28
- #
29
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
- axs[0].set_ylabel(r'$e_\text{NM}(n)$')
31
- axs[0].set_xlim([0, 0.33])
32
- axs[0].set_ylim([0, 30])
33
- #
34
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
- #axs[1].set_ylabel(r'$e_{sym}(n)$')
36
- axs[1].set_xlim([0, 0.33])
37
- axs[1].set_ylim([0, 30])
38
- axs[1].tick_params('y', labelleft=False)
39
- #
40
- mb_check = []
41
- k = 0
42
- #
43
- for mb in micro_mbs:
44
- #
45
- models, models_lower = nuda.matter.micro_models_mb( mb )
46
- #
47
- for model in models:
48
- #
49
- enm = nuda.matter.setupMicro( model = model )
50
- #
51
- if enm.nm_e2a is not None:
52
- print('mb:',mb,'model:',model)
53
- if mb in mb_check:
54
- if enm.marker:
55
- if enm.err:
56
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=None, errorevery=enm.every, color=nuda.param.col[k] )
57
- else:
58
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=None, markevery=enm.every, color=nuda.param.col[k] )
59
- else:
60
- if enm.err:
61
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=enm.linestyle, errorevery=enm.every, color=nuda.param.col[k] )
62
- else:
63
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=enm.linestyle, markevery=enm.every, color=nuda.param.col[k] )
64
- else:
65
- mb_check.append(mb)
66
- k += 1
67
- if enm.marker:
68
- if enm.err:
69
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=None, label=mb, errorevery=enm.every, color=nuda.param.col[k] )
70
- else:
71
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=None, label=mb, markevery=enm.every, color=nuda.param.col[k] )
72
- else:
73
- if enm.err:
74
- axs[0].errorbar( enm.nm_den, enm.nm_e2a, yerr=enm.nm_e2a_err, marker=enm.marker, linestyle=enm.linestyle, label=mb, errorevery=enm.every, color=nuda.param.col[k] )
75
- else:
76
- axs[0].plot( enm.nm_den, enm.nm_e2a, marker=enm.marker, linestyle=enm.linestyle, label=mb, markevery=enm.every, color=nuda.param.col[k] )
77
- #axs[0].plot( esym.den, esym.esym, color=nuda.param.col[k], label=mb )
78
- if nuda.env.verb: esm.print_outputs( )
79
- axs[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 )
80
- axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
81
- axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
82
- axs[0].text(0.03,2,'microscopic models',fontsize='10')
83
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
84
- #
85
- model_check = []
86
- k = 0
87
- #
88
- for model in pheno_models:
89
- #
90
- params, params_lower = nuda.matter.pheno_params( model = model )
91
- #
92
- for param in params:
93
- #
94
- enm = nuda.matter.setupPheno( model = model, param = param )
95
- #
96
- if enm.nm_e2a is not None:
97
- print('model:',model,' param:',param)
98
- if model in model_check:
99
- axs[1].plot( enm.nm_den, enm.nm_e2a, color=nuda.param.col[k] )
100
- else:
101
- model_check.append(model)
102
- k += 1
103
- axs[1].plot( enm.nm_den, enm.nm_e2a, color=nuda.param.col[k], label=model )
104
- #pheno.label=None
105
- #axs[1].plot( esym.den, esym.esym, label=esym.label )
106
- if nuda.env.verb: esym.print_outputs( )
107
- 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 )
108
- axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
109
- axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
110
- axs[1].text(0.03,2,'phenomenological models',fontsize='10')
111
- #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
112
- #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
113
- fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
114
- #
115
- #plt.tight_layout()
116
- if pname is not None:
117
- plt.savefig(pname, dpi=200)
118
- plt.close()
119
- #
@@ -1,119 +0,0 @@
1
- import numpy as np
2
- import matplotlib.pyplot as plt
3
-
4
- import nucleardatapy as nuda
5
-
6
- def matter_ESM_fig( pname, micro_mbs, pheno_models, band ):
7
- """
8
- Plot nucleonic energy per particle E/A in matter.\
9
- The plot is 1x2 with:\
10
- [0,0]: E/A versus den (micro). [0,1]: E/A versus den (pheno).\
11
-
12
- :param pname: name of the figure (*.png)
13
- :type pname: str.
14
- :param micro_mbs: many-body (mb) approach considered.
15
- :type micro_mbs: str.
16
- :param pheno_models: models to run on.
17
- :type pheno_models: array of str.
18
- :param band: object instantiated on the reference band.
19
- :type band: 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=None, top=0.9, wspace=0.05, hspace=0.3 )
28
- #
29
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
30
- axs[0].set_ylabel(r'$e_\text{SM}(n)$')
31
- axs[0].set_xlim([0, 0.33])
32
- axs[0].set_ylim([-25, 5])
33
- #
34
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
35
- #axs[1].set_ylabel(r'$e_{sym}(n)$')
36
- axs[1].set_xlim([0, 0.33])
37
- axs[1].set_ylim([-25, 5])
38
- axs[1].tick_params('y', labelleft=False)
39
- #
40
- mb_check = []
41
- k = 0
42
- #
43
- for mb in micro_mbs:
44
- #
45
- models, models_lower = nuda.matter.micro_models_mb( mb )
46
- #
47
- for model in models:
48
- #
49
- esm = nuda.matter.setupMicro( model = model )
50
- #
51
- if esm.sm_e2a is not None:
52
- print('mb:',mb,'model:',model)
53
- if mb in mb_check:
54
- if esm.marker:
55
- if esm.err:
56
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=None, errorevery=esm.every, color=nuda.param.col[k] )
57
- else:
58
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=None, markevery=esm.every, color=nuda.param.col[k] )
59
- else:
60
- if esm.err:
61
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=esm.linestyle, errorevery=esm.every, color=nuda.param.col[k] )
62
- else:
63
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=esm.linestyle, markevery=esm.every, color=nuda.param.col[k] )
64
- else:
65
- mb_check.append(mb)
66
- k += 1
67
- if esm.marker:
68
- if esm.err:
69
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=None, label=mb, errorevery=esm.every, color=nuda.param.col[k] )
70
- else:
71
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=None, label=mb, markevery=esm.every, color=nuda.param.col[k] )
72
- else:
73
- if esm.err:
74
- axs[0].errorbar( esm.sm_den, esm.sm_e2a, yerr=esm.sm_e2a_err, marker=esm.marker, linestyle=esm.linestyle, label=mb, errorevery=esm.every, color=nuda.param.col[k] )
75
- else:
76
- axs[0].plot( esm.sm_den, esm.sm_e2a, marker=esm.marker, linestyle=esm.linestyle, label=mb, markevery=esm.every, color=nuda.param.col[k] )
77
- #axs[0].plot( esym.den, esym.esym, color=nuda.param.col[k], label=mb )
78
- if nuda.env.verb: esm.print_outputs( )
79
- axs[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 )
80
- axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
81
- axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
82
- axs[0].text(0.03,2,'microscopic models',fontsize='10')
83
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
84
- #
85
- model_check = []
86
- k = 0
87
- #
88
- for model in pheno_models:
89
- #
90
- params, params_lower = nuda.matter.pheno_params( model = model )
91
- #
92
- for param in params:
93
- #
94
- esm = nuda.matter.setupPheno( model = model, param = param )
95
- #
96
- if esm.sm_e2a is not None:
97
- print('model:',model,' param:',param)
98
- if model in model_check:
99
- axs[1].plot( esm.sm_den, esm.sm_e2a, color=nuda.param.col[k] )
100
- else:
101
- model_check.append(model)
102
- k += 1
103
- axs[1].plot( esm.sm_den, esm.sm_e2a, color=nuda.param.col[k], label=model )
104
- #pheno.label=None
105
- #axs[1].plot( esym.den, esym.esym, label=esym.label )
106
- if nuda.env.verb: esym.print_outputs( )
107
- 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 )
108
- axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
109
- axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
110
- axs[1].text(0.03,2,'phenomenological models',fontsize='10')
111
- #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
112
- #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
113
- fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
114
- #
115
- #plt.tight_layout()
116
- if pname is not None:
117
- plt.savefig(pname, dpi=200)
118
- plt.close()
119
- #
@@ -1,122 +0,0 @@
1
- import numpy as np
2
- import matplotlib.pyplot as plt
3
-
4
- import nucleardatapy as nuda
5
-
6
- def matter_Esym_fig( pname, micro_mbs, pheno_models, band ):
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.\
12
-
13
- :param pname: name of the figure (*.png)
14
- :type pname: str.
15
- :param mb: many-body (mb) approach considered.
16
- :type mb: str.
17
- :param models: models to run on.
18
- :type models: array of str.
19
- :param band: object instantiated on the reference band.
20
- :type band: object.
21
- :param matter: can be 'SM' or 'NM'.
22
- :type matter: str.
23
-
24
- """
25
- #
26
- print(f'Plot name: {pname}')
27
- #
28
- fig, axs = plt.subplots(1,2)
29
- #fig.tight_layout() # Or equivalently, "plt.tight_layout()"
30
- fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
31
- #
32
- axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
33
- axs[0].set_ylabel(r'$e_\text{sym}(n)$')
34
- axs[0].set_xlim([0, 0.33])
35
- axs[0].set_ylim([0, 60])
36
- #
37
- axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
38
- #axs[1].set_ylabel(r'$e_{sym}(n)$')
39
- axs[1].set_xlim([0, 0.33])
40
- axs[1].set_ylim([0, 60])
41
- axs[1].tick_params('y', labelleft=False)
42
- #
43
- mb_check = []
44
- k = 0
45
- #
46
- for mb in micro_mbs:
47
- #
48
- models, models_lower = nuda.matter.micro_esym_models_mb( mb )
49
- #
50
- for model in models:
51
- #
52
- esym = nuda.matter.setupMicroEsym( model = model )
53
- #
54
- if esym.esym is not None:
55
- print('mb:',mb,'model:',model)
56
- if mb in mb_check:
57
- if esym.marker:
58
- if esym.err:
59
- axs[0].errorbar( esym.den, esym.esym, yerr=esym.esym_err, marker=esym.marker, linestyle=None, errorevery=esym.every, color=nuda.param.col[k] )
60
- else:
61
- axs[0].plot( esym.den, esym.esym, marker=esym.marker, linestyle=None, markevery=esym.every, color=nuda.param.col[k] )
62
- else:
63
- if esym.err:
64
- axs[0].errorbar( esym.den, esym.esym, yerr=esym.esym_err, marker=esym.marker, linestyle=esym.linestyle, errorevery=esym.every, color=nuda.param.col[k] )
65
- else:
66
- axs[0].plot( esym.den, esym.esym, marker=esym.marker, linestyle=esym.linestyle, markevery=esym.every, color=nuda.param.col[k] )
67
- else:
68
- mb_check.append(mb)
69
- k += 1
70
- if esym.marker:
71
- if esym.err:
72
- axs[0].errorbar( esym.den, esym.esym, yerr=esym.esym_err, marker=esym.marker, linestyle=None, label=mb, errorevery=esym.every, color=nuda.param.col[k] )
73
- else:
74
- axs[0].plot( esym.den, esym.esym, marker=esym.marker, linestyle=None, label=mb, markevery=esym.every, color=nuda.param.col[k] )
75
- else:
76
- if esym.err:
77
- axs[0].errorbar( esym.den, esym.esym, yerr=esym.esym_err, marker=esym.marker, linestyle=esym.linestyle, label=mb, errorevery=esym.every, color=nuda.param.col[k] )
78
- else:
79
- axs[0].plot( esym.den, esym.esym, marker=esym.marker, linestyle=esym.linestyle, label=mb, markevery=esym.every, color=nuda.param.col[k] )
80
- #axs[0].plot( esym.den, esym.esym, color=nuda.param.col[k], label=mb )
81
- if nuda.env.verb: esym.print_outputs( )
82
- axs[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 )
83
- axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
84
- axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
85
- axs[0].text(0.05,5,'microscopic models',fontsize='10')
86
- #axs[0].legend(loc='upper left',fontsize='8', ncol=3)
87
- #
88
- model_check = []
89
- k = 0
90
- #
91
- for model in pheno_models:
92
- #
93
- params, params_lower = nuda.matter.pheno_params( model = model )
94
- #
95
- for param in params:
96
- #
97
- esym = nuda.matter.setupPhenoEsym( model = model, param = param )
98
- #
99
- if esym.esym is not None:
100
- print('model:',model,' param:',param)
101
- if model in model_check:
102
- axs[1].plot( esym.den, esym.esym, color=nuda.param.col[k] )
103
- else:
104
- model_check.append(model)
105
- k += 1
106
- axs[1].plot( esym.den, esym.esym, color=nuda.param.col[k], label=model )
107
- #pheno.label=None
108
- #axs[1].plot( esym.den, esym.esym, label=esym.label )
109
- if nuda.env.verb: esym.print_outputs( )
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.05,5,'phenomenological models',fontsize='10')
114
- #axs[1].legend(loc='upper left',fontsize='8', ncol=2)
115
- #axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
116
- fig.legend(loc='upper left',bbox_to_anchor=(0.2,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
117
- #
118
- #plt.tight_layout()
119
- if pname is not None:
120
- plt.savefig(pname, dpi=200)
121
- plt.close()
122
- #
@@ -1,68 +0,0 @@
1
- import numpy as np
2
- import matplotlib.pyplot as plt
3
-
4
- import nucleardatapy as nuda
5
-
6
- def matter_setupNEPModelDist_fig( pname, models ):
7
- """
8
- Plot nucleonic energy per particle E/A in matter.\
9
- The plot is 5x2 with:\
10
- [0,0]: E/A versus den (micro). [0,1]: E/A versus den (pheno).\
11
-
12
- :param pname: name of the figure (*.png)
13
- :type pname: str.
14
- :param models: models to run on.
15
- :type models: array of str.
16
-
17
- """
18
- #
19
- print(f'Plot name: {pname}')
20
- #
21
- fig, axs = plt.subplots(5,2)
22
- fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.12, bottom=0.06, right=None, top=0.9, wspace=0.3, hspace=0.4 )
24
- #
25
- axs[0,0].set_ylabel(r'$E_\text{sat}$')
26
- axs[0,0].set_xlim([-16.5, -15])
27
- axs[1,0].set_ylabel(r'$n_\text{sat}$')
28
- axs[1,0].set_xlim([0.14, 0.18])
29
- axs[2,0].set_ylabel(r'$K_\text{sat}$')
30
- axs[2,0].set_xlim([180, 360])
31
- axs[3,0].set_ylabel(r'$Q_\text{sat}$')
32
- axs[3,0].set_xlim([-1000, 1000])
33
- axs[4,0].set_ylabel(r'$m_\text{sat}^{*}/m$')
34
- axs[4,0].set_xlim([0.35, 1.2])
35
- axs[0,1].set_ylabel(r'$E_\text{sym}$')
36
- axs[0,1].set_xlim([26, 40])
37
- axs[1,1].set_ylabel(r'$L_\text{sym}$')
38
- axs[1,1].set_xlim([0, 120])
39
- axs[2,1].set_ylabel(r'$K_\text{sym}$')
40
- axs[2,1].set_xlim([-400, 220])
41
- axs[3,1].set_ylabel(r'$Q_\text{sym}$')
42
- axs[3,1].set_xlim([-50, 900])
43
- axs[4,1].set_ylabel(r'$\Delta m_\text{sat}^{*}/m$')
44
- axs[4,1].set_xlim([-0.5, 1.1])
45
- #
46
- # Built distribution of NEP
47
- #
48
- for model in models:
49
- #
50
- dist = nuda.matter.setupNEPModelDist( model )
51
- #
52
- axs[0,0].hist( dist.Esat, bins=10, label=model )
53
- axs[1,0].hist( dist.nsat, bins=10 )
54
- axs[2,0].hist( dist.Ksat, bins=10 )
55
- axs[3,0].hist( dist.Qsat, bins=10 )
56
- axs[4,0].hist( dist.msat, bins=10 )
57
- axs[0,1].hist( dist.Esym, bins=10 )
58
- axs[1,1].hist( dist.Lsym, bins=10 )
59
- axs[2,1].hist( dist.Ksym, bins=10 )
60
- axs[3,1].hist( dist.Qsym, bins=10 )
61
- axs[4,1].hist( dist.Dmsat, bins=10 )
62
- #
63
- #axs[0,0].legend(loc='lower right',fontsize='10',ncol=2)
64
- fig.legend(loc='upper left',bbox_to_anchor=(0.2,0.99),columnspacing=2,fontsize='8',ncol=4,frameon=False)
65
- #
66
- if pname is not None:
67
- plt.savefig(pname, dpi=300)
68
- plt.close()
@@ -1,115 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: nucleardatapy
3
- Version: 0.2.0
4
- Summary: A toolkit for nuclear data processing and analysis.
5
- Author: Jerome Margueron, Sudhanva Lalit
6
- Author-email:
7
- License: MIT
8
- Classifier: Intended Audience :: Science/Research
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.9
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: numpy
17
- Requires-Dist: scipy
18
- Requires-Dist: pandas
19
-
20
- # The toolkit `nucleardatapy`
21
-
22
- ## Purpose:
23
-
24
- The purpose of this toolkit is to simply the access to data, that can be theoretical data or experimental ones. All data are provided with their reference, so when using these data in a scientific paper, reference to data should be provided explicitely. The reference to this toolkit could be given, but it should not mask the reference to data.
25
-
26
- This python toolkit is designed to provide:
27
- 1) microscopic calculations in nuclear matter,
28
- 2) phenomenological predictions in nuclear matter,
29
- 3) experimental data for finite nuclei.
30
-
31
- ## Installation of the toolkit:
32
-
33
- To install the toolkit, launch:
34
- ```
35
- $ bash install.sh
36
- ```
37
-
38
- In `install.sh`, the default directory where the toolkit is installed is `mylib` in the home directory. There, you have `mylib/nucleardatapy` folder pointing to the version of the toolkit defined in `install.sh` (currently `VER=0.1`). These default options could be changed directly in the header of `install.sh`.
39
-
40
- Create an environement variable that will be used by python:
41
- ```
42
- export NUCLEARDATAPY_TK=/path/to/nucleardatapy
43
- ```
44
-
45
- Add this environement variable to the one of python:
46
- ```
47
- export PYTHONPATH=$NUCLEARDATAPY_TK
48
- ```
49
-
50
- In this way, your library will be visible everywhere in your computer.
51
-
52
- Put these commands in your `.profile` or `.zprofile` or `.bashrc` for instance (depending on your OS).
53
-
54
- The first time, you should run again the `.zprofile` for instance:
55
-
56
- ```
57
- $ source .zprofile
58
- ```
59
-
60
- Now everything is done about the installation. You can go to the folder `mylib` in your home directory.
61
-
62
- ## Use nucleardatapy python toolkit
63
-
64
- Go to the folder `mylib/nucleardatapy/samples/nucleardatapy_samples/` and try that:
65
-
66
- ```
67
- $ python3 sample_SetupMicro.py
68
- ```
69
-
70
- ## Test the python toolkit
71
-
72
- A set of tests can be easily performed. They are stored in tests/ folder.
73
-
74
- Launch:
75
-
76
- ```
77
- $ bash run_tests.sh
78
- ```
79
-
80
- ## Get started
81
- How to obtain microscopic results for APR equation of state:
82
-
83
- ```Python
84
- import os
85
- import sys
86
- nuda_tk = os.getenv('NUCLEARDATAPY_TK')
87
- sys.path.insert(0, nuda_tk)
88
-
89
- import nucleardatapy as nuda
90
-
91
- # Instantiate a microscopic object
92
- mic = nuda.SetMicroMatter( model = '1998-VAR-AM-APR')
93
-
94
- # print outputs
95
- mic.print_outputs( )
96
- ```
97
-
98
- ## Contributing
99
-
100
- The file `how_to_contribute.md` details how contributors could join our team or share their results.
101
-
102
- ## License
103
-
104
- TBC.
105
-
106
- ## Report issues
107
-
108
- For the current version, we report issues chatting among us.
109
- Once this toolkit is released, we should setup a way that users could contact us and report issues or difficulties in installing or using the toolkit.
110
-
111
- ## Thanks
112
-
113
- A special thanks to all contributors who accepted to share their results in this toolkit.
114
-
115
-
File without changes
File without changes