Nuclear spectrum benchmarking

This commit is contained in:
Nuwan Yapa 2025-02-03 20:31:37 -05:00
parent edc9c1537a
commit 3f1c8803bb
2 changed files with 55 additions and 3 deletions

39
test/Pb208Spectrum.csv Normal file
View File

@ -0,0 +1,39 @@
proton,kappa,filling,gnodes,fnodes,Ebind
0,-1,1,0,0,63.80958
0,-2,1,0,0,57.09607
0,1,1,0,1,56.51421
0,-3,1,0,0,48.96921
0,2,1,0,1,47.53564
0,-1,1,1,1,44.05962
0,-4,1,0,0,39.82046
0,3,1,0,1,37.11666
0,-2,1,1,1,32.52852
0,1,1,1,2,31.35759
0,-5,1,0,0,30.03271
0,4,1,0,1,25.74641
0,-3,1,1,1,21.54695
0,-6,1,0,0,19.94124
0,2,1,1,2,19.70747
0,-1,1,2,2,19.05405
0,5,1,0,1,13.96937
0,-4,1,1,1,11.33989
0,-7,1,0,0,9.84013
0,3,1,1,2,9.04831
0,-2,1,2,2,8.57808
0,1,1,2,3,7.67567
1,-1,1,0,0,50.48167
1,-2,1,0,0,44.63156
1,1,1,0,1,43.88757
1,-3,1,0,0,37.28703
1,2,1,0,1,35.553
1,-1,1,1,1,31.53505
1,-4,1,0,0,28.92962
1,3,1,0,1,25.80862
1,-2,1,1,1,21.04461
1,-5,1,0,0,19.94885
1,1,1,1,2,19.8522
1,4,1,0,1,15.19352
1,-3,1,1,1,11.01997
1,-6,1,0,0,10.64656
1,2,1,1,2,9.22511
1,-1,1,2,2,8.31272
1 proton kappa filling gnodes fnodes Ebind
2 0 -1 1 0 0 63.80958
3 0 -2 1 0 0 57.09607
4 0 1 1 0 1 56.51421
5 0 -3 1 0 0 48.96921
6 0 2 1 0 1 47.53564
7 0 -1 1 1 1 44.05962
8 0 -4 1 0 0 39.82046
9 0 3 1 0 1 37.11666
10 0 -2 1 1 1 32.52852
11 0 1 1 1 2 31.35759
12 0 -5 1 0 0 30.03271
13 0 4 1 0 1 25.74641
14 0 -3 1 1 1 21.54695
15 0 -6 1 0 0 19.94124
16 0 2 1 1 2 19.70747
17 0 -1 1 2 2 19.05405
18 0 5 1 0 1 13.96937
19 0 -4 1 1 1 11.33989
20 0 -7 1 0 0 9.84013
21 0 3 1 1 2 9.04831
22 0 -2 1 2 2 8.57808
23 0 1 1 2 3 7.67567
24 1 -1 1 0 0 50.48167
25 1 -2 1 0 0 44.63156
26 1 1 1 0 1 43.88757
27 1 -3 1 0 0 37.28703
28 1 2 1 0 1 35.553
29 1 -1 1 1 1 31.53505
30 1 -4 1 0 0 28.92962
31 1 3 1 0 1 25.80862
32 1 -2 1 1 1 21.04461
33 1 -5 1 0 0 19.94885
34 1 1 1 1 2 19.8522
35 1 4 1 0 1 15.19352
36 1 -3 1 1 1 11.01997
37 1 -6 1 0 0 10.64656
38 1 2 1 1 2 9.22511
39 1 -1 1 2 2 8.31272

View File

@ -22,9 +22,22 @@ E_min = 880
E_max = 939
κs, Es = findAllOrbitals(p, S_interp, V_interp, R_interp, A_interp, r_max, E_min, E_max)
Ebinds = (p ? M_p : M_n) .- Es
occ = fillNucleons(N, κs, Es)
scatter(κs, Es, label=(p ? "proton" : "neutron") * " spectrum")
annotate!(κs .+ 0.3, Es, occ)
# format: proton, kappa, filling, gnodes, fnodes, Ebind
bench_data, _ = readdlm("test/Pb208Spectrum.csv", ','; header=true)
mask = findall(bench_data[:, 1] .== Int(p))
bench_κs = bench_data[mask, 2]
bench_Ebinds = bench_data[mask, 6]
bench_filling = bench_data[mask, 3]
bench_occ = Int.(bench_filling .* (2 .* j_κ.(Int.(bench_κs)) .+ 1))
scatter(κs, Ebinds, label=(p ? "proton" : "neutron") * " spectrum")
annotate!(κs .+ 0.3, Ebinds .+ 1, [(o, 9) for o in occ])
scatter!(bench_κs, bench_Ebinds, label="benchmark"; markershape=:cross, markercolor="red")
annotate!(bench_κs .+ 0.3, bench_Ebinds .- 1, [(o, 9, :red) for o in bench_occ])
xlabel!("κ")
ylabel!("E (MeV)")