nucleardatapy 0.2.0__py3-none-any.whl → 0.2.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/crust/setup_crust.py +46 -1
- nucleardatapy/data/crust/2018-PCPFDDG-BSK22.dat +83 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK24.dat +74 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK25.dat +130 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK26.dat +81 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-SM.dat +11 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.2.dat +11 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.4.dat +11 -0
- nucleardatapy/data/nuclei/masses/Theory/2023-BSkG3.txt +0 -4
- nucleardatapy/data/nuclei/masses/Theory/2025-BSkG4.txt +0 -1
- nucleardatapy/eos/setup_am.py +43 -31
- nucleardatapy/eos/setup_am_Beq.py +18 -12
- nucleardatapy/eos/setup_am_Leq.py +53 -47
- nucleardatapy/fig/__init__.py +15 -2
- nucleardatapy/fig/crust_setupCrust_fig.py +3 -3
- nucleardatapy/fig/eos_setupAMBeq_fig.py +866 -49
- nucleardatapy/fig/eos_setupAMLeq_fig.py +185 -53
- nucleardatapy/fig/eos_setupAM_e_asy_lep_fig.py +125 -0
- nucleardatapy/fig/eos_setupAM_e_asy_nuc_fig.py +115 -0
- nucleardatapy/fig/eos_setupAM_e_asy_tot_fig.py +117 -0
- nucleardatapy/fig/eos_setupAM_e_fig.py +173 -0
- nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +1 -1
- nucleardatapy/fig/matter_ENM_fig.py +50 -41
- nucleardatapy/fig/matter_ESM_fig.py +60 -39
- nucleardatapy/fig/matter_Esym_fig.py +48 -36
- nucleardatapy/fig/matter_cs2_fig.py +83 -0
- nucleardatapy/fig/matter_preNM_fig.py +146 -0
- nucleardatapy/fig/matter_preSM_fig.py +144 -0
- nucleardatapy/fig/matter_setupFFGNuc_fig.py +2 -1
- nucleardatapy/fig/matter_setupMicroEsym_fig.py +50 -19
- nucleardatapy/fig/matter_setupMicro_band_fig.py +1 -0
- nucleardatapy/fig/matter_setupMicro_effmass_fig.py +59 -4
- nucleardatapy/fig/matter_setupMicro_fig.py +81 -79
- nucleardatapy/fig/matter_setupPhenoEsym_fig.py +28 -26
- nucleardatapy/fig/matter_setupPheno_fig.py +34 -24
- nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +275 -0
- nucleardatapy/fig/nuc_setupBEExp_fig.py +225 -70
- nucleardatapy/fig/nuc_setupBETheo_fig.py +316 -0
- nucleardatapy/fig/nuc_setupISGMRExp_fig.py +59 -0
- nucleardatapy/fig/nuc_setupRchExp_fig.py +139 -0
- nucleardatapy/fig/nuc_setupRchTheo_fig.py +142 -0
- nucleardatapy/fig/nuc_setupRnpExp_fig.py +120 -0
- nucleardatapy/fig/nuc_setupRnpTheo_fig.py +134 -0
- nucleardatapy/hnuc/__init__.py +3 -3
- nucleardatapy/matter/__init__.py +1 -0
- nucleardatapy/matter/setup_check.py +97 -0
- nucleardatapy/matter/setup_ffg.py +15 -8
- nucleardatapy/matter/setup_micro.py +144 -79
- nucleardatapy/matter/setup_micro_band.py +6 -1
- nucleardatapy/matter/setup_micro_effmass.py +55 -2
- nucleardatapy/matter/setup_micro_esym.py +37 -30
- nucleardatapy/matter/setup_micro_gap.py +3 -3
- nucleardatapy/matter/setup_micro_lp.py +18 -17
- nucleardatapy/matter/setup_pheno.py +2 -2
- nucleardatapy/matter/setup_pheno_esym.py +13 -13
- nucleardatapy/nuc/__init__.py +2 -2
- nucleardatapy/nuc/setup_be_exp.py +90 -90
- nucleardatapy/nuc/setup_be_theo.py +112 -100
- nucleardatapy/nuc/setup_rch_exp.py +49 -6
- nucleardatapy/nuc/setup_rch_theo.py +72 -3
- nucleardatapy/nuc/{setup_nskin_exp.py → setup_rnp_exp.py} +58 -65
- nucleardatapy/nuc/{setup_nskin_theo.py → setup_rnp_theo.py} +34 -39
- nucleardatapy-0.2.1.dist-info/METADATA +521 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/RECORD +86 -65
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/WHEEL +1 -1
- nucleardatapy/fig/eos_setupAM_fig.py +0 -81
- nucleardatapy-0.2.0.dist-info/METADATA +0 -115
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-AM.dat → 2006-BHF-Av18-E2A-AM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-NM.dat → 2006-BHF-Av18-E2A-NM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-SM.dat → 2006-BHF-Av18-E2A-SM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-Esym2-SM.dat → 2006-BHF-Av18-Esym2-SM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-NM-FreeSpectrum.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-SelfEnergy.dat → 2006-BHF-Av18-GAP-NM-SelfEnergy.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-SM-FreeSpectrum.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-SelfEnergy.dat → 2006-BHF-Av18-GAP-SM-SelfEnergy.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL59.dat → 2019-MBPT-NM-DHSL59.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL69.dat → 2019-MBPT-NM-DHSL69.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL59.dat → 2019-MBPT-SM-DHSL59.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL69.dat → 2019-MBPT-SM-DHSL69.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2023-MBPT-NM.csv → 2020-MBPT-NM.csv} +0 -0
- /nucleardatapy/data/matter/micro/{2023-MBPT-SM.csv → 2020-MBPT-SM.csv} +0 -0
- /nucleardatapy/data/nuclei/{nskin → rnp}/208Pb.dat +0 -0
- /nucleardatapy/data/nuclei/{nskin → rnp}/48Ca.dat +0 -0
- /nucleardatapy/hnuc/{setup_be1L_exp.py → setup_re1L_exp.py} +0 -0
- /nucleardatapy/hnuc/{setup_be1Xi_exp.py → setup_re1Xi_exp.py} +0 -0
- /nucleardatapy/hnuc/{setup_be2L_exp.py → setup_re2L_exp.py} +0 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info/licenses}/LICENSE +0 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-0.2.1.dist-info}/top_level.txt +0 -0
|
@@ -21,9 +21,9 @@ def rch_exp_tables():
|
|
|
21
21
|
#
|
|
22
22
|
tables = [ '2013-Angeli' ]
|
|
23
23
|
#
|
|
24
|
-
print('tables available in the toolkit:',tables)
|
|
24
|
+
#print('tables available in the toolkit:',tables)
|
|
25
25
|
tables_lower = [ item.lower() for item in tables ]
|
|
26
|
-
print('tables available in the toolkit:',tables_lower)
|
|
26
|
+
#print('tables available in the toolkit:',tables_lower)
|
|
27
27
|
#
|
|
28
28
|
if nuda.env.verb: print("Exit rch_exp_tables()")
|
|
29
29
|
#
|
|
@@ -109,13 +109,13 @@ class setupRchExp():
|
|
|
109
109
|
#
|
|
110
110
|
if nuda.env.verb: print("Exit setupRchExp()")
|
|
111
111
|
#
|
|
112
|
-
def
|
|
112
|
+
def isotopes(self, Zref = 50 ):
|
|
113
113
|
"""
|
|
114
114
|
This method provide a list if radii for an isotopic chain defined by Zref.
|
|
115
115
|
|
|
116
116
|
"""
|
|
117
117
|
#
|
|
118
|
-
if nuda.env.verb: print("Enter
|
|
118
|
+
if nuda.env.verb: print("Enter isotopes()")
|
|
119
119
|
#
|
|
120
120
|
Nref = []
|
|
121
121
|
Aref = []
|
|
@@ -132,9 +132,9 @@ class setupRchExp():
|
|
|
132
132
|
Rchref = np.array( Rchref, dtype = float )
|
|
133
133
|
Rchref_err = np.array( Rchref_err, dtype = float )
|
|
134
134
|
#
|
|
135
|
-
|
|
135
|
+
if nuda.env.verb: print("Exit isotopes()")
|
|
136
136
|
#
|
|
137
|
-
|
|
137
|
+
return Nref, Aref, Rchref, Rchref_err
|
|
138
138
|
#
|
|
139
139
|
def print_outputs( self ):
|
|
140
140
|
"""
|
|
@@ -157,3 +157,46 @@ class setupRchExp():
|
|
|
157
157
|
if nuda.env.verb: print("Exit print_outputs()")
|
|
158
158
|
#
|
|
159
159
|
|
|
160
|
+
class setupRchExpIsotopes():
|
|
161
|
+
"""
|
|
162
|
+
Instantiate the object with charge radii choosen \
|
|
163
|
+
from a table.
|
|
164
|
+
|
|
165
|
+
This method provide a list if radii for an isotopic chain defined by Zref.
|
|
166
|
+
|
|
167
|
+
:param table: Fix the name of `table`. Default value: '2013-Angeli'.
|
|
168
|
+
:type table: str, optional.
|
|
169
|
+
|
|
170
|
+
**Attributes:**
|
|
171
|
+
"""
|
|
172
|
+
#
|
|
173
|
+
def __init__( self, rch, Zref = 50 ):
|
|
174
|
+
"""
|
|
175
|
+
Parameters
|
|
176
|
+
----------
|
|
177
|
+
model : str, optional
|
|
178
|
+
The model to consider. Choose between: 1998-VAR-AM-APR (default), 2008-AFDMC-NM, ...
|
|
179
|
+
"""
|
|
180
|
+
#
|
|
181
|
+
if nuda.env.verb: print("\nEnter setupRchExpIsotopes()")
|
|
182
|
+
#
|
|
183
|
+
self.label = 'Isotope Z='+str(Zref)
|
|
184
|
+
#
|
|
185
|
+
Nref = []
|
|
186
|
+
Aref = []
|
|
187
|
+
Rchref = []
|
|
188
|
+
Rchref_err = []
|
|
189
|
+
for k in range(len(rch.nucZ)):
|
|
190
|
+
if int( rch.nucZ[k] ) == Zref:
|
|
191
|
+
Nref.append( rch.nucN[k] )
|
|
192
|
+
Aref.append( rch.nucA[k] )
|
|
193
|
+
Rchref.append( rch.nucRch[k] )
|
|
194
|
+
Rchref_err.append( rch.nucRch_err[k] )
|
|
195
|
+
self.N = np.array( Nref, dtype = int )
|
|
196
|
+
self.A = np.array( Aref, dtype = int )
|
|
197
|
+
self.Z = Zref * np.ones( self.N.size )
|
|
198
|
+
self.Rch = np.array( Rchref, dtype = float )
|
|
199
|
+
self.Rch_err = np.array( Rchref_err, dtype = float )
|
|
200
|
+
#
|
|
201
|
+
if nuda.env.verb: print("Exit setupRchExpIsotopes()")
|
|
202
|
+
#
|
|
@@ -2,11 +2,38 @@ import os
|
|
|
2
2
|
import sys
|
|
3
3
|
import numpy as np # 1.15.0
|
|
4
4
|
|
|
5
|
-
#nucleardatapy_tk = os.getenv('NUCLEARDATAPY_TK')
|
|
6
|
-
#sys.path.insert(0, nucleardatapy_tk)
|
|
7
|
-
|
|
8
5
|
import nucleardatapy as nuda
|
|
9
6
|
|
|
7
|
+
def rch_emp( A, Z, formula ):
|
|
8
|
+
if formula == 'classic':
|
|
9
|
+
return 1.2 * A**0.3333
|
|
10
|
+
elif formula == '1994-NPP':
|
|
11
|
+
# B. Nerlo-Pomorska and K. Pomorski, Z. Phys. A 348, 169 (1994)
|
|
12
|
+
r0 = 1.240
|
|
13
|
+
b = 0.191
|
|
14
|
+
c = 1.646
|
|
15
|
+
elif formula == '2013-BAKS-1':
|
|
16
|
+
# T. Bayram, S. Akkoyun, S. Okan Kara, A. Sinan, Acta Phys. Pol. B 44, 1791 (2013)
|
|
17
|
+
r0 = 0.951
|
|
18
|
+
b = 0.0
|
|
19
|
+
c = 0.0
|
|
20
|
+
elif formula == '2013-BAKS-2':
|
|
21
|
+
# T. Bayram, S. Akkoyun, S. Okan Kara, A. Sinan, Acta Phys. Pol. B 44, 1791 (2013)
|
|
22
|
+
r0 = 0.996
|
|
23
|
+
b = 0.278
|
|
24
|
+
c = 0.0
|
|
25
|
+
elif formula == '2013-BAKS-3':
|
|
26
|
+
# T. Bayram, S. Akkoyun, S. Okan Kara, A. Sinan, Acta Phys. Pol. B 44, 1791 (2013)
|
|
27
|
+
r0 = 0.966
|
|
28
|
+
b = 0.182
|
|
29
|
+
c = 1.652
|
|
30
|
+
else:
|
|
31
|
+
print('setup_rch_theo: formula is badly defined ',formula)
|
|
32
|
+
print('setup_rch_theo: exit')
|
|
33
|
+
exit()
|
|
34
|
+
#return ( 1.19 - 0.8 * (1-2*Z/A)**2 ) * A**0.3333 - 0.3* A**0.1666
|
|
35
|
+
return r0 * ( 1.0 - b * (1.0-2.0*Z/A) + c/ A ) * A**0.3333
|
|
36
|
+
|
|
10
37
|
def rch_theo_tables():
|
|
11
38
|
"""
|
|
12
39
|
Return a list of the tables available in this toolkit for the charge radiuus and
|
|
@@ -196,3 +223,45 @@ class setupRchTheo():
|
|
|
196
223
|
if nuda.env.verb: print("Exit print_outputs()")
|
|
197
224
|
#
|
|
198
225
|
|
|
226
|
+
class setupRchTheoIsotopes():
|
|
227
|
+
"""
|
|
228
|
+
Instantiate the object with charge radii choosen \
|
|
229
|
+
from a table.
|
|
230
|
+
|
|
231
|
+
This method provide a list if radii for an isotopic chain defined by Zref.
|
|
232
|
+
|
|
233
|
+
:param table: Fix the name of `table`. Default value: '2013-Angeli'.
|
|
234
|
+
:type table: str, optional.
|
|
235
|
+
|
|
236
|
+
**Attributes:**
|
|
237
|
+
"""
|
|
238
|
+
#
|
|
239
|
+
def __init__( self, rch, Zref = 50 ):
|
|
240
|
+
"""
|
|
241
|
+
Parameters
|
|
242
|
+
----------
|
|
243
|
+
model : str, optional
|
|
244
|
+
The model to consider. Choose between: 1998-VAR-AM-APR (default), 2008-AFDMC-NM, ...
|
|
245
|
+
"""
|
|
246
|
+
#
|
|
247
|
+
if nuda.env.verb: print("\nEnter setupRchExpIsotopes()")
|
|
248
|
+
#
|
|
249
|
+
self.label = 'Isotope Z='+str(Zref)
|
|
250
|
+
#
|
|
251
|
+
Nref = []
|
|
252
|
+
Aref = []
|
|
253
|
+
Rchref = []
|
|
254
|
+
Rchref_err = []
|
|
255
|
+
for k in range(len(rch.nucZ)):
|
|
256
|
+
if int( rch.nucZ[k] ) == Zref:
|
|
257
|
+
Nref.append( rch.nucN[k] )
|
|
258
|
+
Aref.append( rch.nucA[k] )
|
|
259
|
+
Rchref.append( rch.nucRch[k] )
|
|
260
|
+
self.N = np.array( Nref, dtype = int )
|
|
261
|
+
self.A = np.array( Aref, dtype = int )
|
|
262
|
+
self.Z = Zref * np.ones( self.N.size )
|
|
263
|
+
self.Rch = np.array( Rchref, dtype = float )
|
|
264
|
+
#
|
|
265
|
+
if nuda.env.verb: print("Exit setupRchExpIsotopes()")
|
|
266
|
+
#
|
|
267
|
+
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import sys
|
|
3
1
|
import math
|
|
4
|
-
import numpy as np # 1.15.0
|
|
5
|
-
|
|
6
|
-
# nucleardatapy_tk = os.getenv('NUCLEARDATAPY_TK')
|
|
7
|
-
# sys.path.insert(0, nucleardatapy_tk)
|
|
2
|
+
#import numpy as np # 1.15.0
|
|
8
3
|
|
|
9
4
|
import nucleardatapy as nuda
|
|
10
5
|
|
|
11
|
-
def
|
|
6
|
+
def rnp_exp():
|
|
12
7
|
"""
|
|
13
8
|
Return a list of the nuclei (source) for which a neutron skin is given
|
|
14
9
|
|
|
@@ -16,7 +11,7 @@ def nskin_exp():
|
|
|
16
11
|
:rtype: list[str].
|
|
17
12
|
"""
|
|
18
13
|
#
|
|
19
|
-
if nuda.env.verb: print("\nEnter
|
|
14
|
+
if nuda.env.verb: print("\nEnter rnp_exp()")
|
|
20
15
|
#
|
|
21
16
|
sources = [ '48Ca', '208Pb' ]
|
|
22
17
|
#
|
|
@@ -24,11 +19,11 @@ def nskin_exp():
|
|
|
24
19
|
sources_lower = [ item.lower() for item in sources ]
|
|
25
20
|
# print('sources available in the toolkit:',sources_lower)
|
|
26
21
|
#
|
|
27
|
-
if nuda.env.verb: print("Exit
|
|
22
|
+
if nuda.env.verb: print("Exit rnp_exp()")
|
|
28
23
|
#
|
|
29
24
|
return sources, sources_lower
|
|
30
25
|
|
|
31
|
-
def
|
|
26
|
+
def rnp_exp_source(source):
|
|
32
27
|
"""
|
|
33
28
|
Return a list of values for a given source (nuclei).
|
|
34
29
|
|
|
@@ -37,7 +32,7 @@ def nskin_exp_source(source):
|
|
|
37
32
|
:return: The list of calculations.
|
|
38
33
|
:rtype: list[int].
|
|
39
34
|
"""
|
|
40
|
-
if nuda.env.verb: print("\nEnter
|
|
35
|
+
if nuda.env.verb: print("\nEnter rnp_exp_source()")
|
|
41
36
|
|
|
42
37
|
cals = []
|
|
43
38
|
if source.lower() == '48ca':
|
|
@@ -47,10 +42,10 @@ def nskin_exp_source(source):
|
|
|
47
42
|
else:
|
|
48
43
|
raise ValueError(f"Source '{source}' is not supported. Supported sources are: '48Ca' and '208Pb'.")
|
|
49
44
|
|
|
50
|
-
if nuda.env.verb: print("Exit
|
|
45
|
+
if nuda.env.verb: print("Exit rnp_source()")
|
|
51
46
|
return cals
|
|
52
47
|
|
|
53
|
-
class
|
|
48
|
+
class setupRnpExp():
|
|
54
49
|
"""
|
|
55
50
|
Instantiate the neutron skin calculations for a given source and cal.
|
|
56
51
|
|
|
@@ -69,11 +64,11 @@ class SetupNeutronSkinExp():
|
|
|
69
64
|
"""
|
|
70
65
|
def __init__(self, source = '208Pb', cal = 1 ):
|
|
71
66
|
#
|
|
72
|
-
if nuda.env.verb: print("Enter
|
|
67
|
+
if nuda.env.verb: print("Enter setupRnpExp()")
|
|
73
68
|
#
|
|
74
69
|
# some checks
|
|
75
70
|
#
|
|
76
|
-
sources, sources_lower =
|
|
71
|
+
sources, sources_lower = rnp_exp()
|
|
77
72
|
if source.lower() not in sources_lower:
|
|
78
73
|
print('Source ',source,' is not in the list of sources.')
|
|
79
74
|
print('list of sources:',sources)
|
|
@@ -82,7 +77,7 @@ class SetupNeutronSkinExp():
|
|
|
82
77
|
self.source = source
|
|
83
78
|
if nuda.env.verb: print("source:",source)
|
|
84
79
|
#
|
|
85
|
-
cals =
|
|
80
|
+
cals = rnp_exp_source( source = source )
|
|
86
81
|
if cal not in cals:
|
|
87
82
|
print('cal ',cal,' is not in the list of cal.')
|
|
88
83
|
print('list of cal:',cals)
|
|
@@ -95,9 +90,9 @@ class SetupNeutronSkinExp():
|
|
|
95
90
|
#
|
|
96
91
|
file_in = None
|
|
97
92
|
if source.lower() == '48ca':
|
|
98
|
-
file_in = nuda.param.path_data + 'nuclei/
|
|
93
|
+
file_in = nuda.param.path_data + 'nuclei/rnp/48Ca.dat'
|
|
99
94
|
elif source.lower() == '208pb':
|
|
100
|
-
file_in = nuda.param.path_data + 'nuclei/
|
|
95
|
+
file_in = nuda.param.path_data + 'nuclei/rnp/208Pb.dat'
|
|
101
96
|
else:
|
|
102
97
|
raise ValueError(f"Unsupported source '{source}'. Expected '48Ca' or '208Pb'.")
|
|
103
98
|
if file_in is None:
|
|
@@ -445,11 +440,11 @@ class SetupNeutronSkinExp():
|
|
|
445
440
|
#: Attribute the negative uncertainty.
|
|
446
441
|
self.prad_sig_do = None
|
|
447
442
|
#: Attributethe neutron skin of the source.
|
|
448
|
-
self.
|
|
443
|
+
self.rnp = None
|
|
449
444
|
#: Attribute the positive uncertainty.
|
|
450
|
-
self.
|
|
445
|
+
self.rnp_sig_up = None
|
|
451
446
|
#: Attribute the negative uncertainty.
|
|
452
|
-
self.
|
|
447
|
+
self.rnp_sig_lo = None
|
|
453
448
|
#: Attribute latexCite.
|
|
454
449
|
self.latexCite = None
|
|
455
450
|
#
|
|
@@ -469,16 +464,16 @@ class SetupNeutronSkinExp():
|
|
|
469
464
|
if int(a) == cal:
|
|
470
465
|
self.nrad = safe_float(ele[1])
|
|
471
466
|
self.nrad_sig_up = safe_float(ele[2])
|
|
472
|
-
self.
|
|
467
|
+
self.nrad_sig_lo = safe_float(ele[3])
|
|
473
468
|
self.prad = safe_float(ele[4])
|
|
474
469
|
self.prad_sig_up = safe_float(ele[5])
|
|
475
|
-
self.
|
|
476
|
-
self.
|
|
477
|
-
self.
|
|
478
|
-
self.
|
|
470
|
+
self.prad_sig_lo = safe_float(ele[6])
|
|
471
|
+
self.rnp = safe_float(ele[7])
|
|
472
|
+
self.rnp_sig_up = safe_float(ele[8])
|
|
473
|
+
self.rnp_sig_lo = safe_float(ele[9])
|
|
479
474
|
self.latexCite = ele[10].replace('\n','').replace(' ','')
|
|
480
475
|
#
|
|
481
|
-
if nuda.env.verb: print("Exit
|
|
476
|
+
if nuda.env.verb: print("Exit setupRnpExp()")
|
|
482
477
|
#
|
|
483
478
|
#
|
|
484
479
|
def print_outputs( self ):
|
|
@@ -492,11 +487,11 @@ class SetupNeutronSkinExp():
|
|
|
492
487
|
print(" source: ",self.source)
|
|
493
488
|
print(" cal:",self.cal)
|
|
494
489
|
print(" Rn:",self.nrad,' in fm')
|
|
495
|
-
print(" sigma(Rn):",self.nrad_sig_up,self.
|
|
490
|
+
print(" sigma(Rn):",self.nrad_sig_up,self.nrad_sig_lo,' in fm')
|
|
496
491
|
print(" Rp:",self.prad,' in fm')
|
|
497
|
-
print(" sigma(Rp):",self.prad_sig_up,self.
|
|
498
|
-
print("
|
|
499
|
-
print(" sigma(
|
|
492
|
+
print(" sigma(Rp):",self.prad_sig_up,self.prad_sig_lo,' in fm')
|
|
493
|
+
print(" Rnp:",self.rnp,' in fm')
|
|
494
|
+
print(" sigma(Rnp):",self.rnp_sig_up,self.rnp_sig_lo,' in fm')
|
|
500
495
|
print(" latexCite:",self.latexCite)
|
|
501
496
|
print(" ref: ",self.ref)
|
|
502
497
|
print(" label: ",self.label)
|
|
@@ -505,7 +500,7 @@ class SetupNeutronSkinExp():
|
|
|
505
500
|
if nuda.env.verb: print("Exit print_output()")
|
|
506
501
|
#
|
|
507
502
|
#
|
|
508
|
-
class
|
|
503
|
+
class setupRnpAverage():
|
|
509
504
|
"""
|
|
510
505
|
Instantiate the experimental/analitical data for a given source and averaged over cal.
|
|
511
506
|
|
|
@@ -520,7 +515,7 @@ class setupNeutronSkinAverage():
|
|
|
520
515
|
"""
|
|
521
516
|
def __init__(self, source = '208Pb' ):
|
|
522
517
|
#
|
|
523
|
-
if nuda.env.verb: print("Enter
|
|
518
|
+
if nuda.env.verb: print("Enter setupRnpAverage()")
|
|
524
519
|
#
|
|
525
520
|
self.source = source
|
|
526
521
|
self.latexCite = None
|
|
@@ -528,22 +523,20 @@ class setupNeutronSkinAverage():
|
|
|
528
523
|
self.label = source+' average'
|
|
529
524
|
self.note = 'compute the centroid and standard deviation from the data.'
|
|
530
525
|
#
|
|
531
|
-
cals =
|
|
526
|
+
cals = rnp_exp_source( source = source )
|
|
532
527
|
# print('cals:',cals)
|
|
533
528
|
#
|
|
534
529
|
# search for the boundary for the neutron skin:
|
|
535
530
|
nsmin = 0.5; nsmax = 0.0;
|
|
536
531
|
for cal in cals:
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
if
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
nsup = nskin.nskin + 0.5*nskin.nskin_sig_up
|
|
546
|
-
if nsdo < nsmin: nsmin = nsdo
|
|
532
|
+
rnp = nuda.nuc.setupRnpExp( source = source, cal = cal )
|
|
533
|
+
if rnp.rnp_sig_lo is None or rnp.rnp_sig_lo >= 1000:
|
|
534
|
+
rnp.rnp_sig_lo = 0
|
|
535
|
+
if rnp.rnp_sig_up is None or rnp.rnp_sig_up >= 1000:
|
|
536
|
+
rnp.rnp_sig_up = 0
|
|
537
|
+
nslo = rnp.rnp - 0.5*rnp.rnp_sig_lo
|
|
538
|
+
nsup = rnp.rnp + 0.5*rnp.rnp_sig_up
|
|
539
|
+
if nslo < nsmin: nsmin = nslo
|
|
547
540
|
if nsup > nsmax: nsmax = nsup
|
|
548
541
|
#print('nsmin:',nsmin)
|
|
549
542
|
#print('nsmax:',nsmax)
|
|
@@ -552,20 +545,20 @@ class setupNeutronSkinAverage():
|
|
|
552
545
|
#print('ax:',ax)
|
|
553
546
|
ay = np.zeros(300)
|
|
554
547
|
for cal in cals:
|
|
555
|
-
|
|
556
|
-
#
|
|
557
|
-
ay += gauss(ax,
|
|
548
|
+
rnp = nuda.nuc.setupRnpExp( source = source, cal = cal )
|
|
549
|
+
#rnp.print_outputs( )
|
|
550
|
+
ay += gauss(ax,rnp.rnp,rnp.rnp_sig_up,rnp.rnp_sig_lo)
|
|
558
551
|
# determine the centroid and standard deviation from the distribution of cal.
|
|
559
552
|
nor = sum( ay )
|
|
560
553
|
cen = sum( ay*ax )
|
|
561
554
|
std = sum ( ay*ax**2 )
|
|
562
|
-
self.
|
|
563
|
-
self.sig_std = round( math.sqrt( std/nor - self.
|
|
564
|
-
self.
|
|
565
|
-
#print('
|
|
555
|
+
self.rnp_cen = cen / nor
|
|
556
|
+
self.sig_std = round( math.sqrt( std/nor - self.rnp_cen**2 ), 3 )
|
|
557
|
+
self.rnp_cen = round( self.rnp_cen, 3)
|
|
558
|
+
#print('rnp:',self.rnp_cen)
|
|
566
559
|
#print('std:',self.sig_std)
|
|
567
560
|
#
|
|
568
|
-
if nuda.env.verb: print("Exit
|
|
561
|
+
if nuda.env.verb: print("Exit setupRnpAverage()")
|
|
569
562
|
#
|
|
570
563
|
def print_output( self ):
|
|
571
564
|
"""
|
|
@@ -578,7 +571,7 @@ class setupNeutronSkinAverage():
|
|
|
578
571
|
if nuda.env.verb_output:
|
|
579
572
|
print("- Print output:")
|
|
580
573
|
print(" source: ",self.source)
|
|
581
|
-
print("
|
|
574
|
+
print(" rnp_cen:",self.rnp_cen)
|
|
582
575
|
print(" sig_std:",self.sig_std)
|
|
583
576
|
print(" latexCite:",self.latexCite)
|
|
584
577
|
print(" ref: ",self.ref)
|
|
@@ -591,20 +584,20 @@ class setupNeutronSkinAverage():
|
|
|
591
584
|
#
|
|
592
585
|
#
|
|
593
586
|
|
|
594
|
-
def gauss( ax,
|
|
595
|
-
if
|
|
596
|
-
|
|
597
|
-
if
|
|
598
|
-
|
|
599
|
-
fac = math.sqrt( 2*math.pi )
|
|
587
|
+
def gauss( ax, rnp, rnp_sig_up, rnp_sig_lo ):
|
|
588
|
+
if rnp_sig_lo is None or rnp_sig_lo == 0 or rnp_sig_lo >= 1000:
|
|
589
|
+
rnp_sig_lo = 0.0001
|
|
590
|
+
if rnp_sig_up is None or rnp_sig_up == 0 or rnp_sig_up >= 1000:
|
|
591
|
+
rnp_sig_up = 0.0001
|
|
592
|
+
fac = math.sqrt( 2.0 * math.pi )
|
|
600
593
|
gauss = []
|
|
601
594
|
for x in ax:
|
|
602
|
-
if x <
|
|
603
|
-
z = ( x -
|
|
604
|
-
norm =
|
|
595
|
+
if x < rnp:
|
|
596
|
+
z = ( x - rnp ) / rnp_sig_lo
|
|
597
|
+
norm = rnp_sig_lo * fac
|
|
605
598
|
else:
|
|
606
|
-
z = ( x -
|
|
607
|
-
norm =
|
|
608
|
-
gauss.append( math.exp( -0.5*z**2 ) / norm )
|
|
599
|
+
z = ( x - rnp ) / rnp_sig_up
|
|
600
|
+
norm = rnp_sig_up * fac
|
|
601
|
+
gauss.append( math.exp( -0.5 * z**2 ) / norm )
|
|
609
602
|
return gauss
|
|
610
603
|
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import sys
|
|
3
1
|
import numpy as np # 1.15.0
|
|
4
2
|
from scipy.interpolate import CubicSpline
|
|
5
3
|
|
|
6
|
-
# nucleardatapy_tk = os.getenv('NUCLEARDATAPY_TK')
|
|
7
|
-
# sys.path.insert(0, nucleardatapy_tk)
|
|
8
|
-
|
|
9
4
|
import nucleardatapy as nuda
|
|
10
5
|
|
|
11
|
-
def
|
|
6
|
+
def rnp_theo_models():
|
|
12
7
|
"""
|
|
13
8
|
Return a the neutron skin values of the models available in this toolkit and print them all on the prompt.
|
|
14
9
|
|
|
@@ -16,29 +11,29 @@ def nskin_theo_models():
|
|
|
16
11
|
:rtype: list[str].
|
|
17
12
|
"""
|
|
18
13
|
#
|
|
19
|
-
if nuda.env.verb: print("\nEnter
|
|
14
|
+
if nuda.env.verb: print("\nEnter rnp_theo_models()")
|
|
20
15
|
#
|
|
21
16
|
models = [ 'Skyrme', 'NLRH', 'DDRH' ]
|
|
22
17
|
#print('Phenomenological models available in the toolkit:',models)
|
|
23
18
|
models_lower = [ item.lower() for item in models ]
|
|
24
19
|
#
|
|
25
|
-
if nuda.env.verb: print("Exit
|
|
20
|
+
if nuda.env.verb: print("Exit rnp_theo_models()")
|
|
26
21
|
#
|
|
27
22
|
return models, models_lower
|
|
28
23
|
|
|
29
|
-
# def
|
|
24
|
+
# def rnp_theo_nucleus():
|
|
30
25
|
# #
|
|
31
|
-
# if nuda.env.verb: print("\nEnter
|
|
26
|
+
# if nuda.env.verb: print("\nEnter rnp_theo_nucleus()")
|
|
32
27
|
# #
|
|
33
28
|
# nucleus = [ '48Ca', '208Pb']
|
|
34
29
|
# nucleus_lower = [ item.lower() for item in nucleus ]
|
|
35
30
|
# #
|
|
36
|
-
# if nuda.env.verb: print("Exit
|
|
31
|
+
# if nuda.env.verb: print("Exit rnp_theo_nucleus()")
|
|
37
32
|
# #
|
|
38
33
|
# return nucleus, nucleus_lower
|
|
39
34
|
#
|
|
40
35
|
|
|
41
|
-
def
|
|
36
|
+
def rnp_theo_params( model ):
|
|
42
37
|
"""
|
|
43
38
|
Return a list with the parameterizations available in
|
|
44
39
|
this toolkit for a given model and print them all on the prompt.
|
|
@@ -58,7 +53,7 @@ def nskin_theo_params( model ):
|
|
|
58
53
|
:rtype: list[str].
|
|
59
54
|
"""
|
|
60
55
|
#
|
|
61
|
-
if nuda.env.verb: print("\nEnter
|
|
56
|
+
if nuda.env.verb: print("\nEnter rnp_theo_params()")
|
|
62
57
|
#
|
|
63
58
|
#print('For model:',model)
|
|
64
59
|
if model.lower() == 'skyrme':
|
|
@@ -77,11 +72,11 @@ def nskin_theo_params( model ):
|
|
|
77
72
|
#print('Parameters available in the toolkit:',params)
|
|
78
73
|
params_lower = [ item.lower() for item in params ]
|
|
79
74
|
#
|
|
80
|
-
if nuda.env.verb: print("Exit
|
|
75
|
+
if nuda.env.verb: print("Exit rnp_theo_params()")
|
|
81
76
|
#
|
|
82
77
|
return params, params_lower
|
|
83
78
|
|
|
84
|
-
class
|
|
79
|
+
class setupRnpTheo():
|
|
85
80
|
"""
|
|
86
81
|
Instantiate the object with results based on phenomenological\
|
|
87
82
|
interactions and choosen by the toolkit practitioner. \
|
|
@@ -110,7 +105,7 @@ class SetupNeutronSkinTheo():
|
|
|
110
105
|
#
|
|
111
106
|
def __init__( self, model = 'Skyrme', param = 'SLY5', nucleus = '208Pb' ):
|
|
112
107
|
#
|
|
113
|
-
if nuda.env.verb: print("\nEnter
|
|
108
|
+
if nuda.env.verb: print("\nEnter setupRnpTheo()")
|
|
114
109
|
#
|
|
115
110
|
#: Attribute model.
|
|
116
111
|
self.model = model
|
|
@@ -126,9 +121,9 @@ class SetupNeutronSkinTheo():
|
|
|
126
121
|
if nuda.env.verb: print("nucleus:",nucleus)
|
|
127
122
|
print("-> nucleus:",nucleus)
|
|
128
123
|
#
|
|
129
|
-
self =
|
|
124
|
+
self = nuda.nuc.setupRnpTheo.init_self( self )
|
|
130
125
|
#
|
|
131
|
-
models, models_lower =
|
|
126
|
+
models, models_lower = rnp_theo_models( )
|
|
132
127
|
#
|
|
133
128
|
if model.lower() not in models_lower:
|
|
134
129
|
print('The model name ',model,' is not in the list of models.')
|
|
@@ -136,7 +131,7 @@ class SetupNeutronSkinTheo():
|
|
|
136
131
|
print('-- Exit the code --')
|
|
137
132
|
exit()
|
|
138
133
|
#
|
|
139
|
-
params, params_lower =
|
|
134
|
+
params, params_lower = rnp_theo_params( model = model )
|
|
140
135
|
#
|
|
141
136
|
if param.lower() not in params_lower:
|
|
142
137
|
print('The param set ',param,' is not in the list of param.')
|
|
@@ -144,7 +139,7 @@ class SetupNeutronSkinTheo():
|
|
|
144
139
|
print('-- Exit the code --')
|
|
145
140
|
exit()
|
|
146
141
|
#
|
|
147
|
-
# nucleus, nucleus_lower =
|
|
142
|
+
# nucleus, nucleus_lower = rnp_theo_nucleus( )
|
|
148
143
|
# #
|
|
149
144
|
# if nucleus.lower() not in nucleus_lower:
|
|
150
145
|
# print('The param set ',nucleus,' is not in the list of param.')
|
|
@@ -154,70 +149,70 @@ class SetupNeutronSkinTheo():
|
|
|
154
149
|
# #
|
|
155
150
|
if model.lower() == 'skyrme':
|
|
156
151
|
#
|
|
157
|
-
file_in1 = os.path.join(nuda.param.path_data,'
|
|
152
|
+
file_in1 = os.path.join(nuda.param.path_data,'Neutrornp/skyrmernp-'+nucleus+'.dat')
|
|
158
153
|
if nuda.env.verb: print('Reads file1:',file_in1)
|
|
159
154
|
name = np.loadtxt( file_in1, usecols=(0), comments='#', unpack = True, dtype=str )
|
|
160
|
-
Rn, Rp,
|
|
155
|
+
Rn, Rp, Rnp = np.loadtxt( file_in1, usecols=(1,2,3), comments='#', unpack = True )
|
|
161
156
|
#: Attribute providing the label the data is references for figures.
|
|
162
157
|
self.label = 'SKY-'+param
|
|
163
158
|
#: Attribute providing additional notes about the data.
|
|
164
159
|
self.note = "write here notes about this EOS."
|
|
165
160
|
#
|
|
166
161
|
if param in name:
|
|
167
|
-
self.
|
|
162
|
+
self.rnp = True
|
|
168
163
|
ind = np.where(name == param )
|
|
169
164
|
self.Rn = Rn[ind][0];
|
|
170
165
|
self.Rp = Rp[ind][0];
|
|
171
|
-
self.
|
|
166
|
+
self.Rnp = Rnp[ind][0];
|
|
172
167
|
else:
|
|
173
|
-
self.
|
|
168
|
+
self.rnp = False
|
|
174
169
|
#
|
|
175
170
|
elif model.lower() == 'nlrh':
|
|
176
171
|
#
|
|
177
|
-
file_in1 = os.path.join(nuda.param.path_data,'
|
|
172
|
+
file_in1 = os.path.join(nuda.param.path_data,'rnp/nlrhrnp-'+nucleus+'.dat')
|
|
178
173
|
if nuda.env.verb: print('Reads file1:',file_in1)
|
|
179
174
|
name = np.loadtxt( file_in1, usecols=(0), comments='#', unpack = True, dtype=str )
|
|
180
|
-
Rn, Rp,
|
|
175
|
+
Rn, Rp, Rnp = np.loadtxt( file_in1, usecols=(1,2,3), comments='#', unpack = True )
|
|
181
176
|
#: Attribute providing the label the data is references for figures.
|
|
182
177
|
self.label = 'NLRH-'+param
|
|
183
178
|
#: Attribute providing additional notes about the data.
|
|
184
179
|
self.note = "write here notes about this EOS."
|
|
185
180
|
#
|
|
186
181
|
if param in name:
|
|
187
|
-
self.
|
|
182
|
+
self.rnp = True
|
|
188
183
|
ind = np.where(name == param )
|
|
189
184
|
self.Rn = Rn[ind][0];
|
|
190
185
|
self.Rp = Rp[ind][0];
|
|
191
|
-
self.
|
|
186
|
+
self.Rnp = Rnp[ind][0];
|
|
192
187
|
else:
|
|
193
|
-
self.
|
|
188
|
+
self.rnp = False
|
|
194
189
|
#
|
|
195
190
|
elif model.lower() == 'ddrh':
|
|
196
191
|
#
|
|
197
|
-
file_in1 = os.path.join(nuda.param.path_data,'
|
|
192
|
+
file_in1 = os.path.join(nuda.param.path_data,'rnp/ddrhrnp-'+nucleus+'.dat')
|
|
198
193
|
if nuda.env.verb: print('Reads file1:',file_in1)
|
|
199
194
|
name = np.loadtxt( file_in1, usecols=(0), comments='#', unpack = True, dtype=str )
|
|
200
|
-
Rn, Rp,
|
|
195
|
+
Rn, Rp, Rnp = np.loadtxt( file_in1, usecols=(1,2,3), comments='#', unpack = True )
|
|
201
196
|
#: Attribute providing the label the data is references for figures.
|
|
202
197
|
self.label = 'DDRH-'+param
|
|
203
198
|
#: Attribute providing additional notes about the data.
|
|
204
199
|
self.note = "write here notes about this EOS."
|
|
205
200
|
#
|
|
206
201
|
if param in name:
|
|
207
|
-
self.
|
|
202
|
+
self.rnp = True
|
|
208
203
|
ind = np.where(name == param )
|
|
209
204
|
self.Rn = Rn[ind][0];
|
|
210
205
|
self.Rp = Rp[ind][0];
|
|
211
|
-
self.
|
|
206
|
+
self.Rnp = Rnp[ind][0];
|
|
212
207
|
else:
|
|
213
|
-
self.
|
|
208
|
+
self.rnp = False
|
|
214
209
|
#
|
|
215
210
|
#
|
|
216
211
|
self.Rn_unit = 'fm'
|
|
217
212
|
self.Rp_unit = 'fm'
|
|
218
|
-
self.
|
|
213
|
+
self.Rnp_unit = 'fm'
|
|
219
214
|
#
|
|
220
|
-
if nuda.env.verb: print("Exit
|
|
215
|
+
if nuda.env.verb: print("Exit setupRnpTheo()")
|
|
221
216
|
#
|
|
222
217
|
def print_outputs( self ):
|
|
223
218
|
"""
|
|
@@ -234,7 +229,7 @@ class SetupNeutronSkinTheo():
|
|
|
234
229
|
#
|
|
235
230
|
print(f" Rn: {np.round(self.Rn,4)} in {self.Rn_unit}")
|
|
236
231
|
print(f" Rp: {np.round(self.Rn,4)} in {self.Rp_unit}")
|
|
237
|
-
print(f"
|
|
232
|
+
print(f" Rnp: {np.round(self.Rnp,4)} in {self.Rnp_unit}")
|
|
238
233
|
#
|
|
239
234
|
if nuda.env.verb: print("Exit print_outputs()")
|
|
240
235
|
#
|
|
@@ -250,7 +245,7 @@ class SetupNeutronSkinTheo():
|
|
|
250
245
|
#: Attribute the symmetric matter density.
|
|
251
246
|
self.Rp = []
|
|
252
247
|
#: Attribute the neutron matter neutron Fermi momentum.
|
|
253
|
-
self.
|
|
248
|
+
self.Rnp = []
|
|
254
249
|
#: Attribute the plot linestyle.
|
|
255
250
|
self.linestyle = None
|
|
256
251
|
#: Attribute the plot marker.
|