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
|
@@ -87,11 +87,11 @@ class setupAMLeq():
|
|
|
87
87
|
self.marker = esym.marker
|
|
88
88
|
#print('type esym:',type(esym.esym))
|
|
89
89
|
if esym.esym is not None:
|
|
90
|
-
self.nm_den = esym.nm_den
|
|
91
|
-
self.nm_e2a = esym.nm_e2a
|
|
92
|
-
self.sm_den = esym.sm_den
|
|
93
|
-
self.sm_e2a = esym.sm_e2a
|
|
94
90
|
self.den = esym.den
|
|
91
|
+
self.nm_den = esym.den
|
|
92
|
+
self.sm_den = esym.den
|
|
93
|
+
self.nm_e2a_int = esym.esym_nm_e2a_int
|
|
94
|
+
self.sm_e2a_int = esym.esym_sm_e2a_int
|
|
95
95
|
self.esym = esym.esym
|
|
96
96
|
#print('esym:',self.esym)
|
|
97
97
|
self.x_n = ( 1.0 + self.asy ) / 2.0
|
|
@@ -120,29 +120,54 @@ class setupAMLeq():
|
|
|
120
120
|
self.n_mu = self.x_mu * self.den
|
|
121
121
|
#
|
|
122
122
|
# Thermodynamical variables
|
|
123
|
-
|
|
124
|
-
self.
|
|
123
|
+
# nucleons
|
|
124
|
+
self.rmass = self.x_n * nuda.cst.mnc2 + self.x_p * nuda.cst.mpc2
|
|
125
|
+
self.e2a_int_nuc = esym.esym_sm_e2a_int + esym.esym * self.asy**2
|
|
126
|
+
self.e2a_nuc = self.rmass + self.e2a_int_nuc
|
|
127
|
+
self.eps_int_nuc = self.e2a_int_nuc * self.den
|
|
128
|
+
self.eps_nuc = self.e2a_nuc * self.den
|
|
125
129
|
self.pre_nuc = esym.esym_sm_pre + esym.esym_sym_pre * self.asy**2
|
|
130
|
+
# leptons
|
|
126
131
|
lep = nuda.matter.setupFFGLep( den_el = self.n_el, den_mu = self.n_mu )
|
|
127
132
|
self.e2a_el = self.x_el * lep.e2n_el
|
|
133
|
+
self.e2a_int_el = self.e2a_el - self.x_el * nuda.cst.mec2
|
|
128
134
|
self.e2a_mu = self.x_mu * lep.e2n_mu
|
|
135
|
+
self.e2a_int_mu = self.e2a_mu - self.x_mu * nuda.cst.mmuc2
|
|
129
136
|
self.e2a_lep = self.x_lep * lep.e2n_lep
|
|
130
|
-
self.
|
|
137
|
+
self.eps_lep = self.e2a_lep / self.den
|
|
131
138
|
self.pre_el = lep.pre_el
|
|
132
139
|
self.pre_mu = lep.pre_mu
|
|
133
140
|
self.pre_lep = lep.pre_el + lep.pre_mu
|
|
134
|
-
# self.h2a
|
|
135
|
-
# self.h2v
|
|
136
|
-
# self.cs2
|
|
137
141
|
# total
|
|
142
|
+
self.e2a_int_tot = self.e2a_int_nuc + self.e2a_lep
|
|
138
143
|
self.e2a_tot = self.e2a_nuc + self.e2a_lep
|
|
139
|
-
self.
|
|
144
|
+
self.eps_int_tot = self.eps_int_nuc + self.eps_lep
|
|
145
|
+
self.eps_tot = self.eps_nuc + self.eps_lep
|
|
140
146
|
self.pre_tot = self.pre_nuc + self.pre_lep
|
|
141
|
-
#
|
|
147
|
+
# enthalpy self.h2a
|
|
148
|
+
self.h2a_lep = self.e2a_lep + self.pre_lep / self.den
|
|
149
|
+
self.h2a_nuc = self.e2a_nuc + self.pre_nuc / self.den
|
|
150
|
+
self.h2a_tot = self.e2a_tot + self.pre_tot / self.den
|
|
151
|
+
# enthaply density self.h2v
|
|
152
|
+
self.h2v_lep = self.h2a_lep * self.den
|
|
153
|
+
self.h2v_nuc = self.h2a_nuc * self.den
|
|
154
|
+
self.h2v_tot = self.h2a_tot * self.den
|
|
155
|
+
# sound speed self.cs2
|
|
156
|
+
x = np.insert(self.den, 0, 0.0)
|
|
157
|
+
y = np.insert(self.pre_lep, 0, 0.0)
|
|
158
|
+
cs_pre = CubicSpline(x, y)
|
|
159
|
+
self.cs2_lep = cs_pre(self.den, 1) / self.h2a_lep
|
|
160
|
+
y = np.insert(self.pre_nuc, 0, 0.0)
|
|
161
|
+
cs_pre = CubicSpline(x, y)
|
|
162
|
+
self.cs2_nuc = cs_pre(self.den, 1) / self.h2a_nuc
|
|
163
|
+
y = np.insert(self.pre_tot, 0, 0.0)
|
|
164
|
+
cs_pre = CubicSpline(x, y)
|
|
165
|
+
self.cs2_tot = cs_pre(self.den, 1) / self.h2a_tot
|
|
166
|
+
# #
|
|
142
167
|
self.den_unit = 'fm$^{-3}$'
|
|
143
168
|
self.kf_unit = 'fm$^{-1}$'
|
|
144
169
|
self.e2a_unit = 'MeV'
|
|
145
|
-
self.
|
|
170
|
+
self.eps_unit = 'MeV fm$^{-3}$'
|
|
146
171
|
self.pre_unit = 'MeV fm$^{-3}$'
|
|
147
172
|
self.gap_unit = 'MeV'
|
|
148
173
|
#
|
|
@@ -165,7 +190,7 @@ class setupAMLeq():
|
|
|
165
190
|
if self.kfn is not None: print(f" kfn: {np.round(self.den,3)} in {self.kf_unit}")
|
|
166
191
|
if self.asy is not None: print(f" asy: {np.round(self.asy,3)}")
|
|
167
192
|
if self.e2a is not None: print(f" e2a: {np.round(self.e2a,3)} in {self.e2a_unit}")
|
|
168
|
-
if self.
|
|
193
|
+
if self.eps is not None: print(f" eps: {np.round(self.eps,3)} in {self.eps_unit}")
|
|
169
194
|
if self.pre is not None: print(f" pre: {np.round(self.pre,3)} in {self.pre_unit}")
|
|
170
195
|
if self.cs2 is not None: print(f" cs2: {np.round(self.cs2,2)}")
|
|
171
196
|
#
|
|
@@ -202,7 +227,7 @@ class setupAMLeq():
|
|
|
202
227
|
#: Attribute the energy per particle.
|
|
203
228
|
self.e2a = None
|
|
204
229
|
#: Attribute the energy per unit volume.
|
|
205
|
-
self.
|
|
230
|
+
self.eps = None
|
|
206
231
|
#: Attribute the enthalpy per particle.
|
|
207
232
|
self.h2a = None
|
|
208
233
|
#: Attribute the enthalpy per unit volume.
|
nucleardatapy/fig/__init__.py
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
This module provides microscopic, phenomenological and experimental data constraints.
|
|
3
3
|
"""
|
|
4
4
|
from nucleardatapy.fig.matter_setupFFGNuc_fig import *
|
|
5
|
-
from nucleardatapy.fig.
|
|
5
|
+
from nucleardatapy.fig.matter_setupFFGLep_fig import *
|
|
6
|
+
from nucleardatapy.fig.matter_setupMicro_fig import *
|
|
6
7
|
from nucleardatapy.fig.matter_setupMicro_err_NM_fig import *
|
|
7
8
|
from nucleardatapy.fig.matter_setupMicro_band_fig import *
|
|
8
9
|
from nucleardatapy.fig.matter_setupMicro_effmass_fig import *
|
|
@@ -10,19 +11,26 @@ from nucleardatapy.fig.matter_setupMicro_gap_fig import *
|
|
|
10
11
|
from nucleardatapy.fig.matter_setupMicro_LP_fig import *
|
|
11
12
|
from nucleardatapy.fig.matter_setupMicroEsym_fig import *
|
|
12
13
|
#
|
|
13
|
-
from nucleardatapy.fig.matter_setupPheno_fig
|
|
14
|
-
from nucleardatapy.fig.matter_setupPhenoEsym_fig
|
|
14
|
+
from nucleardatapy.fig.matter_setupPheno_fig import *
|
|
15
|
+
from nucleardatapy.fig.matter_setupPhenoEsym_fig import *
|
|
15
16
|
#
|
|
16
|
-
from nucleardatapy.fig.matter_setupHIC_fig
|
|
17
|
+
from nucleardatapy.fig.matter_setupHIC_fig import *
|
|
17
18
|
#
|
|
18
|
-
from nucleardatapy.fig.
|
|
19
|
+
from nucleardatapy.fig.matter_setupNEPStats_fig import *
|
|
19
20
|
#
|
|
20
|
-
from nucleardatapy.fig.
|
|
21
|
-
|
|
22
|
-
from nucleardatapy.fig.
|
|
23
|
-
|
|
24
|
-
from nucleardatapy.fig.
|
|
25
|
-
from nucleardatapy.fig.
|
|
21
|
+
from nucleardatapy.fig.matter_setupCheck_fig import *
|
|
22
|
+
#
|
|
23
|
+
from nucleardatapy.fig.matter_all_fig import *
|
|
24
|
+
#
|
|
25
|
+
#from nucleardatapy.fig.matter_Esym_fig import *
|
|
26
|
+
#from nucleardatapy.fig.matter_ESM_fig import *
|
|
27
|
+
#from nucleardatapy.fig.matter_ENM_fig import *
|
|
28
|
+
#from nucleardatapy.fig.matter_cs2_fig import *
|
|
29
|
+
#from nucleardatapy.fig.matter_preNM_fig import *
|
|
30
|
+
#from nucleardatapy.fig.matter_preSM_fig import *
|
|
31
|
+
#from nucleardatapy.fig.matter_eosNM_fig import *
|
|
32
|
+
#from nucleardatapy.fig.matter_eosSM_fig import *
|
|
33
|
+
#from nucleardatapy.fig.matter_cs2NM_fig import *
|
|
26
34
|
#
|
|
27
35
|
from nucleardatapy.fig.corr_setupKsatQsat_fig import *
|
|
28
36
|
from nucleardatapy.fig.corr_setupEsymLsym_fig import *
|
|
@@ -40,12 +48,13 @@ from nucleardatapy.fig.nuc_setupRnpTheo_fig import *
|
|
|
40
48
|
from nucleardatapy.fig.hnuc_setupRE1LExp_fig import *
|
|
41
49
|
from nucleardatapy.fig.hnuc_setupChart_fig import *
|
|
42
50
|
#
|
|
43
|
-
from nucleardatapy.fig.
|
|
44
|
-
from nucleardatapy.fig.
|
|
45
|
-
from nucleardatapy.fig.
|
|
46
|
-
from nucleardatapy.fig.
|
|
51
|
+
from nucleardatapy.fig.eos_setupAM_fig import *
|
|
52
|
+
from nucleardatapy.fig.eos_setupAM_asy_nuc_fig import *
|
|
53
|
+
from nucleardatapy.fig.eos_setupAM_asy_lep_fig import *
|
|
54
|
+
from nucleardatapy.fig.eos_setupAM_asy_tot_fig import *
|
|
47
55
|
from nucleardatapy.fig.eos_setupAMBeq_fig import *
|
|
48
56
|
from nucleardatapy.fig.eos_setupAMLeq_fig import *
|
|
57
|
+
from nucleardatapy.fig.eos_setupCC_fig import *
|
|
49
58
|
#
|
|
50
59
|
from nucleardatapy.fig.crust_setupCrust_fig import *
|
|
51
60
|
#
|
|
@@ -5,8 +5,10 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def astro_setupGW_fig( pname, sources ):
|
|
7
7
|
"""
|
|
8
|
-
Plot Tidal deformabilities
|
|
9
|
-
|
|
8
|
+
Plot Tidal deformabilities as a function of sources.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: Tidal deformabilities versus sources.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
@@ -22,10 +24,10 @@ def astro_setupGW_fig( pname, sources ):
|
|
|
22
24
|
#
|
|
23
25
|
fig, axs = plt.subplots(1,1)
|
|
24
26
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
25
|
-
fig.subplots_adjust(left=0.14, bottom=0.12, right=
|
|
27
|
+
fig.subplots_adjust(left=0.14, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
|
|
26
28
|
#
|
|
27
|
-
axs.set_xlabel(r'sources',fontsize='
|
|
28
|
-
axs.set_ylabel(r'$\tilde{\Lambda}_{90\%}$',fontsize='
|
|
29
|
+
axs.set_xlabel(r'sources',fontsize='14')
|
|
30
|
+
axs.set_ylabel(r'$\tilde{\Lambda}_{90\%}$',fontsize='14')
|
|
29
31
|
axs.set_xlim([0.8, 2.5])
|
|
30
32
|
axs.set_ylim([0, 1200])
|
|
31
33
|
#
|
|
@@ -46,7 +48,7 @@ def astro_setupGW_fig( pname, sources ):
|
|
|
46
48
|
gw = nuda.astro.setupGW( source = source, hyp = hyp )
|
|
47
49
|
if nuda.env.verb_output: gw.print_output( )
|
|
48
50
|
if nuda.env.verb_latex: gw.print_latex( )
|
|
49
|
-
axs.errorbar( isource+ihyp/10, gw.lam, yerr=np.array([(gw.
|
|
51
|
+
axs.errorbar( isource+ihyp/10, gw.lam, yerr=np.array([(gw.lam_sig_lo,gw.lam_sig_up)]).T, label=gw.label, color=nuda.param.col[isource], marker=gw.marker, linestyle = 'solid', linewidth = 1 )
|
|
50
52
|
ihyp += 1
|
|
51
53
|
#
|
|
52
54
|
gwav = nuda.astro.setupGWAverage( source = source )
|
|
@@ -58,7 +60,7 @@ def astro_setupGW_fig( pname, sources ):
|
|
|
58
60
|
#
|
|
59
61
|
axs.set_xticks( ilabel )
|
|
60
62
|
axs.set_xticklabels( xlabel )
|
|
61
|
-
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=
|
|
63
|
+
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=3,frameon=False)
|
|
62
64
|
#
|
|
63
65
|
#
|
|
64
66
|
if pname is not None:
|
|
@@ -5,16 +5,18 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def astro_setupMR_fig( pname, sources, sources_av ):
|
|
7
7
|
"""
|
|
8
|
-
Plot M-R constraints from
|
|
9
|
-
|
|
8
|
+
Plot M-R constraints from observation measurements.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: Masses versus radii.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
13
15
|
:type pname: str.
|
|
14
16
|
:param sources: array of sources.
|
|
15
17
|
:type sources: array of str.
|
|
16
|
-
:param sources_av: .
|
|
17
|
-
:type sources_av: .
|
|
18
|
+
:param sources_av: array of averaged sources.
|
|
19
|
+
:type sources_av: array of str.
|
|
18
20
|
|
|
19
21
|
"""
|
|
20
22
|
#
|
|
@@ -22,12 +24,12 @@ def astro_setupMR_fig( pname, sources, sources_av ):
|
|
|
22
24
|
#
|
|
23
25
|
fig, axs = plt.subplots(1,1)
|
|
24
26
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
25
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
27
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
|
|
26
28
|
#
|
|
27
|
-
axs.set_xlabel(r'$R$ (km)',fontsize='
|
|
28
|
-
axs.set_ylabel(r'M (M$_\odot$)',fontsize='
|
|
29
|
-
axs.set_xlim([
|
|
30
|
-
axs.set_ylim([
|
|
29
|
+
axs.set_xlabel(r'$R$ (km)',fontsize='14')
|
|
30
|
+
axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
|
|
31
|
+
axs.set_xlim([9.2, 16.5])
|
|
32
|
+
axs.set_ylim([0.58, 2.2])
|
|
31
33
|
#
|
|
32
34
|
isource = 1
|
|
33
35
|
xlabel = []
|
|
@@ -56,31 +58,37 @@ def astro_setupMR_fig( pname, sources, sources_av ):
|
|
|
56
58
|
#
|
|
57
59
|
isource += 1
|
|
58
60
|
#
|
|
59
|
-
isource = 1
|
|
60
|
-
for source in sources_av:
|
|
61
|
+
#isource = 1
|
|
62
|
+
for isource,source in enumerate(sources_av):
|
|
63
|
+
#if source.lower() == 'j0030+0451':
|
|
64
|
+
# obss = [ 1, 2 ]
|
|
65
|
+
#if source.lower() == 'j0740+6620':
|
|
66
|
+
# obss = [ 1, 2, 3 ]
|
|
67
|
+
obss = nuda.astro.mr_obss( source = source )
|
|
61
68
|
if source.lower() == 'j0030+0451':
|
|
62
69
|
obss = [ 1, 2 ]
|
|
63
|
-
if source.lower() == 'j0740+6620':
|
|
64
|
-
obss = [ 1, 2 ]
|
|
65
70
|
mrav = nuda.astro.setupMRAverage( source = source, obss = obss )
|
|
66
71
|
if nuda.env.verb_output: mrav.print_output( )
|
|
67
72
|
if nuda.env.verb_latex: mrav.print_latex( )
|
|
68
|
-
axs.errorbar( mrav.rad_cen, mrav.mass_cen, xerr=mrav.rad_sig_std, yerr=mrav.mass_sig_std, ms=12, label=mrav.label, color=nuda.param.col[isource], marker='^',
|
|
69
|
-
isource += 1
|
|
73
|
+
axs.errorbar( mrav.rad_cen, mrav.mass_cen, xerr=mrav.rad_sig_std, yerr=mrav.mass_sig_std, ms=12, label=mrav.label, color=nuda.param.col[isource+1], marker='^', linewidth = 3 )
|
|
70
74
|
#
|
|
71
75
|
# write source name in plot:
|
|
72
76
|
#
|
|
73
77
|
for source in sources:
|
|
74
78
|
print('source:',source)
|
|
75
79
|
if source.lower() == 'j0030+0451':
|
|
76
|
-
axs.text(13.3,1.
|
|
80
|
+
axs.text(13.3,1.55,'J0030+0451')
|
|
77
81
|
elif source.lower() == 'j0740+6620':
|
|
78
82
|
axs.text(13,1.95,'J0740+6620')
|
|
79
83
|
elif source.lower() == 'j0437-4715':
|
|
80
|
-
axs.text(
|
|
84
|
+
axs.text(11.0,1.48,'J0437-4715')
|
|
85
|
+
elif source.lower() == 'j0614-3329':
|
|
86
|
+
axs.text(9.8,1.55,'J0614-3329')
|
|
87
|
+
elif source.lower() == 'j1731-347':
|
|
88
|
+
axs.text(10.5,0.8,'J1731-347')
|
|
81
89
|
#
|
|
82
90
|
#axs.legend(loc='upper left',fontsize='8', ncol=2)
|
|
83
|
-
axs.legend(loc='lower center',bbox_to_anchor=(0.48,1.01),columnspacing=2,fontsize='8',ncol=
|
|
91
|
+
axs.legend(loc='lower center',bbox_to_anchor=(0.48,1.01),columnspacing=2,fontsize='8',ncol=4,frameon=False)
|
|
84
92
|
#
|
|
85
93
|
if pname is not None:
|
|
86
94
|
plt.savefig(pname, dpi=200)
|
|
@@ -5,8 +5,10 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def astro_setupMasses_fig( pname, sources ):
|
|
7
7
|
"""
|
|
8
|
-
Plot Masses for massives neutron stars as a function of sources
|
|
9
|
-
|
|
8
|
+
Plot Masses for massives neutron stars as a function of sources.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: masses versus sources.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
@@ -20,10 +22,10 @@ def astro_setupMasses_fig( pname, sources ):
|
|
|
20
22
|
#
|
|
21
23
|
fig, axs = plt.subplots(1,1)
|
|
22
24
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
25
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.75, wspace=0.3, hspace=0.3)
|
|
24
26
|
#
|
|
25
|
-
axs.set_ylabel(r'M (M$_\odot$)',fontsize='
|
|
26
|
-
axs.set_xlabel(r'sources',fontsize='
|
|
27
|
+
axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
|
|
28
|
+
axs.set_xlabel(r'sources',fontsize='14')
|
|
27
29
|
axs.set_ylim([1.7, 3.5])
|
|
28
30
|
axs.set_xlim([0.8, 5.5])
|
|
29
31
|
#
|
|
@@ -56,7 +58,7 @@ def astro_setupMasses_fig( pname, sources ):
|
|
|
56
58
|
axs.set_xticks( ilabel )
|
|
57
59
|
axs.set_xticklabels( xlabel )
|
|
58
60
|
#axs.legend(loc='upper left',fontsize='8', ncol=2)
|
|
59
|
-
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=
|
|
61
|
+
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=3,frameon=False)
|
|
60
62
|
#
|
|
61
63
|
if pname is not None:
|
|
62
64
|
plt.savefig(pname, dpi=200)
|
|
@@ -5,8 +5,12 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def astro_setupMtov_fig( pname, sources_lo_all, sources_lo_dist, sources_up1, sources_up2, sources_up3 ):
|
|
7
7
|
"""
|
|
8
|
-
Plot the distribution
|
|
9
|
-
|
|
8
|
+
Plot the probability distribution functions associated to maximum masses.
|
|
9
|
+
|
|
10
|
+
Includes the observation uncertainty in the PDF by using error-function.
|
|
11
|
+
|
|
12
|
+
The plot is 1x1 with:
|
|
13
|
+
|
|
10
14
|
[0]: distribution of maximum mass versus maximum mass.
|
|
11
15
|
|
|
12
16
|
:param pname: name of the figure (*.png)
|
|
@@ -28,10 +32,10 @@ def astro_setupMtov_fig( pname, sources_lo_all, sources_lo_dist, sources_up1, so
|
|
|
28
32
|
#
|
|
29
33
|
fig, axs = plt.subplots(1,1)
|
|
30
34
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
31
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
35
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.9, wspace=0.3, hspace=0.3)
|
|
32
36
|
#
|
|
33
|
-
axs.set_xlabel(r'M$_\mathrm{tov}$ (M$_\odot$)',fontsize='
|
|
34
|
-
axs.set_ylabel(r'probability (non-normalised)',fontsize='
|
|
37
|
+
axs.set_xlabel(r'M$_\mathrm{tov}$ (M$_\odot$)',fontsize='14')
|
|
38
|
+
axs.set_ylabel(r'probability (non-normalised)',fontsize='14')
|
|
35
39
|
axs.set_xlim([1.6, 3.4])
|
|
36
40
|
axs.set_ylim([0.0, 1.03])
|
|
37
41
|
#
|
|
@@ -76,7 +80,7 @@ def astro_setupMtov_fig( pname, sources_lo_all, sources_lo_dist, sources_up1, so
|
|
|
76
80
|
#axs.plot(prob3.mass, prob3.proba_tot, label=prob3.label_tot, color=nuda.param.col[4], linestyle=(1, (4, 8)), linewidth = 3 )
|
|
77
81
|
#
|
|
78
82
|
#axs.legend( loc='upper left',fontsize='8', ncol=1 )
|
|
79
|
-
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=
|
|
83
|
+
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=5,frameon=False)
|
|
80
84
|
#
|
|
81
85
|
if pname is not None:
|
|
82
86
|
plt.savefig(pname, dpi=200)
|
|
@@ -5,8 +5,10 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def astro_setupMup_fig( pname, sources ):
|
|
7
7
|
"""
|
|
8
|
-
Plot upper boundaries
|
|
9
|
-
|
|
8
|
+
Plot mass upper boundaries from GW measurements as a function of GW sources.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: upper boundary for the mass versus sources.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
@@ -20,10 +22,10 @@ def astro_setupMup_fig( pname, sources ):
|
|
|
20
22
|
#
|
|
21
23
|
fig, axs = plt.subplots(1,1)
|
|
22
24
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
25
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
|
|
24
26
|
#
|
|
25
|
-
axs.set_xlabel(r'sources',fontsize='
|
|
26
|
-
axs.set_ylabel(r'M (M$_\odot$)',fontsize='
|
|
27
|
+
axs.set_xlabel(r'sources',fontsize='14')
|
|
28
|
+
axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
|
|
27
29
|
axs.set_xlim([0.8, 2.5])
|
|
28
30
|
axs.set_ylim([2.4, 3.4])
|
|
29
31
|
#
|
|
@@ -45,7 +47,7 @@ def astro_setupMup_fig( pname, sources ):
|
|
|
45
47
|
mup = nuda.astro.setupMup( source = source, hyp = hyp )
|
|
46
48
|
if nuda.env.verb_output: mup.print_output( )
|
|
47
49
|
if nuda.env.verb_latex: mup.print_latex( )
|
|
48
|
-
axs.errorbar( isource+ihyp/10, mup.mup, yerr=np.array([(mup.
|
|
50
|
+
axs.errorbar( isource+ihyp/10, mup.mup, yerr=np.array([(mup.sig_lo,mup.sig_up)]).T, label=mup.label, color=nuda.param.col[isource], marker=mup.marker, linestyle = 'solid', linewidth = 1 )
|
|
49
51
|
ihyp += 1
|
|
50
52
|
#
|
|
51
53
|
if source=='GW170817': hyps = [ 3, 4 ]
|
|
@@ -60,7 +62,7 @@ def astro_setupMup_fig( pname, sources ):
|
|
|
60
62
|
axs.set_xticklabels( xlabel )
|
|
61
63
|
#
|
|
62
64
|
#axs.legend(loc='upper left',fontsize='8', ncol=2)
|
|
63
|
-
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=
|
|
65
|
+
axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=3,frameon=False)
|
|
64
66
|
#
|
|
65
67
|
if pname is not None:
|
|
66
68
|
plt.savefig(pname, dpi=200)
|
|
@@ -3,16 +3,22 @@ import matplotlib.pyplot as plt
|
|
|
3
3
|
|
|
4
4
|
import nucleardatapy as nuda
|
|
5
5
|
|
|
6
|
-
def corr_setupEsymDen_fig( pname, constraints, Ksym ):
|
|
6
|
+
def corr_setupEsymDen_fig( pname, constraints, Ksym, origine ):
|
|
7
7
|
"""
|
|
8
|
-
Plot
|
|
9
|
-
|
|
8
|
+
Plot Esym or Esym,2 (depending on `origine`) as a function of the density.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: upper boundary for the mass versus sources.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
13
15
|
:type pname: str.
|
|
14
|
-
:param
|
|
15
|
-
:type
|
|
16
|
+
:param constraints: array of constraints to run on.
|
|
17
|
+
:type constraints: array of str.
|
|
18
|
+
:param Ksym: Value (in MeV) of Ksym.
|
|
19
|
+
:type Ksym: real number.
|
|
20
|
+
:param origine: can be 'finiteNuclei' or 'neutronStar'.
|
|
21
|
+
:type origine: str.
|
|
16
22
|
|
|
17
23
|
"""
|
|
18
24
|
#
|
|
@@ -20,10 +26,17 @@ def corr_setupEsymDen_fig( pname, constraints, Ksym ):
|
|
|
20
26
|
#
|
|
21
27
|
fig, axs = plt.subplots(1,1)
|
|
22
28
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
29
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
|
|
24
30
|
#
|
|
25
|
-
axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='
|
|
26
|
-
|
|
31
|
+
axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
|
|
32
|
+
if origine == 'finiteNuclei':
|
|
33
|
+
axs.set_ylabel(r'$e_{\text{sym},2}(n_\text{nuc})$ (MeV)',fontsize='14')
|
|
34
|
+
elif origine == 'neutronStar':
|
|
35
|
+
axs.set_ylabel(r'$e_\text{sym}(n_\text{nuc})$ (MeV)',fontsize='14')
|
|
36
|
+
else:
|
|
37
|
+
print('corr_setupEsymDen_fig.py: origine is not well documented, origine=',origine)
|
|
38
|
+
print('corr_setupEsymDen_fig.py: exit()')
|
|
39
|
+
exit()
|
|
27
40
|
axs.set_xlim([0.09, 0.27])
|
|
28
41
|
axs.set_ylim([10, 60])
|
|
29
42
|
#
|
|
@@ -38,7 +51,7 @@ def corr_setupEsymDen_fig( pname, constraints, Ksym ):
|
|
|
38
51
|
if esym.plot:
|
|
39
52
|
axs.fill_between( esym.esym_den, y1=esym.esym_e2a_min, y2=esym.esym_e2a_max, label=esym.label, alpha=esym.alpha )
|
|
40
53
|
#
|
|
41
|
-
axs.text(0.15,12,r'$K_\text{sym}$='+str(int(Ksym))+' MeV',fontsize='
|
|
54
|
+
axs.text(0.15,12,r'$K_\text{sym}$='+str(int(Ksym))+' MeV',fontsize='14')
|
|
42
55
|
axs.legend(loc='lower right',fontsize='9')
|
|
43
56
|
#
|
|
44
57
|
if pname is not None:
|
|
@@ -3,27 +3,41 @@ import matplotlib.pyplot as plt
|
|
|
3
3
|
|
|
4
4
|
import nucleardatapy as nuda
|
|
5
5
|
|
|
6
|
-
def corr_setupEsymLsym_fig( pname, constraints ):
|
|
6
|
+
def corr_setupEsymLsym_fig( pname, constraints, origine ):
|
|
7
7
|
"""
|
|
8
|
-
Plot the correlation between Esym and Lsym
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Plot the correlation between Esym and Lsym.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
12
|
+
[0]: Esym - Lsym correlation plot.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
13
15
|
:type pname: str.
|
|
14
16
|
:param constraints: list of constraints to run on.
|
|
15
17
|
:type constraints: array of str.
|
|
18
|
+
:param origine: can be 'finiteNuclei' or 'neutronStar'.
|
|
19
|
+
:type origine: str.
|
|
16
20
|
|
|
17
21
|
"""
|
|
18
22
|
#
|
|
19
23
|
print(f'Plot name: {pname}')
|
|
24
|
+
print('list of constraints:',constraints)
|
|
20
25
|
#
|
|
21
26
|
fig, axs = plt.subplots(1,1)
|
|
22
27
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
|
-
fig.subplots_adjust(left=0.12, bottom=0.12, right=
|
|
28
|
+
fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
|
|
29
|
+
#
|
|
30
|
+
if origine == 'finiteNuclei':
|
|
31
|
+
axs.set_xlabel(r'$E_{\mathrm{sym},2}$ (MeV)',fontsize='14')
|
|
32
|
+
axs.set_ylabel(r'$L_{\mathrm{sym},2}$ (MeV)',fontsize='14')
|
|
33
|
+
elif origine == 'neutronStar':
|
|
34
|
+
axs.set_xlabel(r'$E_\mathrm{sym}$ (MeV)',fontsize='14')
|
|
35
|
+
axs.set_ylabel(r'$L_\mathrm{sym}$ (MeV)',fontsize='14')
|
|
36
|
+
else:
|
|
37
|
+
print('corr_setupEsymLsym_fig.py: origine is not well documented, origine=',origine)
|
|
38
|
+
print('corr_setupEsymLsym_fig.py: exit()')
|
|
39
|
+
exit()
|
|
24
40
|
#
|
|
25
|
-
axs.set_xlabel(r'$E_{\mathrm{sym},2}$ (MeV)')
|
|
26
|
-
axs.set_ylabel(r'$L_{\mathrm{sym},2}$ (MeV)')
|
|
27
41
|
axs.set_xlim([23, 44])
|
|
28
42
|
axs.set_ylim([10, 120])
|
|
29
43
|
#
|
|
@@ -40,6 +54,9 @@ def corr_setupEsymLsym_fig( pname, constraints ):
|
|
|
40
54
|
elif el.plot == 'curve':
|
|
41
55
|
axs.plot( el.Esym, el.Lsym, linestyle='solid', linewidth=3, label=el.label )
|
|
42
56
|
elif el.plot == 'contour':
|
|
57
|
+
print('plot:',el.plot)
|
|
58
|
+
print('Esym:',el.Esym)
|
|
59
|
+
print('Lsym:',el.Lsym)
|
|
43
60
|
axs.plot( el.Esym, el.Lsym, linestyle='solid', label=el.label )
|
|
44
61
|
elif el.plot == 'band_y':
|
|
45
62
|
axs.fill_between( el.Esym, y1=el.Lsym-el.Lsym_err, y2=el.Lsym+el.Lsym_err, label=el.label, alpha=el.alpha )
|
|
@@ -49,7 +66,7 @@ def corr_setupEsymLsym_fig( pname, constraints ):
|
|
|
49
66
|
#axs.errorbar( el.Esym, el.Lsym, yerr=el.Lsym_err, linestyle='solid', label=el.label )
|
|
50
67
|
if nuda.env.verb: el.print_outputs( )
|
|
51
68
|
#
|
|
52
|
-
axs.legend(loc='lower right',fontsize='
|
|
69
|
+
axs.legend(loc='lower right',fontsize='10')
|
|
53
70
|
#
|
|
54
71
|
if pname is not None:
|
|
55
72
|
plt.savefig(pname, dpi=300)
|
|
@@ -5,8 +5,10 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def corr_setupKsatQsat_fig( pname, constraints ):
|
|
7
7
|
"""
|
|
8
|
-
Plot the correlation between Ksat and Qsat
|
|
9
|
-
|
|
8
|
+
Plot the correlation between Ksat and Qsat.
|
|
9
|
+
|
|
10
|
+
The plot is 1x1 with:
|
|
11
|
+
|
|
10
12
|
[0]: Ksat - Qsat correlation plot
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
@@ -20,12 +22,12 @@ def corr_setupKsatQsat_fig( pname, constraints ):
|
|
|
20
22
|
#
|
|
21
23
|
fig, axs = plt.subplots(1,1)
|
|
22
24
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
|
-
fig.subplots_adjust(left=0.15, bottom=0.12, right=
|
|
25
|
+
fig.subplots_adjust(left=0.15, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
|
|
24
26
|
#
|
|
25
|
-
axs.set_xlabel(r'$K_\mathrm{sat}$ (MeV)')
|
|
26
|
-
axs.set_ylabel(r'$Q_\mathrm{sat}$ (MeV)')
|
|
27
|
-
axs.set_xlim([
|
|
28
|
-
axs.set_ylim([-
|
|
27
|
+
axs.set_xlabel(r'$K_\mathrm{sat}$ (MeV)',fontsize='14')
|
|
28
|
+
axs.set_ylabel(r'$Q_\mathrm{sat}$ (MeV)',fontsize='14')
|
|
29
|
+
axs.set_xlim([100, 360])
|
|
30
|
+
axs.set_ylim([-2500, 2200])
|
|
29
31
|
#axs.tick_params(labelbottom=True, labeltop=False, labelleft=True, labelright=False,
|
|
30
32
|
# bottom=True, top=True, left=True, right=True)
|
|
31
33
|
# axs.xaxis.set_major_locator(MultipleLocator(5))
|
|
@@ -44,20 +46,24 @@ def corr_setupKsatQsat_fig( pname, constraints ):
|
|
|
44
46
|
if nuda.env.verb: print('Qsat:',kq.Qsat)
|
|
45
47
|
if nuda.env.verb: print('len(Ksat):',kq.Ksat.size)
|
|
46
48
|
#
|
|
47
|
-
if k == 2:
|
|
48
|
-
|
|
49
|
-
else:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if k == 3 or k == 4 or k == 5:
|
|
54
|
-
axs.plot( x, nuda.corr.flinear(x,kq.m,kq.c), color=nuda.param.col[kk], linestyle='dashed' )
|
|
49
|
+
#if k == 2:
|
|
50
|
+
# kk = 0
|
|
51
|
+
#else:
|
|
52
|
+
# kk = k
|
|
53
|
+
if k == 5 or k == 9 or k == 10 or k == 11:
|
|
54
|
+
lstyle = 'dashed'
|
|
55
55
|
else:
|
|
56
|
-
|
|
56
|
+
lstyle = 'solid'
|
|
57
|
+
if kq.Ksat is not None:
|
|
58
|
+
axs.scatter( kq.Ksat, kq.Qsat, label=kq.label, color = nuda.param.col[k], marker = kq.marker )
|
|
59
|
+
if kq.Ksat_lin is not None:
|
|
60
|
+
axs.plot( kq.Ksat_lin, kq.Qsat_lin, color = nuda.param.col[k], linestyle = lstyle )
|
|
61
|
+
if kq.Ksat_band is not None:
|
|
62
|
+
axs.fill_between( kq.Ksat_band, kq.Qsat_lo, kq.Qsat_up, label=kq.label, color = nuda.param.col[k], alpha = 0.2 )
|
|
57
63
|
#
|
|
58
64
|
if nuda.env.verb: kq.print_outputs( )
|
|
59
65
|
#
|
|
60
|
-
axs.legend(loc='upper left',ncol=
|
|
66
|
+
axs.legend(loc='upper left',ncol=4, fontsize='10')
|
|
61
67
|
#
|
|
62
68
|
if pname is not None:
|
|
63
69
|
plt.savefig(pname, dpi=200)
|
|
@@ -5,13 +5,15 @@ import nucleardatapy as nuda
|
|
|
5
5
|
|
|
6
6
|
def crust_setupCrust_fig( pname, models ):
|
|
7
7
|
"""
|
|
8
|
-
Plot
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Plot crust predictions for the models given in `models`.
|
|
9
|
+
|
|
10
|
+
The plot is 1x2 with:
|
|
11
|
+
|
|
12
|
+
[0]: internal energy per nucleon as a function of the density n. [1]: Z as a function of the density n.
|
|
11
13
|
|
|
12
14
|
:param pname: name of the figure (*.png)
|
|
13
15
|
:type pname: str.
|
|
14
|
-
:param models:
|
|
16
|
+
:param models: list of different models.
|
|
15
17
|
:type models: str.
|
|
16
18
|
|
|
17
19
|
"""
|
|
@@ -22,14 +24,14 @@ def crust_setupCrust_fig( pname, models ):
|
|
|
22
24
|
fig.tight_layout() # Or equivalently, "plt.tight_layout()"
|
|
23
25
|
fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.78, wspace=0.3, hspace=0.3 )
|
|
24
26
|
#
|
|
25
|
-
axs[0].set_xlabel(r'
|
|
26
|
-
axs[0].set_ylabel(r'$e_{int}(
|
|
27
|
+
axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
|
|
28
|
+
axs[0].set_ylabel(r'$e_\text{int}(n_\text{nuc})$ (MeV)',fontsize='14')
|
|
27
29
|
axs[0].set_xlim([1e-4, 1e-1])
|
|
28
30
|
axs[0].set_ylim([-2, 10])
|
|
29
31
|
axs[0].set_xscale('log')
|
|
30
32
|
#
|
|
31
|
-
axs[1].set_xlabel(r'
|
|
32
|
-
axs[1].set_ylabel(r'$Z$')
|
|
33
|
+
axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
|
|
34
|
+
axs[1].set_ylabel(r'$Z$',fontsize='14')
|
|
33
35
|
axs[1].set_xlim([1e-4, 1e-1])
|
|
34
36
|
axs[1].set_ylim([10, 100])
|
|
35
37
|
axs[1].set_xscale('log')
|
|
@@ -44,7 +46,7 @@ def crust_setupCrust_fig( pname, models ):
|
|
|
44
46
|
axs[1].plot( crust.den, crust.Z, linestyle=crust.linestyle )
|
|
45
47
|
#axs[0].legend(loc='upper left',fontsize='8', ncol=1)
|
|
46
48
|
#axs[1].legend(loc='upper left',fontsize='8', ncol=1)
|
|
47
|
-
fig.legend(loc='upper left',bbox_to_anchor=(0.
|
|
49
|
+
fig.legend(loc='upper left',bbox_to_anchor=(0.08,1.01),columnspacing=2,fontsize='7.5',ncol=4,frameon=False)
|
|
48
50
|
#
|
|
49
51
|
if pname is not None:
|
|
50
52
|
plt.savefig(pname, dpi=200)
|