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
|
@@ -1,140 +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.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
|
|
27
|
-
#
|
|
28
|
-
axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
29
|
-
axs[0].set_ylabel(r'$e_\text{SM}(n_\text{nuc})$')
|
|
30
|
-
axs[0].set_xlim([0, 0.34])
|
|
31
|
-
axs[0].set_ylim([-22, 5])
|
|
32
|
-
#
|
|
33
|
-
axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
34
|
-
#axs[1].set_ylabel(r'$e_{sym}(n)$')
|
|
35
|
-
axs[1].set_xlim([0, 0.34])
|
|
36
|
-
axs[1].set_ylim([-22, 5])
|
|
37
|
-
axs[1].tick_params('y', labelleft=False)
|
|
38
|
-
#
|
|
39
|
-
mb_check = []
|
|
40
|
-
#
|
|
41
|
-
for kmb,mb in enumerate(micro_mbs):
|
|
42
|
-
#
|
|
43
|
-
models, models_lower = nuda.matter.micro_models_mb( mb )
|
|
44
|
-
#
|
|
45
|
-
for model in models:
|
|
46
|
-
#
|
|
47
|
-
micro = nuda.matter.setupMicro( model = model )
|
|
48
|
-
if nuda.env.verb: micro.print_outputs( )
|
|
49
|
-
#
|
|
50
|
-
check = nuda.matter.setupCheck( eos = micro, band = band )
|
|
51
|
-
#
|
|
52
|
-
if check.isInside:
|
|
53
|
-
lstyle = 'solid'
|
|
54
|
-
else:
|
|
55
|
-
lstyle = 'dashed'
|
|
56
|
-
#
|
|
57
|
-
if micro.sm_e2a is not None:
|
|
58
|
-
print('mb:',mb,'model:',model)
|
|
59
|
-
if mb in mb_check:
|
|
60
|
-
if micro.marker:
|
|
61
|
-
print('with marker 1:',micro.marker)
|
|
62
|
-
if micro.e_err:
|
|
63
|
-
print('with error',micro.e_err)
|
|
64
|
-
axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
65
|
-
else:
|
|
66
|
-
print('with no error',micro.e_err)
|
|
67
|
-
axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, color=nuda.param.col[kmb] )
|
|
68
|
-
else:
|
|
69
|
-
print('with no marker',micro.marker)
|
|
70
|
-
if micro.e_err:
|
|
71
|
-
print('with error',micro.e_err)
|
|
72
|
-
axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
73
|
-
else:
|
|
74
|
-
print('with no error',micro.e_err)
|
|
75
|
-
axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
76
|
-
else:
|
|
77
|
-
mb_check.append(mb)
|
|
78
|
-
if micro.marker:
|
|
79
|
-
print('with marker 2:',micro.marker)
|
|
80
|
-
if micro.e_err:
|
|
81
|
-
print('with error',micro.e_err)
|
|
82
|
-
axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
83
|
-
else:
|
|
84
|
-
print('with no error',micro.e_err)
|
|
85
|
-
axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, markevery=micro.every, linestyle=lstyle, label=mb, color=nuda.param.col[kmb] )
|
|
86
|
-
else:
|
|
87
|
-
print('with no marker',micro.marker)
|
|
88
|
-
if micro.e_err:
|
|
89
|
-
print('with error',micro.e_err)
|
|
90
|
-
axs[0].errorbar( micro.sm_den, micro.sm_e2a, yerr=micro.sm_e2a_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
91
|
-
else:
|
|
92
|
-
print('with no error',micro.e_err)
|
|
93
|
-
axs[0].plot( micro.sm_den, micro.sm_e2a, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
94
|
-
# end of model
|
|
95
|
-
# end of mb
|
|
96
|
-
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 )
|
|
97
|
-
axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
98
|
-
axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
99
|
-
axs[0].text(0.03,2,'microscopic models',fontsize='10')
|
|
100
|
-
#
|
|
101
|
-
model_check = []
|
|
102
|
-
#
|
|
103
|
-
for kmodel,model in enumerate(pheno_models):
|
|
104
|
-
#
|
|
105
|
-
params, params_lower = nuda.matter.pheno_params( model = model )
|
|
106
|
-
#
|
|
107
|
-
for param in params:
|
|
108
|
-
#
|
|
109
|
-
pheno = nuda.matter.setupPheno( model = model, param = param )
|
|
110
|
-
if nuda.env.verb: pheno.print_outputs( )
|
|
111
|
-
#
|
|
112
|
-
check = nuda.matter.setupCheck( eos = pheno, band = band )
|
|
113
|
-
#
|
|
114
|
-
if check.isInside:
|
|
115
|
-
lstyle = 'solid'
|
|
116
|
-
else:
|
|
117
|
-
lstyle = 'dashed'
|
|
118
|
-
#
|
|
119
|
-
if pheno.sm_e2a is not None:
|
|
120
|
-
print('model:',model,' param:',param)
|
|
121
|
-
if model in model_check:
|
|
122
|
-
axs[1].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel] )
|
|
123
|
-
else:
|
|
124
|
-
model_check.append(model)
|
|
125
|
-
axs[1].plot( pheno.sm_den, pheno.sm_e2a, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
|
|
126
|
-
# end of param
|
|
127
|
-
# end of model
|
|
128
|
-
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 )
|
|
129
|
-
axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
130
|
-
axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
131
|
-
axs[1].text(0.03,2,'phenomenological models',fontsize='10')
|
|
132
|
-
#
|
|
133
|
-
#axs[1].legend(loc='upper left',fontsize='8', ncol=2)
|
|
134
|
-
#axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
|
|
135
|
-
fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
|
|
136
|
-
#
|
|
137
|
-
if pname is not None:
|
|
138
|
-
plt.savefig(pname, dpi=200)
|
|
139
|
-
plt.close()
|
|
140
|
-
#
|
|
@@ -1,134 +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
|
-
matter = 'Esym'
|
|
29
|
-
#
|
|
30
|
-
fig, axs = plt.subplots(1,2)
|
|
31
|
-
#fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
32
|
-
fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
|
|
33
|
-
#
|
|
34
|
-
axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
35
|
-
axs[0].set_ylabel(r'$e_\text{sym}(n_\text{nuc})$')
|
|
36
|
-
axs[0].set_xlim([0, 0.34])
|
|
37
|
-
axs[0].set_ylim([0, 60])
|
|
38
|
-
#
|
|
39
|
-
axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
40
|
-
#axs[1].set_ylabel(r'$e_{sym}(n)$')
|
|
41
|
-
axs[1].set_xlim([0, 0.34])
|
|
42
|
-
axs[1].set_ylim([0, 60])
|
|
43
|
-
axs[1].tick_params('y', labelleft=False)
|
|
44
|
-
#
|
|
45
|
-
mb_check = []
|
|
46
|
-
#
|
|
47
|
-
for kmb,mb in enumerate(micro_mbs):
|
|
48
|
-
#
|
|
49
|
-
models, models_lower = nuda.matter.micro_esym_models_mb( mb )
|
|
50
|
-
#
|
|
51
|
-
for model in models:
|
|
52
|
-
#
|
|
53
|
-
micro = nuda.matter.setupMicroEsym( model = model )
|
|
54
|
-
if nuda.env.verb: micro.print_outputs( )
|
|
55
|
-
#
|
|
56
|
-
check = nuda.matter.setupCheck( eos = micro, band = band )
|
|
57
|
-
#
|
|
58
|
-
if check.isInside:
|
|
59
|
-
lstyle = 'solid'
|
|
60
|
-
else:
|
|
61
|
-
lstyle = 'dashed'
|
|
62
|
-
#
|
|
63
|
-
if micro.esym is not None:
|
|
64
|
-
print('mb:',mb,'model:',model)
|
|
65
|
-
if mb in mb_check:
|
|
66
|
-
if micro.marker:
|
|
67
|
-
if micro.err:
|
|
68
|
-
axs[0].errorbar( micro.den, micro.esym, yerr=micro.esym_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
69
|
-
else:
|
|
70
|
-
axs[0].plot( micro.den, micro.esym, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
71
|
-
else:
|
|
72
|
-
if micro.err:
|
|
73
|
-
axs[0].errorbar( micro.den, micro.esym, yerr=micro.esym_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
74
|
-
else:
|
|
75
|
-
axs[0].plot( micro.den, micro.esym, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
76
|
-
else:
|
|
77
|
-
mb_check.append(mb)
|
|
78
|
-
if micro.marker:
|
|
79
|
-
if micro.err:
|
|
80
|
-
axs[0].errorbar( micro.den, micro.esym, yerr=micro.esym_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
81
|
-
else:
|
|
82
|
-
axs[0].plot( micro.den, micro.esym, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
83
|
-
else:
|
|
84
|
-
if micro.err:
|
|
85
|
-
axs[0].errorbar( micro.den, micro.esym, yerr=micro.esym_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
86
|
-
else:
|
|
87
|
-
axs[0].plot( micro.den, micro.esym, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
88
|
-
# end of model
|
|
89
|
-
# end of mb
|
|
90
|
-
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 )
|
|
91
|
-
axs[0].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
92
|
-
axs[0].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
93
|
-
axs[0].text(0.05,5,'microscopic models',fontsize='10')
|
|
94
|
-
#
|
|
95
|
-
model_check = []
|
|
96
|
-
#
|
|
97
|
-
for kmodel,model in enumerate(pheno_models):
|
|
98
|
-
#
|
|
99
|
-
params, params_lower = nuda.matter.pheno_params( model = model )
|
|
100
|
-
#
|
|
101
|
-
for param in params:
|
|
102
|
-
#
|
|
103
|
-
pheno = nuda.matter.setupPhenoEsym( model = model, param = param )
|
|
104
|
-
if nuda.env.verb: pheno.print_outputs( )
|
|
105
|
-
#
|
|
106
|
-
check = nuda.matter.setupCheck( eos = pheno, band = band )
|
|
107
|
-
#
|
|
108
|
-
if check.isInside:
|
|
109
|
-
lstyle = 'solid'
|
|
110
|
-
else:
|
|
111
|
-
lstyle = 'dashed'
|
|
112
|
-
#
|
|
113
|
-
if pheno.esym is not None:
|
|
114
|
-
print('model:',model,' param:',param)
|
|
115
|
-
if model in model_check:
|
|
116
|
-
axs[1].plot( pheno.den, pheno.esym, linestyle=lstyle, color=nuda.param.col[kmodel] )
|
|
117
|
-
else:
|
|
118
|
-
model_check.append(model)
|
|
119
|
-
axs[1].plot( pheno.den, pheno.esym, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
|
|
120
|
-
# end of param
|
|
121
|
-
# end of model
|
|
122
|
-
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 )
|
|
123
|
-
axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
124
|
-
axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
125
|
-
axs[1].text(0.05,5,'phenomenological models',fontsize='10')
|
|
126
|
-
#
|
|
127
|
-
#axs[1].legend(loc='upper left',fontsize='8', ncol=2)
|
|
128
|
-
#axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
|
|
129
|
-
fig.legend(loc='upper left',bbox_to_anchor=(0.2,1.0),columnspacing=2,fontsize='8',ncol=4,frameon=False)
|
|
130
|
-
#
|
|
131
|
-
if pname is not None:
|
|
132
|
-
plt.savefig(pname, dpi=200)
|
|
133
|
-
plt.close()
|
|
134
|
-
#
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
import matplotlib.pyplot as plt
|
|
3
|
-
|
|
4
|
-
import nucleardatapy as nuda
|
|
5
|
-
|
|
6
|
-
def matter_cs2_fig( pname, micro_models, pheno_models, band ):
|
|
7
|
-
"""
|
|
8
|
-
Plot nuclear chart (N versus Z).\
|
|
9
|
-
The plot is 1x1 with:\
|
|
10
|
-
[0]: nuclear chart.
|
|
11
|
-
|
|
12
|
-
:param pname: name of the figure (*.png)
|
|
13
|
-
:type pname: str.
|
|
14
|
-
:param table: table.
|
|
15
|
-
:type table: str.
|
|
16
|
-
:param version: version of table to run on.
|
|
17
|
-
:type version: str.
|
|
18
|
-
:param theo_tables: object instantiated on the reference band.
|
|
19
|
-
:type theo_tables: object.
|
|
20
|
-
|
|
21
|
-
"""
|
|
22
|
-
#
|
|
23
|
-
print(f'Plot name: {pname}')
|
|
24
|
-
#
|
|
25
|
-
fig, axs = plt.subplots(1,2)
|
|
26
|
-
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
27
|
-
fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.98, wspace=0.3, hspace=0.3 )
|
|
28
|
-
#
|
|
29
|
-
axs[0].set_xlabel(r'n (fm$^{-3}$)')
|
|
30
|
-
axs[0].set_ylabel(r'$c_{s,NM}^2(n)$')
|
|
31
|
-
axs[0].set_xlim([0, 0.3])
|
|
32
|
-
axs[0].set_ylim([0, 0.5])
|
|
33
|
-
#
|
|
34
|
-
axs[1].set_xlabel(r'n (fm$^{-3}$)')
|
|
35
|
-
axs[1].set_ylabel(r'$c_{s,NM}^2(n)$')
|
|
36
|
-
axs[1].set_xlim([0, 0.3])
|
|
37
|
-
axs[1].set_ylim([0, 0.5])
|
|
38
|
-
#
|
|
39
|
-
for model in micro_models:
|
|
40
|
-
#
|
|
41
|
-
mic = nuda.matter.setupMicro( model = model )
|
|
42
|
-
if mic.nm_cs2 is not None:
|
|
43
|
-
print('model:',model)
|
|
44
|
-
if mic.marker:
|
|
45
|
-
if mic.err:
|
|
46
|
-
axs[0].errorbar( mic.nm_den, mic.nm_cs2, yerr=mic.nm_cs2_err, marker=mic.marker, linestyle=None, label=mic.label, errorevery=mic.every )
|
|
47
|
-
else:
|
|
48
|
-
axs[0].plot( mic.nm_den, mic.nm_cs2, marker=mic.marker, linestyle=None, label=mic.label, markevery=mic.every )
|
|
49
|
-
else:
|
|
50
|
-
if mic.err:
|
|
51
|
-
axs[0].errorbar( mic.nm_den, mic.nm_cs2, yerr=mic.nm_cs2_err, marker=mic.marker, linestyle=mic.linestyle, label=mic.label, errorevery=mic.every )
|
|
52
|
-
else:
|
|
53
|
-
axs[0].plot( mic.nm_den, mic.nm_cs2, marker=mic.marker, linestyle=mic.linestyle, label=mic.label, markevery=mic.every )
|
|
54
|
-
if nuda.env.verb: mic.print_outputs( )
|
|
55
|
-
#axs[0].fill_between( band.den, y1=(band.pre-band.pre_std), y2=(band.pre+band.pre_std), color=band.color, alpha=band.alpha, visible=True )
|
|
56
|
-
#axs[0].plot( band.den, (band.pre-band.pre_std), color='k', linestyle='dashed' )
|
|
57
|
-
#axs[0].plot( band.den, (band.pre+band.pre_std), color='k', linestyle='dashed' )
|
|
58
|
-
axs[0].text(0.01,0.4,'microscopic models',fontsize='10')
|
|
59
|
-
axs[0].legend(loc='upper left',fontsize='8', ncol=3)
|
|
60
|
-
#
|
|
61
|
-
for model in pheno_models:
|
|
62
|
-
#
|
|
63
|
-
params, params_lower = nuda.matter.pheno_params( model = model )
|
|
64
|
-
#
|
|
65
|
-
for param in params:
|
|
66
|
-
#
|
|
67
|
-
pheno = nuda.matter.setupPheno( model = model, param = param )
|
|
68
|
-
if pheno.nm_pre is not None:
|
|
69
|
-
print('model:',model,' param:',param)
|
|
70
|
-
#pheno.label=None
|
|
71
|
-
axs[1].plot( pheno.nm_den, pheno.nm_cs2, label=pheno.label )
|
|
72
|
-
if nuda.env.verb: pheno.print_outputs( )
|
|
73
|
-
#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 )
|
|
74
|
-
#axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
75
|
-
#axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
76
|
-
axs[1].text(0.01,0.4,'phenomenological models',fontsize='10')
|
|
77
|
-
#axs[1].legend(loc='upper left',fontsize='8', ncol=2)
|
|
78
|
-
#axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
|
|
79
|
-
#
|
|
80
|
-
if pname is not None:
|
|
81
|
-
plt.savefig(pname, dpi=200)
|
|
82
|
-
plt.close()
|
|
83
|
-
#
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
import matplotlib.pyplot as plt
|
|
3
|
-
|
|
4
|
-
import nucleardatapy as nuda
|
|
5
|
-
|
|
6
|
-
def matter_preNM_fig( pname, micro_mbs, pheno_models, band ):
|
|
7
|
-
"""
|
|
8
|
-
Plot nucleonic pressure 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
|
-
p_den = 0.32
|
|
26
|
-
p_cen = 23.0
|
|
27
|
-
p_std = 14.5
|
|
28
|
-
p_micro_cen = 15.0
|
|
29
|
-
p_micro_std = 6.5
|
|
30
|
-
p_pheno_cen = 23.0
|
|
31
|
-
p_pheno_std = 14.5
|
|
32
|
-
#
|
|
33
|
-
fig, axs = plt.subplots(1,2)
|
|
34
|
-
#fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
35
|
-
fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
|
|
36
|
-
#
|
|
37
|
-
axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
38
|
-
axs[0].set_ylabel(r'$p_\text{NM}(n_\text{nuc})$')
|
|
39
|
-
axs[0].set_xlim([0, 0.35])
|
|
40
|
-
axs[0].set_ylim([-2, 45])
|
|
41
|
-
#
|
|
42
|
-
axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
43
|
-
#axs[1].set_ylabel(r'$e_{sym}(n)$')
|
|
44
|
-
axs[1].set_xlim([0, 0.35])
|
|
45
|
-
axs[1].set_ylim([-2, 45])
|
|
46
|
-
axs[1].tick_params('y', labelleft=False)
|
|
47
|
-
#
|
|
48
|
-
mb_check = []
|
|
49
|
-
#
|
|
50
|
-
for kmb,mb in enumerate(micro_mbs):
|
|
51
|
-
#
|
|
52
|
-
models, models_lower = nuda.matter.micro_models_mb( mb )
|
|
53
|
-
#
|
|
54
|
-
for model in models:
|
|
55
|
-
#
|
|
56
|
-
micro = nuda.matter.setupMicro( model = model )
|
|
57
|
-
if nuda.env.verb: micro.print_outputs( )
|
|
58
|
-
#
|
|
59
|
-
check = nuda.matter.setupCheck( eos = micro, band = band )
|
|
60
|
-
#
|
|
61
|
-
if check.isInside:
|
|
62
|
-
lstyle = 'solid'
|
|
63
|
-
else:
|
|
64
|
-
lstyle = 'dashed'
|
|
65
|
-
#continue
|
|
66
|
-
#
|
|
67
|
-
print('model:',model)
|
|
68
|
-
print('err:',micro.p_err)
|
|
69
|
-
print('den:',micro.nm_den)
|
|
70
|
-
print('pre:',micro.nm_pre)
|
|
71
|
-
print('pre_err:',micro.nm_pre_err)
|
|
72
|
-
if micro.nm_pre is not None:
|
|
73
|
-
print('mb:',mb,'model:',model)
|
|
74
|
-
if mb in mb_check:
|
|
75
|
-
if micro.marker:
|
|
76
|
-
if micro.p_err:
|
|
77
|
-
axs[0].errorbar( micro.nm_den, micro.nm_pre, yerr=micro.nm_pre_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
78
|
-
else:
|
|
79
|
-
axs[0].plot( micro.nm_den, micro.nm_pre, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
80
|
-
else:
|
|
81
|
-
if micro.p_err:
|
|
82
|
-
axs[0].errorbar( micro.nm_den, micro.nm_pre, yerr=micro.nm_pre_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
83
|
-
else:
|
|
84
|
-
axs[0].plot( micro.nm_den, micro.nm_pre, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
85
|
-
else:
|
|
86
|
-
mb_check.append(mb)
|
|
87
|
-
if micro.marker:
|
|
88
|
-
if micro.p_err:
|
|
89
|
-
axs[0].errorbar( micro.nm_den, micro.nm_pre, yerr=micro.nm_pre_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
90
|
-
else:
|
|
91
|
-
axs[0].plot( micro.nm_den, micro.nm_pre, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
92
|
-
else:
|
|
93
|
-
if micro.p_err:
|
|
94
|
-
axs[0].errorbar( micro.nm_den, micro.nm_pre, yerr=micro.nm_pre_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
95
|
-
else:
|
|
96
|
-
axs[0].plot( enm.nm_den, enm.nm_pre, marker=enm.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
97
|
-
# end of model
|
|
98
|
-
# end of mb
|
|
99
|
-
axs[0].errorbar( p_den, p_cen, yerr=p_std, color='k' )
|
|
100
|
-
axs[0].errorbar( p_den+0.005, p_micro_cen, yerr=p_micro_std, color='r' )
|
|
101
|
-
axs[0].text(0.02,40,'microscopic models',fontsize='10')
|
|
102
|
-
#
|
|
103
|
-
model_check = []
|
|
104
|
-
#
|
|
105
|
-
for kmodel,model in enumerate(pheno_models):
|
|
106
|
-
#
|
|
107
|
-
params, params_lower = nuda.matter.pheno_params( model = model )
|
|
108
|
-
#
|
|
109
|
-
for param in params:
|
|
110
|
-
#
|
|
111
|
-
pheno = nuda.matter.setupPheno( model = model, param = param )
|
|
112
|
-
if nuda.env.verb: pheno.print_outputs( )
|
|
113
|
-
#
|
|
114
|
-
check = nuda.matter.setupCheck( eos = pheno, band = band )
|
|
115
|
-
#
|
|
116
|
-
if check.isInside:
|
|
117
|
-
lstyle = 'solid'
|
|
118
|
-
else:
|
|
119
|
-
lstyle = 'dashed'
|
|
120
|
-
#continue
|
|
121
|
-
#
|
|
122
|
-
if pheno.nm_pre is not None:
|
|
123
|
-
print('model:',model,' param:',param)
|
|
124
|
-
if model in model_check:
|
|
125
|
-
axs[1].plot( pheno.nm_den, pheno.nm_pre, linestyle=lstyle, color=nuda.param.col[kmodel] )
|
|
126
|
-
else:
|
|
127
|
-
model_check.append(model)
|
|
128
|
-
axs[1].plot( pheno.nm_den, pheno.nm_pre, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
|
|
129
|
-
# end of param
|
|
130
|
-
# end of model
|
|
131
|
-
axs[1].errorbar( p_den, p_cen, yerr=p_std, color='k' )
|
|
132
|
-
axs[1].errorbar( p_den+0.005, p_pheno_cen, yerr=p_pheno_std, color='r' )
|
|
133
|
-
#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 )
|
|
134
|
-
#axs[1].plot( band.den, (band.e2a-band.e2a_std), color='k', linestyle='dashed' )
|
|
135
|
-
#axs[1].plot( band.den, (band.e2a+band.e2a_std), color='k', linestyle='dashed' )
|
|
136
|
-
axs[1].text(0.02,40,'phenomenological models',fontsize='10')
|
|
137
|
-
#
|
|
138
|
-
#axs[1].legend(loc='upper left',fontsize='8', ncol=2)
|
|
139
|
-
#axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
|
|
140
|
-
fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
|
|
141
|
-
#
|
|
142
|
-
#plt.tight_layout()
|
|
143
|
-
if pname is not None:
|
|
144
|
-
plt.savefig(pname, dpi=200)
|
|
145
|
-
plt.close()
|
|
146
|
-
#
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
import matplotlib.pyplot as plt
|
|
3
|
-
|
|
4
|
-
import nucleardatapy as nuda
|
|
5
|
-
|
|
6
|
-
def matter_preSM_fig( pname, micro_mbs, pheno_models, band ):
|
|
7
|
-
"""
|
|
8
|
-
Plot nucleonic pressure in SM.\
|
|
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
|
-
:param matter: variable `matter`employed to define the band.
|
|
21
|
-
:type matter: str.
|
|
22
|
-
|
|
23
|
-
"""
|
|
24
|
-
#
|
|
25
|
-
print(f'Plot name: {pname}')
|
|
26
|
-
#
|
|
27
|
-
p_den = 0.32
|
|
28
|
-
p_cen = 11.5
|
|
29
|
-
p_std = 5.5
|
|
30
|
-
p_micro_cen = 9.0
|
|
31
|
-
p_micro_std = 3.0
|
|
32
|
-
p_pheno_cen = 14.5
|
|
33
|
-
p_pheno_std = 2.5
|
|
34
|
-
#
|
|
35
|
-
fig, axs = plt.subplots(1,2)
|
|
36
|
-
#fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
37
|
-
fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.9, wspace=0.05, hspace=0.3 )
|
|
38
|
-
#
|
|
39
|
-
axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
40
|
-
axs[0].set_ylabel(r'$p_\text{SM}(n_\text{nuc})$')
|
|
41
|
-
axs[0].set_xlim([0, 0.35])
|
|
42
|
-
axs[0].set_ylim([-2, 45])
|
|
43
|
-
#
|
|
44
|
-
axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)')
|
|
45
|
-
#axs[1].set_ylabel(r'$e_{sym}(n)$')
|
|
46
|
-
axs[1].set_xlim([0, 0.35])
|
|
47
|
-
axs[1].set_ylim([-2, 45])
|
|
48
|
-
axs[1].tick_params('y', labelleft=False)
|
|
49
|
-
#
|
|
50
|
-
mb_check = []
|
|
51
|
-
#
|
|
52
|
-
for kmb,mb in enumerate(micro_mbs):
|
|
53
|
-
#
|
|
54
|
-
models, models_lower = nuda.matter.micro_models_mb( mb )
|
|
55
|
-
#
|
|
56
|
-
for model in models:
|
|
57
|
-
#
|
|
58
|
-
micro = nuda.matter.setupMicro( model = model )
|
|
59
|
-
if nuda.env.verb: micro.print_outputs( )
|
|
60
|
-
#
|
|
61
|
-
check = nuda.matter.setupCheck( eos = micro, band = band )
|
|
62
|
-
#
|
|
63
|
-
if check.isInside:
|
|
64
|
-
lstyle = 'solid'
|
|
65
|
-
else:
|
|
66
|
-
lstyle = 'dashed'
|
|
67
|
-
#continue
|
|
68
|
-
#
|
|
69
|
-
print('model:',model)
|
|
70
|
-
print('err:',micro.p_err)
|
|
71
|
-
print('den:',micro.sm_den)
|
|
72
|
-
print('pre:',micro.sm_pre)
|
|
73
|
-
print('pre_err:',micro.sm_pre_err)
|
|
74
|
-
if micro.sm_pre is not None:
|
|
75
|
-
print('mb:',mb,'model:',model)
|
|
76
|
-
if mb in mb_check:
|
|
77
|
-
if micro.marker:
|
|
78
|
-
if micro.p_err:
|
|
79
|
-
axs[0].errorbar( micro.sm_den, micro.sm_pre, yerr=micro.sm_pre_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
80
|
-
else:
|
|
81
|
-
axs[0].plot( micro.sm_den, micro.sm_pre, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
82
|
-
else:
|
|
83
|
-
if micro.p_err:
|
|
84
|
-
axs[0].errorbar( micro.sm_den, micro.sm_pre, yerr=micro.sm_pre_err, marker=micro.marker, linestyle=lstyle, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
85
|
-
else:
|
|
86
|
-
axs[0].plot( micro.sm_den, micro.sm_pre, marker=micro.marker, linestyle=lstyle, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
87
|
-
else:
|
|
88
|
-
mb_check.append(mb)
|
|
89
|
-
if micro.marker:
|
|
90
|
-
if micro.p_err:
|
|
91
|
-
axs[0].errorbar( esm.sm_den, micro.sm_pre, yerr=micro.sm_pre_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
92
|
-
else:
|
|
93
|
-
axs[0].plot( micro.sm_den, micro.sm_pre, marker=micro.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
94
|
-
else:
|
|
95
|
-
if micro.p_err:
|
|
96
|
-
axs[0].errorbar( micro.sm_den, micro.sm_pre, yerr=micro.sm_pre_err, marker=micro.marker, linestyle=lstyle, label=mb, errorevery=micro.every, color=nuda.param.col[kmb] )
|
|
97
|
-
else:
|
|
98
|
-
axs[0].plot( micro.sm_den, esm.sm_pre, marker=esm.marker, linestyle=lstyle, label=mb, markevery=micro.every, color=nuda.param.col[kmb] )
|
|
99
|
-
# end of model
|
|
100
|
-
# end of mb
|
|
101
|
-
axs[0].errorbar( p_den, p_cen, yerr=p_std, color='k' )
|
|
102
|
-
axs[0].errorbar( p_den+0.005, p_micro_cen, yerr=p_micro_std, color='r' )
|
|
103
|
-
axs[0].text(0.02,40,'microscopic models',fontsize='10')
|
|
104
|
-
#
|
|
105
|
-
model_check = []
|
|
106
|
-
#
|
|
107
|
-
for kmodel,model in enumerate(pheno_models):
|
|
108
|
-
#
|
|
109
|
-
params, params_lower = nuda.matter.pheno_params( model = model )
|
|
110
|
-
#
|
|
111
|
-
for param in params:
|
|
112
|
-
#
|
|
113
|
-
pheno = nuda.matter.setupPheno( model = model, param = param )
|
|
114
|
-
if nuda.env.verb: pheno.print_outputs( )
|
|
115
|
-
#
|
|
116
|
-
check = nuda.matter.setupCheck( eos = pheno, band = band )
|
|
117
|
-
#
|
|
118
|
-
if check.isInside:
|
|
119
|
-
lstyle = 'solid'
|
|
120
|
-
else:
|
|
121
|
-
lstyle = 'dashed'
|
|
122
|
-
#continue
|
|
123
|
-
#
|
|
124
|
-
if pheno.sm_pre is not None:
|
|
125
|
-
print('model:',model,' param:',param)
|
|
126
|
-
if model in model_check:
|
|
127
|
-
axs[1].plot( pheno.sm_den, pheno.sm_pre, linestyle=lstyle, color=nuda.param.col[kmodel] )
|
|
128
|
-
else:
|
|
129
|
-
model_check.append(model)
|
|
130
|
-
axs[1].plot( pheno.sm_den, pheno.sm_pre, linestyle=lstyle, color=nuda.param.col[kmodel], label=model )
|
|
131
|
-
# end of param
|
|
132
|
-
# end of model
|
|
133
|
-
axs[1].errorbar( p_den, p_cen, yerr=p_std, color='k' )
|
|
134
|
-
axs[1].errorbar( p_den+0.005, p_pheno_cen, yerr=p_pheno_std, color='r' )
|
|
135
|
-
axs[1].text(0.02,40,'phenomenological models',fontsize='10')
|
|
136
|
-
#
|
|
137
|
-
#axs[1].legend(loc='upper left',fontsize='8', ncol=2)
|
|
138
|
-
#axs[0,1].legend(loc='upper left',fontsize='xx-small', ncol=2)
|
|
139
|
-
fig.legend(loc='upper left',bbox_to_anchor=(0.15,1.0),columnspacing=2,fontsize='8',ncol=5,frameon=False)
|
|
140
|
-
#
|
|
141
|
-
if pname is not None:
|
|
142
|
-
plt.savefig(pname, dpi=200)
|
|
143
|
-
plt.close()
|
|
144
|
-
#
|