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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. nucleardatapy/__init__.py +3 -1
  2. nucleardatapy/astro/setup_gw.py +18 -18
  3. nucleardatapy/astro/setup_mr.py +9 -1
  4. nucleardatapy/astro/setup_mup.py +10 -10
  5. nucleardatapy/corr/setup_EsymDen.py +0 -5
  6. nucleardatapy/corr/setup_EsymLsym.py +50 -17
  7. nucleardatapy/corr/setup_KsatQsat.py +170 -69
  8. nucleardatapy/crust/setup_crust.py +363 -125
  9. nucleardatapy/data/astro/NICER/J0740+6620.dat +1 -0
  10. nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-E2A-NM.dat +8 -8
  11. nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
  12. nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
  13. nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
  14. nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
  15. nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
  16. nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
  17. nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
  18. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
  19. nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
  20. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
  21. nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
  22. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
  23. nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
  24. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
  25. nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
  26. nucleardatapy/env.py +1 -1
  27. nucleardatapy/eos/__init__.py +4 -3
  28. nucleardatapy/eos/setupCC.py +429 -0
  29. nucleardatapy/eos/setup_am.py +39 -14
  30. nucleardatapy/eos/setup_am_Beq.py +40 -15
  31. nucleardatapy/eos/setup_am_Leq.py +40 -15
  32. nucleardatapy/fig/__init__.py +24 -15
  33. nucleardatapy/fig/astro_setupGW_fig.py +5 -5
  34. nucleardatapy/fig/astro_setupMR_fig.py +12 -10
  35. nucleardatapy/fig/astro_setupMasses_fig.py +4 -4
  36. nucleardatapy/fig/astro_setupMtov_fig.py +4 -4
  37. nucleardatapy/fig/astro_setupMup_fig.py +5 -5
  38. nucleardatapy/fig/corr_setupEsymDen_fig.py +12 -5
  39. nucleardatapy/fig/corr_setupEsymLsym_fig.py +18 -5
  40. nucleardatapy/fig/corr_setupKsatQsat_fig.py +19 -15
  41. nucleardatapy/fig/crust_setupCrust_fig.py +5 -5
  42. nucleardatapy/fig/eos_setupAMBeq_fig.py +523 -66
  43. nucleardatapy/fig/eos_setupAMLeq_fig.py +18 -18
  44. nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +364 -0
  45. nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +337 -0
  46. nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +343 -0
  47. nucleardatapy/fig/eos_setupAM_fig.py +504 -0
  48. nucleardatapy/fig/eos_setupCC_fig.py +240 -0
  49. nucleardatapy/fig/hnuc_setupChart_fig.py +2 -2
  50. nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +3 -3
  51. nucleardatapy/fig/matter_all_fig.py +954 -0
  52. nucleardatapy/fig/matter_setupCheck_fig.py +103 -0
  53. nucleardatapy/fig/matter_setupFFGLep_fig.py +70 -0
  54. nucleardatapy/fig/matter_setupFFGNuc_fig.py +267 -104
  55. nucleardatapy/fig/matter_setupHIC_fig.py +98 -58
  56. nucleardatapy/fig/matter_setupMicroEsym_fig.py +248 -63
  57. nucleardatapy/fig/matter_setupMicro_LP_fig.py +175 -78
  58. nucleardatapy/fig/matter_setupMicro_band_fig.py +115 -47
  59. nucleardatapy/fig/matter_setupMicro_effmass_fig.py +248 -73
  60. nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +41 -18
  61. nucleardatapy/fig/matter_setupMicro_fig.py +299 -67
  62. nucleardatapy/fig/matter_setupMicro_gap_fig.py +219 -92
  63. nucleardatapy/fig/matter_setupNEPStats_fig.py +96 -0
  64. nucleardatapy/fig/matter_setupPhenoEsym_fig.py +193 -55
  65. nucleardatapy/fig/matter_setupPheno_fig.py +385 -88
  66. nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +59 -48
  67. nucleardatapy/fig/nuc_setupBEExp_fig.py +48 -41
  68. nucleardatapy/fig/nuc_setupBETheo_fig.py +59 -31
  69. nucleardatapy/fig/nuc_setupISGMRExp_fig.py +5 -5
  70. nucleardatapy/fig/nuc_setupRchExp_fig.py +2 -2
  71. nucleardatapy/fig/nuc_setupRchTheo_fig.py +21 -20
  72. nucleardatapy/fig/nuc_setupRnpExp_fig.py +77 -109
  73. nucleardatapy/fig/nuc_setupRnpTheo_fig.py +92 -93
  74. nucleardatapy/hello.py +6 -0
  75. nucleardatapy/hnuc/setup_re1L_exp.py +6 -6
  76. nucleardatapy/hnuc/setup_re1Xi_exp.py +5 -5
  77. nucleardatapy/hnuc/setup_re2L_exp.py +6 -6
  78. nucleardatapy/matter/__init__.py +14 -14
  79. nucleardatapy/matter/setup_check.py +6 -6
  80. nucleardatapy/matter/setup_ffg.py +66 -39
  81. nucleardatapy/matter/setup_hic.py +91 -74
  82. nucleardatapy/matter/setup_micro.py +1623 -1009
  83. nucleardatapy/matter/setup_micro_band.py +6 -6
  84. nucleardatapy/matter/setup_micro_esym.py +11 -13
  85. nucleardatapy/matter/setup_micro_gap.py +24 -17
  86. nucleardatapy/matter/setup_micro_lp.py +2 -2
  87. nucleardatapy/matter/setup_nep.py +175 -92
  88. nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
  89. nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
  90. nucleardatapy/matter/setup_pheno.py +121 -45
  91. nucleardatapy/matter/setup_pheno_esym.py +8 -13
  92. nucleardatapy/nuc/setup_be_exp.py +304 -292
  93. nucleardatapy/nuc/setup_be_theo.py +273 -97
  94. nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
  95. nucleardatapy/nuc/setup_rnp_exp.py +1 -0
  96. nucleardatapy/nuc/setup_rnp_theo.py +2 -1
  97. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/METADATA +48 -16
  98. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/RECORD +127 -120
  99. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/WHEEL +1 -1
  100. tests/test_corr_setupKsatQsat.py +3 -1
  101. tests/test_matter_setupMicro.py +37 -10
  102. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
  103. nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
  104. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
  105. nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
  106. nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +0 -125
  107. nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +0 -115
  108. nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +0 -117
  109. nucleardatapy/fig/eos_setupAM_e_fig.py +0 -173
  110. nucleardatapy/fig/matter_ENM_fig.py +0 -128
  111. nucleardatapy/fig/matter_ESM_fig.py +0 -140
  112. nucleardatapy/fig/matter_Esym_fig.py +0 -134
  113. nucleardatapy/fig/matter_cs2_fig.py +0 -83
  114. nucleardatapy/fig/matter_preNM_fig.py +0 -146
  115. nucleardatapy/fig/matter_preSM_fig.py +0 -144
  116. nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
  117. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
  118. /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
  119. /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
  120. /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
  121. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
  122. /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
  123. /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
  124. /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
  125. /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
  126. /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
  127. /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
  128. /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
  129. /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
  130. /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
  131. /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
  132. /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
  133. /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
  134. /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
  135. /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
  136. /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
  137. /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
  138. /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
  139. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
  140. /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
  141. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.dist-info}/licenses/LICENSE +0 -0
  142. {nucleardatapy-0.2.1.dist-info → nucleardatapy-1.0.0.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
- self.e2a_nuc = esym.esym_sm_e2a + esym.esym * self.asy**2
124
- self.e2v_nuc = self.e2a_nuc * self.den
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.e2v_lep = self.e2a_lep / self.den
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.e2v_tot = self.e2v_nuc + self.e2v_lep
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.e2v_unit = 'MeV fm$^{-3}$'
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.e2v is not None: print(f" e2v: {np.round(self.e2v,3)} in {self.e2v_unit}")
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.e2v = None
230
+ self.eps = None
206
231
  #: Attribute the enthalpy per particle.
207
232
  self.h2a = None
208
233
  #: Attribute the enthalpy per unit volume.
@@ -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.matter_setupMicro_fig import *
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 import *
14
- from nucleardatapy.fig.matter_setupPhenoEsym_fig import *
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 import *
17
+ from nucleardatapy.fig.matter_setupHIC_fig import *
17
18
  #
18
- from nucleardatapy.fig.matter_setupNEPModelDist_fig import *
19
+ from nucleardatapy.fig.matter_setupNEPStats_fig import *
19
20
  #
20
- from nucleardatapy.fig.matter_Esym_fig import *
21
- from nucleardatapy.fig.matter_ESM_fig import *
22
- from nucleardatapy.fig.matter_ENM_fig import *
23
- from nucleardatapy.fig.matter_cs2_fig import *
24
- from nucleardatapy.fig.matter_preNM_fig import *
25
- from nucleardatapy.fig.matter_preSM_fig import *
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.eos_setupAM_e_fig import *
44
- from nucleardatapy.fig.eos_setupAM_e_asy_nuc_fig import *
45
- from nucleardatapy.fig.eos_setupAM_e_asy_lep_fig import *
46
- from nucleardatapy.fig.eos_setupAM_e_asy_tot_fig import *
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
  #
@@ -22,10 +22,10 @@ def astro_setupGW_fig( pname, sources ):
22
22
  #
23
23
  fig, axs = plt.subplots(1,1)
24
24
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
25
- fig.subplots_adjust(left=0.14, bottom=0.12, right=None, top=0.8, wspace=0.3, hspace=0.3)
25
+ fig.subplots_adjust(left=0.14, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
26
26
  #
27
- axs.set_xlabel(r'sources',fontsize='12')
28
- axs.set_ylabel(r'$\tilde{\Lambda}_{90\%}$',fontsize='12')
27
+ axs.set_xlabel(r'sources',fontsize='14')
28
+ axs.set_ylabel(r'$\tilde{\Lambda}_{90\%}$',fontsize='14')
29
29
  axs.set_xlim([0.8, 2.5])
30
30
  axs.set_ylim([0, 1200])
31
31
  #
@@ -46,7 +46,7 @@ def astro_setupGW_fig( pname, sources ):
46
46
  gw = nuda.astro.setupGW( source = source, hyp = hyp )
47
47
  if nuda.env.verb_output: gw.print_output( )
48
48
  if nuda.env.verb_latex: gw.print_latex( )
49
- axs.errorbar( isource+ihyp/10, gw.lam, yerr=np.array([(gw.lam_sig_do,gw.lam_sig_up)]).T, label=gw.label, color=nuda.param.col[isource], marker=gw.marker, linestyle = 'solid', linewidth = 1 )
49
+ 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
50
  ihyp += 1
51
51
  #
52
52
  gwav = nuda.astro.setupGWAverage( source = source )
@@ -58,7 +58,7 @@ def astro_setupGW_fig( pname, sources ):
58
58
  #
59
59
  axs.set_xticks( ilabel )
60
60
  axs.set_xticklabels( xlabel )
61
- axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=2,frameon=False)
61
+ axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=3,frameon=False)
62
62
  #
63
63
  #
64
64
  if pname is not None:
@@ -22,10 +22,10 @@ def astro_setupMR_fig( pname, sources, sources_av ):
22
22
  #
23
23
  fig, axs = plt.subplots(1,1)
24
24
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
25
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.85, wspace=0.3, hspace=0.3)
25
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
26
26
  #
27
- axs.set_xlabel(r'$R$ (km)',fontsize='12')
28
- axs.set_ylabel(r'M (M$_\odot$)',fontsize='12')
27
+ axs.set_xlabel(r'$R$ (km)',fontsize='14')
28
+ axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
29
29
  axs.set_xlim([10.5, 16.5])
30
30
  axs.set_ylim([1.15, 2.2])
31
31
  #
@@ -56,17 +56,19 @@ def astro_setupMR_fig( pname, sources, sources_av ):
56
56
  #
57
57
  isource += 1
58
58
  #
59
- isource = 1
60
- for source in sources_av:
59
+ #isource = 1
60
+ for isource,source in enumerate(sources_av):
61
+ #if source.lower() == 'j0030+0451':
62
+ # obss = [ 1, 2 ]
63
+ #if source.lower() == 'j0740+6620':
64
+ # obss = [ 1, 2, 3 ]
65
+ obss = nuda.astro.mr_obss( source = source )
61
66
  if source.lower() == 'j0030+0451':
62
67
  obss = [ 1, 2 ]
63
- if source.lower() == 'j0740+6620':
64
- obss = [ 1, 2 ]
65
68
  mrav = nuda.astro.setupMRAverage( source = source, obss = obss )
66
69
  if nuda.env.verb_output: mrav.print_output( )
67
70
  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='^', linestyle = 'solid', linewidth = 3 )
69
- isource += 1
71
+ 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
72
  #
71
73
  # write source name in plot:
72
74
  #
@@ -80,7 +82,7 @@ def astro_setupMR_fig( pname, sources, sources_av ):
80
82
  axs.text(10.7,1.5,'J0437-4715')
81
83
  #
82
84
  #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=3,frameon=False)
85
+ axs.legend(loc='lower center',bbox_to_anchor=(0.48,1.01),columnspacing=2,fontsize='8',ncol=4,frameon=False)
84
86
  #
85
87
  if pname is not None:
86
88
  plt.savefig(pname, dpi=200)
@@ -20,10 +20,10 @@ def astro_setupMasses_fig( pname, sources ):
20
20
  #
21
21
  fig, axs = plt.subplots(1,1)
22
22
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.7, wspace=0.3, hspace=0.3)
23
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.75, wspace=0.3, hspace=0.3)
24
24
  #
25
- axs.set_ylabel(r'M (M$_\odot$)',fontsize='12')
26
- axs.set_xlabel(r'sources',fontsize='12')
25
+ axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
26
+ axs.set_xlabel(r'sources',fontsize='14')
27
27
  axs.set_ylim([1.7, 3.5])
28
28
  axs.set_xlim([0.8, 5.5])
29
29
  #
@@ -56,7 +56,7 @@ def astro_setupMasses_fig( pname, sources ):
56
56
  axs.set_xticks( ilabel )
57
57
  axs.set_xticklabels( xlabel )
58
58
  #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=2,frameon=False)
59
+ axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8', ncol=3,frameon=False)
60
60
  #
61
61
  if pname is not None:
62
62
  plt.savefig(pname, dpi=200)
@@ -28,10 +28,10 @@ def astro_setupMtov_fig( pname, sources_lo_all, sources_lo_dist, sources_up1, so
28
28
  #
29
29
  fig, axs = plt.subplots(1,1)
30
30
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
31
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.85, wspace=0.3, hspace=0.3)
31
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.9, wspace=0.3, hspace=0.3)
32
32
  #
33
- axs.set_xlabel(r'M$_\mathrm{tov}$ (M$_\odot$)',fontsize='12')
34
- axs.set_ylabel(r'probability (non-normalised)',fontsize='12')
33
+ axs.set_xlabel(r'M$_\mathrm{tov}$ (M$_\odot$)',fontsize='14')
34
+ axs.set_ylabel(r'probability (non-normalised)',fontsize='14')
35
35
  axs.set_xlim([1.6, 3.4])
36
36
  axs.set_ylim([0.0, 1.03])
37
37
  #
@@ -76,7 +76,7 @@ def astro_setupMtov_fig( pname, sources_lo_all, sources_lo_dist, sources_up1, so
76
76
  #axs.plot(prob3.mass, prob3.proba_tot, label=prob3.label_tot, color=nuda.param.col[4], linestyle=(1, (4, 8)), linewidth = 3 )
77
77
  #
78
78
  #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=4,frameon=False)
79
+ axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=5,frameon=False)
80
80
  #
81
81
  if pname is not None:
82
82
  plt.savefig(pname, dpi=200)
@@ -20,10 +20,10 @@ def astro_setupMup_fig( pname, sources ):
20
20
  #
21
21
  fig, axs = plt.subplots(1,1)
22
22
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.8, wspace=0.3, hspace=0.3)
23
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.85, wspace=0.3, hspace=0.3)
24
24
  #
25
- axs.set_xlabel(r'sources',fontsize='12')
26
- axs.set_ylabel(r'M (M$_\odot$)',fontsize='12')
25
+ axs.set_xlabel(r'sources',fontsize='14')
26
+ axs.set_ylabel(r'M (M$_\odot$)',fontsize='14')
27
27
  axs.set_xlim([0.8, 2.5])
28
28
  axs.set_ylim([2.4, 3.4])
29
29
  #
@@ -45,7 +45,7 @@ def astro_setupMup_fig( pname, sources ):
45
45
  mup = nuda.astro.setupMup( source = source, hyp = hyp )
46
46
  if nuda.env.verb_output: mup.print_output( )
47
47
  if nuda.env.verb_latex: mup.print_latex( )
48
- axs.errorbar( isource+ihyp/10, mup.mup, yerr=np.array([(mup.sig_do,mup.sig_up)]).T, label=mup.label, color=nuda.param.col[isource], marker=mup.marker, linestyle = 'solid', linewidth = 1 )
48
+ 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
49
  ihyp += 1
50
50
  #
51
51
  if source=='GW170817': hyps = [ 3, 4 ]
@@ -60,7 +60,7 @@ def astro_setupMup_fig( pname, sources ):
60
60
  axs.set_xticklabels( xlabel )
61
61
  #
62
62
  #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=2,frameon=False)
63
+ axs.legend(loc='lower center',bbox_to_anchor=(0.5,1.01),columnspacing=2,fontsize='8',ncol=3,frameon=False)
64
64
  #
65
65
  if pname is not None:
66
66
  plt.savefig(pname, dpi=200)
@@ -3,7 +3,7 @@ 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
8
  Plot upper boundaries for the tov mass.\
9
9
  The plot is 1x1 with:\
@@ -20,10 +20,17 @@ def corr_setupEsymDen_fig( pname, constraints, Ksym ):
20
20
  #
21
21
  fig, axs = plt.subplots(1,1)
22
22
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.3, hspace=0.3)
23
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
24
24
  #
25
- axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='12')
26
- axs.set_ylabel(r'$E_\text{sym}$ (MeV)',fontsize='12')
25
+ axs.set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
26
+ if origine == 'finiteNuclei':
27
+ axs.set_ylabel(r'$e_{\text{sym},2}(n_\text{nuc})$ (MeV)',fontsize='14')
28
+ elif origine == 'neutronStar':
29
+ axs.set_ylabel(r'$e_\text{sym}(n_\text{nuc})$ (MeV)',fontsize='14')
30
+ else:
31
+ print('corr_setupEsymDen_fig.py: origine is not well documented, origine=',origine)
32
+ print('corr_setupEsymDen_fig.py: exit()')
33
+ exit()
27
34
  axs.set_xlim([0.09, 0.27])
28
35
  axs.set_ylim([10, 60])
29
36
  #
@@ -38,7 +45,7 @@ def corr_setupEsymDen_fig( pname, constraints, Ksym ):
38
45
  if esym.plot:
39
46
  axs.fill_between( esym.esym_den, y1=esym.esym_e2a_min, y2=esym.esym_e2a_max, label=esym.label, alpha=esym.alpha )
40
47
  #
41
- axs.text(0.15,12,r'$K_\text{sym}$='+str(int(Ksym))+' MeV',fontsize='12')
48
+ axs.text(0.15,12,r'$K_\text{sym}$='+str(int(Ksym))+' MeV',fontsize='14')
42
49
  axs.legend(loc='lower right',fontsize='9')
43
50
  #
44
51
  if pname is not None:
@@ -3,7 +3,7 @@ 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
8
  Plot the correlation between Esym and Lsym.\
9
9
  The plot is 1x1 with:\
@@ -17,13 +17,23 @@ def corr_setupEsymLsym_fig( pname, constraints ):
17
17
  """
18
18
  #
19
19
  print(f'Plot name: {pname}')
20
+ print('list of constraints:',constraints)
20
21
  #
21
22
  fig, axs = plt.subplots(1,1)
22
23
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.12, bottom=0.12, right=None, top=0.98, wspace=0.3, hspace=0.3)
24
+ fig.subplots_adjust(left=0.12, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
25
+ #
26
+ if origine == 'finiteNuclei':
27
+ axs.set_xlabel(r'$E_{\mathrm{sym},2}$ (MeV)',fontsize='14')
28
+ axs.set_ylabel(r'$L_{\mathrm{sym},2}$ (MeV)',fontsize='14')
29
+ elif origine == 'neutronStar':
30
+ axs.set_xlabel(r'$E_\mathrm{sym}$ (MeV)',fontsize='14')
31
+ axs.set_ylabel(r'$L_\mathrm{sym}$ (MeV)',fontsize='14')
32
+ else:
33
+ print('corr_setupEsymLsym_fig.py: origine is not well documented, origine=',origine)
34
+ print('corr_setupEsymLsym_fig.py: exit()')
35
+ exit()
24
36
  #
25
- axs.set_xlabel(r'$E_{\mathrm{sym},2}$ (MeV)')
26
- axs.set_ylabel(r'$L_{\mathrm{sym},2}$ (MeV)')
27
37
  axs.set_xlim([23, 44])
28
38
  axs.set_ylim([10, 120])
29
39
  #
@@ -40,6 +50,9 @@ def corr_setupEsymLsym_fig( pname, constraints ):
40
50
  elif el.plot == 'curve':
41
51
  axs.plot( el.Esym, el.Lsym, linestyle='solid', linewidth=3, label=el.label )
42
52
  elif el.plot == 'contour':
53
+ print('plot:',el.plot)
54
+ print('Esym:',el.Esym)
55
+ print('Lsym:',el.Lsym)
43
56
  axs.plot( el.Esym, el.Lsym, linestyle='solid', label=el.label )
44
57
  elif el.plot == 'band_y':
45
58
  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 +62,7 @@ def corr_setupEsymLsym_fig( pname, constraints ):
49
62
  #axs.errorbar( el.Esym, el.Lsym, yerr=el.Lsym_err, linestyle='solid', label=el.label )
50
63
  if nuda.env.verb: el.print_outputs( )
51
64
  #
52
- axs.legend(loc='lower right',fontsize='9')
65
+ axs.legend(loc='lower right',fontsize='10')
53
66
  #
54
67
  if pname is not None:
55
68
  plt.savefig(pname, dpi=300)
@@ -20,12 +20,12 @@ def corr_setupKsatQsat_fig( pname, constraints ):
20
20
  #
21
21
  fig, axs = plt.subplots(1,1)
22
22
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
- fig.subplots_adjust(left=0.15, bottom=0.12, right=None, top=0.98, wspace=0.3, hspace=0.3)
23
+ fig.subplots_adjust(left=0.15, bottom=0.12, right=0.95, top=0.98, wspace=0.3, hspace=0.3)
24
24
  #
25
- axs.set_xlabel(r'$K_\mathrm{sat}$ (MeV)')
26
- axs.set_ylabel(r'$Q_\mathrm{sat}$ (MeV)')
27
- axs.set_xlim([190, 360])
28
- axs.set_ylim([-1000, 1500])
25
+ axs.set_xlabel(r'$K_\mathrm{sat}$ (MeV)',fontsize='14')
26
+ axs.set_ylabel(r'$Q_\mathrm{sat}$ (MeV)',fontsize='14')
27
+ axs.set_xlim([100, 360])
28
+ axs.set_ylim([-2500, 2200])
29
29
  #axs.tick_params(labelbottom=True, labeltop=False, labelleft=True, labelright=False,
30
30
  # bottom=True, top=True, left=True, right=True)
31
31
  # axs.xaxis.set_major_locator(MultipleLocator(5))
@@ -44,20 +44,24 @@ def corr_setupKsatQsat_fig( pname, constraints ):
44
44
  if nuda.env.verb: print('Qsat:',kq.Qsat)
45
45
  if nuda.env.verb: print('len(Ksat):',kq.Ksat.size)
46
46
  #
47
- if k == 2:
48
- kk = 0
47
+ #if k == 2:
48
+ # kk = 0
49
+ #else:
50
+ # kk = k
51
+ if k == 5 or k == 9 or k == 10 or k == 11:
52
+ lstyle = 'dashed'
49
53
  else:
50
- kk = k
51
- axs.scatter( kq.Ksat, kq.Qsat, label=kq.label, color=nuda.param.col[kk], marker=kq.marker )
52
- x = np.linspace(min(kq.Ksat),max(kq.Ksat),10)
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' )
55
- else:
56
- axs.plot( x, nuda.corr.flinear(x,kq.m,kq.c), color=nuda.param.col[kk], linestyle='solid' )
54
+ lstyle = 'solid'
55
+ if kq.Ksat is not None:
56
+ axs.scatter( kq.Ksat, kq.Qsat, label=kq.label, color = nuda.param.col[k], marker = kq.marker )
57
+ if kq.Ksat_lin is not None:
58
+ axs.plot( kq.Ksat_lin, kq.Qsat_lin, color = nuda.param.col[k], linestyle = lstyle )
59
+ if kq.Ksat_band is not None:
60
+ axs.fill_between( kq.Ksat_band, kq.Qsat_lo, kq.Qsat_up, label=kq.label, color = nuda.param.col[k], alpha = 0.2 )
57
61
  #
58
62
  if nuda.env.verb: kq.print_outputs( )
59
63
  #
60
- axs.legend(loc='upper left',ncol=3, fontsize='9')
64
+ axs.legend(loc='upper left',ncol=4, fontsize='10')
61
65
  #
62
66
  if pname is not None:
63
67
  plt.savefig(pname, dpi=200)
@@ -22,14 +22,14 @@ def crust_setupCrust_fig( pname, models ):
22
22
  fig.tight_layout() # Or equivalently, "plt.tight_layout()"
23
23
  fig.subplots_adjust(left=0.10, bottom=0.12, right=None, top=0.78, wspace=0.3, hspace=0.3 )
24
24
  #
25
- axs[0].set_xlabel(r'n (fm$^{-3}$)')
26
- axs[0].set_ylabel(r'$e_{int}(n)$')
25
+ axs[0].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
26
+ axs[0].set_ylabel(r'$e_\text{int}(n_\text{nuc})$ (MeV)',fontsize='14')
27
27
  axs[0].set_xlim([1e-4, 1e-1])
28
28
  axs[0].set_ylim([-2, 10])
29
29
  axs[0].set_xscale('log')
30
30
  #
31
- axs[1].set_xlabel(r'n (fm$^{-3}$)')
32
- axs[1].set_ylabel(r'$Z$')
31
+ axs[1].set_xlabel(r'$n_\text{nuc}$ (fm$^{-3}$)',fontsize='14')
32
+ axs[1].set_ylabel(r'$Z$',fontsize='14')
33
33
  axs[1].set_xlim([1e-4, 1e-1])
34
34
  axs[1].set_ylim([10, 100])
35
35
  axs[1].set_xscale('log')
@@ -44,7 +44,7 @@ def crust_setupCrust_fig( pname, models ):
44
44
  axs[1].plot( crust.den, crust.Z, linestyle=crust.linestyle )
45
45
  #axs[0].legend(loc='upper left',fontsize='8', ncol=1)
46
46
  #axs[1].legend(loc='upper left',fontsize='8', ncol=1)
47
- fig.legend(loc='upper left',bbox_to_anchor=(0.01,1.01),columnspacing=2,fontsize='7.5',ncol=4,frameon=False)
47
+ fig.legend(loc='upper left',bbox_to_anchor=(0.08,1.01),columnspacing=2,fontsize='7.5',ncol=4,frameon=False)
48
48
  #
49
49
  if pname is not None:
50
50
  plt.savefig(pname, dpi=200)