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.
- nucleardatapy/__init__.py +3 -1
- nucleardatapy/astro/setup_gw.py +18 -18
- nucleardatapy/astro/setup_mr.py +123 -33
- nucleardatapy/astro/setup_mup.py +10 -10
- nucleardatapy/corr/setup_EsymDen.py +0 -5
- nucleardatapy/corr/setup_EsymLsym.py +50 -17
- nucleardatapy/corr/setup_KsatQsat.py +170 -69
- nucleardatapy/create_folder.py +2 -2
- nucleardatapy/crust/setup_crust.py +364 -126
- nucleardatapy/data/astro/HESS/J1731-347.dat +4 -0
- nucleardatapy/data/astro/NICER/J0030+0451.dat +6 -6
- nucleardatapy/data/astro/NICER/J0437-4715.dat +4 -3
- nucleardatapy/data/astro/NICER/J0614-3329.dat +4 -0
- nucleardatapy/data/astro/NICER/J0740+6620.dat +5 -4
- nucleardatapy/data/hnuclei/1991-2L-Yamamoto.csv +6 -0
- nucleardatapy/data/hnuclei/2013-2L-Ahn.csv +1 -1
- nucleardatapy/data/hnuclei/2019-2L-Ekawa.csv +7 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-E2A-NM.dat +8 -8
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-414-E2A.dat +21 -0
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-414-TD.dat +22 -0
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-450-E2A.dat +20 -0
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-450-TD.dat +22 -0
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-500-E2A.dat +23 -0
- nucleardatapy/data/matter/micro/2020-SCGF-NM-N3LO-500-TD.dat +22 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-414-E2A.dat +15 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-414-TD.dat +21 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-450-E2A.dat +15 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-450-TD.dat +21 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-500-E2A.dat +20 -0
- nucleardatapy/data/matter/micro/2020-SCGF-SM-N3LO-500-TD.dat +20 -0
- nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLO450.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLO500.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLOgo394.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-NM-DeltaNNLOgo450.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-NM-NNLOsat.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLO450.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLO500.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLOgo394.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-SM-DeltaNNLOgo450.dat +28 -0
- nucleardatapy/data/matter/micro/2024-ABI-SM-NNLOsat.dat +28 -0
- nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
- nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
- nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
- nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
- nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
- nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
- nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
- nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
- nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
- nucleardatapy/env.py +1 -1
- nucleardatapy/eos/__init__.py +4 -3
- nucleardatapy/eos/setupCC.py +429 -0
- nucleardatapy/eos/setup_am.py +39 -14
- nucleardatapy/eos/setup_am_Beq.py +40 -15
- nucleardatapy/eos/setup_am_Leq.py +40 -15
- nucleardatapy/fig/__init__.py +24 -15
- nucleardatapy/fig/astro_setupGW_fig.py +9 -7
- nucleardatapy/fig/astro_setupMR_fig.py +26 -18
- nucleardatapy/fig/astro_setupMasses_fig.py +8 -6
- nucleardatapy/fig/astro_setupMtov_fig.py +10 -6
- nucleardatapy/fig/astro_setupMup_fig.py +9 -7
- nucleardatapy/fig/corr_setupEsymDen_fig.py +22 -9
- nucleardatapy/fig/corr_setupEsymLsym_fig.py +25 -8
- nucleardatapy/fig/corr_setupKsatQsat_fig.py +23 -17
- nucleardatapy/fig/crust_setupCrust_fig.py +11 -9
- nucleardatapy/fig/eos_setupAMBeq_fig.py +641 -156
- nucleardatapy/fig/eos_setupAMLeq_fig.py +53 -50
- nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +373 -0
- nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +346 -0
- nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +352 -0
- nucleardatapy/fig/eos_setupAM_fig.py +519 -0
- nucleardatapy/fig/eos_setupCC_fig.py +270 -0
- nucleardatapy/fig/hnuc_setupChart_fig.py +19 -16
- nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +15 -5
- nucleardatapy/fig/matter_all_fig.py +971 -0
- nucleardatapy/fig/matter_setupCheck_fig.py +106 -0
- nucleardatapy/fig/matter_setupFFGLep_fig.py +74 -0
- nucleardatapy/fig/matter_setupFFGNuc_fig.py +286 -115
- nucleardatapy/fig/matter_setupHIC_fig.py +107 -67
- nucleardatapy/fig/matter_setupMicroEsym_fig.py +259 -73
- nucleardatapy/fig/matter_setupMicro_LP_fig.py +185 -82
- nucleardatapy/fig/matter_setupMicro_band_fig.py +126 -53
- nucleardatapy/fig/matter_setupMicro_effmass_fig.py +253 -77
- nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +45 -20
- nucleardatapy/fig/matter_setupMicro_fig.py +317 -77
- nucleardatapy/fig/matter_setupMicro_gap_fig.py +237 -100
- nucleardatapy/fig/matter_setupNEPStats_fig.py +106 -0
- nucleardatapy/fig/matter_setupPhenoEsym_fig.py +204 -65
- nucleardatapy/fig/matter_setupPheno_fig.py +395 -93
- nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +93 -73
- nucleardatapy/fig/nuc_setupBEExp_fig.py +97 -87
- nucleardatapy/fig/nuc_setupBETheo_fig.py +114 -81
- nucleardatapy/fig/nuc_setupISGMRExp_fig.py +12 -15
- nucleardatapy/fig/nuc_setupRchExp_fig.py +14 -22
- nucleardatapy/fig/nuc_setupRchTheo_fig.py +37 -40
- nucleardatapy/fig/nuc_setupRnpExp_fig.py +86 -106
- nucleardatapy/fig/nuc_setupRnpTheo_fig.py +105 -94
- nucleardatapy/hello.py +6 -0
- nucleardatapy/hnuc/setup_re1L_exp.py +6 -6
- nucleardatapy/hnuc/setup_re1Xi_exp.py +5 -5
- nucleardatapy/hnuc/setup_re2L_exp.py +36 -13
- nucleardatapy/matter/__init__.py +14 -14
- nucleardatapy/matter/setup_check.py +6 -6
- nucleardatapy/matter/setup_ffg.py +66 -39
- nucleardatapy/matter/setup_hic.py +91 -74
- nucleardatapy/matter/setup_micro.py +2033 -1007
- nucleardatapy/matter/setup_micro_band.py +6 -6
- nucleardatapy/matter/setup_micro_esym.py +56 -54
- nucleardatapy/matter/setup_micro_gap.py +24 -17
- nucleardatapy/matter/setup_micro_lp.py +2 -2
- nucleardatapy/matter/setup_nep.py +175 -92
- nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
- nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
- nucleardatapy/matter/setup_pheno.py +129 -49
- nucleardatapy/matter/setup_pheno_esym.py +22 -19
- nucleardatapy/nuc/setup_be_exp.py +306 -292
- nucleardatapy/nuc/setup_be_theo.py +288 -105
- nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
- nucleardatapy/nuc/setup_rnp_exp.py +1 -0
- nucleardatapy/nuc/setup_rnp_theo.py +2 -1
- {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/METADATA +48 -16
- {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/RECORD +157 -124
- {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/WHEEL +1 -1
- tests/test_corr_setupKsatQsat.py +3 -1
- tests/test_matter_setupMicro.py +37 -10
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
- nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +0 -125
- nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +0 -115
- nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +0 -117
- nucleardatapy/fig/eos_setupAM_e_fig.py +0 -173
- nucleardatapy/fig/matter_ENM_fig.py +0 -128
- nucleardatapy/fig/matter_ESM_fig.py +0 -140
- nucleardatapy/fig/matter_Esym_fig.py +0 -134
- nucleardatapy/fig/matter_cs2_fig.py +0 -83
- nucleardatapy/fig/matter_preNM_fig.py +0 -146
- nucleardatapy/fig/matter_preSM_fig.py +0 -144
- nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
- /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
- /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
- {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import matplotlib.pyplot as plt
|
|
3
|
+
|
|
4
|
+
import nucleardatapy as nuda
|
|
5
|
+
|
|
6
|
+
def eos_setupCC_eos_fig( pname, band, crust_model, core_kind, core_model, core_param ):
|
|
7
|
+
"""
|
|
8
|
+
Plot the EoS with crust and core parts.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1.
|
|
11
|
+
|
|
12
|
+
[0]: pressure as a function of the energy density.
|
|
13
|
+
|
|
14
|
+
:param pname: name of the figure (*.png)
|
|
15
|
+
:type pname: str.
|
|
16
|
+
:param band: object instantiated on the reference band.
|
|
17
|
+
:type band: object.
|
|
18
|
+
:param crust_model: the name of the crust model.
|
|
19
|
+
:type crust_model: str.
|
|
20
|
+
:param core_kind: the kind of the core model ('micro' or 'pheno').
|
|
21
|
+
:type core_kind: str.
|
|
22
|
+
:param core_model: the name of the core model.
|
|
23
|
+
:type core_model: str.
|
|
24
|
+
:param core_param: the parameters of the core model.
|
|
25
|
+
:type core_param: str.
|
|
26
|
+
"""
|
|
27
|
+
#
|
|
28
|
+
print(f'Plot name: {pname}')
|
|
29
|
+
#
|
|
30
|
+
p_den = 312.0
|
|
31
|
+
p_cen = 12.5
|
|
32
|
+
p_std = 11.0
|
|
33
|
+
#
|
|
34
|
+
fig, axs = plt.subplots(1,1)
|
|
35
|
+
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
36
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.95, wspace=0.05, hspace=0.05 )
|
|
37
|
+
#
|
|
38
|
+
axs.set_xlabel(r'$\epsilon_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
|
|
39
|
+
axs.set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)',fontsize='14')
|
|
40
|
+
axs.set_xlim([1.e-2, 2.e3])
|
|
41
|
+
axs.set_ylim([1.e-5, 2.e3])
|
|
42
|
+
#axs.set_tick_params('y', right=True)
|
|
43
|
+
#axs.set_tick_params('x', top=True)
|
|
44
|
+
axs.set_xscale('log')
|
|
45
|
+
axs.set_yscale('log')
|
|
46
|
+
#
|
|
47
|
+
# check the core EOS against the band in NM
|
|
48
|
+
#
|
|
49
|
+
if core_kind == 'micro':
|
|
50
|
+
eos = nuda.eos.setupAMBeq( model = core_model, kind = core_kind )
|
|
51
|
+
elif core_kind == 'pheno':
|
|
52
|
+
eos = nuda.eos.setupAMBeq( model = core_model, param = core_param, kind = core_kind )
|
|
53
|
+
else:
|
|
54
|
+
print('eos_setupCC_fig.py: core_kind ',core_kind,' is ill defined.')
|
|
55
|
+
print('eos_setupCC_fig.py: -- Exit the code --')
|
|
56
|
+
exit()
|
|
57
|
+
#
|
|
58
|
+
check = nuda.matter.setupCheck( eos = eos, band = band )
|
|
59
|
+
#
|
|
60
|
+
if check.isInside:
|
|
61
|
+
lstyle = 'solid'
|
|
62
|
+
else:
|
|
63
|
+
lstyle = 'dashed'
|
|
64
|
+
#
|
|
65
|
+
# plot
|
|
66
|
+
#
|
|
67
|
+
emp = None
|
|
68
|
+
for k in range(0,3):
|
|
69
|
+
if k == 0:
|
|
70
|
+
connect = 'density'
|
|
71
|
+
#emp = 'simple'
|
|
72
|
+
#emp = 'Steiner'
|
|
73
|
+
boundaries = [ 0.016, 0.16 ] # in units of fm-3
|
|
74
|
+
elif k == 1:
|
|
75
|
+
connect = 'epsilon'
|
|
76
|
+
boundaries = [ 15.0, 150.0 ] # in units of MeV fm-3
|
|
77
|
+
elif k == 2:
|
|
78
|
+
connect = 'pressure'
|
|
79
|
+
boundaries = [ 0.1, 1.0 ] # in units of MeV fm-3
|
|
80
|
+
#
|
|
81
|
+
# create the crust+core EOS
|
|
82
|
+
#
|
|
83
|
+
eos_cc = nuda.eos.setupCC( crust_model = crust_model, core_kind=core_kind, core_model = core_model, core_param = core_param, connect = connect, boundaries = boundaries, emp = emp )
|
|
84
|
+
#
|
|
85
|
+
if eos_cc.pre is not None:
|
|
86
|
+
axs.plot( eos_cc.eps, eos_cc.pre, marker='.', linestyle=lstyle, markevery=eos_cc.every, label=eos_cc.label )
|
|
87
|
+
#
|
|
88
|
+
axs.errorbar( p_den, p_cen, yerr=p_std, color='k', linewidth = 3 )
|
|
89
|
+
#
|
|
90
|
+
fig.legend(loc='upper left',bbox_to_anchor=(0.2,0.9),fontsize='10')
|
|
91
|
+
#fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=3,frameon=False)
|
|
92
|
+
#
|
|
93
|
+
if pname is not None:
|
|
94
|
+
plt.savefig(pname, dpi=200)
|
|
95
|
+
plt.close()
|
|
96
|
+
#
|
|
97
|
+
|
|
98
|
+
def eos_setupCC_checkpre_fig( pname, band, crust_model, core_kind, core_model, core_param, connect, boundaries, emp ):
|
|
99
|
+
"""
|
|
100
|
+
Check the EoS with crust and core parts.
|
|
101
|
+
|
|
102
|
+
The plot is 1x1.
|
|
103
|
+
|
|
104
|
+
[0]: pressure and band to check visualy.
|
|
105
|
+
|
|
106
|
+
:param pname: name of the figure (*.png)
|
|
107
|
+
:type pname: str.
|
|
108
|
+
:param band: object instantiated on the reference band.
|
|
109
|
+
:type band: object.
|
|
110
|
+
:param crust_model: the name of the crust model.
|
|
111
|
+
:type crust_model: str.
|
|
112
|
+
:param core_kind: the kind of the core model ('micro' or 'pheno').
|
|
113
|
+
:type core_kind: str.
|
|
114
|
+
:param core_model: the name of the core model.
|
|
115
|
+
:type core_model: str.
|
|
116
|
+
:param core_param: the parameters of the core model.
|
|
117
|
+
:type core_param: str.
|
|
118
|
+
:param connect: The thermodynamic quantity employed to connect the crust and the core. Can be: 'density', 'epsilon' (energy density) or 'pressure'.
|
|
119
|
+
:type connect: str.
|
|
120
|
+
:param boundaries: array with lower and upper boundaries to consider. Connected to the variable `connect`. For instance boundaries = [ 0.016, 0.16 ] for 'density' (in units of fm-3), boundaries = [ 15.0, 150.0 ] for 'epsilon' (in units of MeV fm-3), or boundaries = [ 0.1, 1.0 ] for pressure (in units of MeV fm-3).
|
|
121
|
+
:type boundaries: array of real.
|
|
122
|
+
:param emp: way to connect the crust and the core. Can be: 'None', 'simple', 'Steiner'.
|
|
123
|
+
:type emp: str.
|
|
124
|
+
"""
|
|
125
|
+
#
|
|
126
|
+
print(f'Plot name: {pname}')
|
|
127
|
+
#
|
|
128
|
+
p_den = 312.0
|
|
129
|
+
p_cen = 12.5
|
|
130
|
+
p_std = 11.0
|
|
131
|
+
#
|
|
132
|
+
fig, axs = plt.subplots(1,1)
|
|
133
|
+
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
134
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
|
|
135
|
+
#
|
|
136
|
+
axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
137
|
+
axs.set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)')
|
|
138
|
+
axs.set_xlim([1.e-7, 2.e0])
|
|
139
|
+
axs.set_ylim([1.e-8, 2.e3])
|
|
140
|
+
#axs.set_tick_params('y', right=True)
|
|
141
|
+
#axs.set_tick_params('x', top=True)
|
|
142
|
+
axs.set_xscale('log')
|
|
143
|
+
axs.set_yscale('log')
|
|
144
|
+
#
|
|
145
|
+
# create the crust+core EOS
|
|
146
|
+
#
|
|
147
|
+
eos_cc = nuda.eos.setupCC( crust_model = crust_model, core_kind=core_kind, core_model = core_model, core_param = core_param, connect = connect, boundaries = boundaries, emp = emp )
|
|
148
|
+
#
|
|
149
|
+
# check the core EOS against the band in NM
|
|
150
|
+
#
|
|
151
|
+
if core_kind == 'micro':
|
|
152
|
+
eos = nuda.eos.setupAMBeq( model = core_model, kind = core_kind )
|
|
153
|
+
elif core_kind == 'pheno':
|
|
154
|
+
eos = nuda.eos.setupAMBeq( model = core_model, param = core_param, kind = core_kind )
|
|
155
|
+
else:
|
|
156
|
+
print('eos_setupCC_fig.py: core_kind ',core_kind,' is ill defined.')
|
|
157
|
+
print('eos_setupCC_fig.py: -- Exit the code --')
|
|
158
|
+
exit()
|
|
159
|
+
#
|
|
160
|
+
check = nuda.matter.setupCheck( eos = eos, band = band )
|
|
161
|
+
#
|
|
162
|
+
if check.isInside:
|
|
163
|
+
lstyle = 'solid'
|
|
164
|
+
else:
|
|
165
|
+
lstyle = 'dashed'
|
|
166
|
+
#
|
|
167
|
+
# plot
|
|
168
|
+
#
|
|
169
|
+
if eos_cc.pre is not None:
|
|
170
|
+
axs.plot( eos_cc.den, eos_cc.pre, marker='o', linestyle=lstyle, markevery=eos_cc.every )
|
|
171
|
+
axs.plot( eos_cc.crust_den, eos_cc.crust_pre, marker='x', linestyle=lstyle, markevery=10 )
|
|
172
|
+
axs.plot( eos_cc.core_den, eos_cc.core_pre, marker='+', linestyle=lstyle, markevery=eos_cc.every )
|
|
173
|
+
axs.plot( eos_cc.crux_den, 0.4+eos_cc.crux_pre, marker='s', linestyle=lstyle, markevery=10, color='r' )
|
|
174
|
+
axs.plot( eos_cc.corx_den, 0.8+eos_cc.corx_pre, marker='s', linestyle=lstyle, markevery=eos_cc.every, color='k' )
|
|
175
|
+
#
|
|
176
|
+
#axs.errorbar( p_den, p_cen, yerr=p_std, color='k', linewidth = 3 )
|
|
177
|
+
#
|
|
178
|
+
#fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
|
|
179
|
+
#
|
|
180
|
+
if pname is not None:
|
|
181
|
+
plt.savefig(pname, dpi=200)
|
|
182
|
+
plt.close()
|
|
183
|
+
#
|
|
184
|
+
|
|
185
|
+
def eos_setupCC_checkeos_fig( pname, band, crust_model, core_kind, core_model, core_param, connect, boundaries, emp ):
|
|
186
|
+
"""
|
|
187
|
+
Check the EoS with crust and core parts.
|
|
188
|
+
|
|
189
|
+
The plot is 1x1.
|
|
190
|
+
|
|
191
|
+
[0]: pressure and band to check visualy.
|
|
192
|
+
|
|
193
|
+
:param pname: name of the figure (*.png)
|
|
194
|
+
:type pname: str.
|
|
195
|
+
:param band: object instantiated on the reference band.
|
|
196
|
+
:type band: object.
|
|
197
|
+
:param crust_model: the name of the crust model.
|
|
198
|
+
:type crust_model: str.
|
|
199
|
+
:param core_kind: the kind of the core model ('micro' or 'pheno').
|
|
200
|
+
:type core_kind: str.
|
|
201
|
+
:param core_model: the name of the core model.
|
|
202
|
+
:type core_model: str.
|
|
203
|
+
:param core_param: the parameters of the core model.
|
|
204
|
+
:type core_param: str.
|
|
205
|
+
:param connect: The thermodynamic quantity employed to connect the crust and the core. Can be: 'density', 'epsilon' (energy density) or 'pressure'.
|
|
206
|
+
:type connect: str.
|
|
207
|
+
:param boundaries: array with lower and upper boundaries to consider. Connected to the variable `connect`. For instance boundaries = [ 0.016, 0.16 ] for 'density' (in units of fm-3), boundaries = [ 15.0, 150.0 ] for 'epsilon' (in units of MeV fm-3), or boundaries = [ 0.1, 1.0 ] for pressure (in units of MeV fm-3).
|
|
208
|
+
:type boundaries: array of real.
|
|
209
|
+
:param emp: way to connect the crust and the core. Can be: 'None', 'simple', 'Steiner'.
|
|
210
|
+
:type emp: str.
|
|
211
|
+
"""
|
|
212
|
+
#
|
|
213
|
+
print(f'Plot name: {pname}')
|
|
214
|
+
#
|
|
215
|
+
p_den = 312.0
|
|
216
|
+
p_cen = 12.5
|
|
217
|
+
p_std = 11.0
|
|
218
|
+
#
|
|
219
|
+
fig, axs = plt.subplots(1,1)
|
|
220
|
+
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
221
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.90, wspace=0.05, hspace=0.05 )
|
|
222
|
+
#
|
|
223
|
+
axs.set_xlabel(r'$\epsilon_\text{tot}$ (MeV fm$^{-3}$)')
|
|
224
|
+
axs.set_ylabel(r'$p_\text{tot}$ (MeV fm$^{-3}$)')
|
|
225
|
+
axs.set_xlim([1.e-4, 3.e3])
|
|
226
|
+
axs.set_ylim([1.e-8, 2.e3])
|
|
227
|
+
#axs.set_tick_params('y', right=True)
|
|
228
|
+
#axs.set_tick_params('x', top=True)
|
|
229
|
+
axs.set_xscale('log')
|
|
230
|
+
axs.set_yscale('log')
|
|
231
|
+
#
|
|
232
|
+
# create the crust+core EOS
|
|
233
|
+
#
|
|
234
|
+
eos_cc = nuda.eos.setupCC( crust_model = crust_model, core_kind=core_kind, core_model = core_model, core_param = core_param, connect = connect, boundaries = boundaries, emp = emp )
|
|
235
|
+
#
|
|
236
|
+
# check the core EOS against the band in NM
|
|
237
|
+
#
|
|
238
|
+
if core_kind == 'micro':
|
|
239
|
+
eos = nuda.eos.setupAMBeq( model = core_model, kind = core_kind )
|
|
240
|
+
elif core_kind == 'pheno':
|
|
241
|
+
eos = nuda.eos.setupAMBeq( model = core_model, param = core_param, kind = core_kind )
|
|
242
|
+
else:
|
|
243
|
+
print('eos_setupCC_fig.py: core_kind ',core_kind,' is ill defined.')
|
|
244
|
+
print('eos_setupCC_fig.py: -- Exit the code --')
|
|
245
|
+
exit()
|
|
246
|
+
#
|
|
247
|
+
check = nuda.matter.setupCheck( eos = eos, band = band )
|
|
248
|
+
#
|
|
249
|
+
if check.isInside:
|
|
250
|
+
lstyle = 'solid'
|
|
251
|
+
else:
|
|
252
|
+
lstyle = 'dashed'
|
|
253
|
+
#
|
|
254
|
+
# plot
|
|
255
|
+
#
|
|
256
|
+
if eos_cc.pre is not None:
|
|
257
|
+
axs.plot( eos_cc.eps, eos_cc.pre, marker='o', linestyle=lstyle, markevery=eos_cc.every )
|
|
258
|
+
axs.plot( eos_cc.crust_eps, eos_cc.crust_pre, marker='x', linestyle=lstyle, markevery=10 )
|
|
259
|
+
axs.plot( eos_cc.core_eps, eos_cc.core_pre, marker='+', linestyle=lstyle, markevery=eos_cc.every )
|
|
260
|
+
axs.plot( eos_cc.crux_eps, 0.4+eos_cc.crux_pre, marker='s', linestyle=lstyle, markevery=10, color='r' )
|
|
261
|
+
axs.plot( eos_cc.corx_eps, 0.8+eos_cc.corx_pre, marker='s', linestyle=lstyle, markevery=eos_cc.every, color='k' )
|
|
262
|
+
#
|
|
263
|
+
#axs.errorbar( p_den, p_cen, yerr=p_std, color='k', linewidth = 3 )
|
|
264
|
+
#
|
|
265
|
+
#fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
|
|
266
|
+
#
|
|
267
|
+
if pname is not None:
|
|
268
|
+
plt.savefig(pname, dpi=200)
|
|
269
|
+
plt.close()
|
|
270
|
+
#
|
|
@@ -3,45 +3,48 @@ import matplotlib.pyplot as plt
|
|
|
3
3
|
|
|
4
4
|
import nucleardatapy as nuda
|
|
5
5
|
|
|
6
|
-
def hnuc_setupChart_fig( pname,
|
|
6
|
+
def hnuc_setupChart_fig( pname, tables1L, tables2L, tables1Xi ):
|
|
7
7
|
"""
|
|
8
|
-
Plot hyper-nuclear chart (N versus Z)
|
|
9
|
-
|
|
8
|
+
Plot hyper-nuclear chart (N versus Z).
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: nuclear chart.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
13
15
|
:type pname: str.
|
|
14
16
|
:param table1L: table.
|
|
15
|
-
:type table1L: str.
|
|
17
|
+
:type table1L: array of str.
|
|
16
18
|
:param table2L: table.
|
|
17
|
-
:type table2L: str.
|
|
19
|
+
:type table2L: array of str.
|
|
18
20
|
:param table1Xi: table.
|
|
19
|
-
:type table1Xi: str.
|
|
20
|
-
|
|
21
|
+
:type table1Xi: array of str.
|
|
21
22
|
"""
|
|
22
23
|
#
|
|
23
24
|
print(f'Plot name: {pname}')
|
|
24
25
|
#
|
|
25
|
-
hnuc1L = nuda.hnuc.setupRE1LExp( table = table1L )
|
|
26
|
-
hnuc2L = nuda.hnuc.setupRE2LExp( table = table2L )
|
|
27
|
-
hnuc1Xi = nuda.hnuc.setupRE1XiExp( table = table1Xi )
|
|
28
|
-
#
|
|
29
26
|
# plot
|
|
30
27
|
#
|
|
31
28
|
fig, axs = plt.subplots(1,1)
|
|
32
29
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
33
30
|
fig.subplots_adjust(left=0.12, bottom=0.15, right=None, top=0.95, wspace=0.3, hspace=0.3)
|
|
34
31
|
#
|
|
35
|
-
axs.set_ylabel(r'Proton number $Z$')
|
|
36
|
-
axs.set_xlabel(r'Neutron number $N$')
|
|
32
|
+
axs.set_ylabel(r'Proton number $Z$ (log scale)',fontsize='14')
|
|
33
|
+
axs.set_xlabel(r'Neutron number $N$ (log scale)',fontsize='14')
|
|
37
34
|
axs.set_yscale('log')
|
|
38
35
|
axs.set_xscale('log')
|
|
39
36
|
axs.set_xlim([0.8, 140])
|
|
40
37
|
axs.set_ylim([0.8, 90.0])
|
|
41
38
|
#
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
for table1L in tables1L:
|
|
40
|
+
hnuc1L = nuda.hnuc.setupRE1LExp( table = table1L )
|
|
41
|
+
axs.scatter( hnuc1L.N, hnuc1L.Z, marker='s', s=12, color=nuda.param.col[0], label=r'1$\Lambda$ from table '+table1L )
|
|
42
|
+
for table2L in tables2L:
|
|
43
|
+
hnuc2L = nuda.hnuc.setupRE2LExp( table = table2L )
|
|
44
|
+
axs.scatter( hnuc2L.N+0.05, hnuc2L.Z+0.05, marker='s', s=12, color=nuda.param.col[1], label=r'2$\Lambda$ from table '+table2L )
|
|
45
|
+
for table1Xi in tables1Xi:
|
|
46
|
+
hnuc1Xi = nuda.hnuc.setupRE1XiExp( table = table1Xi )
|
|
47
|
+
axs.scatter( hnuc1Xi.N+0.1, hnuc1Xi.Z+0.1, marker='s', s=12, color=nuda.param.col[2], label=r'1$\Xi^{-}$ from table '+table1Xi )
|
|
45
48
|
#
|
|
46
49
|
#axs.text(0.15,12,r'$K_{sym}$='+str(int(Ksym))+' MeV',fontsize='12')
|
|
47
50
|
axs.legend(loc='lower right',fontsize='11',ncol=1)
|
|
@@ -4,15 +4,25 @@ import matplotlib.pyplot as plt
|
|
|
4
4
|
import nucleardatapy as nuda
|
|
5
5
|
|
|
6
6
|
def hnuc_setupRE1LExp_fig( pname, tables ):
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
"""
|
|
8
|
+
Plot the removal energies as a function of A^{-2/3}.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
12
|
+
[0]: nuclear chart.
|
|
13
|
+
|
|
14
|
+
:param pname: name of the figure (*.png)
|
|
15
|
+
:type pname: str.
|
|
16
|
+
:param tables: table.
|
|
17
|
+
:type tables: str.
|
|
18
|
+
"""
|
|
9
19
|
#
|
|
10
20
|
fig, axs = plt.subplots(1,1)
|
|
11
21
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
12
|
-
fig.subplots_adjust(left=0.12, bottom=0.15, right=
|
|
22
|
+
fig.subplots_adjust(left=0.12, bottom=0.15, right=0.95, top=0.95, wspace=0.3, hspace=0.3)
|
|
13
23
|
#
|
|
14
|
-
axs.set_ylabel(r'
|
|
15
|
-
axs.set_xlabel(r'$A^{-2/3}$')
|
|
24
|
+
axs.set_ylabel(r'Removal energy $B_\Lambda$ (MeV)',fontsize='14')
|
|
25
|
+
axs.set_xlabel(r'$A^{-2/3}$',fontsize='14')
|
|
16
26
|
axs.set_xlim([0.0, 0.28])
|
|
17
27
|
axs.set_ylim([-5.0, 32.0])
|
|
18
28
|
#
|